1 2011-09-06 Arnaud Charlet <charlet@adacore.com>
3 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
6 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
8 * s-finmas.adb (Set_Finalize_Address): Explain the reason
9 for the synchronization. Move the test for null from
10 s-stposu.Allocate_Any_Controlled to this routine since the check
11 needs to be protected too.
12 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
14 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
15 explaining the context in which this routine is used.
16 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
17 to s-finmas.Set_Finalize_Address.
19 2011-09-05 Ed Schonberg <schonberg@adacore.com>
21 * einfo.ads: Document that itypes have no parent field.
23 2011-09-05 Robert Dewar <dewar@adacore.com>
25 * rtsfind.adb (Check_CRT): Check for overloaded entity
26 * rtsfind.ads: Document that entities to be found by rtsfind
28 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
29 (Lock_Entries_With_Status): New name for Lock_Entries with two
30 arguments (changed to meet rtsfind no overloading rule).
32 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
34 * s-finmas.adb (Set_Finalize_Address (Address,
35 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
36 (Set_Finalize_Address (in out Finalization_Master,
37 Finalize_Address_Ptr): Add synchronization code.
38 * s-finmas.ads (Set_Finalize_Address (Address,
39 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
40 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
41 Set_Finalize_Address for the heterogeneous case.
43 2011-09-05 Ed Schonberg <schonberg@adacore.com>
45 * sem_ch3.adb: Undo previous change, not suitable after all.
47 2011-09-05 Robert Dewar <dewar@adacore.com>
49 * einfo.ads: Minor comment clarification.
51 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
53 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
54 no longer needs to search through the entities of the return
55 statement scope to find the _chain.
56 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
57 (Analyze_Block_Statement): Add local variable
58 Is_BIP_Return_Statement. Add machinery to install all entities
59 produced by the expansion of the return object declaration.
60 (Install_Return_Entities): New routine.
61 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
63 2011-09-05 Ed Schonberg <schonberg@adacore.com>
65 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
66 of subunit is incomplete.
67 (Analyze_Proper_Body): If parent spec is not available, do not
70 2011-09-05 Ed Schonberg <schonberg@adacore.com>
72 * sem_disp.adb (Find_Controlling_Arg): Add checks for
73 interface type conversions, that are expanded into dereferences.
75 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
77 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
78 Examine the parameter and return profile of a subprogram and swap
79 any incomplete types coming from a limited context with their
80 corresponding non-limited views.
81 (Exchange_Limited_Views): New routine.
83 2011-09-05 Ed Schonberg <schonberg@adacore.com>
85 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
86 of internal entity to the subtype declaration, so that when
87 entities are subsequently exchanged in a package body, the tree
88 remains properly formatted for ASIS.
90 2011-09-05 Johannes Kanig <kanig@adacore.com>
92 * g-comlin.adb (Set_Usage): Additional optional argument to set help
94 (Display_Help): display the user given help message, if available.
96 2011-09-05 Ed Schonberg <schonberg@adacore.com>
98 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
99 is legal if the original node is an identifier that is a
100 parameterless function call.
102 2011-09-05 Pascal Obry <obry@adacore.com>
104 * prj-nmsc.adb: Minor reformatting.
105 Add support for standalone aggregate library.
106 (Check_Stand_Alone_Library): Handle standalone aggregate library.
107 * projects.texi: Fix documentation for aggregate library projects.
109 2011-09-05 Robert Dewar <dewar@adacore.com>
111 * sem_ch6.adb: Minor reformatting.
113 2011-09-05 Matthew Gingell <gingell@adacore.com>
115 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
116 stack guard page on PPC Linux. This patch ensures the 64K guard page at
117 the bottom of the stack is not overwritten.
119 2011-09-05 Thomas Quinot <quinot@adacore.com>
121 * exp_intr.adb, s-tasini.adb: Minor reformatting.
123 2011-09-05 Ed Schonberg <schonberg@adacore.com>
125 * sem_ch3.adb (Access_Definition): If an access type declaration
126 appears in a child unit, the scope of whatever anonymous type
127 may be generated is the child unit itself.
129 2011-09-05 Ed Schonberg <schonberg@adacore.com>
131 * sem_ch6.adb (Analyze_Expression_Function): Do not set
132 Comes_From_Source on rewritten body.
133 (Analyze_Subprogram_Body_Helper): Check that the original node for
134 the body comes from source, when determining whether expansion
135 of a protected operation is needed.
137 2011-09-05 Ed Schonberg <schonberg@adacore.com>
139 * exp_aggr.adb (Replace_Type): If the target of the assignment is
140 a selected component and the right-hand side is a self-referential
141 access, the proper prefix of the rewritten attribute is a copy
142 of the left-hand side, not of its prefix.
144 2011-09-05 Robert Dewar <dewar@adacore.com>
146 * sem_ch5.adb: Minor reformatting.
147 * sem_ch3.adb: Minor code clean up.
149 2011-09-05 Jose Ruiz <ruiz@adacore.com>
151 * exp_ch9.adb (Make_Initialize_Protection): The fact that
152 restriction No_Dynamic_Attachment is in effect or not should
153 not influence the default priority associated to a protected
154 object. With this change, when the restriction is in effect (as
155 is the case for the Ravenscar profile) the default priority of
156 a protected object with an interrupt handler is in the range of
157 interrupt priorities (Default_Interrupt_Priority) as required
160 2011-09-05 Arnaud Charlet <charlet@adacore.com>
162 * a-iteint.ads: Fix header.
164 2011-09-05 Vincent Celier <celier@adacore.com>
166 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
167 with a directory separator to avoid output such as:
168 "/path/to/objauto.cgpr" has been deleted.
170 2011-09-05 Robert Dewar <dewar@adacore.com>
172 * sem_ch3.adb: Minor reformatting.
174 2011-09-05 Ed Schonberg <schonberg@adacore.com>
176 * sem_ch5.adb: Better error message.
178 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
180 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
181 (Expand_Array_Aggregate): Detect a special case of an aggregate
182 which contains tasks in the context of an unexpanded return
183 statement of a build-in-place function.
184 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
185 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
186 which contains tasks and expand it now that the original simple
187 return statement has been rewritten.
188 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
189 reformatting. Do not create a chain for an extended return
190 statement if one is already available.
191 (Has_Activation_Chain): New routine.
193 2011-09-05 Marc Sango <sango@adacore.com>
195 * sem_ch3.adb (Analyze_Object_Declaration): Remove
196 the wrong test and add the correct test to detect the violation
197 of illegal use of unconstrained string type in SPARK mode.
199 2011-09-05 Ed Schonberg <schonberg@adacore.com>
201 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
202 message on an iterator over an array.
204 2011-09-05 Robert Dewar <dewar@adacore.com>
206 * lib-xref-alfa.adb: Minor reformatting.
208 2011-09-05 Robert Dewar <dewar@adacore.com>
210 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
211 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
213 2011-09-05 Gary Dismukes <dismukes@adacore.com>
215 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
217 2011-09-05 Johannes Kanig <kanig@adacore.com>
219 * lib-xref-alfa.adb: Update comments.
221 2011-09-05 Thomas Quinot <quinot@adacore.com>
223 * sem_res.adb: Minor reformatting
225 2011-09-05 Ed Schonberg <schonberg@adacore.com>
227 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
228 present, create them now. Needed in case the return type was
229 a limited view in the function declaration.
230 (Make_Build_In_Place_Call_In_Allocator): If return type contains
231 tasks, build the activation chain for it. Pass a reference to
232 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
233 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
234 with build_in_place calls.
235 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
236 incomplete, inatialize its Corresponding_Record_Type component.
237 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
240 2011-09-05 Johannes Kanig <kanig@adacore.com>
242 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
245 2011-09-05 Ed Schonberg <schonberg@adacore.com>
247 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
248 appears within a package specification and the token after "IS"
249 is not a parenthesis, assume that this is an unparenthesized
250 expression function, even if the token appears in a line by
252 * par.adb: Clarify use of Labl field of scope stack in error
255 2011-09-05 Bob Duff <duff@adacore.com>
257 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
258 conversions instead of normal type conversions in all cases where a
259 type conversion would be illegal. In particular, use unchecked
260 conversions when the operand types are private.
262 2011-09-05 Johannes Kanig <kanig@adacore.com>
264 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
265 objects of task type or protected type.
267 2011-09-05 Ed Schonberg <schonberg@adacore.com>
269 * sem_ch6.adb (Analyze_Expression_Function): If the expression
270 function comes from source, indicate that so does its rewriting,
271 so it is compatible with any subsequent expansion of the
272 subprogram body (e.g. when it is a protected operation).
273 * sem_ch4.adb: minor reformatting
275 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
277 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
278 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
279 may lead to wrong ancestor package in the case of instantiated subunit
280 bodies. If a subunit is instantiated, follow the chain of instantiations
281 rather than the stub structure.
283 2011-09-02 Robert Dewar <dewar@adacore.com>
285 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
286 * gcc-interface/Make-lang.in: Update dependencies.
288 2011-09-02 Marc Sango <sango@adacore.com>
290 * sem_ch3.adb (Analyze_Object_Declaration): Change
291 comment and add additional check to differentiate constant of
292 type string from others unconstrained type.
294 2011-09-02 Ed Schonberg <schonberg@adacore.com>
296 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
297 present in incomplete type declarations to refine the error
298 message the full declaration is in the same unit.
299 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
300 an incomplete type, set the Premature_Use for additional message.
301 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
302 and Premature_Use is set, place additional information at the
303 point of premature use.
305 2011-09-02 Bob Duff <duff@adacore.com>
307 * sem_ch6.adb: (Check_Post_State): Suppress warning
308 "postcondition refers only to pre-state" when the expression has not
309 yet been analyzed, because it causes false alarms. This can happen when
310 the postcondition contains a quantified expression, because those are
311 analyzed later. This is a temporary/partial fix.
312 (Process_Post_Conditions): Minor: change wording of warning.
314 2011-09-02 Marc Sango <sango@adacore.com>
316 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
317 illegal use of unconstrained string type in SPARK mode.
318 * sem_res.adb (Analyze_Operator_Symbol): Set the
319 right place where the string operand of concatenation should be
320 violate in SPARK mode.
322 2011-09-02 Robert Dewar <dewar@adacore.com>
324 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
325 exp_ch3.adb: Minor reformatting.
327 2011-09-02 Vincent Celier <celier@adacore.com>
329 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
330 as the compiler driver so Is_Compilable returns True for sources.
331 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
334 2011-09-02 Ed Schonberg <schonberg@adacore.com>
336 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
337 condition, a reference to a controlling formal must be interpreted
338 as having the class-wide type (or an access to such) so that the
339 inherited condition can be properly applied to any overriding
340 operation (see ARM12 6.6.1 (7)).
342 2011-09-02 Tristan Gingold <gingold@adacore.com>
344 * init.c (__gnat_is_vms_v7): Fix case and add prototype
347 2011-09-02 Javier Miranda <miranda@adacore.com>
349 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
350 initializing expression of a class-wide interface object declaration
351 if its type is limited.
353 2011-09-02 Johannes Kanig <kanig@adacore.com>
355 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
356 literals, take into account the type name; the type is *not*
357 the scope for an enumeration literal.
359 2011-09-02 Ed Schonberg <schonberg@adacore.com>
361 * sem_ch6.adb (Check_Overriding_Indicator): add special check
362 to reject an overriding indicator on a user-defined Adjust
363 subprogram for a limited controlled type.
365 2011-09-02 Ed Schonberg <schonberg@adacore.com>
367 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
368 for an actual that is a function call returning an unconstrained
369 limited controlled type.
371 2011-09-02 Tristan Gingold <gingold@adacore.com>
373 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
375 2011-09-02 Johannes Kanig <kanig@adacore.com>
377 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
378 from "HEAP" to __HEAP Change comment that refers to that variable
379 * put_alfa.adb: Change comment that refers to that variable
381 2011-09-02 Robert Dewar <dewar@adacore.com>
383 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
385 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
387 * exp_util.adb (Extract_Renamed_Object): Renamed to
388 Find_Renamed_Object. This routine has been reimplemented and now uses
389 tree traversal to locate a renamed object.
390 (Is_Aliased): Replace call to Extract_Renamed_Object with
393 2011-09-02 Tristan Gingold <gingold@adacore.com>
395 * init.c: (__gnat_is_vms_v7): New function.
397 2011-09-02 Olivier Hainque <hainque@adacore.com>
399 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
400 that have a misaligned backchain, necessarily bogus.
402 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
404 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
405 TSS routine Finalize_Address when compiling in Alfa mode.
406 (Expand_Freeze_Record_Type): Do not create TSS routine
407 Finalize_Address when compiling in Alfa mode.
408 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
409 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
411 (Expand_N_Allocator): Do not produce a call to
412 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
413 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
414 produce a call to primitive Set_Finalize_Address in Alfa mode because
415 Finalize_Address is not built.
416 * exp_ch7.adb (Build_Finalization_Master): Do not create
417 finalization masters in Afa mode since they are not needed.
418 (Build_Finalizer): Do not create scope and library-level
419 finalizers in Alfa mode since they are not needed.
420 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
421 "new" and "free" when applied to controlled objects in Alfa mode since
424 2011-09-02 Vincent Celier <celier@adacore.com>
426 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
427 only library names with the syntax of Ada identifiers, to avoid errors
428 when compiling the binder generated files.
429 * projects.texi: Document restriction on SAL library names
431 2011-09-02 Thomas Quinot <quinot@adacore.com>
433 * a-chtgbo.adb: Minor comment fix.
435 2011-09-02 Robert Dewar <dewar@adacore.com>
437 * lib-xref.adb: Minor reformatting
439 2011-09-02 Vincent Celier <celier@adacore.com>
441 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
442 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
443 --version and --help in usage.
444 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
446 2011-09-02 Bob Duff <duff@adacore.com>
448 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
449 compilers don't understand it.
451 2011-09-02 Gary Dismukes <dismukes@adacore.com>
453 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
454 underlying subtype rather than its base type on the call to
455 Build_Record_Or_Elementary_Input_Function, so that any
456 constraints on a discriminated subtype will be available for
457 doing the check required by AI05-0192.
458 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
459 If the prefix subtype of the 'Input attribute is a constrained
460 discriminated subtype, then check each constrained discriminant value
461 against the corresponding value read from the stream.
463 2011-09-02 Yannick Moy <moy@adacore.com>
465 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
466 warnings on suspicious contracts, and enable them with -gnatwa.
468 2011-09-02 Robert Dewar <dewar@adacore.com>
470 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
473 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
475 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
476 which ensure that restriction No_Dynamic_Attachment has not been
478 (Make_Initialize_Protection): Protected types with attach or
479 interrupt handlers must not violate restriction No_Dynamic_Attachment.
480 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
481 which ensures that restriction No_Dynamic_Attachment has not been
483 * sem_attr.adb: (Eval_Attribute): Transform
484 VAX_Float_Type'First and 'Last into references to
485 the temporaries which store the corresponding bounds. The
486 transformation is needed since the back end cannot evaluate
487 'First and 'Last on VAX.
488 (Is_VAX_Float): New routine.
490 2011-09-02 Ed Schonberg <schonberg@adacore.com>
492 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
493 generic unit is not intrinsic and has an explicit convention,
494 the instance inherits it.
496 2011-09-02 Robert Dewar <dewar@adacore.com>
498 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
499 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
501 2011-09-02 Thomas Quinot <quinot@adacore.com>
503 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
504 Guard against a prefix that is an N_Has_Entity but has no
507 2011-09-02 Yannick Moy <moy@adacore.com>
509 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
512 2011-09-02 Yannick Moy <moy@adacore.com>
514 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
515 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
517 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
518 procedure looking for suspicious postconditions.
519 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
520 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
521 options -gnatw.t and -gnatw.T.
523 2011-09-02 Pascal Obry <obry@adacore.com>
525 * prj.adb: Minor code refactoring. Move check for null project in
527 * projects.texi: Fix minor typos.
529 2011-09-02 Ed Schonberg <schonberg@adacore.com>
531 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
532 of iteration is an expression, its value must be captured in a
533 renaming declaration, so that modification of the elements is
534 propagated to the original container.
536 2011-09-02 Pascal Obry <obry@adacore.com>
538 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
539 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
540 prj-tree.adb: Minor reformatting and style fixes.
542 2011-09-02 Robert Dewar <dewar@adacore.com>
544 * s-rident.ads: Add new restriction No_Implicit_Aliasing
545 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
547 (Analyze_Attribute, case Address): ditto
548 (Analyze_Attribute, case Unrestricted_Access): ditto
549 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
550 No_Implicit_Aliasing restriction.
551 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
553 2011-09-02 Ed Schonberg <schonberg@adacore.com>
555 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
556 is an unchecked conversion, apply test to its expression.
558 2011-09-02 Javier Miranda <miranda@adacore.com>
560 * sem_ch3.adb (Check_Abstract_Overriding): When
561 traversing the chain of aliased subprograms avoid reporting a
562 redundant error on the current entity.
564 2011-09-02 Sergey Rybin <rybin@adacore.com>
566 * gnat_ugn.texi: Minor clean up.
568 2011-09-02 Bob Duff <duff@adacore.com>
570 * s-htable.adb (Set_If_Not_Present): Use renaming
571 instead of ":=", because the type Key is limited in the generic (even
572 if not in the instances).
574 2011-09-02 Robert Dewar <dewar@adacore.com>
576 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
577 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
580 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
582 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
583 inherited component with the enclosing derived type. Code reformatting.
585 2011-09-02 Gary Dismukes <dismukes@adacore.com>
587 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
588 return done when overflow checks are enabled, since comparisons against
589 Lor and Hir should not be done when OK1 is False.
591 2011-09-02 Gary Dismukes <dismukes@adacore.com>
593 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
594 Add new formal Master_Exp. When present, add that expression to the
595 call as an extra actual.
596 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
597 Fmaster_Actual and in the case of a BIP call initializing a return
598 object of an enclosing BIP function set it to a
599 new reference to the implicit finalization master
600 formal of the enclosing function. Fmaster_Actual is
601 then passed to the new formal Master_Exp on the call to
602 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
603 initializations of Enclosing_Func to its declaration.
605 2011-09-02 Thomas Quinot <quinot@adacore.com>
607 * csets.ads: Minor reformatting
609 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
611 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
612 the full view of a private type coming from an instantiation.
613 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
614 loop to iterate over the declarations rather than use the
615 First_Entity / Next_Entity scheme.
617 2011-09-02 Ed Schonberg <schonberg@adacore.com>
619 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
620 X'range (N) into X'First (N) .. X'Last (N), do not share the
621 dimension indicator N, if present. Even though it is a static
622 constant, its source location may be modified when printing
623 expanded code under -gnatDL, and node sharing will lead to chaos
624 in Sprint on large files, by generating a sloc value that does
625 not correspond to any source file.
627 2011-09-02 Bob Duff <duff@adacore.com>
629 * einfo.adb: (Has_Xref_Entry): Do not call
630 Implementation_Base_Type. Lib.Xref has been
631 rewritten to avoid the need for it, and it was costly.
632 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
633 functions in support of efficient xref.
634 * lib-xref-alfa.adb: Misc changes related to Key component of
636 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
637 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
638 no longer does. This is the one place where it is needed.
640 2011-09-02 Johannes Kanig <kanig@adacore.com>
642 * g-comlin.adb (Getopt): New optional argument Concatenate to have
643 similar interface as the other Getopt function.
645 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
647 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
648 a call to Set_Finalize_Address if there is no allocator available.
649 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
650 a case of allocator expansion where the allocator is not expanded but
651 needs a custom allocate routine. Code reformatting.
652 (Is_Finalizable_Transient): Remove local variables Has_Rens and
653 Ren_Obj. Code reformatting.
654 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
655 through the use of 'reference.
656 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
657 as part of build-in-place expansion. They are intentionally marked as
658 coming from source, but their parents are not.
660 2011-09-02 Ed Schonberg <schonberg@adacore.com>
662 * sem_ch10.adb (Analyze_With_Clause): If the library unit
663 is the generated subprogram declaration for a child unit body
664 that acts as spec, use the original body in the with_clause,
665 to prevent binding errors.
667 2011-09-02 Vincent Celier <celier@adacore.com>
669 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
670 qualifier /MULTI_UNIT_INDEX=
672 2011-09-02 Johannes Kanig <kanig@adacore.com>
674 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
675 instead of calling the callback function
677 2011-09-02 Robert Dewar <dewar@adacore.com>
679 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
680 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
682 2011-09-02 Vincent Celier <celier@adacore.com>
684 * prj-nmsc.adb: (Find_Sources): When the list of sources is
685 explicitly declared in an extending project, do not warn if a source
686 for an inherited naming exception is not found.
688 2011-09-02 Gary Dismukes <dismukes@adacore.com>
690 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
691 expansion is inactive.
693 2011-09-02 Ed Schonberg <schonberg@adacore.com>
695 * sem_util.adb (Note_Possible_Modification): If the entity
696 being modified is the renaming generated for an Ada2012 iterator
697 element, the enclosing container or array is modified as well.
699 2011-09-02 Jose Ruiz <ruiz@adacore.com>
701 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
702 Initialize): Define and initialize the
703 mutex attributes and condition variable attributes locally.
705 2011-09-02 Vincent Celier <celier@adacore.com>
707 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
708 exception replaced in an extending project.
709 (Check_Object): No error when the other source is locally removed.
711 2011-09-02 Yannick Moy <moy@adacore.com>
713 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
716 2011-08-31 Arnaud Charlet <charlet@adacore.com>
718 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
720 * gcc-interface/Make-lang.in: Update dependencies.
722 2011-09-01 Robert Dewar <dewar@adacore.com>
724 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
726 2011-09-01 Jose Ruiz <ruiz@adacore.com>
728 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
729 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
730 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
731 specific for systems where their glibc version does not define the
732 routines to handle dynamically allocated CPU sets.
734 2011-09-01 Vincent Celier <celier@adacore.com>
736 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
737 prj-env.adb: Implement inheritance of naming exceptions in extending
740 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
742 * gnatls.adb: Display simple message instead of content of
745 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
747 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
748 access discriminant and anonymous access component scopes.
749 (Inherit_Component): Reuse the itype of an access discriminant
750 or anonymous access component by copying it in order to set the proper
751 scope. This is done only when the parent and the derived type
752 are in different scopes.
753 (Set_Anonymous_Etype): New routine.
755 2011-09-01 Robert Dewar <dewar@adacore.com>
757 * a-convec.adb: Minor reformatting throughout.
759 2011-09-01 Jose Ruiz <ruiz@adacore.com>
761 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
762 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
763 CPU_ALLOC_SIZE and CPU_FREE linux macros.
764 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
765 CPU_SET_S respectively because we are now using dynamically allocated
766 CPU sets which are more portable across different glibc versions.
767 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
768 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
769 masks dynamically according to the number of processors in the target
771 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
772 respectively, so we need to pass the size of the masks as
774 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
775 created cpu_set_t masks
776 with the number of processors available in the target platform,
777 instead of static bit arrays. It enhances portability because
778 it uses the information from the target platform.
779 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
780 are using a restricted run-time library, use the flag
781 Configurable_Run_Time_Mode instead of Restricted_Profile.
783 2011-09-01 Vincent Celier <celier@adacore.com>
785 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
786 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
788 2011-09-01 Nicolas Roche <roche@adacore.com>
790 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
791 on VxWorks in kernel mode.
793 2011-09-01 Jose Ruiz <ruiz@adacore.com>
795 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
796 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
797 directly the bit array.
798 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
799 the linux macros with the same name.
800 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
801 wrappers around the CPU_ZERO and CPU_SET linux macros.
803 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
805 * exp_ch7.adb (Find_Insertion_List): Removed.
806 (Process_Transient_Objects): Insert the declarations of the hook
807 access type and the hook object before the associated transient object.
809 2011-09-01 Jose Ruiz <ruiz@adacore.com>
811 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
812 package System.Aux_Dec when using restricted run-time libraries which
813 do not have this package.
815 2011-09-01 Tristan Gingold <gingold@adacore.com>
817 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
819 2011-09-01 Bob Duff <duff@adacore.com>
821 * sem_attr.adb (Analyze_Access_Attribute): Do not call
822 Kill_Current_Values for P'Unrestricted_Access, where P is library level
824 2011-09-01 Thomas Quinot <quinot@adacore.com>
826 * exp_ch5.adb: Minor reformatting
827 * gnat_ugn.texi: Fix minor typos.
828 * gcc-interface/Make-lang.in: Update dependencies.
830 2011-09-01 Robert Dewar <dewar@adacore.com>
832 * inline.adb, sem_aggr.adb: Minor reformatting.
834 2011-09-01 Ed Schonberg <schonberg@adacore.com>
836 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
838 2011-09-01 Robert Dewar <dewar@adacore.com>
840 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
842 2011-09-01 Bob Duff <duff@adacore.com>
844 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
845 body" the same as "in inlined body", because visibility shouldn't
848 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
850 * inline.adb (Add_Inlined_Body): Refine previous change.
852 2011-09-01 Gary Dismukes <dismukes@adacore.com>
854 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
855 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
856 Test for case where call
857 initializes an object of a return statement before testing for
858 a constrained call, to ensure that all such cases get handled
859 by simply passing on the caller's parameters. Also, in that
860 case call Needs_BIP_Alloc_Form to determine whether to pass on
861 the BIP_Alloc_Form parameter of the enclosing function rather
862 than testing Is_Constrained. Add similar tests for the return
863 of a BIP call to later processing to ensure consistent handling.
864 (Needs_BIP_Alloc_Form): New utility function.
865 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
866 a BIP_Alloc_Form formal with call to new utility function
867 Needs_BIP_Alloc_Form.
869 2011-09-01 Pascal Obry <obry@adacore.com>
871 * prj-part.adb: Minor reformatting.
873 2011-09-01 Vincent Celier <celier@adacore.com>
875 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
876 half character in the unit name.
878 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
880 * exp_ch4.adb: Minor code and comment reformatting.
882 2011-09-01 Thomas Quinot <quinot@adacore.com>
884 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
885 for Is_Limited_Type and Is_Tagged_Type in condition checking
886 for by-reference type.
887 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
888 subprograms may have a completion because of a previous
889 Inline_Always clause, but the enclosing package must be marked
890 inlined for the subprogram body to become visible to the backend.
892 2011-09-01 Thomas Quinot <quinot@adacore.com>
894 * sem_aux.adb, exp_ch4.adb: Minor reformatting
896 2011-09-01 Pascal Obry <obry@adacore.com>
898 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
900 2011-09-01 Ed Schonberg <schonberg@adacore.com>
902 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
903 the formals of a subprogram stub that acts as a spec.
905 2011-09-01 Ed Schonberg <schonberg@adacore.com>
907 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
908 type, declare a renaming for it, not an object declaration.
910 2011-09-01 Yannick Moy <moy@adacore.com>
912 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
913 Ignore_Errors to ignore failures to read ALI files when True.
915 2011-09-01 Javier Miranda <miranda@adacore.com>
917 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
918 constructor calls associated with non-tagged record types.
920 2011-09-01 Robert Dewar <dewar@adacore.com>
922 * g-socthi-vms.adb: Minor reformatting.
924 2011-09-01 Nicolas Roche <roche@adacore.com>
926 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
927 in order to avoid impact of imcompatible changes.
928 * cstreams.c: Likewise
932 2011-09-01 Yannick Moy <moy@adacore.com>
934 * lib-writ.adb (Write_With_Lines): Always output complete information
935 on "with" line in Alfa mode, as this is required by formal verification
938 2011-09-01 Tristan Gingold <gingold@adacore.com>
940 * g-socthi-vms.adb: Add comments.
942 2011-09-01 Pascal Obry <obry@adacore.com>
944 * prj.ads: Minor reformatting.
946 2011-09-01 Vincent Celier <celier@adacore.com>
948 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
949 exceptions in the config pragmas file.
951 2011-09-01 Tristan Gingold <gingold@adacore.com>
953 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
955 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
957 * exp_ch7.adb (Find_Insertion_List): New routine.
958 (Process_Transient_Objects): Add code to handle the abnormal
959 finalization of a controlled transient associated with a subprogram
960 call. Since transients are cleaned up right after the associated
961 context, an exception raised during a subprogram call may bypass the
964 2011-09-01 Robert Dewar <dewar@adacore.com>
966 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
969 2011-09-01 Robert Dewar <dewar@adacore.com>
971 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
973 2011-09-01 Robert Dewar <dewar@adacore.com>
975 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
977 2011-09-01 Thomas Quinot <quinot@adacore.com>
979 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
980 GNATRTL_NONTASKING_OBJS.
982 2011-09-01 Robert Dewar <dewar@adacore.com>
984 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
985 possibility of this flag being set for formals in Ada 2012 mode.
986 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
988 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
990 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
992 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
995 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
997 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
998 insertion node in a tree of nested Expression_With_Actions nodes.
999 (Process_Transient_Object): In the case where a complex if statement
1000 has been converted into nested Expression_With_Actions nodes, the
1001 "hook" object and the associated access type must be inserted before
1002 the top most Expression_With_Actions.
1004 2011-09-01 Robert Dewar <dewar@adacore.com>
1006 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
1007 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
1009 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1011 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
1013 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1015 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
1017 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
1018 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
1019 in a similar way as we do for the Priority or Dispatching_Domain aspect.
1020 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
1021 Dispatching_Domains_Frozen): Move this local data to package
1022 System.Tasking because with the CPU aspect we need to have access
1023 to this data when creating the task in System.Tasking.Stages.Create_Task
1024 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
1025 Move these variables from the body of
1026 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
1027 we need to have access to this data when creating the task in
1028 System.Tasking.Stages.Create_Task.
1029 * s-taskin.adb (Initialize): Signal the allocation of the environment
1030 task to a CPU, if any, so that we know whether the CPU can be
1031 transferred to a different dispatching domain.
1032 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
1033 is being allocated belongs to the dispatching domain where the task
1034 lives. Signal the allocation of the task to a CPU, if any, so that we
1035 know whether the CPU can be transferred to a different dispatching
1038 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1040 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
1041 attributes Same_Storage and Overlaps_Storage.
1043 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1045 * exp_strm.adb: Remove with and use clause for Opt.
1046 (Build_Array_Input_Function): Remove the version-dependent generation
1047 of the return statement. The Ada 2005 tree is now the default.
1049 2011-09-01 Yannick Moy <moy@adacore.com>
1051 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
1052 it is never empty when compiling in Alfa mode.
1054 2011-09-01 Robert Dewar <dewar@adacore.com>
1056 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
1057 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
1058 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
1059 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
1061 2011-09-01 Matthew Heaney <heaney@adacore.com>
1063 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
1064 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
1065 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
1066 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
1067 unbounded queue container.
1068 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
1069 bounded queue container.
1070 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
1071 unbounded priority queue container.
1072 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
1073 bounded priority queue container.
1075 2011-08-31 Pascal Obry <obry@adacore.com>
1077 * a-direct.adb: Do not try to create an UNC path on Windows.
1078 (Create_Path): Skip leading computer name in UNC path if any.
1080 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1082 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
1083 version-dependent generation of the return statement. The Ada 2005 tree
1086 2011-08-31 Thomas Quinot <quinot@adacore.com>
1088 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
1089 types Stream_Element_Offset and Storage_Offset have a different native
1090 type depending on whether the platform is 32 or 64 bits. When
1091 exchanging them, always convert to 64 bits.
1093 2011-08-31 Yannick Moy <moy@adacore.com>
1095 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
1096 --force-alfa to gnat2why.
1098 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1100 * sem_ch12.adb (Save_References): If the node has aspects, save
1101 references within the corresponding expressions in a separate step,
1102 because the aspects are not directly in the tree for the declaration
1103 to which they belong.
1105 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1107 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
1108 in CodePeer mode, since representation clauses are partially ignored.
1109 * gcc-interface/Make-lang.in: Update dependencies.
1111 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1113 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1114 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
1115 to any dispatching domain.
1117 2011-08-31 Thomas Quinot <quinot@adacore.com>
1119 * exp_ch4.adb: Minor reformatting.
1121 2011-08-31 Bob Duff <duff@adacore.com>
1123 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
1124 on nodes for which it is not defined.
1125 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
1128 2011-08-31 Bob Duff <duff@adacore.com>
1130 * sem_ch3.adb (Process_Full_View): Disable legality check if
1131 In_Instance, to avoid spurious errors.
1132 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
1133 if In_Instance, to avoid spurious errors.
1135 2011-08-31 Pascal Obry <obry@adacore.com>
1137 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
1138 directory speparators.
1139 (Compose): Use Dir_Seps to handle both forms.
1140 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
1142 (Extension): Use Dir_Seps to handle both forms.
1144 2011-08-31 Pascal Obry <obry@adacore.com>
1146 * prj-conf.adb: Minor reformatting.
1148 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1150 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
1151 dispatching domain aspect.
1152 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
1154 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
1155 Dispatching_Domain aspect in a similar way as we do for the Priority
1157 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
1158 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
1160 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
1161 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
1162 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
1163 Dispatching_Domain and add it to the task definition.
1164 (Sig_Flags): Add Pragma_Dispatching_Domain.
1165 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
1166 support to find the types Dispatching_Domain and
1167 Dispatching_Domain_Access.
1168 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
1169 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
1170 query the availability of a pragma Dispatching_Domain.
1171 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
1172 the expander to pass the Dispatching_Domain when creating a task.
1173 (Name_Dispatching_Domain): Add this new name for a pragma.
1174 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
1175 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
1176 task has been allocated at creation time.
1177 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
1178 Ravenscar is always null.
1179 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
1180 the task has been allocated at creation time.
1181 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
1182 a specific dispatching domain.
1183 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
1184 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
1185 and CPU are specified for the task, and the CPU value is not contained
1186 within the range of processors for the domain.
1188 2011-08-31 Vincent Celier <celier@adacore.com>
1190 * make.adb (Original_Gcc) : New constant String_Access.
1191 (Gnatmake): For VM targets, do not use VM version of the compiler if
1192 --GCC= has been specified.
1194 2011-08-31 Thomas Quinot <quinot@adacore.com>
1196 * sem_ch5.adb: Minor reformatting.
1198 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1200 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
1203 2011-08-31 Bob Duff <duff@adacore.com>
1205 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
1206 the access type is private; we don't care about privacy in expansion.
1208 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1210 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
1211 subcomponents tnat may be limited, because they originate in view
1212 conflicts. If the original aggregate is legal and the actuals are
1213 legal, the aggregate itself is legal.
1215 2011-08-31 Matthew Heaney <heaney@adacore.com>
1217 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
1220 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1222 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
1225 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1227 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
1228 Interrupt_Priority aspects, force the analysis of the aspect expression
1229 (when building the equivalent pragma). Otherwise, its analysis is done
1230 too late, after the task or protected object has been created.
1231 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
1232 Analyze_Single_Task_Declaration): Remove the code to move the aspects
1233 to the object declaration because they are needed in the type
1236 2011-08-31 Robert Dewar <dewar@adacore.com>
1238 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
1239 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
1242 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1244 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
1245 if the corresponding type is malformed due to restriction violations.
1247 2011-08-31 Robert Dewar <dewar@adacore.com>
1249 * s-ransee.ads, s-ransee.adb: Minor reformatting.
1251 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1253 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
1254 would cause the generation of Set_Finalize_Address if the target is a
1255 VM and the designated type is not derived from [Limited_]Controlled.
1257 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1259 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
1261 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
1262 case of a compilation error.
1264 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1266 * init.c (__gnat_error_handler): Standardize the stack overflow or
1267 erroneous memory access message.
1268 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
1269 or erroneous memory access message.
1271 2011-08-31 Robert Dewar <dewar@adacore.com>
1273 * sem_ch4.adb: Minor reformatting.
1274 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
1276 2011-08-31 Thomas Quinot <quinot@adacore.com>
1278 * scos.ads: Minor documentation clarification.
1279 * put_scos.adb: Do not generate SCO unit header line for a unit that
1282 2011-08-31 Robert Dewar <dewar@adacore.com>
1284 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
1286 2011-08-31 Tristan Gingold <gingold@adacore.com>
1288 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
1289 hold variables between these following subprograms.
1290 (Build_Exception_Handler, Build_Object_Declarations,
1291 Build_Raise_Statement): Use the above type as parameter.
1292 Make the above adjustments.
1293 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
1295 2011-08-31 Pascal Obry <obry@adacore.com>
1297 * projects.texi: Minor reformatting.
1299 2011-08-31 Tristan Gingold <gingold@adacore.com>
1301 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
1302 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
1304 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1306 * exp_ch5.adb: Minor code cleanup.
1307 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
1308 prevent cascaded errors.
1309 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
1310 variable of an iterator specification in current scope.
1311 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
1312 postconditions on the stack, as they contain no return statements.
1314 2011-08-31 Yannick Moy <moy@adacore.com>
1316 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
1317 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
1318 call Qualify_Entity_Names.
1319 (Expand_Alfa): call Qualify_Entity_Names in more cases
1320 * lib-xref-alfa.adb: Take into account system package.
1321 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
1322 CodePeer mode in which we are interested in finding bugs even if
1323 compiler cannot compile source.
1324 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
1327 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1329 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
1330 denoted by the subtype mark to ensure getting the concurrent type in
1331 the case where the subtype mark denotes a private subtype of a
1332 concurrent type (needed when using -gnatc).
1333 (Process_Subtype): For the processing specific to type kinds, case on
1334 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
1335 subtype denotes a private subtype whose base type is nonprivate (needed
1336 for subtypes of private fulfilled by task types when compiling with
1339 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1341 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
1342 late primitives that override interface operations when the full
1343 expander is not active, to avoid blowups in Register_Primitive when
1344 types don't have associated secondary dispatch tables.
1346 2011-08-31 Yannick Moy <moy@adacore.com>
1348 * alfa_test.adb: Code clean up.
1350 2011-08-31 Marc Sango <sango@adacore.com>
1352 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
1353 by Comes_From_Source (Original_Node (N)) in order to treat also the
1354 nodes which have been rewritten.
1355 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
1356 explicit dereference and slice violation in spark mode on the nodes
1357 coming only from the source code.
1359 2011-08-31 Robert Dewar <dewar@adacore.com>
1361 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
1362 lib-xref-alfa.adb: Minor reformatting.
1364 2011-08-31 Matthew Heaney <heaney@adacore.com>
1366 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
1368 2011-08-31 Javier Miranda <miranda@adacore.com>
1370 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
1371 only for class-wide subprograms conflicting with entities of concurrent
1374 2011-08-31 Matthew Heaney <heaney@adacore.com>
1376 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
1379 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1381 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
1382 general description of the routine.
1384 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1386 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
1387 doubly-linked lists.
1389 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1391 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
1392 check is needed for a left-hand side that is a dereference, and the
1393 base type is private without discriminants (whereas the full type does
1394 have discriminants), an extra retrieval of the underlying type may be
1395 needed in the case where the subtype is a record subtype whose base
1396 type is private. Update comments.
1398 2011-08-31 Javier Miranda <miranda@adacore.com>
1400 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
1401 found check if there is a class-wide subprogram covering the primitive.
1403 2011-08-31 Yannick Moy <moy@adacore.com>
1405 * sem_res.adb: Further cases where full expansion test is needed,
1406 rather than expansion test.
1408 2011-08-31 Pascal Obry <obry@adacore.com>
1410 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
1412 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1414 * exp_ch5.adb: Handle iterators over derived container types.
1416 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1418 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
1419 (Has_Anonymous_Master): New routine.
1420 (Set_Has_Anonymous_Master): New routine.
1421 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
1422 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
1423 (Current_Anonymous_Master): New routine.
1424 (Current_Unit_First_Declaration): Removed.
1425 (Current_Unit_Scope): Removed.
1426 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
1427 their objects on a per-unit heterogeneous finalization master.
1429 2011-08-31 Matthew Heaney <heaney@adacore.com>
1431 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
1434 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1436 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
1439 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1441 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
1442 where the actual is an unexpanded call to 'Input.
1444 2011-08-31 Yannick Moy <moy@adacore.com>
1446 * sem_ch4.adb: Code clean up.
1448 2011-08-31 Yannick Moy <moy@adacore.com>
1450 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
1452 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1454 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
1455 and TSS primitive Finalize_Address if finalization is suppressed.
1456 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
1457 primitive Finalize_Address if finalization is suppressed.
1459 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1461 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
1462 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
1463 sure that the underlying task has already been created before trying
1464 to change its affinity.
1465 (Set_CPU): Use the term processor instead of CPU, as we do in
1468 2011-08-31 Vincent Celier <celier@adacore.com>
1470 * prj-attr.adb: New Compiler attribute Source_File_Switches.
1471 * prj-nmsc.adb (Process_Compiler): Process attribute
1472 Source_File_Switches.
1473 * prj.ads (Language_Config): New name list component
1474 Name_Source_File_Switches.
1475 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
1477 2011-08-31 Ed Schonberg <schonberg@adacore.com>
1479 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
1480 discriminated component of an actual, expand at once to prevent
1481 ouf-of-order references with generated subtypes.
1483 2011-08-31 Yannick Moy <moy@adacore.com>
1485 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
1486 reference to operator in Alfa xrefs.
1488 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1490 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
1491 where the parent instance was frozen before the current instance due to
1492 the presence of a source body. Update calls to Insert_After_Last_Decl.
1493 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
1494 Update the comment which illustrates the purpose of the routine.
1495 Package instances are now frozen by source bodies which appear after
1496 the instance. This ensures that entities coming from within the
1497 instance are available for use in the said bodies.
1498 (Install_Body): Add code to handle the case where the parent instance
1499 was frozen before the current instance due to the presence of a source
1500 body. Update calls to Insert_After_Last_Decl.
1502 2011-08-31 Jose Ruiz <ruiz@adacore.com>
1504 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
1506 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
1508 2011-08-31 Yannick Moy <moy@adacore.com>
1510 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
1512 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
1513 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
1514 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
1515 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
1516 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
1517 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1518 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
1519 ALFA in Alfa (we dropped acronym).
1520 * einfo.adb (Primitive_Operations): Correctly return list of primitive
1521 operations in a case where it returned previously No_Elist.
1523 2011-08-31 Robert Dewar <dewar@adacore.com>
1525 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
1526 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
1527 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1528 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
1529 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
1530 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
1533 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
1535 * sem_ch12 (Check_Private_View): Revert previous change.
1536 * sem_res.adb (Conversion_Check): Do not emit the error message if the
1537 conversion is in a generic instance.
1539 2011-08-31 Matthew Heaney <heaney@adacore.com>
1541 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
1542 * a-chtgbo.adb (Free): Allow 0 as index value.
1544 2011-08-31 Matthew Heaney <heaney@adacore.com>
1546 * a-cborma.adb (Insert): Add comment to explain why no element
1549 2011-08-31 Gary Dismukes <dismukes@adacore.com>
1551 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
1552 spec discriminant is already a concurrent type, in which case just use
1553 it, otherwise fetch the Corresponding_Concurrent_Type as before.
1555 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1557 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
1558 system-linux-mips.ads, system-linux-mipsel.ads,
1559 system-linux-mips64el.ads, system-linux-ppc64.ads,
1560 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
1562 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1564 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
1565 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
1566 (build_unary_op): Likewise.
1568 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1570 * raise-gcc.c: Do not include coretypes.h and tm.h.
1571 (setup_to_install): Remove test for compiler macro.
1572 * targext.c: Document use for the library.
1573 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
1575 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
1577 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
1578 the expression to the nominal type if the latter is a record type with
1579 a variant part and the type of the former is a record type without one.
1581 2011-08-30 Yannick Moy <moy@adacore.com>
1583 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1584 expansion in Alfa mode.
1585 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
1586 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
1588 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
1589 * sem_res.adb: Ditto.
1590 * gcc-interface/Make-lang.in: Update dependencies.
1592 2011-08-30 Thomas Quinot <quinot@adacore.com>
1594 * g-socket.ads: Minor documentation adjustment.
1596 2011-08-30 Robert Dewar <dewar@adacore.com>
1598 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
1600 2011-08-30 Yannick Moy <moy@adacore.com>
1602 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
1603 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
1604 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
1605 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
1606 Revert change which introduced files for "light"
1607 expansion, to be replaced by a single file for Alfa expansion.
1609 2011-08-30 Robert Dewar <dewar@adacore.com>
1611 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
1612 Minor code reorg/reformatting.
1614 2011-08-30 Yannick Moy <moy@adacore.com>
1616 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
1617 common shorthand for (Expander_Active and not ALFA_Mode) that can be
1618 used for testing full expansion, that is active expansion not in the
1619 reduced mode for Alfa
1620 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
1621 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
1622 of the verbose (Expander_Active and not ALFA_Mode)
1624 2011-08-30 Tristan Gingold <gingold@adacore.com>
1626 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
1627 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
1628 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
1629 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
1631 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1633 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
1634 access conversions to check that the conversion is a rewritten node,
1635 rather than just having Comes_From_Source set to False, which wasn't
1638 2011-08-30 Robert Dewar <dewar@adacore.com>
1640 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
1641 g-socket.ads: Minor reformatting.
1643 2011-08-30 Thomas Quinot <quinot@adacore.com>
1645 * sem_util.adb: Minor reformatting.
1647 2011-08-30 Tristan Gingold <gingold@adacore.com>
1649 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
1650 to be compliant with the ABI.
1652 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1654 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
1655 of a designated type when the related access type is an actual in an
1656 instance. This ensures that the full view of designated type is
1657 available when inside the body of the instance.
1659 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1661 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
1662 in a position to be modified, a slice is treated like an indexed
1665 2011-08-30 Thomas Quinot <quinot@adacore.com>
1667 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
1668 field tv_sec in struct timeval.
1670 2011-08-30 Yannick Moy <moy@adacore.com>
1672 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
1673 blocks of code doing full expansion, previously only guarded by
1674 Expander_Active, by anding the test that ALFA_Mode is not set
1676 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1678 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
1679 add the function to the list of private dependents, for subsequent
1680 legality check on Taft amendment types.
1681 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
1682 Private_Dependents, as for other incomplete types.
1683 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
1684 Taft-amendment type is used as the return type of a function.
1686 2011-08-30 Javier Miranda <miranda@adacore.com>
1688 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
1689 which emits an error by a call to a new routine which report the error.
1690 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
1691 entity does not cover an existing interface.
1692 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
1694 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
1695 protected procedures or entries whose mode is not conformant.
1696 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
1697 an error by a call to a new routine which report the error.
1699 2011-08-30 Robert Dewar <dewar@adacore.com>
1701 * gnat_rm.texi: Minor change.
1702 * exp_attr_light.adb: Minor reformatting.
1704 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1706 * sem_ch3.adb: Patch inheritance of aspects in
1707 Complete_Private_Subtype, to avoid infinite loop.
1709 2011-08-30 Javier Miranda <miranda@adacore.com>
1711 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
1712 been reported and a subprogram covering an interface primitive is not
1713 found then skip generating the internal entity. Done to avoid crashing
1715 (Check_Abstract_Overriding): Change text of error of wrong formal of
1716 protected subprogram or entry. Done for consistency to emit exactly the
1717 same error reported by Check_Synchronized_Overriding. In addition, the
1718 error is restricted to protected types (bug found working on AI05-0090)
1720 2011-08-30 Yannick Moy <moy@adacore.com>
1722 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
1723 expansion in Alfa mode.
1724 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
1725 * exp_light.adb, exp_light.ads: New package defining light expansion.
1726 * expander.adb (Expand): Call light expansion in Alfa mode
1727 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
1729 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
1731 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
1732 * gnat1drv.adb (Adjust_Global_Switches): Comment
1734 2011-08-30 Yannick Moy <moy@adacore.com>
1736 * lib-xref-alfa.adb: Minor refactoring.
1738 2011-08-30 Yannick Moy <moy@adacore.com>
1740 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
1742 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
1743 expansion in Alfa mode.
1744 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
1747 2011-08-30 Robert Dewar <dewar@adacore.com>
1749 * debug_a.adb: Update comment.
1751 2011-08-30 Robert Dewar <dewar@adacore.com>
1753 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
1754 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
1755 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
1756 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
1758 2011-08-30 Robert Dewar <dewar@adacore.com>
1760 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
1763 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
1765 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
1766 Build_Finalization_Master by supplying an insertion node and enclosing
1767 scope. In its old version, the call did not generate a finalization
1769 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
1770 recognize anonymous access-to-controlled components. Rewrite the
1771 machinery which creates finalization masters to service anonymous
1772 access-to-controlled components of a record type. In its current state,
1773 only one heterogeneous master is necessary to handle multiple anonymous
1775 (Freeze_Type): Comment reformatting.
1776 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
1778 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
1779 associates TSS primitive Finalize_Address with either the master itself
1780 or with the internal hash table depending on the mode of operation of
1783 2011-08-30 Javier Miranda <miranda@adacore.com>
1785 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
1786 interface type then do not generate code to compare this component.
1787 Required since they have no components and their equality operator is
1790 2011-08-30 Steve Baird <baird@adacore.com>
1792 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
1793 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
1794 returns the (static) accessibility level of the object. Otherwise, the
1795 same as Type_Access_Level.
1796 (Dynamic_Accessibility_Level): New function; given an expression which
1797 could occur as the rhs of an assignment to a saooaaat (i.e., an
1798 expression of an access-to-object type), return the new value for the
1799 saooaaat's associated Extra_Accessibility object.
1800 (Effective_Extra_Accessibility): New function; same as
1801 Einfo.Extra_Accessibility except that object renames are looked through.
1803 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
1804 (Dynamic_Accessibility_Level): New function; see sem_util.ads
1806 (Effective_Extra_Accessibility): New function; see sem_util.ads
1808 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
1809 (Extra_Accessibility): Update comments.
1810 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
1811 except RM_Size field (which is only for types) is unaffected.
1813 (Extra_Accessibility): Expand domain to allow objects, not just formals.
1814 (Set_Extra_Accessibility): Expand domain to allow objects, not just
1816 (Init_Size): Add assertion that we are not trashing the
1817 Extra_Accessibility attribute of an object.
1818 (Init_Size_Align): Add assertion that we are not trashing the
1819 Extra_Accessibility attribute of an object.
1820 (Init_Object_Size_Align): New procedure; see einfo.ads description.
1821 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
1822 differently for the type of a (non-library-level) saooaaat depending
1823 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
1824 is queried in this set of changes - everything else (in particular,
1825 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
1826 driven off of the setting of the Is_Local_Anonymous_Access attribute.
1827 The special treatment of library-level saooaaats is an optimization,
1828 not required for correctnesss. This is based on the observation that the
1829 Ada2012 rules (static and dynamic) for saooaaats turn out to be
1830 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
1832 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
1833 false for the type of a saooaaat, declare and initialize its
1834 accessibility level object and set the Extra_Accessibility attribute
1835 of the saooaaat to refer to this object.
1836 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
1837 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
1838 calls to Effective_Extra_Accessibility in order to support
1839 renames of saooaaats.
1840 (Expand_N_Type_Conversion): Add new local function,
1841 Has_Extra_Accessibility, and call it when determining whether an
1842 accessibility check is needed.
1843 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
1844 evaluate to True (without raising an exception).
1846 (Expand_N_Assignment_Statement): When assigning to an Ada2012
1847 saooaaat, update its associated Extra_Accessibility object (if
1848 it has one). This includes an accessibility check.
1849 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
1850 a saooaaat, update its Extra_Accessibility object too (if it
1852 (Expand_Call): Replace a couple of calls to Type_Access_Level
1853 with calls to Dynamic_Access_Level to handle cases where
1854 passing a literal (any literal) is incorrect.
1855 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
1856 checks associated with "Saooaat := Some_Object'Access;"; this must
1857 be rejected if Some_Object is declared in a more nested scope
1859 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
1860 assignment to a saooaaat even if Is_Local_Anonymous_Access
1861 returns False for its type (indicating a 2012-style saooaaat).
1863 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
1864 (which is only appropriate for objects, not types) with a call
1865 of Init_Object_Size_Align in order to avoid trashing the
1866 Extra_Accessibility attribute of a rename (the two attributes
1869 (Valid_Conversion) Replace six calls to Type_Access_Level with
1870 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
1871 Ada2012 non-library-level saooaaat, the former returns library level
1872 while the latter returns the (static) accessibility level of the
1873 saooaaat. A type conversion to the anonymous type of a saooaaat
1874 can only occur as part of an assignment to the saooaaat, so we
1875 know that such a conversion must be in a lhs context, so Deepest
1876 yields the result that we need. If such a conversion could occur,
1877 say, as the operand of an equality operator, then this might not
1878 be right. Also add a test so that static accessibilty checks are
1879 performed for converting to a saooaaat's type even if
1880 Is_Local_Anonymous_Access yields False for the type.
1882 2011-08-30 Javier Miranda <miranda@adacore.com>
1884 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
1885 controls generation of a warning associated with late declaration of
1886 dispatching functions. Required to avoid generating spurious
1889 2011-08-30 Gary Dismukes <dismukes@adacore.com>
1891 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
1892 return object has an anonymous access type and the function's type is
1893 a named access type.
1894 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
1895 conversions on implicit conversions, since such conversions can occur
1896 for anonymous access cases due to expansion. Issue error for attempt
1897 to rename an anonymous expression as an object of a named access type.
1898 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
1899 to indicate whether this function should report errors on invalid
1901 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
1902 the expression is of an anonymous access type and the expected type is
1903 a named general access type, rewrite the expression as a type
1904 conversion, unless this is an expression of a membership test.
1905 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
1906 calling of Error_Msg_N on new formal Report_Errs.
1907 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
1908 calling of Error_Msg_NE on new formal Report_Errs.
1909 (Valid_Conversion): Move declaration of this function to the package
1910 spec, to allow calls from membership test processing. For Ada 2012,
1911 enforce legality restrictions on implicit conversions of anonymous
1912 access values to general access types, disallowing such conversions in
1913 cases where the expression has a dynamic accessibility level (access
1914 parameters, stand-alone anonymous access objects, or a component of a
1915 dereference of one of the first two cases).
1916 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
1917 in the context of a named general access expected type.
1918 * exp_ch4.adb Add with and use of Exp_Ch2.
1919 (Expand_N_In): Add processing for membership tests applied to
1920 expressions of an anonymous access type. First, Valid_Conversion is
1921 called to check whether the test is statically False, and then the
1922 conversion is expanded to test that the expression's accessibility
1923 level is no deeper than that of the tested type. In the case of
1924 anonymous access-to-tagged types, a tagged membership test is applied
1926 (Tagged_Membership): Extend to handle access type cases, applying the
1927 test to the designated types.
1928 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
1929 accessibility level, and the actual is a 'Access applied to a current
1930 instance, pass the accessibility level of the type of the current
1931 instance rather than applying Object_Access_Level to the prefix. Add a
1932 ??? comment, since this level isn't quite right either (will eventually
1933 need to pass an implicit level parameter to init procs).
1935 2011-08-30 Bob Duff <duff@adacore.com>
1937 * s-taskin.ads: Minor comment fix.
1939 2011-08-30 Ed Schonberg <schonberg@adacore.com>
1941 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
1942 component and the selector is a dispatching operation, check if it is
1943 a prefixed call before rewriting as a parameterless function call.
1945 2011-08-29 Jakub Jelinek <jakub@redhat.com>
1947 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
1948 tsystem.h into $(RTSDIR) instead of rts.
1950 2011-08-29 Robert Dewar <dewar@adacore.com>
1952 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
1954 * gcc-interface/Make-lang.in: Update dependencies.
1956 2011-08-29 Yannick Moy <moy@adacore.com>
1958 * alfa.ads (Name_Of_Heap_Variable): New constant name.
1959 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
1960 table to hold dereferences.
1961 (Add_ALFA_Xrefs): Take into account dereferences as special
1962 reads/writes to the variable "HEAP".
1963 (Enclosing_Subprogram_Or_Package): Move subprogram here.
1964 (Generate_Dereference): New procedure to store a read/write dereferencew
1966 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
1967 the special "HEAP" var.
1968 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
1970 * sem_util.adb (Note_Possible_Modification): Store write dereference
1973 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1975 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
1976 ensures that the level of the subpool access type is not deeper than
1977 that of the pool object.
1978 * sem_util.adb (Object_Access_Level): Expand to handle defining
1980 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
1981 subpool handle name of a rewritten allocator.
1983 2011-08-29 Robert Dewar <dewar@adacore.com>
1985 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
1987 2011-08-29 Thomas Quinot <quinot@adacore.com>
1989 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
1990 values, we generate multiple triples of parameters in the TypeCode.
1991 Bump Choice_Index for each such triple so that a subsequent default
1992 choice is associated with the correct index in the typecode.
1994 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1996 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
1998 (First, Last): Handle properly an iterator over a null container.
2000 2011-08-29 Bob Duff <duff@adacore.com>
2002 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
2003 processing if we run across a node with no Scope. This can happen if
2004 we're with-ing an library-level instance, and that instance got errors
2005 that caused "instantiation abandoned".
2006 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
2007 an exception instead of using Assert, so it won't go into an infinite
2008 loop, even when assertions are turned off.
2010 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2012 * a-coorse.adb: Proper handling of empty ordered sets.
2014 2011-08-29 Johannes Kanig <kanig@adacore.com>
2016 * debug.adb: Add comments.
2018 2011-08-29 Thomas Quinot <quinot@adacore.com>
2020 * a-except.adb, a-except-2005.adb: Minor comment rewording and
2023 2011-08-29 Yannick Moy <moy@adacore.com>
2025 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
2026 declaration for Itypes in Alfa mode.
2028 2011-08-29 Robert Dewar <dewar@adacore.com>
2030 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
2031 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
2032 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
2035 2011-08-29 Tristan Gingold <gingold@adacore.com>
2037 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
2039 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
2040 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
2043 2011-08-29 Robert Dewar <dewar@adacore.com>
2045 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
2047 2011-08-29 Javier Miranda <miranda@adacore.com>
2049 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
2050 renamings of formal subprograms when the actual for a formal type is
2053 2011-08-29 Matthew Heaney <heaney@adacore.com>
2055 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
2058 2011-08-29 Matthew Heaney <heaney@adacore.com>
2060 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
2061 components of record type.
2062 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
2065 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2067 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
2068 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
2071 2011-08-29 Robert Dewar <dewar@adacore.com>
2073 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
2076 2011-08-29 Matthew Heaney <heaney@adacore.com>
2078 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
2079 components of record type.
2081 2011-08-29 Bob Duff <duff@adacore.com>
2083 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
2084 by the termination handler.
2086 2011-08-29 Yannick Moy <moy@adacore.com>
2088 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
2089 created in Alfa mode, instead of inserting artificial declarations of
2090 non-Itypes in the tree.
2091 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
2092 know if an Itype has a corresponding declaration, as defined in
2095 2011-08-29 Yannick Moy <moy@adacore.com>
2097 * gnat1drv.adb: Minor rewrite.
2099 2011-08-29 Bob Duff <duff@adacore.com>
2101 * s-tasuti.adb (Make_Passive): Work around race condition in
2102 Make_Independent, which can cause Wait_Count to be zero. So instead of
2103 asserting that Wait_Count > 0, and then decrementing it, decrement it
2104 only if Wait_Count > 0.
2105 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
2106 should be nonnegative, so declare them Natural instead of Integer.
2108 2011-08-29 Robert Dewar <dewar@adacore.com>
2110 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
2111 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
2112 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
2113 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
2114 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
2116 2011-08-29 Tristan Gingold <gingold@adacore.com>
2118 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
2120 2011-08-29 Vadim Godunko <godunko@adacore.com>
2122 * s-parint.ads: Minor comment clarification.
2124 2011-08-29 Vincent Celier <celier@adacore.com>
2126 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
2127 may be used as identifiers.
2129 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2131 * a-coinho.ads: Minor reformating.
2133 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2135 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
2136 container of a derived type.
2138 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2140 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
2141 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
2143 2011-08-29 Pascal Obry <obry@adacore.com>
2145 * exp_disp.adb: Minor comment fix.
2146 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
2147 to avoid warnings when compiling with -Wall.
2148 (Make_Disp_Conditional_Select_Body): Likewise.
2149 (Make_Disp_Timed_Select_Body): Likewise.
2151 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2153 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
2154 an entity name, generate reference for it.
2156 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2158 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
2160 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
2161 the class-wide type.
2162 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
2164 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2166 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
2167 subtype for an object whose type is an unconstrained union.
2169 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2171 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
2172 is allowed in a component definition, by AI95-406.
2174 2011-08-29 Matthew Heaney <heaney@adacore.com>
2176 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
2178 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2180 * a-except-2005.adb: Alphabetize all routines.
2181 (Triggered_By_Abort): New routine.
2182 * a-except-2005.ads (Triggered_By_Abort): New routine.
2183 * a-except.adb Alphabetize all routines.
2184 (Triggered_By_Abort): New routine.
2185 * a-except.ads (Triggered_By_Abort): New routine.
2186 * exp_ch7.adb: Update all comments involving the detection of aborts in
2188 (Build_Object_Declarations): Do not generate code to detect the
2189 presence of an abort at the start of finalization code, use a runtime
2191 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
2193 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
2194 allocate a task on a subpool.
2195 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
2196 The flag disables all actions related to the maintenance of
2197 Finalize_Address_Table when subpools are not in use.
2198 (Allocate_Any_Controlled): Signal the machinery that subpools are in
2200 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
2201 performs costly task locking when subpools are not in use.
2203 2011-08-29 Yannick Moy <moy@adacore.com>
2205 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
2206 types and dispatching calls in Alfa mode.
2207 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
2208 correspondance between body and spec scopes, to reuse utility functions
2209 (Traverse_Declarations_Or_Statements): Protect access to body for stub
2210 by testing the presence of the library unit for the body
2211 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
2212 mode the expansion of accept statements is skipped
2213 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
2214 the unique entity corresponding to the one returned by
2215 Unique_Defining_Entity applied to the enclosing declaration of the
2218 2011-08-29 Bob Duff <duff@adacore.com>
2220 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
2221 gdb when x is not a node (it can be a node list, name_id, etc). pp is
2222 an alias for pn. ppp is an alias for pt.
2224 2011-08-29 Javier Miranda <miranda@adacore.com>
2226 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
2227 aggregate to take a consistent decision on the need to convert into
2228 assignments aggregates that initialize constant objects.
2230 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2232 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
2233 Build_Allocate_Deallocate_Proc in order to handle allocation of
2234 non-controlled objects on subpools.
2235 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
2236 to be end-user visible.
2237 * s-finmas.adb: Add with and use clause for System.HTable.
2238 Add an instantiation of Simple_HTable which provides a mapping between
2239 the address of a controlled object and the corresponding
2240 Finalize_Address used to clean up the object. The table is used when a
2241 master is operating in heterogeneous mode.
2242 (Attach): Explain why the input node is not verified on being already
2244 (Delete_Finalize_Address): New routine.
2245 (Detach): Add pragma Assert which ensures that a node is already
2247 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
2248 since nodes are no longer removed on traversal. Explain why node
2249 detachment is undesirable in this case.
2250 (Get_Finalize_Address): New routine.
2251 (Hash): New routine.
2252 (Is_Empty_List): Removed.
2253 (pm): Renamed to Print_Master. Add output for discriminant
2255 Comment reformatting.
2256 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
2257 * s-finmas.ads: Various comments additions / improvements.
2258 Type Finalization_Master has a discriminant which determines the mode of
2260 (Delete_Finalize_Address): New routine.
2261 (Get_Finalize_Address): New routine.
2262 (pm): Renamed to Print_Master.
2263 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
2264 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
2265 use clause for System.IO.
2266 (Allocate_Any_Controlled): Add machinery to set TSS primitive
2267 Finalize_Address depending on the mode of allocation and the mode of
2269 (Deallocate_Any_Controlled): Remove the relation pair object -
2270 Finalize_Address regardless of the master mode. Add comment explaining
2272 (Detach): Ensure that fields Prev and Next are null after detachment.
2273 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
2274 scheme to check whether the list of subpools is empty. There is no
2275 longer need to store the next subpool or advance the current pointer.
2276 (Is_Empty_List): New routine.
2277 (Print_Pool): New routine.
2278 (Print_Subpool): New routine.
2279 * s-stposu.ads: Various comments additions / improvements.
2280 Field Master of type Root_Subpool is now a heterogeneous collection.
2281 (Print_Pool): New routine.
2282 (Print_Subpool): New routine.
2284 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2286 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
2287 forms, using aspects of container types.
2288 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
2289 Has_Implicit_Dereference flags, that may be set on the partial view.
2290 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
2291 container type with an indexing aspect.
2292 (Analyze_Quantified_Expression): Analyze construct with expansion
2293 disabled, because it will be rewritten as a loop during expansion.
2294 (Try_Container_Indexing): The prefix itself may be a container type
2295 with an indexing aspect, as with a vector of vectors.
2296 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
2297 the original doamin of iteration, for name capture.
2298 (Analyze_Iterator_Specification): If the domain is an expression that
2299 needs finalization, create a separate declaration for it.
2300 For an iterator with "of" retrieve default iterator info from aspect of
2301 container type. For "in" iterator, retrieve type of Iterate function.
2302 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
2303 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
2304 analysis, to prevent spurious errors about late attributes.
2305 * sprint.adb: Handle quantified expression with either loop or iterator
2307 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
2310 2011-08-29 Vincent Celier <celier@adacore.com>
2312 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
2313 Binder or Linker of the main project file.
2315 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2317 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
2320 2011-08-29 Yannick Moy <moy@adacore.com>
2322 * exp_ch9.adb: Partial revert of previous change for Alfa mode
2324 2011-08-29 Yannick Moy <moy@adacore.com>
2326 * exp_ch11.adb: Minor expansion of comment.
2328 2011-08-29 Yannick Moy <moy@adacore.com>
2330 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
2332 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2334 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
2335 interpretation, set the type before resolving the operands, because
2336 legality checks on an exponention operand need to know the type of the
2339 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2341 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
2342 cleanups on a master if the instance is within a generic unit.
2343 Complement to the corresponding fix to inline.adb for K520-030.
2345 2011-08-29 Tristan Gingold <gingold@adacore.com>
2347 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
2349 * exp_intr.adb: Minor comment fix.
2351 2011-08-29 Bob Duff <duff@adacore.com>
2353 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
2354 Delay_Required was used as an uninitialized variable.
2356 2011-08-29 Robert Dewar <dewar@adacore.com>
2358 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
2359 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
2360 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
2362 2011-08-29 Thomas Quinot <quinot@adacore.com>
2364 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
2365 Remove unused variables.
2367 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2369 * sem_res.adb: Remove Build_Explicit_Dereference.
2370 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
2371 from sem_res.adb, used in analysis of additional constructs.
2372 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
2373 expansion of iterators.
2374 (Is_Object_Reference): Recognize variables rewritten as explicit
2375 dereferences in Ada2012.
2376 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
2377 Reversible_Iterator names, for expansion of Ada2012 iterators.
2378 * aspects.ads, aspects.adb (Find_Aspect): Utility.
2379 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
2380 linked list container.
2381 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
2382 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
2384 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2386 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
2389 2011-08-29 Vincent Celier <celier@adacore.com>
2391 * make.adb (Gnatmake): Get the maximum number of simultaneous
2392 compilation processes after the Builder switches has been scanned, as
2393 there may include -jnn.
2395 2011-08-29 Matthew Heaney <heaney@adacore.com>
2397 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
2399 2011-08-29 Tristan Gingold <gingold@adacore.com>
2401 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
2402 GNAT_DRIVER_COMMAND_LINE to 255.
2404 2011-08-29 Pascal Obry <obry@adacore.com>
2406 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
2407 reformatting and style fix (class attribute casing).
2409 2011-08-29 Yannick Moy <moy@adacore.com>
2411 * exp_ch11.adb: Yet another case where expansion should be common
2412 between CodePeer and Alfa.
2414 2011-08-29 Yannick Moy <moy@adacore.com>
2416 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
2418 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2420 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
2421 incomplete type and its completion match.
2423 2011-08-29 Yannick Moy <moy@adacore.com>
2425 * exp_ch13.adb: Adjust previous change.
2427 2011-08-29 Robert Dewar <dewar@adacore.com>
2429 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
2430 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
2433 2011-08-29 Emmanuel Briot <briot@adacore.com>
2435 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
2436 initialize aggregated projects.
2438 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2440 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
2441 depth of candidates to resolve a potentially spurious ambiguity between
2442 two visible subprograms.
2444 2011-08-29 Yannick Moy <moy@adacore.com>
2446 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
2448 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
2449 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
2452 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2454 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
2457 2011-08-29 Thomas Quinot <quinot@adacore.com>
2459 * sem_res.adb: Minor reformatting.
2461 2011-08-29 Johannes Kanig <kanig@adacore.com>
2463 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
2465 * gnat1drv.adb (Adjust_Global_Switches): Set
2466 Use_Expressions_With_Actions to False in ALFA mode.
2467 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
2470 2011-08-29 Yannick Moy <moy@adacore.com>
2472 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
2473 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
2474 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
2475 tagged types and dispatching calls in Alfa mode.
2477 2011-08-29 Javier Miranda <miranda@adacore.com>
2479 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
2480 we do not report an error on an Empty node.
2482 2011-08-29 Geert Bosch <bosch@adacore.com>
2484 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
2485 a-nlrear.o and a-nurear.o.
2487 2011-08-29 Robert Dewar <dewar@adacore.com>
2489 * freeze.adb: Minor code reorganization.
2491 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
2492 sem_ch6.adb: Minor reformatting
2494 2011-08-29 Tristan Gingold <gingold@adacore.com>
2496 * s-except.ads, s-except.adb: Provide dummy body.
2498 2011-08-29 Yannick Moy <moy@adacore.com>
2500 * sem_warn.adb (Within_Postcondition): Take into account the case of
2501 an Ensures component in a Test_Case.
2503 2011-08-29 Tristan Gingold <gingold@adacore.com>
2505 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
2506 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
2507 System_Exceptions_Debug
2508 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
2509 * a-except.adb: With and use System.Exceptions_Debug instead of
2511 * a-except-2005.adb: Likewise.
2512 * s-assert.adb: Likewise.
2513 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
2514 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
2515 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
2516 s-excdeb. Update dependencies.
2517 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
2518 as these no longer need external libraries.
2520 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2522 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
2523 exponentiation operator on universal values in a context that requires
2526 2011-08-29 Tristan Gingold <gingold@adacore.com>
2528 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
2529 before calling notify_handled_exception.
2530 * a-exextr.adb: Fix comment.
2532 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2534 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
2535 Finalize_Address of the access type's finalization master.
2536 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
2537 access type's finalization master. Add a guard to prevent
2538 Associated_Storage_Pool from being set on .NET/JVM.
2539 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
2540 attribute Finalize_Address of the access type's finalization master.
2541 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
2542 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
2543 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
2545 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
2546 use clause for System.IO
2547 (Detach): Relax the assertion, to be reinstated later.
2548 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
2549 Relax the assertion on Finalize_Address, to be reinstated later.
2550 (Is_Empty_List): New routine.
2551 (pm): New debug routine.
2552 (Set_Finalize_Address): New routine.
2553 * s-finmas.ads (pm): New debug routine.
2554 (Set_Finalize_Address): New routine.
2555 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2557 2011-08-29 Tristan Gingold <gingold@adacore.com>
2559 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
2560 Remove convention C.
2562 2011-08-29 Tristan Gingold <gingold@adacore.com>
2564 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
2565 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
2566 (Finalize_TCB): Remove its finalization.
2567 (Initialize): Remove assignment of GET_Exc_Stack_Addr
2568 * s-soflin.adb (NT_Exc_Stack): Remove
2569 (Get_Exc_Stack_Addr_NT): Likewise.
2570 (Get_Exc_Stack_Addr_Soft): Likewise.
2571 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
2572 (Get_Exc_Stack_Addr): Likewise.
2573 (Get_Exc_Stack_Addr_Soft): Likewise
2574 * s-taspri-vms.ads (Exc_Stack_T): Remove.
2575 (Exc_Stack_Ptr_T): Likewise.
2576 (Private_Data): Remove Exc_Stack_Ptr component.
2578 2011-08-29 Tristan Gingold <gingold@adacore.com>
2580 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
2582 2011-08-29 Tristan Gingold <gingold@adacore.com>
2584 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2586 2011-08-29 Geert Bosch <bosch@adacore.com>
2588 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
2589 L2_Norm, Swap_Column): New generic subprograms
2590 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
2591 L2_Norm, Swap_Column): Implement new subprograms in order to
2592 eliminate dependency on BLAS and LAPACK libraries in
2593 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
2594 version. Forward_Eliminate/Back_Substitute can be used to put a
2595 matrix in row echelon or reduced row echelon form using partial
2597 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
2598 Swap_Column): Instantiate from System.Generic_Array_Operations.
2599 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
2600 (Sqrt): Local function for simple computation of square root without
2601 adding dependencies on Generic_Elementary_Functions.
2602 (Swap): New subprogram to exchange floating point numbers.
2603 (Inverse): Reimplement using Jordan-Gauss elimination.
2604 (Jacobi): New procedure implementing Jacobi's method for computation
2605 of eigensystems, based on Rutishauser's implementation.
2606 (L2_Norm): Implement directly using the inner product.
2607 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
2608 decreasing eigenvalue as required by the Ada RM.
2609 (Swap_Column): New helper procedure for Sort_Eigensystem.
2610 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
2611 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
2614 2011-08-29 Thomas Quinot <quinot@adacore.com>
2616 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
2619 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2621 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
2622 than the current node.
2623 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
2624 Finalization_Master. The list headers have two fields instead of three.
2625 This should fix alignment issue but subpool allocations are now
2626 unusable. Alphabetize subprograms.
2627 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
2628 the size of the header when converting the beginning of the object to
2629 a FM_Node. Set the master's Finalize_Address attribute if not already
2631 (Deallocate_Any_Controlled): Use the offset rather than the size of the
2632 header when converting the beginning of the object to a FM_Node.
2634 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2636 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
2637 reraise when compiling for CodePeer.
2639 2011-08-29 Arnaud Charlet <charlet@adacore.com>
2641 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
2642 now needed by a-convec.adb. Fix warning.
2644 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2646 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
2647 processing of TSS routine Finalize_Address when compiling in
2650 2011-08-29 Thomas Quinot <quinot@adacore.com>
2652 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
2653 sem_warn.adb: Minor reformatting.
2655 2011-08-29 Emmanuel Briot <briot@adacore.com>
2657 * prj-conf.adb (Get_Config_Switches): Also collect the list of
2658 languages from aggregated projects.
2660 2011-08-29 Yannick Moy <moy@adacore.com>
2662 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
2663 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2664 Traverse_Package_Declaration, Traverse_Subprogram_Body,
2665 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
2666 for stubs are traversed too when parameter is set
2667 (Traverse_All_Compilation_Units): Traverse without going inside stubs
2668 (Traverse_Declarations_Or_Statements): Do the special traversing for
2669 stubs when required.
2670 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
2671 return subprogram or package body from stub.
2672 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
2673 stubs without prior subprogram decl.
2675 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
2677 * gnat_ugn.texi: Fix typo.
2679 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2681 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
2682 which accounts for size vs alignment issues and calculates the size of
2684 (Deallocate_Any_Controlled): Ditto.
2685 (Nearest_Multiple_Rounded_Up): New routine.
2687 2011-08-29 Tristan Gingold <gingold@adacore.com>
2689 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
2690 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
2691 (Set_Exception_Msg): Ditto.
2692 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
2694 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
2695 Use Save_Occurrence instead of Save_Occurrence_No_Private.
2696 (Raise_With_Msg): Remove Cleanup_Flag.
2697 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
2698 Clean_Flag and Private_Data components.
2700 2011-08-29 Yannick Moy <moy@adacore.com>
2702 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
2704 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
2705 of an explicitly declared type, so that the base types of the original
2706 type and this generated type are the same, and a "type" (not a subtype
2708 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
2709 small" in Alfa mode, like in CodePeer mode.
2710 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
2711 clauses in Alfa mode.
2713 2011-08-29 Javier Miranda <miranda@adacore.com>
2715 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
2716 function to the package spec.
2717 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
2718 internally generated bodies of null procedures locate the internally
2719 generated spec enforcing mode conformance.
2720 (Is_Interface_Conformant): Ensure that the controlling formal of the
2723 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2725 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
2726 reject the pragma if it appears to apply to a formal subprogram.
2728 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2730 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
2731 inner expression, to prevent double evaluation.
2733 2011-08-29 Tristan Gingold <gingold@adacore.com>
2735 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
2737 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
2738 * a-except-2005.adb (Propagate_Exception): Adjust spec.
2739 (Raise_Current_Excep): Adjust call.
2740 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
2742 2011-08-29 Thomas Quinot <quinot@adacore.com>
2744 * exp_disp.adb: Minor reformatting.
2746 2011-08-29 Tristan Gingold <gingold@adacore.com>
2748 * a-exexpr.adb (Setup_Exception): Removed.
2749 * a-exexpr-gcc.adb (Setup_Exception): Removed.
2750 * a-except.adb (Exception_Propagation): Removed.
2751 * a-except-2005.adb (Setup_Exception): Removed.
2752 (Reraise): Remove call to Setup_Exception.
2753 (Reraise_Occurrence): Ditto.
2754 (Reraise_Occurrence_Always): Ditto.
2755 (Reraise_Occurrence_No_Defer): Ditto.
2756 (Transfer_Occurrence): Ditto.
2757 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
2758 (Set_Exception_Msg): Ditto.
2760 2011-08-29 Robert Dewar <dewar@adacore.com>
2762 * a-convec.adb, exp_disp.adb: Minor reformatting.
2764 2011-08-29 Tristan Gingold <gingold@adacore.com>
2766 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
2768 2011-08-29 Gary Dismukes <dismukes@adacore.com>
2770 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
2771 Exception_Handlers to No_List instead of Empty_List in the case where
2772 there are no handlers.
2774 2011-08-29 Tristan Gingold <gingold@adacore.com>
2776 * gcc-interface/gigi.h (enum standard_datatypes): Add
2777 ADT_reraise_zcx_decl
2778 (reraise_zcx_decl): New macro.
2779 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
2780 (gigi): Set reraise_zcx_decl.
2781 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
2782 (gnat_to_gnu): Handle N_Raise_Statement.
2784 2011-08-29 Robert Dewar <dewar@adacore.com>
2786 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
2787 a-undesu.adb: Minor reformatting.
2789 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2791 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
2792 table, accept an unfrozen untagged component if it is an actual for a
2793 formal incomplete type.
2794 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
2795 provide new iterator forms over vectors.
2796 Introduce type Iterator in package body to implement operations of
2797 Reversible_Iterator interface.
2798 * a-iteint.ads: Make package pure so it is usable with new container
2799 packages, that are categorized Remote_Types.
2801 2011-08-29 Robert Dewar <dewar@adacore.com>
2803 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
2805 2011-08-29 Bob Duff <duff@adacore.com>
2807 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
2808 of <>, because this is the routine that checks for dimensionality
2809 errors (for example, for a two-dimensional array, (others => <>) should
2810 be (others => (others => <>)).
2812 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2814 * impunit.adb: Add new run-time units.
2815 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
2816 s-stposu.ads, s-stposu.adb: Code clean up.
2817 Handle protected class-wide or task class-wide types
2818 Handle C/C++/CIL/Java types.
2819 * s-spsufi.adb, s-spsufi.ads: New files.
2821 2011-08-29 Yannick Moy <moy@adacore.com>
2823 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
2824 library-level subprogram.
2825 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
2827 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
2829 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
2831 * gnat_rm.texi: Update doc for Test_Case pragma.
2833 2011-08-29 Tristan Gingold <gingold@adacore.com>
2835 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
2837 (GCC_Exception_Access): New type.
2838 (Unwind_DeleteException): New imported procedure
2839 (Foreign_Exception): Import it.
2840 (GNAT_GCC_Exception): Simply have the occurrence inside.
2841 (To_GCC_Exception): New function.
2842 (To_GNAT_GCC_Exception): New function.
2843 (GNAT_GCC_Exception_Cleanup): New procedure..
2844 (Propagate_GCC_Exception): New procedure.
2845 (Reraise_GCC_Exception): New procedure.
2846 (Setup_Current_Excep): New procedure.
2847 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
2848 (Unwind_RaiseException): Ditto.
2849 (Unwind_ForcedUnwind): Ditto.
2851 (Begin_Handler): Change type of parameter.
2852 (End_Handler): Ditto. Now delete the exception if still present.
2853 (Setup_Key): Removed.
2854 (Is_Setup_And_Not_Propagated): Removed.
2855 (Set_Setup_And_Not_Propagated): Ditto.
2856 (Clear_Setup_And_Not_Propagated): Ditto.
2857 (Save_Occurrence_And_Private): Ditto.
2858 (EID_For): Add 'not null' constraint on parameter.
2859 (Setup_Exception): Does nothing.
2860 (Propagate_Exception): Simplified.
2861 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
2862 re-raise is not expanded anymore.
2863 * s-except.ads (Foreign_Exception): New exception - placeholder for
2865 * raise-gcc.c (__gnat_setup_current_excep): Declare
2866 (CXX_EXCEPTION_CLASS): Define (not yet used)
2867 (GNAT_EXCEPTION_CLASS): Define.
2868 (is_handled_by): Handle foreign exceptions.
2869 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
2871 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2873 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
2875 2011-08-29 Thomas Quinot <quinot@adacore.com>
2877 * a-synbar-posix.adb: Minor reformatting.
2879 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2881 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
2882 a-exetim-default.ads (Interrupt_Clocks_Supported,
2883 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2884 definitions to be compliant with AI-0171. The target systems do not
2885 support separate account for the execution time of interrupt handlers.
2887 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2889 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
2890 in the barrier to put first the easiest to evaluate (and the one which
2891 will be True more often). More efficient.
2893 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2895 * s-atocou-x86.adb: Fix constraint in machine code insertion.
2897 2011-08-29 Bob Duff <duff@adacore.com>
2899 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
2900 attributes that are now aspects, as specified by AI05-0229-1.
2901 * sem_ch13.adb (Analyze_Aspect_Specifications,
2902 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
2903 pragmas or attribute references, as appropriate.
2905 2011-08-29 Robert Dewar <dewar@adacore.com>
2907 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
2908 a-synbar-posix.ads: Minor reformatting.
2910 2011-08-29 Yannick Moy <moy@adacore.com>
2912 * snames.ads-tmpl: Add name Force.
2914 2011-08-29 Pascal Obry <obry@adacore.com>
2916 * prj-nmsc.adb: Minor reformatting.
2918 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2920 * a-exetim.ads (Interrupt_Clocks_Supported,
2921 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
2922 definitions to be compliant with AI-0171.
2924 2011-08-29 Robert Dewar <dewar@adacore.com>
2926 * a-ngelfu.adb: Add comments.
2928 2011-08-29 Geert Bosch <bosch@adacore.com>
2930 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
2931 the closest machine number to Pi / 2.0.
2933 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2935 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
2936 package Ada.Synchronous_Barriers.
2937 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
2938 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
2939 default implementation using protected objects and another one
2940 a-synbar-posix using POSIX barriers as the underlying support.
2941 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
2942 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
2943 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
2944 Clean up dependencies.
2945 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
2947 2011-08-29 Robert Dewar <dewar@adacore.com>
2949 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
2950 exp_dist.adb: Minor code reorganization.
2953 2011-08-29 Thomas Quinot <quinot@adacore.com>
2955 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
2956 primitive operation must support external streaming if it is not a
2957 controlling access result.
2959 2011-08-29 Thomas Quinot <quinot@adacore.com>
2961 * sinfo.ads, sem_ch7.adb: Minor reformatting.
2963 2011-08-29 Bob Duff <duff@adacore.com>
2965 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
2966 restriction on allocators, as required by AI05-0013-1.
2967 * restrict.ads: Minor comment fix.
2969 2011-08-29 Tristan Gingold <gingold@adacore.com>
2971 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
2972 (To_Jmpbuf_Address): Ditto
2973 (builtin_longjmp): Ditto
2975 2011-08-29 Thomas Quinot <quinot@adacore.com>
2977 * sem_res.adb: Minor reformatting.
2979 2011-08-29 Vincent Celier <celier@adacore.com>
2981 * make.adb (Gnatmake): Move special processing for VM targets after the
2982 call to Get_Target_Parameters.
2984 2011-08-29 Thomas Quinot <quinot@adacore.com>
2986 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
2988 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2990 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
2991 where an anonymous access discriminant of a limited designated type
2992 appears in a non-immutably limited discriminated type and issue an
2993 error message. Add local variable Desig_T and replace all occurrences
2996 2011-08-29 Jose Ruiz <ruiz@adacore.com>
2998 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
2999 implementation is compliant to RM D.15(15/2) after the modification
3000 imposed by AI05-0094-1 (binding interpretation).
3002 2011-08-29 Robert Dewar <dewar@adacore.com>
3004 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
3005 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
3007 2011-08-29 Thomas Quinot <quinot@adacore.com>
3009 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
3010 the scope name, do not report a missing label as a style violation (it
3011 will be diagnosed as an illegality).
3012 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
3013 variant records: Get_Enum_Lit_From_Pos already returns a usage
3014 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
3015 on Expr in Integer_Literal case so that it can be used by
3018 2011-08-29 Tristan Gingold <gingold@adacore.com>
3020 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
3022 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
3023 (Build_Abort_Block_Handler): New function to build an Abort_Signal
3025 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
3026 Build_Abort_Block_Handler to build the exception handler. Do not
3027 undefer aborts for the Abort_Signal exception handler if back-end
3028 exception mechanism.
3029 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
3030 back_end exceptions for all others and abort_signal.
3031 * s-except.ads (ZCX_By_Default): New constant.
3032 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
3033 (Raise_Exception_Always): Ditto.
3034 (Raise_From_Signal_Handler): Ditto.
3035 (Raise_With_Location_And_Msg): Ditto.
3036 (Raise_With_Msg): Ditto.
3038 (Reraise_Occurence): Ditto.
3039 (Reraise_Occurrence_Always): Ditto.
3040 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
3041 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
3043 2011-08-29 Thomas Quinot <quinot@adacore.com>
3045 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
3047 2011-08-29 Robert Dewar <dewar@adacore.com>
3049 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
3050 Minor code reorganization.
3052 2011-08-29 Bob Duff <duff@adacore.com>
3054 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
3055 2012, not just Ada 2005.
3057 2011-08-29 Vincent Celier <celier@adacore.com>
3059 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
3060 with a project file or with gprbuid, if -gnatep= is specified, the
3061 builder may need to be invoked with -x.
3063 2011-08-29 Tristan Gingold <gingold@adacore.com>
3065 * a-exexpr-gcc.adb: Minor comment fix.
3067 2011-08-29 Robert Dewar <dewar@adacore.com>
3069 * sem_ch8.adb: Minor reformatting.
3071 2011-08-29 Bob Duff <duff@adacore.com>
3073 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
3074 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
3075 treating "some" as unreserved in earlier Ada versions. This is now
3076 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
3077 rather than Name_Some, since Tok_Some is now recognized as reserved.
3078 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
3080 * scans.ads: Minor comment fixes.
3081 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
3082 for other language versions.
3083 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
3084 treating "some" as unreserved in earlier Ada versions. This is now
3085 handled in Snames.Is_Keyword_Name.
3086 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
3088 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
3089 unreserved in earlier Ada versions. This is now handled in
3090 Snames.Is_Keyword_Name.
3091 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
3092 words as for other language versions.
3093 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
3094 Ada 2012, not just Ada 2005.
3096 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3098 * sem_ch13.adb: Additional semantic checks for aspects involved in
3101 2011-08-29 Matthew Heaney <heaney@adacore.com>
3103 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
3104 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
3105 Container parameter.
3106 (Ancestor_Find): ditto.
3108 2011-08-29 Thomas Quinot <quinot@adacore.com>
3110 * par-endh.adb: Minor reformatting.
3112 2011-08-29 Tristan Gingold <gingold@adacore.com>
3114 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
3115 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
3116 (Adjust_N_CLeanups_For): Remove.
3117 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
3119 (Propgate_Exception): Adjust.
3120 * raise-gcc.c: Add a few static/const.
3121 (Adjust_N_Cleanups_For): Remove declaration.
3122 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
3124 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3126 * sem_ch8.adb: Use type of function return when rewriting as object
3129 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3131 * sem_type.adb: Minor reformatting.
3133 2011-08-29 Robert Dewar <dewar@adacore.com>
3135 * makeutl.adb: Minor reformatting.
3137 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3139 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
3140 function call of a limited type, the expansion of the renaming is
3141 complicated by the presence of various temporaries and subtypes that
3142 capture constraints of the renamed object.
3143 Rewrite node as an object declaration, whose expansion is simpler.
3144 Given that the object is limited there is no copy involved and no
3147 2011-08-29 Robert Dewar <dewar@adacore.com>
3149 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
3150 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
3152 2011-08-29 Tristan Gingold <gingold@adacore.com>
3154 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
3155 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
3156 system-linux-hppa.ads, system-linux-s390.ads,
3157 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
3158 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
3159 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
3160 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
3161 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
3162 system-solaris-sparc.ads, system-lynxos-x86.ads,
3163 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
3164 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
3165 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
3166 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
3167 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
3168 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
3169 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
3170 * opt.ads: Adjust comment.
3171 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
3172 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
3173 * system.ads: Move GCC_ZCX_Support to obsolete entries.
3175 2011-08-29 Emmanuel Briot <briot@adacore.com>
3177 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
3178 file name is specified on the gnatmake or gprbuild command line, and
3179 before we search for that file in the project.
3181 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3183 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
3184 used to determine whether a possible interpretation for an overloadable
3185 entity is declared within the current instantiation and should be
3186 included in the candidate set.
3188 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3190 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
3192 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3194 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
3195 access subtype is access_to_subprogram, when applying checks for
3198 2011-08-29 Matthew Heaney <heaney@adacore.com>
3200 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
3201 for sibling when common parent.
3203 2011-08-29 Thomas Quinot <quinot@adacore.com>
3205 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
3208 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3210 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
3211 for the return type when in ASIS mode.
3213 2011-08-29 Vincent Celier <celier@adacore.com>
3215 * make.adb (Gnatmake): Get the default search dirs, then the target
3216 parameters after getting the Builder switches, as the Builder switches
3217 may include --RTS= and that could change the default search dirs.
3219 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3221 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
3222 Make_Final_Call. Move the processing for class-wide types before the
3223 processing for derivations from [Limited_]Controlled.
3224 (Make_Final_Call): Move the processing for class-wide types before the
3225 processing for derivations from [Limited_]Controlled.
3226 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
3227 Add code to account for alignments larger than the list header. Add a
3228 comment illustrating the structure of the allocated object + padding +
3230 (Deallocate_Any_Controlled): Add code to account for alignments larger
3231 than the list header.
3233 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3235 * sinfo.ads, sinfo.adb: New node kind
3236 N_Formal_Incomplete_Type_Definition, related flags.
3237 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
3238 Parse formal incomplete types.
3239 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
3241 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
3242 Formal incomplete types do not need completion.
3243 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
3244 Validate_Incomplete_Type_Instance): New procedures to handle formal
3246 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
3247 that corresponds to a formal incomplete type.
3248 * sprint.adb: Handle formal incomplete type declarations.
3249 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
3252 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3254 * a-fihema.ads, a-fihema.adb: Unit removed.
3255 * a-undesu.ads, a-undesu.adb: New unit implementing
3256 Ada.Unchecked_Deallocate_Subpool.
3257 * einfo.adb: Remove Associated_Collection from the node usage.
3258 Add Finalization_Master to the node usage.
3259 (Associated_Collection): Removed.
3260 (Finalization_Master): New routine.
3261 (Set_Associated_Collection): Removed.
3262 (Set_Finalization_Master): New routine.
3263 (Write_Field23_Name): Remove Associated_Collection from the output. Add
3264 Finalization_Master to the output.
3265 * einfo.ads: Remove attribute Associated_Collection and its uses in
3267 Add new attribute Finalization_Master along with its uses in entitites.
3268 (Associated_Collection): Removed along with its pragma import.
3269 (Finalization_Master): New routine along with a pragma import.
3270 (Set_Associated_Collection): Removed along with its pragma import.
3271 (Set_Finalization_Master): New routine along with a pragma import.
3272 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
3273 Build_Finalization_Collection with Build_Finalization_Master.
3274 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
3275 before the bodies of the predefined routines. Add comment explaining
3276 this. Replace call to Build_Finalization_Collection with
3277 Build_Finalization_Master.
3278 (Freeze_Type): Replace call to Build_Finalization_Collection with
3279 Build_Finalization_Master.
3280 (Make_Finalize_Address_Body): Comment reformatting.
3281 (Make_Predefined_Primitive_Specs): Code reformatting.
3282 (Stream_Operation_OK): Update comment mentioning finalization
3283 collections. Replace RE_Finalization_Collection with
3284 RE_Finalization_Master.
3285 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
3286 Associated_Collection with Finalization_Master. Replace call to
3287 Build_Finalization_Collection with Build_Finalization_Master.
3288 (Expand_Allocator_Expression): Replace call to Associated_Collection
3289 with Finalization_Master. Replace call to Set_Associated_Collection with
3290 Set_Finalization_Master. Remove the generation of
3291 Set_Finalize_Address_Ptr.
3292 (Expand_N_Allocator): Replace call to Associated_Collection with
3293 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
3294 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
3295 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
3296 comment on usage. Replace call to Needs_BIP_Collection with
3297 Needs_BIP_Finalization_Master Remplace BIP_Collection with
3298 BIP_Finalization_Master. Update all comments which mention finalization
3299 collections. Replace Associated_Collection with
3300 Finalization_Master. Replace Build_Finalization_Collection with
3301 Build_Finalization_Master.
3302 (BIP_Formal_Suffix): Update BIP_Collection's case.
3303 (Build_Heap_Allocator): Update the related comment. Rename local
3304 variable Collect to Fin_Mas_Id and update its occurrences. Update
3305 comments which mention finalization collections. Replace
3306 Set_Associated_Collection with Set_Finalization_Master.
3307 (Expand_Call): Update the code which detects a special piece of library
3309 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
3310 Add_Collection_Actual_To_Build_In_Place_Call with
3311 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
3312 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
3313 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
3314 Add_Collection_Actual_To_Build_In_Place_Call with
3315 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
3316 (Make_Build_In_Place_Call_In_Assignment): Replace call to
3317 Add_Collection_Actual_To_Build_In_Place_Call with
3318 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
3319 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
3320 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
3321 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
3322 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
3323 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
3324 Replace call to Set_Associated_Collection with Set_Finalization_Master.
3325 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
3326 Replace the call to Associated_Collection with Finalization_Master.
3327 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
3328 Update the way finalization master names are generated. Update the
3329 retrieval of the correct access type which will carry the pool and
3331 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
3332 (Make_Finalize_Address_Body): Abstract types do not need
3333 Finalize_Address. Code reformatting.
3334 (Make_Finalize_Address_Stmts): Update comment on usage.
3335 (Make_Set_Finalize_Address_Ptr_Call): Removed.
3336 (Process_Declarations): Update comments.
3337 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
3338 Build_Finalization_Master. Update associated comment.
3339 (Make_Set_Finalize_Address_Ptr_Call): Removed.
3340 * exp_ch13.adb: Update comments which mention finalization collections.
3341 (Expand_N_Free_Statement): Replace the call to Associated_Collection
3342 with Finalization_Master.
3343 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
3344 create calls to routines Allocate_Any_Controlled and
3345 Deallocate_Any_Controlled.
3346 (Find_Finalize_Address): New routine.
3347 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
3349 (Requires_Cleanup_Actions): Update the comment on freeze node
3351 * exp_util.ads: Remove comment on generated code for
3352 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
3353 is better to simply look in the body.
3354 * freeze.adb (Freeze_All): Update the comment of finalization
3355 collections. Replace the call to Associated_Collection with
3356 Finalization_Master. Replace the call to Build_Finalization_Collection
3357 with Build_Finalization_Master.
3358 * impunit.adb: Add a-undesu and s-stposu to the list of units.
3359 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
3361 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
3362 Ada.Finalization. Add processing for children of System.Storage_Pools.
3363 * rtsfind.ads: Remove the naming of second level children of
3365 Remove Ada_Finalization_Heap_Management from the list of units.
3366 Remove subtype Ada_Finalization_Child.
3367 Remove the following subprogram entities:
3371 RE_Finalization_Collection
3372 RE_Finalization_Collection_Ptr
3373 RE_Set_Finalize_Address_Ptr
3375 Add the naming of second level children of System.Storage_Pools.
3376 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
3378 Add subtype System_Storage_Pools_Child.
3379 Add the following subprogram entities to System.Finalization_Masters:
3381 RE_Finalization_Master
3382 RE_Finalization_Master_Ptr
3384 Add the following subprogram entities to System.Storage_Pools.Subpools:
3386 RE_Allocate_Any_Controlled
3387 RE_Deallocate_Any_Controlled
3388 RE_Root_Storage_Pool_With_Subpools
3392 Move the following subprogram entities from
3393 Ada.Finalization.Heap_Management to System.Finalization_Masters:
3395 RE_Add_Offset_To_Address
3400 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
3401 Set_Associated_Collection with Set_Finalization_Master.
3402 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
3403 BIP_Finalization_Master is created.
3404 * s-finmas.adb: New unit System.Finalization_Masters.
3405 * s-finmas.ads: New unit System.Finalization_Masters.
3406 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
3407 * s-stposu.ads, s-stposu.adb: New unit implementing
3408 System.Storage_Pools.Subpools.
3410 2011-08-29 Bob Duff <duff@adacore.com>
3412 * tbuild.adb: Add assertion.
3414 2011-08-29 Thomas Quinot <quinot@adacore.com>
3416 * s-pooglo.adb: Minor reformatting.
3418 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3420 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
3421 an indexed component of a packed array whose element type is a record
3422 with a representation clause different from that of the right-hand
3423 side, generate a temporary to minimuze the number of bit-field
3424 operations generated.
3426 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3428 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
3429 declarations, and thus are likely insertion points for actions.
3431 2011-08-29 Bob Duff <duff@adacore.com>
3433 * einfo.ads: Minor comment fix.
3435 2011-08-29 Robert Dewar <dewar@adacore.com>
3437 * frontend.adb, gnat1drv.adb: Minor reformatting.
3439 2011-08-29 Tristan Gingold <gingold@adacore.com>
3441 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
3442 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
3443 space in front of the header.
3445 2011-08-29 Johannes Kanig <kanig@adacore.com>
3447 * frontend.adb (Frontend): Exit after creating Standard package when
3448 -gnatd.H is present.
3449 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
3452 2011-08-29 Robert Dewar <dewar@adacore.com>
3454 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
3455 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
3456 snames.ads-tmpl: Minor reformatting.
3458 2011-08-29 Philippe Gil <gil@adacore.com>
3460 * prj.adb (Reset_Units_In_Table): New procedure.
3461 Reset units to avoid access to freed memory.
3463 2011-08-29 Thomas Quinot <quinot@adacore.com>
3465 * get_scos.adb: When reading a P statement SCO without a pragma name
3466 (from an older ALI file), ensure that the Pragma_Name component is set
3467 to Unknown_Pragma (not left uninitialized).
3469 2011-08-29 Vincent Celier <celier@adacore.com>
3471 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
3472 modified to compute correctly the object path of a SAL project that is
3473 extending another library project.
3474 (Write_Path_File): New procedure.
3475 * makeutl.ads (Directories): New table moved from Buildgpr
3476 (Get_Directories): New procedure moved from Buildgpr
3477 (Write_Path_File): New procedure
3478 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
3479 paths before binding SALs, instead of Set_Ada_Paths.
3480 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
3482 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
3483 (Current_Source_Path_File_Of): New function
3484 (Set_Current_Object_Path_File_Of): New procedure
3485 (Current_Source_Object_File_Of): New function
3486 (Set_Current_Object_Path_File_Of): New procedure
3487 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
3488 (Current_Source_Path_File_Of): New function
3489 (Set_Current_Object_Path_File_Of): New procedure
3490 (Current_Source_Object_File_Of): New function
3491 (Set_Current_Object_Path_File_Of): New procedure
3493 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3495 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
3496 packed entity, use a bit-field assignment only if there is no change of
3499 2011-08-29 Thomas Quinot <quinot@adacore.com>
3501 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
3502 Is_RTU instead of using Chars comparisons.
3504 2011-08-29 Thomas Quinot <quinot@adacore.com>
3506 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
3507 temporary object if the actual is constrained, and the discriminants
3508 read from the stream don't match.
3510 2011-08-29 Tristan Gingold <gingold@adacore.com>
3512 * sem_attr.adb, exp_attr.adb: Add handling of
3513 Attribute_System_Allocator_Alignment
3514 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
3515 Attribute_System_Allocator_Alignment.
3516 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
3517 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
3518 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
3519 get_target_system_allocator_alignment.
3521 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3523 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3526 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3528 * exp_ch3.adb (In_Runtime): Fix typo.
3530 2011-08-29 Bob Duff <duff@adacore.com>
3532 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
3534 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3536 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
3537 and a separate tag assignment is generated, ensure that the tag
3538 assignment is analyzed.
3540 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3542 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
3543 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
3544 of statement lists that may contain local declarations.
3545 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
3546 duplicate the triggering statements needed for the expansion of this
3547 construct, when the trigger is a dispatching call to a synchronized
3550 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3552 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
3553 * bindgen.adb: Add comments.
3554 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
3557 2011-08-29 Robert Dewar <dewar@adacore.com>
3559 * exp_attr.adb: Minor reformatting.
3560 Minor code reorganization and commenting.
3561 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
3564 2011-08-29 Thomas Quinot <quinot@adacore.com>
3566 * get_scos.adb: Ignore chaining indicators not currently supported
3569 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3571 * system.ads: Minor editing.
3573 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3575 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
3577 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
3578 Attribute_Elab_Subp_Body.
3579 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
3580 * sem_util.adb: Update comments.
3582 2011-08-29 Thomas Quinot <quinot@adacore.com>
3584 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
3585 pragma name for each SCO statement corresponding to a pragma.
3587 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3589 * opt.ads: Minor editing.
3591 2011-08-29 Yannick Moy <moy@adacore.com>
3593 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
3594 that only made sense for CodePeer mode.
3596 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3598 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
3599 which is no longer used.
3600 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
3601 handling of the 64-bit division check.
3602 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
3604 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
3607 2011-08-29 Thomas Quinot <quinot@adacore.com>
3609 * get_scos.adb: Minor reformatting.
3611 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3613 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
3614 statement list is wrapped in a block, the block is explicitly analyzed
3615 in order to properly redecorate the entities and create a servicing
3618 2011-08-29 Tristan Gingold <gingold@adacore.com>
3620 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
3621 (Set_Zero_Cost_Handling): Remove.
3623 2011-08-29 Thomas Quinot <quinot@adacore.com>
3625 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
3627 2011-08-29 Geert Bosch <bosch@adacore.com>
3629 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
3630 instruction, as the latter may produce -0.0, which is not a valid VAX
3632 (Neg_G): Likewise for VAX F float.
3634 2011-08-29 Robert Dewar <dewar@adacore.com>
3636 * exp_util.adb: Minor reformatting.
3638 2011-08-29 Yannick Moy <moy@adacore.com>
3640 * sem_ch3.adb: Minor comment update.
3642 2011-08-29 Thomas Quinot <quinot@adacore.com>
3644 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
3647 2011-08-29 Thomas Quinot <quinot@adacore.com>
3649 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
3650 current statement sequence on a generic instantiation or a subprogram
3653 2011-08-29 Robert Dewar <dewar@adacore.com>
3655 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
3658 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3660 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3661 Correct the check which involves the freeze node of a controlled or
3662 access-to-controlled type.
3664 2011-08-29 Geert Bosch <bosch@adacore.com>
3666 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
3668 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
3671 2011-08-29 Yannick Moy <moy@adacore.com>
3673 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
3674 for every index type and component type that is not a subtype_mark.
3675 (Process_Subtype): Set Etype of subtype.
3677 2011-08-29 Robert Dewar <dewar@adacore.com>
3679 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
3680 reorganization. Minor reformatting.
3682 2011-08-29 Steve Baird <baird@adacore.com>
3684 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
3685 for CodePeer and ALFA modes.
3687 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3689 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
3690 that comes from an enclosing scope if it is not the renaming of an
3691 actual, to handle properly a spurious ambiguity in an instance.
3693 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3695 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
3696 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
3697 use it instead of the Esize of the first parameter.
3698 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
3700 <Size>: Likewise. Call it for composite types on the RM size.
3702 2011-08-29 Yannick Moy <moy@adacore.com>
3704 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
3705 * sem_util.adb (Unique_Name): Correct behaviour for names of
3708 2011-08-29 Yannick Moy <moy@adacore.com>
3710 * sem_prag.adb (Check_Precondition_Postcondition): In formal
3711 verification mode, analyze pragma expression for correctness, for
3712 pre/post on library-level subprogram, as it is not expanded later.
3714 2011-08-29 Yannick Moy <moy@adacore.com>
3716 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
3717 in formal verification.
3719 2011-08-29 Thomas Quinot <quinot@adacore.com>
3721 * sem_util.adb: Minor reformatting.
3722 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
3724 * par_sco.ads, par_sco.adb: Update comments.
3726 2011-08-29 Yannick Moy <moy@adacore.com>
3728 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
3729 associated getter/setter.
3730 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
3732 2011-08-29 Vincent Celier <celier@adacore.com>
3734 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
3735 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
3736 with declarations for Language_Kind and Dependency_Kind for Ada.
3737 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
3738 (Process_Compiler): Take into account the new attributes Dependency_Kind
3740 (Check_Configuration): Check if language kind is unit based, not if the
3741 language name is Ada.
3742 (Process_Exceptions_Unit_Based): Ditto
3743 (Add_Language): Remove default additions of language and dependency kind
3744 * prj.ads: Minor comment change
3745 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
3747 2011-08-29 Johannes Kanig <kanig@adacore.com>
3749 * debug.adb: Update comments.
3751 2011-08-24 Joseph Myers <joseph@codesourcery.com>
3753 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
3754 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
3755 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
3756 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
3757 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
3759 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3761 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
3762 (GNATLIBCFLAGS_FOR_C): Replace
3763 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
3764 (gnatlib-shared-default, gnatlib-shared-dual-win32)
3765 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
3766 (gnatlib-sjlj, gnatlib-zcx): Likewise.
3768 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
3770 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
3772 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
3774 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
3776 2011-08-05 Nicolas Roche <roche@adacore.com>
3778 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
3779 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
3781 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
3783 2011-08-05 Matthew Heaney <heaney@adacore.com>
3785 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
3786 subprogram bodies declared out-of-order.
3788 2011-08-05 Yannick Moy <moy@adacore.com>
3790 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
3791 entities directly in package Standard, otherwise skip the standard
3794 2011-08-05 Robert Dewar <dewar@adacore.com>
3796 * a-cbmutr.adb: Minor reformatting
3797 (Allocate_Node): refactor node allocation algorithm
3799 2011-08-05 Robert Dewar <dewar@adacore.com>
3801 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
3802 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
3804 (Analyze_Pragma, case Check_Policy): Ditto.
3805 * sem_prag.ads (Check_Disabled): New function
3806 * snames.ads-tmpl: Add Name_Disable.
3808 2011-08-05 Robert Dewar <dewar@adacore.com>
3810 * gnat_rm.texi: Document implementation-defined policy DISABLE for
3811 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
3813 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3815 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
3816 that appears in a generic formal part and applies to a formal
3819 2011-08-05 Robert Dewar <dewar@adacore.com>
3821 * a-cbmutr.ads: Minor reformatting.
3823 2011-08-05 Matthew Heaney <heaney@adacore.com>
3825 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
3826 to check count, check sign of value instead.
3827 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
3828 (Copy_Subtree): allocate copy of source element
3829 (Equal_Subtree): compare elements, not access objects
3831 2011-08-05 Vincent Celier <celier@adacore.com>
3833 * gnat_ugn.texi: Fix VMS alternative.
3835 2011-08-05 Thomas Quinot <quinot@adacore.com>
3837 * sem_ch11.adb: Add comment.
3839 2011-08-05 Robert Dewar <dewar@adacore.com>
3841 * exp_util.adb: Minor comment fix.
3843 2011-08-05 Robert Dewar <dewar@adacore.com>
3845 * scng.adb (Error_Unterminated_String): Improve flag position when
3848 2011-08-05 Matthew Heaney <heaney@adacore.com>
3850 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
3852 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
3853 multiway tree containers.
3855 2011-08-05 Robert Dewar <dewar@adacore.com>
3857 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
3858 * stylesw.adb: Implement -gnatyC to control comment spacing
3859 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
3861 * usage.adb: Add line for -gnatyC.
3863 2011-08-05 Robert Dewar <dewar@adacore.com>
3865 * gnat_ugn.texi: Document -gnatyC.
3866 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
3867 synonym for COMMENTS2).
3869 2011-08-05 Robert Dewar <dewar@adacore.com>
3871 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
3872 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
3873 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
3874 a-comutr.ads, lib-xref.adb: Minor reformatting.
3876 2011-08-05 Robert Dewar <dewar@adacore.com>
3878 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
3879 warning if there is an exception handler present.
3881 2011-08-05 Pascal Obry <obry@adacore.com>
3883 * a-iteint.ads: Fix copyright year.
3885 2011-08-05 Thomas Quinot <quinot@adacore.com>
3887 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
3888 statement SCO for a USE clause or a representation clause.
3890 2011-08-05 Yannick Moy <moy@adacore.com>
3892 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
3893 between body and spec for stub.
3894 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
3895 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
3896 pragma precondition or postcondition, for which the enclosing
3897 subprogram or package in the AST is not the desired one, return empty.
3899 2011-08-05 Thomas Quinot <quinot@adacore.com>
3901 * g-expect.adb: Minor reformatting.
3903 2011-08-05 Bob Duff <duff@adacore.com>
3905 * a-fihema.adb: Comment out OS_Lib.
3907 2011-08-05 Matthew Heaney <heaney@adacore.com>
3909 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
3910 (unbounded multiway tree containers) and a-iteint.ads.
3911 * a-comutr.ads, a-comutr.adb:
3912 This is the new Ada 2012 unit for unbounded multiway tree containers
3913 * a-cimutr.ads, a-cimutr.adb
3914 This is the new Ada 2012 unit for indefinite multiway tree containers
3915 * a-iteint.ads: New file.
3917 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3919 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
3921 2011-08-05 Bob Duff <duff@adacore.com>
3923 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
3925 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
3927 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3929 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
3930 general indexing aspects of Ada2012. Called when analyzing indexed
3931 components when other interpretations fail.
3932 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
3933 in an expression context where overloading is meaningful. This excludes
3934 the occurrence in an aspect specification (efficiency only).
3935 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
3936 related to iterators can be set by an attribute specification, but
3938 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
3939 Constant_Indexing and Variable_Indexing.
3940 (Check_Indexing_Functions): New procedure to perform legality checks.
3941 Additional semantic checks at end of declarations.
3943 2011-08-05 Sergey Rybin <rybin@adacore.com>
3945 * tree_io.ads: Update ASIS_Version_Number because of the change of the
3946 order of calling Tree_Write/Tree_Read routines made for aspects.
3948 2011-08-05 Bob Duff <duff@adacore.com>
3950 * a-fihema.adb (Finalize): Fix race condition.
3952 2011-08-05 Yannick Moy <moy@adacore.com>
3954 * sem_ch12.adb (Analyze_Package_Instantiation,
3955 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
3958 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3960 * sem_type.adb (Specific_Type): in an instance, the type-specific
3961 operand of an equality check that involves null may have a private
3962 type. Use full view to determine legality of construct.
3964 2011-08-05 Vincent Celier <celier@adacore.com>
3966 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
3967 delete or close the file when the call to gnatmake was successful.
3969 2011-08-05 Yannick Moy <moy@adacore.com>
3971 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
3972 Global_Discard_Names.
3974 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3976 * sinfo.ads: comments on use of entity field for aspect specifications.
3978 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3980 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
3981 node is not itself an entity but a selected component, it is a
3982 rewritten parameterless call to an en enclosing synchronized operation,
3983 and this expansion will be performed again in the instance, so there is
3984 no global information to preserve.
3986 2011-08-05 Javier Miranda <miranda@adacore.com>
3988 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
3989 for renamings of predefined primitives.
3990 (In_Predef_Prims_DT): New subprogram.
3992 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3994 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
3995 possible interpretation of name is a reference type, add an
3996 interpretation that is the designated type of the reference
3997 discriminant of that type.
3998 * sem_res.adb (resolve): If the interpretation imposed by context is an
3999 implicit dereference, rewrite the node as the deference of the
4000 reference discriminant.
4001 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
4002 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
4003 parent type or base type.
4004 * sem_ch4.adb (Process_Indexed_Component,
4005 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
4006 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
4007 Check for implicit dereference.
4008 (List_Operand_Interps): Indicate when an implicit dereference is
4010 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
4012 2011-08-05 Thomas Quinot <quinot@adacore.com>
4014 * scos.ads: Update documentation of SCO table. Pragma statements can now
4015 be marked as disabled (using 'p' instead of 'P' as the statement kind).
4016 * par_sco.ads, par_sco.adb: Implement the above change.
4017 (Process_Decisions_Defer): Generate a P decision for the first parameter
4018 of a dyadic pragma Debug.
4019 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
4021 * put_scos.adb: Code simplification based on above change.
4023 2011-08-05 Robert Dewar <dewar@adacore.com>
4025 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
4026 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
4027 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
4028 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
4030 2011-08-05 Bob Duff <duff@adacore.com>
4032 * a-stunau.ads, g-spipat.adb: Update comments.
4034 2011-08-05 Bob Duff <duff@adacore.com>
4036 * a-fihema.ads: Minor comment fix.
4037 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
4039 (Attach, Detach): Remove some unnecessary code.
4040 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
4042 2011-08-05 Bob Duff <duff@adacore.com>
4044 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
4045 allocation for Objects component. This simplifies the code somewhat. It
4046 is also a little more efficient in the not-so-unusual case where there
4047 are no controlled objects allocated.
4048 Make Finalization_Started flag atomic.
4049 (Finalize): Avoid unnecessary detachment of items from the list.
4050 (pcol): Minor cleanup.
4052 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4054 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
4055 package whose name is the same as that of the generic unit, or its
4058 2011-08-05 Bob Duff <duff@adacore.com>
4060 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
4061 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
4062 Minor comment fixes.
4064 2011-08-05 Arnaud Charlet <charlet@adacore.com>
4066 * make.adb (Linking_Phase): No longer need to set source search path
4067 before calling gnatlink in CodePeer mode.
4068 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
4069 gcc in CodePeer mode, since the binder generated file no longer has a
4071 * switch.ads, switch.adb (Is_Language_Switch): Removed.
4072 * switch-c.adb: Update comment.
4074 2011-08-05 Thomas Quinot <quinot@adacore.com>
4076 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
4078 2011-08-05 Nicolas Roche <roche@adacore.com>
4080 * gnat_ugn.texi: Fix minor syntax error issue.
4082 2011-08-05 Vincent Celier <celier@adacore.com>
4084 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
4085 delete or close the file when the call to gnatmake returns a non
4086 successful return code.
4088 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4090 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
4091 check, indicate that the copy of the original node does not come from
4092 source, to prevent an infinite recursion of the expansion.
4094 2011-08-05 Johannes Kanig <kanig@adacore.com>
4096 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
4097 VC generation for subprogram bodies.
4099 2011-08-05 Yannick Moy <moy@adacore.com>
4102 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
4103 the base type with the smallest allowed base type.
4105 2011-08-05 Sergey Rybin <rybin@adacore.com>
4107 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
4110 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4112 * sem_ch12.ads: minor comment updates.
4114 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4116 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
4117 instantiation and a formal package the compiler generates a package
4118 renaming declaration so that the generic name within the declaration
4119 is interpreted as a renaming of the instance. At the end of a formal
4120 package declaration, this renaming must become invisible.
4122 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4124 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
4125 comparison and rely on concrete entities instead.
4127 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4129 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
4130 and discriminants, to indicate that the type has an access discriminant
4131 that supports implicit dereference.
4132 * snames.ads-tmpl: Add names of aspects and attributes related to
4133 Ada2012 iterators: constant_indexing, default_iterator,
4134 iterator_element, implicit_dereference, variable_indexing.
4135 * aspects.ads, aspects.adb: entries for iterator-related aspects.
4136 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
4137 iterator-related aspects.
4138 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
4140 2011-08-05 Sergey Rybin <rybin@adacore.com>
4142 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
4143 metrics in gnatmetric to cover new kinds of coupling mentrics.
4145 2011-08-05 Steve Baird <baird@adacore.com>
4147 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
4148 of calling the user-defined main subprogram.
4149 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
4150 is set) Call_Main_Subprogram ahead of, as opposed to
4152 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
4153 generation of a "with" of the user-defined main subprogram.
4154 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
4155 (which is now called from Gen_Main instead).
4157 2011-08-05 Emmanuel Briot <briot@adacore.com>
4159 * projects.texi: Added reference to the Makefile package.
4161 2011-08-05 Thomas Quinot <quinot@adacore.com>
4163 * exp_ch7.adb: Minor comment rewording.
4165 2011-08-05 Ed Falis <falis@adacore.com>
4167 * env.c: Fix comment.
4169 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4171 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
4172 character comparison and rely on concrete entities instead.
4174 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4176 * sem_ch3.adb: (Check_Private_Overriding): better error message,
4177 suggested by AI95-0068.
4179 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
4181 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
4182 the two potential initialization calls. This accounts for any
4183 access-before-elaboration checks which may precede the initialization
4185 (Next_Suitable_Statement): New routine. Returns the next real statement
4186 after the input node while skipping generated checks.
4187 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
4188 with comment on usage.
4189 Do not generate Elaborate_All when the trigger is a finalization call
4190 coming from a type init proc.
4191 (Check_Elab_Call): Propagate the initialization procedure context to
4192 subsequent calls to Check_A_Call.
4193 (Check_Internal_Call_Continue): Propagate the initialization procedure
4194 context to subsequent calls to Check_Elab_Call.
4195 (Is_Finalization_Procedure): New routine. Returns True if the input
4196 entity denotes a [Deep_]Finalize routine.
4197 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
4198 along with comment on usage.
4200 2011-08-05 Vadim Godunko <godunko@adacore.com>
4202 * s-atocou.ads: Add list of supported platforms.
4204 2011-08-05 Yannick Moy <moy@adacore.com>
4206 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
4208 * opt.ads (Disable_ALI_File): new Boolean flag
4209 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
4211 2011-08-05 Ed Falis <falis@adacore.com>
4213 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
4214 environ is properly defined.
4216 2011-08-05 Vincent Celier <celier@adacore.com>
4218 * make.adb (Compilation_Phase): Exit immediately when all objects have
4219 been found up to date, to avoid multiple exit messages.
4220 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
4221 same project for languages with no compiler.
4222 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
4224 2011-08-05 Robert Dewar <dewar@adacore.com>
4226 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
4227 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
4228 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
4229 s-atocou-builtin.adb: Minor reformatting.
4231 2011-08-05 Yannick Moy <moy@adacore.com>
4233 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
4234 if the node to wrap is a pragma check, this node and enclosed
4235 expression are not expanded, so do not apply any transformations here.
4236 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
4237 introducing transient scopes.
4239 2011-08-05 Jose Ruiz <ruiz@adacore.com>
4241 * adaint.c (__gnat_set_writable, __gnat_set_readable,
4242 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
4243 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
4244 routine is available, so we use the default implementation of these
4246 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
4247 support for copying attributes on VxWorks 6.
4249 2011-08-05 Yannick Moy <moy@adacore.com>
4251 * debug.adb: Remove use of -gnatd.D.
4252 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
4253 * opt.ads: Simplify variables for ALFA mode, to keep one only
4254 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
4257 2011-08-05 Vincent Celier <celier@adacore.com>
4259 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
4260 Builder'Default_Switches.
4262 2011-08-05 Vincent Celier <celier@adacore.com>
4264 * makeusg.adb: Add lines for --create-map-file switches.
4266 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4268 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
4269 profile is incomplete and the full view is available, replace it with
4271 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
4272 incomplete, freezing the subprogram is delayed until the full view is
4274 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
4275 fixed-point multiplication operator and the predefined operator is
4276 resolved in favor of the user-defined one.
4278 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4280 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
4283 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4285 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
4286 whether a type lacks user-defined Read or Write operations, or has a
4287 component that lacks them.
4288 * sem_attr.adb (Check_Stream_Attribute): if restriction
4289 No_Default_Stream_Attributes is active, verify that all subcomponent
4290 types of the target have user-defined stream operations, and report
4292 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
4293 * exp_strm.adb: Build_Elementary_Input_Call,
4294 Build_Elementary_Write_Call): remove checks for restriction
4295 No_Default_Stream_Attributes, now checked in semantics.
4297 2011-08-04 Vincent Celier <celier@adacore.com>
4299 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
4300 switches on the command line, look for all valid --RTS switches in the
4301 Builder switches and for each language use the first runtime name found
4302 to invoke gprconfig.
4303 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
4304 command line and there is no auto-configuration.
4305 (Runtime_Name_Set_For): New function.
4307 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4309 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
4310 elaborate initialization expression for variable Abort when processing
4311 a package body or a declaration.
4312 (Create_Finalizer): Propagate the package context when creating the
4313 exception-related variables.
4314 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
4315 For_Package along with usage comment.
4317 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4319 * gcc-interface/Makefile.in: Clean up targets.
4320 Enable new package for atomic counters and copy-on-write implementation
4321 of unbounded strings on x86 platforms.
4322 * gcc-interface/Make-lang.in: Update dependencies.
4324 2011-08-04 Robert Dewar <dewar@adacore.com>
4326 * exp_ch7.adb: Minor reformatting.
4328 2011-08-04 Robert Dewar <dewar@adacore.com>
4330 * exp_strm.adb: Minor reformatting.
4332 2011-08-04 Vadim Godunko <godunko@adacore.com>
4334 * s-atocou.adb: Replace by dummy version and use on targets where atomic
4335 operations are not supported.
4336 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
4337 * s-atocou-x86.adb: New file.
4338 * Makefile.rtl: Add s-atocou.o file
4340 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4342 * make.adb (Compile): Move setting of CodePeer_Mode to ...
4343 (Compilation_Phase): ... here.
4344 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
4346 2011-08-04 Thomas Quinot <quinot@adacore.com>
4348 * Make-generated.in: Fix minor typo in comment.
4350 2011-08-04 Thomas Quinot <quinot@adacore.com>
4352 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
4355 2011-08-04 Robert Dewar <dewar@adacore.com>
4357 * a-coinho.adb: Minor reformatting.
4359 2011-08-04 Robert Dewar <dewar@adacore.com>
4361 * a-coinho.ads: Minor reformatting.
4363 2011-08-04 Vadim Godunko <godunko@adacore.com>
4365 * s-atocou.ads, s-atocou.adb: New files.
4366 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
4367 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
4368 direct use of GCC's atomic builtins and replace them by use of new
4369 atomic counter package.
4371 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4373 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
4375 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4377 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
4378 with a call to Get_External_Tag.
4379 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
4380 subprogram usage. Remove the guard against package declarations and
4381 bodies since Build_Cleanup_Statements is no longer invoked in that
4383 (Build_Components): Initialize Tagged_Type_Stmts when the context
4384 contains at least one library-level tagged type.
4385 (Build_Finalizer): New local variables Has_Tagged_Types and
4386 Tagged_Type_Stmts along with associated comments on usage. Update the
4387 logic to include tagged type processing.
4388 (Create_Finalizer): Insert all library-level tagged type unregistration
4389 code before the jump block circuitry.
4390 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
4391 (Expand_N_Package_Declaration): Remove the call to
4392 Build_Cleanup_Statements.
4393 (Process_Tagged_Type_Declaration): New routine. Generate a call to
4394 unregister the external tag of a tagged type.
4395 (Processing_Actions): Reimplemented to handle tagged types.
4396 (Process_Declarations): Detect the declaration of a library-level
4397 tagged type and carry out the appropriate actions.
4398 (Unregister_Tagged_Types): Removed. The machinery has been directly
4399 merged with Build_Finalizer.
4401 2011-08-04 Robert Dewar <dewar@adacore.com>
4403 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
4404 gnatls.adb, exp_ch3.adb: Minor reformatting.
4406 2011-08-04 Marc Sango <sango@adacore.com>
4408 * sem_attr.adb (Analyze_Attribute): Replace the message
4409 "invisible attribute of}" of the spark restriction violation in
4410 attribute reference by the simple message "invisible attribute of type".
4411 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
4412 two insertion characters: '&' and '}'.
4414 2011-08-04 Vadim Godunko <godunko@adacore.com>
4416 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
4417 * a-coinho.ads, a-coinho.adb: New file.
4418 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
4420 2011-08-04 Nicolas Roche <roche@adacore.com>
4422 * alfa_test.adb: Not all ali files are containing alfa information even
4423 if compiled with -gnatd.F. So suppress warning about missing ALFA
4426 2011-08-04 Yannick Moy <moy@adacore.com>
4428 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
4430 * put_alfa.adb: Check that scope name is not empty.
4432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4434 * exp_ch3.adb (Stream_Operation_Ok): new predicate
4435 Needs_Elementary_Stream_Operation, to determine whether user-defined
4436 Read and Write attributes are available for the elementary components
4437 of the given type. If only the predefined attributes are available,
4438 then when restriction No_Default_Stream_Attributes is active the
4439 predefined stream attributes for the composite type cannot be created.
4441 2011-08-04 Robert Dewar <dewar@adacore.com>
4443 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
4444 Put routines in alpha order
4446 2011-08-04 Jose Ruiz <ruiz@adacore.com>
4448 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
4449 * gcc-interface/Make-lang.in: Update dependencies.
4451 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4453 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
4454 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
4457 2011-08-04 Robert Dewar <dewar@adacore.com>
4459 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
4460 lib-xref-alfa.adb: Minor reformatting.
4462 2011-08-04 Marc Sango <sango@adacore.com>
4464 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
4465 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
4466 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
4469 2011-08-04 Tristan Gingold <gingold@adacore.com>
4471 * bindgen.adb (Gen_Adainit_C): Remove.
4472 (Gen_Adafinal_C): Ditto.
4473 (Gen_Elab_Externals_C): Ditto.
4474 (Gen_Elab_Calls_C): Ditto.
4475 (Gen_Elab_Order_C): Ditto.
4476 (Gen_Elab_Defs_C): Ditto.
4477 (Gen_Finalize_Library_C): Ditto.
4478 (Gen_Finalize_Library_Defs_C): Ditto.
4479 (Gen_Main_C): Ditto.
4480 (Gen_Output_File_C): Ditto.
4481 (Gen_Restrictions_C): Ditto.
4482 (Gen_Versions_C): Ditto.
4483 (Write_Info_Ada_C): Ditto.
4484 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
4485 (Gen_Output_File): Do not force Ada_Bind_File anymore.
4486 Always call Gen_Output_File_Ada.
4487 * gnatlink.adb (Begin_Info): Now a constant.
4489 (Ada_Bind_File): Remove
4490 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
4491 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
4492 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
4493 * opt.ads (Ada_Bind_File): Remove.
4495 2011-08-04 Thomas Quinot <quinot@adacore.com>
4497 * projects.texi: Document target-specific directory in default project
4500 2011-08-04 Thomas Quinot <quinot@adacore.com>
4502 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
4505 2011-08-04 Yannick Moy <moy@adacore.com>
4507 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
4508 opt.ads, lib-xref.ads: Code clean up.
4510 2011-08-04 Yannick Moy <moy@adacore.com>
4512 * gnat_rm.texi: Update description of Test_Case
4513 * gnat_ugn.texi: Typo.
4515 2011-08-04 Ed Falis <falis@adacore.com>
4517 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
4519 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4521 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
4522 it is of type Root_Controlled. This action eliminates fields Prev and
4523 Next from type equality.
4525 2011-08-04 Yannick Moy <moy@adacore.com>
4527 * lib-xref-alfa.adb: Correct typo.
4529 2011-08-04 Matthew Heaney <heaney@adacore.com>
4531 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
4534 2011-08-04 Yannick Moy <moy@adacore.com>
4536 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
4537 (Analyze_Pragma): allow static string expression for name of Test_Case,
4538 instead of simply string literals.
4539 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
4542 2011-08-04 Vincent Celier <celier@adacore.com>
4544 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
4545 case suffixes to find truncated main sources.
4547 2011-08-04 Tristan Gingold <gingold@adacore.com>
4549 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
4550 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
4551 (Compute_Current_Task): Ditto.
4553 2011-08-04 Tristan Gingold <gingold@adacore.com>
4555 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
4557 2011-08-04 Yannick Moy <moy@adacore.com>
4559 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
4560 library-level constant.
4561 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
4562 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
4563 used as selector of parameter association, in ALFA mode.
4565 2011-08-04 Robert Dewar <dewar@adacore.com>
4567 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
4568 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
4571 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4573 * make.adb (Linking_Phase): Set source search path before calling
4574 gnatlink in CodePeer mode.
4576 2011-08-04 Javier Miranda <miranda@adacore.com>
4578 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
4579 Remove code which takes care of building TSDs.
4580 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
4581 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
4582 the accessibility check in VM targets.
4583 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
4584 (Building_Static_DT): Now returns false for VM targets.
4585 (Build_VM_TSDs): Removed.
4586 (Expand_Interface_Conversion): Generate missing runtime check for
4587 conversions to interface types whose target type is unknown at compile
4589 (Make_VM_TSD): Add missing code to disable the generation of calls to
4590 Check_TSD if the tagged type is not defined at library level, or not
4591 has a representation clause specifying its external tag, or -gnatdQ is
4593 * exp_disp.ads (Build_VM_TSDs): Removed.
4594 (Make_VM_TSDs): Spec relocated from exp_disp.adb
4595 * sem_disp.adb (Check_Dispatching_Operation): No code required to
4596 register primitives in the dispatch tables in VM targets.
4597 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
4598 initialization of class-wide interface objects in VM targets.
4599 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
4602 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4604 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
4605 when dotnet-ld cannot be found.
4607 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4609 * bindgen.adb: Simplify significantly generation of binder body file in
4611 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
4612 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
4615 2011-08-04 Yannick Moy <moy@adacore.com>
4617 * sem_prag.adb, sem.ads: Code cleanup.
4619 2011-08-04 Tristan Gingold <gingold@adacore.com>
4621 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
4622 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
4623 results if possible.
4624 * s-stusta.adb (Print): Adjust after changes in s-stausa.
4625 * gnat_ugn.texi: Update dynamic stack usage section.
4627 2011-08-04 Steve Baird <baird@adacore.com>
4629 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
4630 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
4631 contains only a call to the user-defined main subprogram.
4632 (Gen_Main_Ada) - If CodePeer_Mode is set, then
4633 call the "wrapper" subprogram instead of directly
4634 calling the user-defined main subprogram.
4636 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4638 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
4639 alternatives of a case statement for controlled objects. Rename local
4640 variable A to Dead_Alt.
4641 (Expand_N_If_Statement): Check the then and else statements of an if
4642 statement for controlled objects. Check the then statements of all
4643 elsif parts of an if statement for controlled objects.
4644 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
4646 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
4647 detects a loop associated with the expansion of an array object.
4648 Augment the processing of the loop statements to account for a possible
4649 wrap done by Process_Statements_For_Controlled_Objects.
4650 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
4651 statements and abortable part of an asynchronous select for controlled
4653 (Expand_N_Conditional_Entry_Call): Check the else statements of a
4654 conditional entry call for controlled objects.
4655 (Expand_N_Selective_Accept): Check the alternatives of a selective
4656 accept for controlled objects.
4657 (Expand_N_Timed_Entry_Call): Check the entry call and delay
4658 alternatives of a timed entry call for controlled objects.
4659 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
4660 exception handler for controlled objects.
4661 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4662 Add formal parameter Nested_Constructs along with its associated
4664 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
4665 Requires_Cleanup_Actions.
4666 (Process_Statements_For_Controlled_Objects): New routine.
4667 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
4668 routine. Inspect a node which contains a non-handled sequence of
4669 statements for controlled objects. If such an object is found, the
4670 statements are wrapped in a block.
4672 2011-08-04 Bob Duff <duff@adacore.com>
4674 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
4675 need to compare with Class_Wide_Type (T2), in order to get at the
4676 original class-wide type node.
4677 * sem_type.ads (Covers): Improve the comment.
4678 * einfo.ads (Class_Wide_Type): Improve the comment.
4679 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
4680 the type of the Deref.
4682 2011-08-04 Yannick Moy <moy@adacore.com>
4684 * gnat_rm.texi: Document that Test_Case pragma can only appear on
4685 separate declarations.
4686 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
4687 check identifier of pragma argument.
4688 (Chain_TC): check that no other test case associated to the same entity
4689 share the same name.
4690 (Check_Test_Case): disallow test case inside subprogram body
4691 (Analyze_Pragma): correct call to check identifier and not argument
4692 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
4693 function gets name from test case pragma.
4695 2011-08-04 Yannick Moy <moy@adacore.com>
4697 * gnat_rm.texi: Document new pragma and aspect.
4698 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
4699 (No_Duplicates_Allowed): new constant array defining whether duplicates
4700 aspects of each kind can appear on the same declaration.
4701 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
4702 field, which points to a node holding the previous Spec_PPC_List.
4703 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
4704 through the indirection with Contract.
4705 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
4706 * par-prag.adb (Prag): do nothing on Test_Case pragma
4707 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
4709 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
4710 component Ensures of Test_Case.
4711 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
4712 (Analyze_Generic_Subprogram_Declaration,
4713 Analyze_Subprogram_Instantiation,
4714 Analyze_Abstract_Subprogram_Declaration,
4715 Analyze_Subprogram_Body_Helper,
4716 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
4717 insert contract in subprogram node at point of definition
4719 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
4720 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
4721 corresponding pragma
4722 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
4723 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
4724 similar to the analysis of pre/post
4725 (Derive_Subprogram): insert contract in subprogram node at point of
4727 * sem_prag.adb, sem_prag.ads
4728 (Check_Arg_Is_String_Literal, Check_Identifier):
4729 new checking procedures to be called in treatment of pragmas
4730 (Check_Test_Case): new procedure to check that a Test_Case aspect or
4731 pragma is well-formed. This does not check currently that 'Result is
4732 used only in the Ensures component of a Test_Case.
4733 (Analyze_Pragma): add case for Test_Case
4734 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
4735 components of a Test_Case.
4736 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
4737 expressions in the 3rd (and 4th if present) arguments of a Test_Case
4738 pragma, treated as spec expressions.
4739 (Sig_Flags): add value -1 for Test_Case.
4740 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
4741 Get_Requires_From_Test_Case_Pragma): getters for both expression
4742 components of a Test_Case.
4743 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
4744 indirection between an entry or [generic] subprogram entity and its
4745 pre/post + test-cases.
4746 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
4747 get/set for fields of an N_Contract node.
4748 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
4749 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
4750 names and pragma for Test_Case.
4751 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
4753 2011-08-04 Vincent Celier <celier@adacore.com>
4755 * gnat_ugn.texi: Improve documentation of gnatmake switch
4756 --source-info-file=.
4758 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4760 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
4761 type). Initialize Atyp to the appropriate type which is later checked
4762 for completion. Rewrite the assertion associated with private type
4765 2011-08-04 Ed Falis <falis@adacore.com>
4767 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
4768 initialize the number of CPUs.
4770 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4772 * sem_type.adb (Disambiguate): New subsidiary routine
4773 In_Same_Declaration_List, to implement AI05-0020: a user-defined
4774 equality on an anonymous access type whose designated type is private
4775 does not lead to an ambiguity with the universal access equality
4776 operator in the body or child units of the defining package. The same
4777 is true for a multiplication operator on a private type completed with
4780 2011-08-04 Javier Miranda <miranda@adacore.com>
4782 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
4783 (Normalize_Scalars_Config): Removed.
4785 (Register_Opt_Config_Switches): Remove registering config values of
4786 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
4787 (Restore_Opt_Config_Switches): Remove code which restores the values of
4788 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4789 Init_Or_Norm_Scalars.
4790 (Save_Opt_Config_Switches): Remove code which saves values of
4791 Init_Or_Norm_Scalars and Normalize_Scalars.
4792 (Set_Opt_Config_Switches): Remove code which restores config values of
4793 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
4794 Init_Or_Norm_Scalars.
4796 2011-08-04 Yannick Moy <moy@adacore.com>
4798 * frontend.adb (Frontend): remove previous patch to avoid full
4799 qualification in ALFA mode.
4800 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
4801 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
4802 unique name for an entity, which could be used to identify the entity
4803 across compilation units.
4805 2011-08-04 Thomas Quinot <quinot@adacore.com>
4808 (Initialize_Default_Project_Path): Add target specific directory
4809 ($prefix/$target/lib/gnat) in front of project path in all cases
4810 (making gnatmake's behaviour consistent with gprbuild).
4811 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
4812 Pass target name from Sdefault to project subsystem.
4813 * gnatls.adb: Show new target specific default project directory.
4815 2011-08-04 Johannes Kanig <kanig@adacore.com>
4817 * cstand.adb: Add Information to Identifier in Standard
4818 (Identifer_For): Set Entity to the corresponding entity
4820 2011-08-04 Sergey Rybin <rybin@adacore.com>
4822 * gnat_ugn.texi: Update doc on gnatcheck.
4824 2011-08-04 Yannick Moy <moy@adacore.com>
4826 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
4829 2011-08-04 Yannick Moy <moy@adacore.com>
4831 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
4832 performing expansion.
4833 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
4834 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
4835 it is not called in ALFA mode.
4837 2011-08-04 Emmanuel Briot <briot@adacore.com>
4839 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
4840 after all, so removed.
4842 2011-08-04 Sergey Rybin <rybin@adacore.com>
4844 * vms_data.ads: Add missing VMS qualifiers.
4846 2011-08-04 Emmanuel Briot <briot@adacore.com>
4848 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
4849 the list of files on the command line after processing it through
4852 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4854 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
4855 processing for .NET/JVM. These targets can now benefit from
4856 Raise_From_Controlled_Operation and they share the same processing with
4858 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
4859 These targets need transient scopes in order to properly finalize short
4860 lived controlled objects.
4861 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
4862 NET/JVM. These targets can now benefit from
4863 Raise_From_Controlled_Operation and they share the same processing with
4866 2011-08-04 Geert Bosch <bosch@adacore.com>
4868 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
4870 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4872 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
4873 Expand_Record_Aggregate, to determine whether aggregate must be
4874 expanded into assignments. This is the case if the ancestor part is
4875 private, regarless of the setting of the flag Has_Private_Ancestor.
4877 2011-08-04 Ed Falis <falis@adacore.com>
4879 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
4881 2011-08-04 Bob Duff <duff@adacore.com>
4883 * sinfo.ads: Fix comment.
4885 2011-08-04 Steve Baird <baird@adacore.com>
4887 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
4888 choose a package name in much the same way as is
4889 done for JGNAT when VM_Target /= No_VM, except that
4890 a slightly more distinctive prefix string is used.
4892 2011-08-04 Emmanuel Briot <briot@adacore.com>
4894 * makeutl.adb (Complete_Mains): no longer accept unit names on the
4895 gnatmake command line.
4896 This behavior was never documented (and was supported only because of
4897 an early bug in the code). This case might lead to ambiguous cases
4898 (between unit names and truncated base names without suffixes).
4900 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4902 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
4903 Remove the external tag of a tagged type from the internal hash table.
4904 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
4905 expanded usage of the routine. Strenghten the check for Is_Master. Add
4906 processing for tagged types.
4907 (Build_Finalizer): Create all the necessary lists used in finalizer
4908 creation when the processed context is a package that may contain
4910 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
4911 Requires_Cleanup_Actions.
4912 (Expand_N_Package_Body): Package bodies may need clean up code
4913 depending on whether they contain tagged types.
4914 (Expand_N_Package_Declaration): Package declarations may need clean up
4915 code depending on whether they contain tagged types.
4916 (Unregister_Tagged_Types): New routine. Search through a list of
4917 declarations or statements, looking for non-abstract Ada tagged types.
4918 For each such type, generate code to unregister the external tag.
4919 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
4920 Requires_Cleanup_Actions.
4921 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
4922 through a list of declarations or statements looking for non-abstract
4923 Ada tagged types or controlled objects.
4924 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
4925 Requires_Cleanup_Actions.
4926 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
4927 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
4930 2011-08-04 Vincent Celier <celier@adacore.com>
4932 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
4933 has Ada sources, not project Project, because if the root project
4934 Project has no sources of its own, all projects will be deemed without
4937 2011-08-04 Gary Dismukes <dismukes@adacore.com>
4939 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
4940 of the No_Param_Proc acc-to-subp type used for initialization of
4941 __gnat_finalize_library_objects so that it's declared at library level
4942 rather than nested inside of the adainit routine.
4944 2011-08-04 Javier Miranda <miranda@adacore.com>
4946 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
4947 if the tagged type has a representation clause which specifies its
4950 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4952 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
4953 Remove previous procedure with that name.
4954 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
4956 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
4957 subtype mark, the ancestor cannot have unknown discriminants.
4958 (Resolve_Record_Aggregate): if the type has invisible components
4959 because of a private ancestor, the aggregate is illegal.
4961 2011-08-04 Vincent Celier <celier@adacore.com>
4963 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
4964 account switches -gnat2005, -gnat12 and -gnat2012.
4966 2011-08-04 Bob Duff <duff@adacore.com>
4968 * s-tasdeb.ads: Minor comment fix.
4970 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4972 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
4974 * switch.ads, switch.adb (Is_Language_Switch): New function.
4976 2011-08-04 Vincent Celier <celier@adacore.com>
4978 * switch-c.adb: Minor comment addition.
4980 2011-08-04 Vincent Celier <celier@adacore.com>
4982 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
4983 ending with '=' is followed by a space (missing file name).
4985 2011-08-04 Pascal Obry <obry@adacore.com>
4987 * g-regist.ads: Fix size of HKEY on x86_64-windows.
4989 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4991 * sem_ch12.adb (Analyze_Associations): New routine
4992 Check_Overloaded_Formal_Subprogram to reject a formal package when
4993 there is a named association or a box initialisation for an overloaded
4994 formal subprogram of the corresponding generic.
4996 2011-08-04 Yannick Moy <moy@adacore.com>
4998 * alfa.ads (ALFA_Xref_Record): add component for type of entity
4999 * get_alfa.adb, put_alfa.adb: Read and write new component of
5001 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
5003 2011-08-04 Pascal Obry <obry@adacore.com>
5005 * urealp.adb: Minor reformatting.
5007 2011-08-04 Tristan Gingold <gingold@adacore.com>
5009 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
5010 Handle the case when Cleanup_Protected_Object returns Empty.
5012 2011-08-04 Yannick Moy <moy@adacore.com>
5014 * frontend.adb (Frontend): only qualify names in non-ALFA mode
5016 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5018 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
5019 call, ignore functions.
5021 2011-08-04 Geert Bosch <bosch@adacore.com>
5023 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
5026 2011-08-04 Emmanuel Briot <briot@adacore.com>
5028 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
5029 as an index for Builder'Switches. This conforms to the documentation.
5030 * make.adb (Insert_Project_Sources): avoid duplicate code
5032 2011-08-04 Emmanuel Briot <briot@adacore.com>
5034 * makeutl.adb (Complete_Mains): if the user has passed a relative file
5035 name on the command line (for instance "../dummy"), never assume it can
5038 2011-08-04 Tristan Gingold <gingold@adacore.com>
5040 * bindgen.adb: Remove code the reference or create the
5041 Break_Start/__gnat_break_start procedure.
5042 * s-stalib.adb (Break_Start): Removed.
5044 2011-08-04 Emmanuel Briot <briot@adacore.com>
5046 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
5047 shared with gprbuild.
5049 2011-08-04 Yannick Moy <moy@adacore.com>
5051 * par-ch4.adb (P_Primary): preferentially issue an error message about
5052 a missing parenthesis arount a conditional or case expression in Ada
5053 2012 mode, if we detect that the alignment is not correct for a
5056 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5058 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
5059 tag-to-class-wide conversion as needing finalization actions.
5060 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
5061 a tag-to-class-wide conversion as needing finalization actions.
5062 (Is_Finalizable_Transient): The result of a tag-to-class-wide
5063 conversion does not need finalization actions.
5064 (Is_Tag_To_CW_Conversion): New routine.
5065 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
5066 whether an object is the result of a tag-to-class-wide conversion.
5068 2011-08-04 Yannick Moy <moy@adacore.com>
5070 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
5071 the left-hand-side and right-hand-side of a conjunct are inserted when
5072 translating a pre- or postcondition
5073 * sem_ch6.adb: Correct typo in comment
5075 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5077 * gnat_rm.texi: Ravenscar does not prohibit dependence on
5078 Unchecked_Conversion and Unchecked_Deallocation.
5080 2011-08-04 Thomas Quinot <quinot@adacore.com>
5082 * make.adb: Minor reformatting.
5084 2011-08-04 Emmanuel Briot <briot@adacore.com>
5086 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
5087 sources in the project and its imported projects, but not in the whole
5090 2011-08-04 Emmanuel Briot <briot@adacore.com>
5092 * make.adb: Remove debug trace.
5094 2011-08-04 Vincent Celier <celier@adacore.com>
5096 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
5097 path in canonical form, to be able to compare path names on platforms
5098 such as Windows or Darwin.
5100 2011-08-04 Thomas Quinot <quinot@adacore.com>
5102 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
5103 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
5104 * scos.ads: Update documentation accordingly.
5105 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
5108 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5110 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
5111 attribute only if prefix type is scalar.
5113 2011-08-04 Emmanuel Briot <briot@adacore.com>
5115 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
5116 in gnatmake for specifying mains on the command line that do not belong
5117 to the main project. These mains must currently all belong to the same
5119 (Ultimate_Extension_Of): removed, since duplicated
5120 Ultimate_Extending_Project.
5122 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5124 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
5126 (CodePeer_Mode_String): New.
5127 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
5129 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
5130 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
5131 mode, since no useful elaboration subprogram is needed by CodePeer.
5132 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
5133 In this mode, compile binder file with -gnatC and do stop after this
5136 2011-08-04 Vincent Celier <celier@adacore.com>
5138 * exp_ch7.adb: Minor comment fix.
5140 2011-08-04 Robert Dewar <dewar@adacore.com>
5142 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
5143 exp_ch4.adb, makeutl.adb: Minor reformatting.
5145 2011-08-04 Emmanuel Briot <briot@adacore.com>
5147 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
5148 Create several new subprograms to move code out of Make. This makes the
5149 code more readable, removes code duplication, and is a preparation work
5150 for adding support for aggregate projects.
5152 2011-08-04 Tristan Gingold <gingold@adacore.com>
5154 * s-po32gl.ads, s-po32gl.adb: New files.
5155 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
5156 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
5157 (Build_Finalization_Collection): Use it.
5158 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
5159 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
5161 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
5162 * gcc-interface/Make-lang.in: Update dependencies.
5164 2011-08-04 Emmanuel Briot <briot@adacore.com>
5166 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
5169 2011-08-04 Emmanuel Briot <briot@adacore.com>
5171 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
5172 command line is not a file name, also check whether it could be a unit
5175 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5177 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
5178 the header of the finalization routine.
5179 If the unit has no finalizer but is a body whose spec has one, then
5180 generate the decrement of the elaboration entity only.
5181 If the unit has a finalizer and is a spec, then do not generate the
5182 decrement of the elaboration entity.
5183 (Gen_Finalize_Library_C): Likewise.
5185 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5187 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
5188 (Bounds_Size_Expression): Removed.
5189 (Double_Alignment_Of): New subsidiary routine.
5190 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
5191 for a hole in the dope vector of unconstrained arrays due to different
5192 index and element alignments.
5194 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5196 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
5197 raise program_error because body has not been seen yet.
5199 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5201 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
5204 2011-08-04 Vincent Celier <celier@adacore.com>
5206 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
5208 2011-08-04 Yannick Moy <moy@adacore.com>
5210 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
5211 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
5213 2011-08-04 Thomas Quinot <quinot@adacore.com>
5215 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
5216 instantiation in RCI.
5218 2011-08-04 Emmanuel Briot <briot@adacore.com>
5220 * make.adb: Share more code with gprbuild
5222 2011-08-04 Emmanuel Briot <briot@adacore.com>
5224 * projects.texi: Added documentation for the IDE'Gnat project file
5227 2011-08-04 Nicolas Roche <roche@adacore.com>
5229 * gnat_rm.texi: Minor editing.
5231 2011-08-04 Javier Miranda <miranda@adacore.com>
5233 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
5234 and the library case for VM targets.
5235 (Gen_Adainit_Ada): Likewise.
5237 2011-08-04 Robert Dewar <dewar@adacore.com>
5239 * g-altive.ads: Minor comment updates.
5240 * prj-nmsc.adb: Minor reformatting.
5242 2011-08-04 Javier Miranda <miranda@adacore.com>
5245 (Normalize_Scalars_Config): Value of the configuration switch set by
5246 pragma Normalize_Scalars when it appears in the gnat.adc file.
5247 (Normalize_Scalars): New field for record Config_Switches_Type. Used
5248 to save and restore settings of this pragma.
5250 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
5251 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
5253 2011-08-04 Vincent Celier <celier@adacore.com>
5255 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
5257 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5259 * makeutl.adb: Minor reformatting.
5261 2011-08-04 Olivier Hainque <hainque@adacore.com>
5263 * g-altive.ads: Update comments to reflect that only the soft
5264 binding is available today.
5266 2011-08-04 Robert Dewar <dewar@adacore.com>
5268 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
5269 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
5270 * gcc-interface/Make-lang.in: Update dependencies.
5272 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5274 * prj-env.adb: Remove local debug traces.
5276 2011-08-04 Yannick Moy <moy@adacore.com>
5278 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
5279 was used instead of Hi_OK, which could cause a read of an uninitialized
5280 value later on. Detected while working on the new warning.
5281 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
5283 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
5284 in more cases, in order to detect more unreferenced values.
5285 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
5286 object for expression, if any.
5288 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5290 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
5291 the operand types instead of the Esize.
5293 2011-08-04 Steve Baird <baird@adacore.com>
5295 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
5296 enable CodePeer_Mode.
5297 * bindusg.adb (Display): Add help message describing -P binder switch.
5298 * gnat_ugn.texi: Document -P binder switch.
5299 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
5300 user-defined main program directly.
5301 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
5302 user-defined main program in the context clause of the package body.
5304 2011-08-04 Yannick Moy <moy@adacore.com>
5306 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
5307 duplicate of Defining_Entity
5308 (Get_Unique_Entity_For_Decl): rename function into
5309 Unique_Defining_Entity
5310 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
5311 (Formal_Proof_On): remove synthesized flag
5312 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5313 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
5314 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
5315 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
5316 Annotate (Formal_Proof)
5318 2011-08-04 Emmanuel Briot <briot@adacore.com>
5320 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
5321 source files with non-standard naming schemes, in imported projects
5323 2011-08-04 Emmanuel Briot <briot@adacore.com>
5325 * makeutl.adb (Complete_Mains): when a multi-unit source file is
5326 specified on the gprbuild command line, we need to compile all units
5327 within that file, not just the first one we find
5328 Fix error message for mains that are not found.
5330 2011-08-04 Thomas Quinot <quinot@adacore.com>
5332 * sem_ch6.adb: Update comment.
5333 * sem_ch12.adb: Minor reformatting.
5335 2011-08-04 Bob Duff <duff@adacore.com>
5337 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
5338 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
5339 race condition whose symptom is to fail to lock Parent. That, in turn,
5340 causes Parent.Awake_Count to be accessed without locking Parent, which
5341 causes another race condition whose symptom is that Parent.Awake_Count
5342 can be off by 1 (either too high or too low). The solution is to lock
5343 Parent unconditionally, and then lock Acceptor, before reading
5344 Acceptor.Terminate_Alternative.
5346 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5348 * debug.adb: Update comment.
5350 2011-08-04 Robert Dewar <dewar@adacore.com>
5352 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
5353 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
5354 exp_ch6.adb: Minor reformatting.
5356 2011-08-04 Gary Dismukes <dismukes@adacore.com>
5358 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
5361 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5363 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
5365 2011-08-04 Thomas Quinot <quinot@adacore.com>
5367 * sinfo.ads: Minor reformatting.
5369 2011-08-04 Emmanuel Briot <briot@adacore.com>
5371 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
5372 even if there is no location.
5374 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5376 * sem_res.adb, sem_ch4.adb: move check for restriction
5377 No_Task_Hierarchy to resolve_allocator.
5379 2011-08-04 Thomas Quinot <quinot@adacore.com>
5381 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
5382 This flag of N_Pragma nodes is not used, remove it as well as all of
5383 the associated circuitry.
5385 2011-08-04 Javier Miranda <miranda@adacore.com>
5387 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
5388 runtime check on duplicated externa tags
5389 * debug.adb Document switch -gnatdQ.
5391 2011-08-04 Gary Dismukes <dismukes@adacore.com>
5393 * a-fihema.ads: Minor typo fix.
5395 2011-08-04 Yannick Moy <moy@adacore.com>
5397 * sem_ch10.adb: Minor comment update.
5399 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5401 * einfo.adb: Update the node field usage to reflect the renaming of
5402 Return_Flag to Return_ Flag_Or_Transient_Decl.
5403 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
5404 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
5405 (Write_Field15_Name): Change Return_Flag to
5406 Return_Flag_Or_Transient_Decl.
5407 * einfo.ads: Rename node field Return_Flag to
5408 Return_Flag_Or_Transient_Decl. Update the associated comment and all
5409 occurrences in entities.
5410 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
5411 associated Inline pragma.
5412 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
5413 associated Inline pragma.
5414 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
5416 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
5417 Return_Flag and Set_Return_Flag.
5418 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
5419 objects generated for controlled transients declared inside an
5420 Exception_With_Actions. Update the calls to Return_Flag.
5421 (Process_Object_Declaration): Add code to add a null guard for hook
5422 objects generated for controlled transients declared inside an
5423 Exception_With_Actions. Update related comment.
5424 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
5425 objects generated for controlled transients declared inside an
5426 Exception_With_Actions. Update the calls to Return_Flag.
5427 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
5429 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5431 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
5432 positional aggregate.
5434 2011-08-04 Vincent Celier <celier@adacore.com>
5436 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
5437 SLOC only for pragmas.
5439 2011-08-04 Emmanuel Briot <briot@adacore.com>
5441 * projects.texi: Minor typo fix.
5443 2011-08-04 Emmanuel Briot <briot@adacore.com>
5445 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
5446 on case-sensitive file systems.
5448 2011-08-04 Thomas Quinot <quinot@adacore.com>
5450 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
5451 nested in a disabled pragma.
5452 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
5453 enclosing pragma, if any, for X decisions.
5455 2011-08-04 Thomas Quinot <quinot@adacore.com>
5457 * sem_prag.adb: Minor reformatting.
5459 2011-08-04 Vincent Celier <celier@adacore.com>
5461 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
5462 allowed in no run time mode.
5464 2011-08-04 Vincent Celier <celier@adacore.com>
5466 * make.adb (Check): When -gnatc is used, check for the source file
5467 inside the ALI file with a canonical case file name.
5469 2011-08-04 Emmanuel Briot <briot@adacore.com>
5471 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
5472 overriding the separator.
5474 2011-08-04 Robert Dewar <dewar@adacore.com>
5476 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
5477 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
5479 2011-08-04 Robert Dewar <dewar@adacore.com>
5481 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
5483 2011-08-04 Yannick Moy <moy@adacore.com>
5485 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
5486 'Result only appears in postcondition of function.
5488 2011-08-04 Thomas Quinot <quinot@adacore.com>
5490 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
5491 external tag, include the value of the external tag in the exception
5494 2011-08-04 Yannick Moy <moy@adacore.com>
5496 * sem_attr.adb (Result): modify error message for misplaced 'Result
5498 2011-08-04 Sergey Rybin <rybin@adacore.com>
5500 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
5501 clear that the second argument must be an identifier.
5503 2011-08-04 Thomas Quinot <quinot@adacore.com>
5505 * exp_ch9.adb (Build_Barrier_Function): When compiling with
5506 -fpreserve-control-flow, insert an IF statement on the barrier
5507 condition to ensure that a conditional branch instruction is generated.
5509 2011-08-04 Emmanuel Briot <briot@adacore.com>
5511 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
5512 (Processing_Flags.Ignore_Missing_With): new flag.
5514 2011-08-04 Emmanuel Briot <briot@adacore.com>
5516 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
5517 Source_List_File on case-insensitive systems where the file is actually
5518 on a case-sensitive file system (NFS,...).
5520 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5522 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
5523 function return contains a controlled [extension] aggregate and the
5524 return statement is not part of a handled sequence of statements, wrap
5525 the return in a block. This ensures that all controlled temporaries
5526 generated during aggregate resolution will be picked up by the
5527 finalization machinery.
5529 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5531 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
5532 components, freeze type before resolution, to ensure that default
5533 initializations are present for all components.
5534 * sem_res.adb (Resolve_Actuals): the designated object of an
5535 accces-to-constant type is a legal actual in a call to an
5536 initialization procedure.
5538 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5540 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
5541 N_Unchecked_Type_Conversion to the possible containers of a renamed
5544 2011-08-04 Yannick Moy <moy@adacore.com>
5546 * par-ch13.adb (Aspect_Specifications_Present): recognize
5547 "with Identifier'Class =>" as an aspect, so that a meaningful warning
5548 is issued in Strict mode.
5549 * par.adb: Fix typos in comments.
5551 2011-08-04 Yannick Moy <moy@adacore.com>
5553 * sem_attr.adb (Result): modify error message to take into account Post
5554 aspect when compiling Ada 2012 (or newer) code.
5556 2011-08-04 Nicolas Roche <roche@adacore.com>
5558 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
5559 remove need for GCC exceptions.
5561 2011-08-04 Vincent Celier <celier@adacore.com>
5563 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
5564 project, not the source file name.
5565 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
5566 excluded, continue looking. This excluded source will only be returned
5567 if there is no other source with the same base name that is not locally
5570 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5572 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
5573 private and one of the operands is a real literal, use a qualified
5574 expression rather than a conversion which is not meaningful to the
5577 2011-08-04 Yannick Moy <moy@adacore.com>
5579 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
5580 corresponding aspect X'Class are allowed, proceed with analysis of the
5581 aspect instead of skipping it.
5583 2011-08-04 Tristan Gingold <gingold@adacore.com>
5585 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
5586 This will allow to have an Ada implementation for the subprogram.
5588 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5590 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
5591 completion and aspects are present, apply them to the entity for the
5592 type which is currently the partial view, but which is the one that
5594 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
5595 applies to a partial view, indicate that the full view has predicates
5596 and delayed aspects.
5597 (Replace_Type_Reference): Handle properly predicates that apply to the
5598 full view of a private completion.
5600 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5602 * layout.adb (Layout_Type): For composite types, do not set Esize.
5603 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
5605 (Size_Known): Look at the RM size of components instead of the Esize.
5606 (Freeze_Record_Type): Look at the RM size instead of the Esize to
5607 issue warning and activate Implicit_Packing.
5608 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
5609 if the Esize is not known.
5610 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
5611 for elementary types only.
5612 (Analyze_Record_Representation_Clause): Look at the RM size instead
5613 of the Esize to issue errors.
5614 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
5616 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
5618 Look at the RM size instead of the Esize for types if the latter is
5620 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
5622 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5624 * sem_type.adb: proper handling of equality not involving anonymous
5627 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5629 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
5630 Vis_Decls. When creating a library-level finalizer for a package spec,
5631 both the declaration and body of the finalizer are inserted either in
5632 the visible or private declarations of the package spec.
5634 2011-08-04 Javier Miranda <miranda@adacore.com>
5636 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
5637 use of the full-view of a type when invoking Is_Ancestor.
5638 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
5639 the full-view of private parents is requested, then use also the
5640 full-view of the parent of the first derivation.
5642 2011-08-04 Tristan Gingold <gingold@adacore.com>
5644 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
5645 instead of the locally imported procedure.
5646 * s-taprop-mingw.adb (Enter_Task): Ditto.
5647 * s-valrea.adb (Scan_Real): Ditto.
5648 * s-imgrea.adb (Set_Image_Real): Ditto.
5649 * s-flocon.ads: Make the package pure.
5651 2011-08-04 Thomas Quinot <quinot@adacore.com>
5653 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
5654 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
5655 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
5656 New subprogram, moved here from...
5657 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
5658 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
5659 rewriting of the last argument into a procedure call statement here...
5660 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
5663 2011-08-04 Thomas Quinot <quinot@adacore.com>
5665 * par_sco.adb: Minor reformatting.
5667 2011-08-04 Robert Dewar <dewar@adacore.com>
5669 * erroutc.adb: Minor reformatting.
5671 2011-08-04 Thomas Quinot <quinot@adacore.com>
5673 * par_sco.adb: Comment update.
5675 2011-08-04 Tristan Gingold <gingold@adacore.com>
5677 * s-flocon.ads: New file.
5678 * g-flocon.ads: Now a renaming of s-flocon.
5679 * Makefile.rtl: Add s-flocon.o
5681 2011-08-04 Javier Miranda <miranda@adacore.com>
5683 * exp_strm.adb (Build_Array_Input_Function): if the array type is
5684 constrained, do not attempt to build a subtype of it.
5686 2011-08-04 Yannick Moy <moy@adacore.com>
5688 * errout.ads Change comments: remove 'R'M as an example where quotes
5689 are needed; add ALFA as another case where quotes are not needed
5690 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
5691 case where quotes are not needed.
5692 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
5693 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
5694 Remove all occurrences of 'A'L'F'A
5696 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5698 * sem_ch13.adb: check legality of invariant pragma.
5700 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5702 * bindgen.adb: Add comments.
5704 2011-08-04 Yannick Moy <moy@adacore.com>
5706 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
5708 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
5709 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
5711 2011-08-04 Robert Dewar <dewar@adacore.com>
5713 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
5714 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
5715 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
5717 2011-08-04 Thomas Quinot <quinot@adacore.com>
5719 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
5721 2011-08-04 Thomas Quinot <quinot@adacore.com>
5724 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
5727 2011-08-04 Robert Dewar <dewar@adacore.com>
5729 * einfo.ads, exp_ch4.adb: Minor reformatting.
5731 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5733 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
5735 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5737 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
5738 type in all cases to compute list of primitive operations, because full
5739 view may be an itype that is not attached to the list of declarations.
5741 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5743 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
5744 library has already been finalized.
5745 (Gen_Adafinal_C): Likewise.
5746 (Gen_Adainit_Ada): Generate an early return if the library has
5747 already been elaborated.
5748 (Gen_Adainit_C): Likewise.
5749 (Gen_Output_File_Ada): Generate an elaboration flag.
5750 (Gen_Output_File_C): Likewise.
5752 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5754 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
5755 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
5756 built in the first place.
5757 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
5758 for CodePeer because Finalize_Address was not built to begin with.
5759 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
5761 2011-08-04 Pascal Obry <obry@adacore.com>
5763 * adaint.c (__gnat_tmp_name): Use current process id to create temp
5764 filenames, this ensures unicity of filenames across processes.
5766 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5768 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
5769 Raise_Controlled to Raise_From_Controlled_Operation. Update the
5770 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
5771 Add False as the actual to From_Abort in the generated call to
5772 Raise_From_Controlled_Operation.
5774 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5776 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
5777 so that the ali file name can be retrieved from outside of this package.
5778 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
5779 doing nothing in the general case, but used to update the object file
5780 timestamp if directly generated by the backend.
5781 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
5782 to a later time than the ali file one.
5784 2011-08-04 Yannick Moy <moy@adacore.com>
5786 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
5787 entities whose body contains an Annotate pragma which forces formal
5789 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5790 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
5791 Mark_Non_ALFA_Subprogram to pass in a message and node.
5792 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
5793 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
5794 surrounding subprogram.
5795 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
5796 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
5797 as not in ALFA is annotated with Formal_Proof being On, then an error
5798 is issued based on the additional parameters for message and node.
5799 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
5800 * gcc-interface/Make-lang.in: Update dependencies.
5802 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5804 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
5805 Finalize_Address when CodePeer is enabled.
5807 2011-08-04 Pascal Obry <obry@adacore.com>
5809 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
5810 the latter returns a pointer to a static buffer which is deallocated
5811 at the end of the routine.
5813 2011-08-04 Yannick Moy <moy@adacore.com>
5815 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
5816 after index creation; mark unconstrained base array type generated as
5817 being in/not in ALFA as well
5818 (Make_Index): mark subtype created as in/not in ALFA
5819 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
5820 over a loop as in/not in ALFA, depending on its type and form of loop
5823 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5825 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
5826 directly to False on .NET and JVM.
5828 2011-08-04 Yannick Moy <moy@adacore.com>
5830 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
5831 constraint that subtype must come from source code to be in ALFA, so
5832 that anonymous subtypes can be in ALFA too.
5834 2011-08-04 Yannick Moy <moy@adacore.com>
5836 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
5837 reference for ALFA mode.
5838 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
5839 procedure public so as to use it from formal verification back-end.
5841 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5843 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
5844 invalid checks of the Parameter, making Remove_Switch not working
5847 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5849 * targparm.ads: Update header: no run-time exception is needed on this
5852 2011-08-04 Vincent Celier <celier@adacore.com>
5854 * a-fihema.adb: Use System.IO instead of GNAT.IO
5856 2011-08-04 Thomas Quinot <quinot@adacore.com>
5858 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
5859 are forbidden in Compiler_Unit mode.
5861 2011-08-04 Robert Dewar <dewar@adacore.com>
5863 * sem_util.adb: Minor reformatting.
5865 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5867 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
5868 library-level finalizers.
5869 (Gen_Finalize_Library_C): Update the import string for library-level
5871 (Gen_Finalize_Library_Defs_C): Update the definition name of a
5872 library-level finalizer.
5873 * exp_ch7.adb: Remove with and use clauses for Stringt.
5874 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
5875 Spec_Decl. Add local variable Body_Id. The names of library-level
5876 finalizers are now manually fully qualified and are no longer external.
5877 A single name is now capable of servicing .NET, JVM and non-VM targets.
5878 Pragma Export is no longer required to provide visibility for the name.
5879 (Create_Finalizer_String): Removed.
5880 (New_Finalizer_Name): New routine which mimics New_..._Name.
5882 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5884 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
5885 elaboration counter to Standard_Short_Integer.
5886 * sem_util.adb (Build_Elaboration_Entity): Likewise.
5887 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
5888 (Gen_Elab_Externals_C): Likewise.
5890 2011-08-04 Ed Falis <falis@adacore.com>
5892 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
5893 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
5894 system-vxworks-mips.ads, system-vxworks-x86.ads
5895 (Always_Compatible_Rep): set to False for all VxWorks targets.
5897 2011-08-04 Robert Dewar <dewar@adacore.com>
5899 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
5900 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
5901 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
5902 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
5903 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
5904 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
5905 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
5906 Minor reformatting and code reorganization.
5908 2011-08-04 Emmanuel Briot <briot@adacore.com>
5910 * projects.texi: Added doc for aggregate projects.
5912 2011-08-04 Emmanuel Briot <briot@adacore.com>
5914 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
5915 Add support for overriding the Project_Path in aggregate projects.
5917 2011-08-04 Robert Dewar <dewar@adacore.com>
5919 * a-cofove.ads: Minor reformatting.
5921 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5923 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
5924 on the generated code.
5925 (Build_Finalize_Statements): Update the comment on the generated code.
5926 (Build_Initialize_Statements): Update the comment on the generated code.
5927 (Build_Object_Declarations): Add local variable Result. The object
5928 declarations are now built in sequence.
5929 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
5932 2011-08-04 Robert Dewar <dewar@adacore.com>
5934 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
5936 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
5938 * einfo.ads (Elaboration_Entity): Document new definition and use.
5939 (Elaboration_Entity_Required): Adjust to above change.
5940 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
5941 * exp_ch12.adb: And with and use for Snames.
5942 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
5943 * exp_util.adb (Set_Elaboration_Flag): Likewise.
5944 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
5945 <Check_Unit_Name>: Deal with N_Expanded_Name.
5946 <Attribute_Elaborated>: Extend to all unit names.
5947 * sem_elab.adb: And with and use for Uintp.
5948 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
5949 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
5950 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
5951 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
5952 from Gen_Adainit_Ada.
5953 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
5954 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
5955 case, do not call System.Standard_Library.Adafinal; instead call
5956 finalize_library if needed.
5957 (Gen_Adafinal_C): Likewise.
5958 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
5959 non-main program case.
5960 (Gen_Adainit_C): Generate a couple of external declarations here.
5961 In the main program case, set SSL.Finalize_Library_Objects.
5962 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
5963 (Gen_Elab_Calls_C): Likewise.
5964 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
5965 (Gen_Finalize_Library_C): Likewise. Generate a full function.
5966 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
5968 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
5969 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
5971 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
5972 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
5973 of external declarations. Call Gen_Finalize_Library_C.
5975 2011-08-04 Emmanuel Briot <briot@adacore.com>
5977 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
5978 Compute_Compilation_Phases): new subprogram.
5979 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
5980 The number of mains as well as the various compilation phases that
5981 need to be run are now project tree specific, since various
5982 aggregated trees might have different requirements. In particular,
5983 they do not all require bind or link phases.
5985 2011-08-04 Emmanuel Briot <briot@adacore.com>
5987 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
5988 (Project_Tree_Appdata): New type.
5989 It is now possible to associate application-specific data to a project
5990 tree. In particular, this is used in the gprbuild builder to avoid a
5991 number of global tables and htables, especially now that there can be
5992 several project trees loaded at once because of aggregate projects.
5993 (Debug_Name): new procedure.
5994 * projects.texi: Clarify syntax of "**" for Source_Dirs
5996 2011-08-03 Emmanuel Briot <briot@adacore.com>
5998 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
5999 the "roots" for a main.
6000 (Fill_From_Project): add support for aggregate projects. Main units
6001 in aggregated projects are now automatically added in the list of
6002 files to build (although this fails later on in gprbuild, because
6003 these files are not using the root proejct tree, so this needs
6005 * gcc-interface/Make-lang.in: Update dependencies.
6007 2011-08-03 Yannick Moy <moy@adacore.com>
6009 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
6010 conditional expression in ALFA.
6011 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
6012 expressions as not in ALFA.
6014 2011-08-03 Robert Dewar <dewar@adacore.com>
6016 * a-cofove.adb: Minor reformatting.
6018 2011-08-03 Emmanuel Briot <briot@adacore.com>
6020 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
6021 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
6023 These packages are more logically placed in the Queue package, since
6024 they manipulate the queue. It is also likely that they can be adapted
6025 for gnatmake, thus sharing more code.
6026 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
6027 that we could move the above.
6029 2011-08-03 Emmanuel Briot <briot@adacore.com>
6031 * errutil.adb (Finalize): clean up the list of error messages on exit.
6032 Calling this subprogram multiple times will no longer show duplicate
6033 error messages on stderr.
6035 2011-08-03 Emmanuel Briot <briot@adacore.com>
6037 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
6038 Getopt_Switches when we have already define a command line
6041 2011-08-03 Yannick Moy <moy@adacore.com>
6043 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
6044 in ALFA. Instead, they are considered as assertions to prove.
6045 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
6046 nodes as not in ALFA. Instead, include conditional expressions in ALFA
6047 if they have no ELSE part, or if they occur in pre- and postconditions,
6048 where the Condition cannot have side-effects in ALFA
6049 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
6050 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
6051 Instead, include type conversion between scalar types in ALFA.
6052 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
6053 if-and-only-if its type is in ALFA.
6055 2011-08-03 Thomas Quinot <quinot@adacore.com>
6057 * scos.adb, get_scos.adb, put_scos.adb
6058 New code letter for decisions: G (entry guard)
6060 (Traverse_Subprogram_Body): Rename to...
6061 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
6062 (Traverse_Protected_Body): New subprogram
6063 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
6064 protected bodies and entry bodies.
6066 2011-08-03 Yannick Moy <moy@adacore.com>
6068 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
6069 entities with get/set subprograms, which is set on procedure entities
6070 generated by the compiler for a postcondition.
6071 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
6072 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
6073 entity for a declaration
6074 (Get_Unique_Entity_For_Decl): new function returning an entity which
6075 represents a declaration, so that matching spec and body have the same
6078 2011-08-03 Robert Dewar <dewar@adacore.com>
6080 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
6081 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
6083 2011-08-03 Yannick Moy <moy@adacore.com>
6085 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
6086 library-level because retriction No_Implicit_Dynamic_Code in the
6087 front-end prevents its definition as a local subprogram
6088 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
6089 for reuse in other contexts
6090 (Traverse_Declarations_Or_Statements,
6091 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
6092 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
6093 procedures take a callback parameter to be called on all declarations
6095 (Traverse_All_Compilation_Units): new generic function to traverse a
6096 compilation unit and call a callback parameter on all declarations
6098 2011-08-03 Javier Miranda <miranda@adacore.com>
6100 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
6101 in Java since they are always enclosed in a namespace that
6102 differentiates them, and overloaded entities are supported by the VM.
6104 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6106 * checks.adb (Determine_Range): If a computed bound of an operation is
6107 outside the range of the base type of the expression, and overflow
6108 checks are enabled, the result is unknown and cannot be used for any
6109 subsequent constant folding.
6110 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
6111 unknown, so is the result of the comparison.
6113 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6115 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
6116 From_Abort. When finalization was triggered by an abort, propagate
6117 Standard'Abort_Signal rather than Program_Error.
6118 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
6120 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
6121 From_Abort. When finalization was triggered by an abort, propagate
6122 Standard'Abort_Signal rather than Program_Error.
6123 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
6125 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
6126 Abort_Id. Update the calls to Build_Object_Declarations and
6127 Build_Raise_Statement to include Abort_Id.
6128 (Build_Adjust_Statements): New local variable Abort_Id. Update the
6129 calls to Build_Object_Declarations and Build_Raise_Statement to include
6131 (Build_Finalize_Statements): New local variable Abort_Id. Update the
6132 calls to Build_Object_Declarations and Build_Raise_Statement to include
6134 (Build_Components): Create an entity for Abort_Id when exceptions are
6135 allowed on the target.
6136 (Build_Finalizer): New local variable Abort_Id.
6137 (Build_Initialize_Statements): New local variable Abort_Id. Update the
6138 calls to Build_Object_Declarations and Build_Raise_Statement to include
6140 (Build_Object_Declarations): Add new formal Abort_Id. Create the
6141 declaration of flag Abort_Id to preserve the original abort status
6142 before finalization code is executed.
6143 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
6144 runtime routine Raise_From_Controlled_Operation.
6145 (Create_Finalizer): Update the call to Build_Raise_Statement to include
6146 Abort_Id. Update the call to Build_Object_Declarations to include
6147 Abort_Id. Update the layout of the finalizer body.
6148 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
6149 (Process_Transient_Objects): New local variable Abort_Id. Remove the
6150 clunky code to create all flags and objects related to
6151 exception propagation and replace it with a call to
6152 Build_Object_Declarations. Update the call to Build_Raise_Statement to
6154 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
6155 Add new formal Abort_Id and associated comment on its use.
6156 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
6158 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
6159 Remove the clunky code to create all flags and objects related to
6160 exception propagation and replace it with a call to
6161 Build_Object_Declarations. Update the call to Build_Raise_Statement.
6163 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6165 * s-tassta.adb: Fix minor typos.
6167 2011-08-03 Robert Dewar <dewar@adacore.com>
6169 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
6170 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
6172 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6174 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
6175 to packages. This ensures that the finalizer body will not end up
6176 inside the freeze node.
6177 (Process_Declarations): Add code to detect whether a freeze node has a
6178 nested finalization collection.
6180 2011-08-03 Pascal Obry <obry@adacore.com>
6182 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
6183 (Current_Session): Return a not null access to Session_Type.
6184 (Default_Session): Likewise.
6186 2011-08-03 Robert Dewar <dewar@adacore.com>
6188 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
6189 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
6191 2011-08-03 Pascal Obry <obry@adacore.com>
6193 * g-awk.ads: Minor comment fix.
6195 2011-08-03 Sergey Rybin <rybin@adacore.com>
6197 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
6198 the tree structure related to discriminant constraints.
6199 Original_Discriminant cannot be used any more for computing the
6200 defining name for the reference to a discriminant.
6202 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6204 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
6205 function is not visibly tagged, this is not a dispatching call and
6206 therfore is not Tag_Indeterminate, even if the function is marked as
6207 dispatching on result.
6209 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6211 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
6212 (Expand_N_Free_Statement): Add a guard to protect against run-times
6213 which do not support controlled types.
6214 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
6215 against run-times which do not support controlled types.
6216 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
6217 against run-times which do not support controlled types.
6218 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
6219 against run-times which do not support controlled types.
6220 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
6221 protect against run-times which do not support controlled types.
6223 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
6225 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
6226 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
6228 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6230 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
6231 modified in the source, to prevent spurious warnings when compiling
6234 2011-08-03 Thomas Quinot <quinot@adacore.com>
6236 * a-except-2005.adb: Minor reformatting.
6238 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6240 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
6241 is a renaming declaration in the private part of a package, do not emit
6242 a warning that the with_clause could be moved because the renaming may
6243 be used in the body or in a child unit.
6245 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6247 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6248 Propagate the Comes_From_Source attribute from the original return
6249 object to the renaming.
6251 2011-08-03 Jose Ruiz <ruiz@adacore.com>
6253 * exp_ch7.adb (Build_Raise_Statement): Do not call
6254 Raise_From_Controlled_Operation when this routine is not present in
6255 the run-time library.
6256 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
6257 libraries (Ravenscar), tasks are non-terminating, and protected objects
6258 and tasks can only appear at library level, so we do not want
6259 finalization of protected objects nor tasks.
6260 * exp_intr.adb: Minor clarification in comment.
6261 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
6262 Gen_Output_File_C): Remove references to finalization of library-level
6263 objects when using restricted run-time libraries.
6265 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6267 * sem_ch3.adb (Build_Discriminant_Constraints): Set
6268 Original_Discriminant only if the parent type is a generic formal.
6270 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6272 * exp_ch13.adb: Add with and use clause for Targparm;
6273 (Expand_N_Free_Statement): Prevent the generation of a custom
6274 Deallocate on .NET/JVM targets since this requires pools and address
6276 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
6277 .NET/JVM targets, attach the newly allocated object to the access
6278 type's finalization collection. Do not generate a call to
6279 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
6280 exist in the runtime.
6281 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
6282 create a custom Allocate for object that do not require initialization.
6283 Attach a newly allocated object to the access type's finalization
6284 collection on .NET/JVM.
6285 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
6286 assignment of controlled types on .NET/JVM. The two hidden pointers
6287 Prev and Next and stored and later restored after the assignment takes
6289 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
6290 kludge for .NET/JVM to recognize a particular piece of code coming from
6291 Heap_Management and change the call to Finalize into Deep_Finalize.
6292 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
6293 finalization collections on .NET/JVM only for types derived from
6294 Controlled. Separate the association of storage pools with a collection
6295 and only allow it on non-.NET/JVM targets.
6296 (Make_Attach_Call): New routine.
6297 (Make_Detach_Call): New routine.
6298 (Process_Object_Declarations): Suppress the generation of
6299 build-in-place return object clean up code on .NET/JVM since it uses
6301 * exp_ch7.ads (Make_Attach_Call): New routine.
6302 (Make_Detach_Call): New routine.
6303 * exp_intr.adb Add with and use clause for Targparm.
6304 (Expand_Unc_Deallocation): Detach a controlled object from a collection
6305 on .NET/JVM targets.
6306 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
6307 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
6308 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
6309 names used in finalization.
6311 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6313 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
6314 (Attach, Detach): Lock the current task when chaining an object onto a
6317 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
6319 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
6320 Rewritten to create the message strings when the exception is not
6321 raised by an abort during finalization.
6322 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
6323 Raise_From_Controlled_Operation and update its associated comment.
6324 * a-fihema.ads, a-fihema.adb: New GNAT unit.
6325 Ada.Finalization.Heap_Management provides key functionality
6326 associated with controlled objects on the heap, their creation,
6327 finalization and reclamation. Type Finalization_Collection is
6328 effectively a wrapper which sits ontop of a storage pool and performs
6329 all necessary bookkeeping for all the objects it contains. Each
6330 access-to-controlled or access-to-class-wide type receives a collection
6331 as part of its expansion. The compiler generates buffer code and
6332 invokes Allocate / Deallocate to create and destroy allocated
6334 * a-finali.adb ("="): Removed.
6335 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
6336 fields Prev and Next.
6337 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
6338 A library unit with at least one controlled object on the library level
6339 has a special finalizer which is invoked by the binder. To signal this,
6340 ali files carry field PF.
6341 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
6342 associated comment on field usage.
6343 * a-tags.adb (Get_RC_Offset): Removed.
6344 (Needs_Finalization): New routine.
6345 * a-tags.ads: Update the structure of the GNAT dispatch tables.
6346 Dispatch tables now carry field Needs_Finalization which provides
6347 runtime indication whether a type is controlled or has controlled
6348 components or both. Remove field RC_Offset.
6349 (Get_RC_Offset): Removed along with its associated pragma Export.
6350 Since tagged types with controlled components no longer carry hidden
6351 field _controller, the special mechanism to retrieve its location is no
6353 (Needs_Finalization): New routine.
6354 * atree.ads, atree.adb (Elist24): New routine.
6355 (Set_Elist24): New routine.
6356 * atree.h: Add a define clause for Elist24.
6357 * bindgen.adb New library-level variable Lib_Final_Built.
6358 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
6359 presence of a VM target, the routine generates calls to the proper
6360 library finalization routine.
6361 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
6362 targets. Set the correct library finalization routine depending on
6363 whether the library has controlled objects or this is a VM compilation.
6364 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
6365 to library-level finalizers of compiled units in reverse order of
6366 elaboration. It also produces exception management code and reraises a
6367 potential exception after all units have been finalized.
6368 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
6369 library-level finalizers of compiled units in reverse order of
6371 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
6372 definitions of all library-level finalizers available to the compilation
6373 (Gen_Main_Ada): Directly call Adafinal which now contails all target
6375 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
6376 System.Standard_Library.Adafinal directly. If the library needs
6377 finalization actions, create the sequence of finalization calls.
6378 (Gen_Output_File_Ada): Alphabetize local variables and constants.
6379 Generate a with clause for System.Soft_Links when compiling for a VM.
6380 Remove the code which imports System.Standard_Library.Adafinal as
6381 Do_Finalize. Generate the library finalization routine.
6382 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
6383 If the library needs finalization actions, create all the definitions
6384 of library- level finalizers.
6385 (Has_Finalizer): New routine. Determines whether at least one compiled
6386 unit has a library-level finalizer.
6387 Add type Qualification_Mode.
6388 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
6389 * einfo.adb: New usage of field 15 as Return_Flag.
6390 Remove Finalization_Chain_Entity from the usages of field 19.
6391 Remove Associated_Final_Chain from the usages of field 23.
6392 New usage of field 23 as Associated_Collection.
6393 New usage of field 24 as Finalizer.
6394 New usage of flag 252 as Is_Processed_Transient.
6395 (Associated_Final_Chain): Removed.
6396 (Associated_Collection): New routine.
6397 (Finalization_Chain_Entity): Removed.
6398 (Finalizer): New routine.
6399 (Is_Finalizer): New routine.
6400 (Is_Processed_Transient): New routine.
6401 (Return_Flag): New routine.
6402 (Set_Associated_Final_Chain): Removed.
6403 (Set_Associated_Collection): New routine.
6404 (Set_Finalization_Chain_Entity): Removed.
6405 (Set_Finalizer): New routine.
6406 (Set_Is_Processed_Transient): New routine.
6407 (Set_Return_Flag): New routine.
6408 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
6410 (Write_Field8_Name): Alphabetize the output.
6411 (Write_Field11_Name): Alphabetize the output.
6412 (Write_Field12_Name): Alphabetize the output.
6413 (Write_Field13_Name): Alphabetize the output.
6414 (Write_Field14_Name): Alphabetize the output.
6415 (Write_Field15_Name): Alphabetize the output.
6416 (Write_Field16_Name): Alphabetize the output.
6417 (Write_Field17_Name): Alphabetize the output.
6418 (Write_Field18_Name): Alphabetize the output.
6419 (Write_Field19_Name): Alphabetize the output. Remove the output of
6420 Finalization_Chain_Entity.
6421 (Write_Field20_Name): Alphabetize the output.
6422 (Write_Field21_Name): Alphabetize the output.
6423 (Write_Field22_Name): Alphabetize the output.
6424 (Write_Field23_Name): Alphabetize the output. Remove the output of
6425 Associated_Final_Chain. Add output for Associated_Collection.
6426 (Write_Field24_Name): Alphabetize the output.
6427 (Write_Field25_Name): Add output for Finalizer.
6428 (Write_Field26_Name): Alphabetize the output.
6429 (Write_Field27_Name): Alphabetize the output.
6430 (Write_Field28_Name): Alphabetize the output.
6431 * einfo.ads: Add new field description for Associated_Collection and
6433 Remove Associated_Final_Chain and its uses in nodes.
6434 Remove Finalization_Chain_Entity and its uses in nodes.
6435 Add new field description for Finalizer and its uses in nodes.
6436 Add new synthesized attribute Is_Finalizer.
6437 Add new flag description for Is_Processed_Transient and its uses in
6439 Add new field description for Return_Flag and its uses in nodes.
6440 (Associated_Final_Chain): Removed along with its pragma Inline.
6441 (Associated_Collection): New routine and pragma Inline.
6442 (Finalization_Chain_Entity): Removed along with its pragma Inline.
6443 (Finalizer): New routine and pragma Inline.
6444 (Is_Finalizer): New routine and pragma Inline.
6445 (Is_Processed_Transient): New routine and pragma Inline.
6446 (Return_Flag): New routine and pragma Inline.
6447 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
6448 (Set_Associated_Collection): New routine and pragma Inline.
6449 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
6450 (Set_Finalizer): New routine and pragma Inline.
6451 (Set_Is_Processed_Transient): New routine and pragma Inline.
6452 (Set_Return_Flag): New routine and pragma Inline.
6453 * exp_aggr.adb: Alphabetize subprograms.
6454 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
6455 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
6456 associated comments. Remove local variables External_Final_List and
6458 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
6459 Ancestor. Remove the retrieval of finalization lists. Update the call to
6461 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
6462 lists. Update the call to Late_Expansion.
6463 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
6464 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
6465 (Gen_Assign): Remove the retrieval of the finalization list used to
6466 build the assignment. Update the calls to Make_Init_Call and
6468 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
6469 Remove the mechanism to determine attachment levels and finalization
6470 list retrieval. Remove the processing for coextensions.
6471 (Init_Controller): Removed. Controllers no longer exist.
6472 (Late_Expansion): Remove formals Flist and Obj along with their
6473 associated comments. Update the calls to Build_Record_Aggr_Code and
6474 Build_Array_Aggr_Code.
6475 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
6476 (Expand_N_Freeze_Entity): Add special processing for finalizers which
6477 appear in entry bodies, protected subprograms and task bodies.
6478 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
6479 * exp_ch3.adb (Add_Final_Chain): Removed.
6480 (Build_Array_Init_Proc): Alphabetize local variables.
6481 (Build_Assignment): Alphabetize local variables. Update the call to
6483 (Build_Class_Wide_Master): Rename local variables to better reflect
6485 (Build_Discriminant_Assignments): Code reformatting.
6486 (Build_Init_Call_Thru): Code reformatting.
6487 (Build_Init_Procedure): Code reformatting. Generate a special version
6488 of Deep_Finalize which is capable of finalizing all initialized
6489 components and ignore the rest.
6490 (Build_Init_Statements): Rename local variables to better reflect their
6492 Reimplement the mechanism to include the creation and update of an index
6493 variable called a "counter". It is used as a bookmark for tracing
6494 initialized and non-initialized components.
6495 (Build_Initialization_Call): Remove local variable Controller_Typ.
6496 Alphabetize all local variables. Remove the initialization of the
6497 record controller and update the call to Make_Init_Call.
6498 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
6499 New local variable Counter.
6500 (Constrain_Array): Alphabetize.
6501 (Expand_Freeze_Array_Type): Create a collection instead of a
6503 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
6504 Finalize_Address which is used in conjunction with allocated controlled
6506 (Expand_N_Object_Declaration): Remove the creation of a finalization
6507 list for anonymous access types. Update the calls to Make_Init_Call and
6509 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
6510 retrieval of finalization lists. Remove the expansion of the record
6511 controller. Create TSS primitive Finalize_Address used in conjunction
6512 with controlled objects on the heap. Create finalization collections
6513 for access-to-controlled record components.
6514 (Expand_Record_Controller): Removed.
6515 (Freeze_Type): Remove the freezing of record controllers. Freezing of
6516 class-wide types now requires additional processing. Create
6517 finalization collections for access-to-controlled types.
6518 (Increment_Counter): New routine.
6519 (Make_Counter): New routine.
6520 (Make_Eq_If): Remove the mention of Name_uController.
6521 (Make_Predefined_Primitive_Specs): There is no longer need to skip
6522 types coming from System.Finalization_Root.
6523 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
6524 (Predefined_Primitive_Bodies): There is no longer need to skip types
6525 coming from System.Finalization_Root.
6526 (Stream_Operation_OK): Do not generate stream routines for
6527 type Ada.Finalization.Heap_Management.Finalization_Collection.
6528 * exp_ch3.ads: Alphabetize subprograms.
6529 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
6530 Add with and use clause for Lib.
6531 (Complete_Coextension_Finalization): Removed.
6532 (Complete_Controlled_Allocation): New routine. Create a finalization
6533 collection for anonymous access-to-controlled types. Create a custom
6534 Allocate which interfaces with the back end and the machinery in
6536 (Expand_Allocator_Expression): Add necessary calls to
6537 Complete_Controlled_Allocation. Remove the retrieval of finalization
6538 lists. Update the calls to Make_Adjust_Call. Generate a call to
6539 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6540 the associated collection.
6541 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
6542 Code clean up. Remove the retrieval of finalization lists and
6544 Update the call to Make_Init_Call. Generate a call to
6545 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
6546 the associated collection.
6547 (Get_Allocator_Final_List): Removed. Finalization lists are not
6549 (Suitable_Element): Remove the mention of Name_uController.
6550 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
6551 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
6552 the left hand side, carry out the assignment and adjust the left hand
6554 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
6555 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
6556 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
6557 BIP_Collection and BIPcollection.
6558 (Build_Heap_Allocator): New routine used to allocate the return object
6559 of a build-in-place function onto a collection.
6560 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
6561 (Expand_Call): Do not replace direct calls to Deep routines with their
6563 (Expand_N_Extended_Return_Statement): Give all variables shorter names
6564 and update their occurrences. Add a special return flag to monitor the
6565 [ab]normal execution of the function. The flag is set right before the
6567 Rewrite the mechanism used to allocate a build-in-place return object
6568 on the heap or on a storage pool.
6569 (Is_Direct_Deep_Call): New routine.
6570 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
6571 build-in-place function call instead of a final list. Build a call to
6572 Set_Finalize_Address_Ptr to decorate the associated collection.
6573 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
6574 order to name the build-in-place function call's result for later
6575 finalization. Add a collection to a build-in-place function call
6576 instead of a final list.
6577 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
6578 build-in-place function call instead of a final list. Remove the code
6579 which moves one final list and transforms it into the actual in a
6580 nested build-in-place call.
6581 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
6582 build-in-place function call instead of a final list.
6583 (Move_Final_List): Removed.
6584 (Needs_BIP_Collection): New routine.
6585 (Needs_BIP_Final_List): Removed.
6586 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
6587 enumeration type BIP_Formal_Kind.
6588 Update the related comment.
6589 (Needs_BIP_Collection): New routine.
6590 (Needs_BIP_Final_List): Removed.
6591 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
6592 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
6593 majority of subprograms in this unit. Add Name_Finalize_Address to
6594 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
6595 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
6596 statements for an array type.
6597 (Build_Adjust_Statements): Create the adjust statements for a record
6599 (Build_Cleanup_Statements): New routine. A procedure which given any
6600 construct containing asynchronous calls, references to _master, or is a
6601 task body, a task allocation or a protected body produces the necessary
6602 runtime calls to clean up these constructs.
6603 (Build_Exception_Handler): New routine.
6604 (Build_Final_List): Removed.
6605 (Build_Finalization_Collection): New routine. A core procedure which
6606 creates a collection to service heap allocated controlled objects
6607 associated with an access-to-controlled type.
6608 (Build_Finalize_Statements): Create the finalization statements for a
6610 (Build_Finalizer): New routine. A core procedure which given any
6611 construct with declarations and/or statements detects all objects which
6612 need any type of clean up (controlled objects, protected objects) and
6613 generates all necessary code to clean up the said objects in the proper
6615 (Build_Finalizer_Call): New routine.
6616 (Build_Initialize_Statements): Create the initialization statements for
6617 an array type. The generated routine contains code to finalize partially
6619 (Build_Object_Declarations): New routine.
6620 (Build_Raise_Statement): New routine.
6621 (Clean_Simple_Protected_Objects): Removed.
6622 (Controller_Component): Removed.
6623 (Enclosing_Function): New routine.
6624 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
6625 either declarations or statements or both.
6626 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
6627 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
6629 (Find_Final_List): Removed.
6630 (Global_Flist_Ref): Removed.
6631 (In_Finalization_Root): Removed.
6632 (Insert_Actions_In_Scope_Around): Determine the range of the transient
6633 scope in terms of tree nodes. Process all transient variables within
6635 (Make_Adjust_Call): Rewritten. There is no longer an attach call
6636 generated after the adjust.
6637 (Make_Attach_Call): Removed.
6638 (Make_Call): New routine.
6639 (Make_Clean): Removed.
6640 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
6642 (Make_Deep_Proc): Rewritten to generate the new profile signature used
6644 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
6646 (Make_Final_Call): Modified to simply create a call to either
6647 Deep_Finalize or Finalize.
6648 (Make_Finalize_Address_Body): New routine.
6649 (Make_Finalize_Address_Stmts): New routine. A function which produces
6650 TSS primitive Finalize_Address used in conjunction with heap allocated
6652 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
6653 (Make_Init_Call): Rewritten. There is no longer an attach call
6654 generated after initialization.
6655 (Make_Local_Deep_Finalize): New routine.
6656 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6657 (Make_Transient_Block): Remove the finalization list retrieval and
6659 (Needs_Finalization): Moved to Exp_Util.
6660 (Parent_Field_Type): New routine.
6661 (Preprocess_Components): New routine.
6662 (Process_Transient_Objects): New routine.
6663 (Wrap_HSS_In_Block): New routine.
6664 (Wrap_Transient_Declaration): Remove finalization list management and
6665 controller insertion.
6666 (Wrap_Transient_Expression): Code reformatting.
6667 (Wrap_Transient_Statement): Code reformatting.
6668 * exp_ch7.ads (Build_Final_List): Removed.
6669 (Build_Finalization_Collection): New routine.
6670 (Build_Raise_Statement): New routine.
6671 (Controller_Component): Removed.
6672 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
6673 (Find_Final_List): Removed.
6674 (In_Finalization_Root): Removed.
6675 (Is_Simple_Protected_Type): Update related comment.
6676 (Make_Adjust_Call): New parameter profile and associated comments.
6677 (Make_Attach_Call): Removed.
6678 (Make_Final_Call): New parameter profile and associated comments.
6679 (Make_Finalize_Address_Body): New routine.
6680 (Make_Init_Call): New parameter profile and associated comments.
6681 (Make_Local_Deep_Finalize): New routine.
6682 (Make_Set_Finalize_Address_Ptr_Call): New routine.
6683 (Needs_Finalization): Moved to Exp_Util.
6684 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
6685 (Expand_N_Protected_Body): Remove the handling of finalization lists.
6686 (Find_Protection_Type): Moved to Exp_Util.
6687 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
6688 (Make_DT): Update sequence of dispatch table initialization. Remove the
6689 initialization of field RC_Offset. Add initialization of field Needs_
6691 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
6692 Reimplement how an object is first finalized, then deallocated.
6693 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
6695 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
6696 Register TSS_Finalize_Address with type TSS_Names.
6697 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
6698 procedure provides the interface between an allocation / deallocation
6699 and the support machinery in Ada.Finalization.Heap_Management.
6700 (Find_Init_Call): Code reformatting.
6701 (Find_Init_Call_In_List): Code reformatting.
6702 (Find_Protection_Type): Moved from Exp_Ch9.
6703 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
6704 (Has_Controlled_Coextensions): Removed.
6705 (Has_Controlled_Objects): New routine.
6706 (In_Library_Level_Package_Body): New routine.
6707 (Insert_Action_After): New routine.
6708 (Is_Finalizable_Transient): New routine. This predicate determines
6709 whether an object declaration is one of the many variants of controlled
6711 (Is_Null_Access_BIP_Func_Call): New routine.
6712 (Is_Non_BIP_Func_Call): New routine.
6713 (Is_Related_To_Func_Return): New routine.
6714 (Needs_Finalization): Moved from Exp_Ch7.
6715 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
6716 (Find_Protection_Type): Moved from Exp_Ch9.
6717 (Has_Controlled_Coextensions): Removed.
6718 (Has_Controlled_Objects): New routine.
6719 (In_Library_Level_Package_Body): New routine.
6720 (Insert_Action_After): New routine.
6721 (Is_Finalizable_Transient): New routine.
6722 (Is_Null_Access_BIP_Func_Call): New routine.
6723 (Is_Non_BIP_Func_Call): New routine.
6724 (Is_Related_To_Func_Return): New routine.
6725 (Needs_Finalization): Moved from Exp_ch7.
6726 * expander.adb (Expand): Add a case for N_Free_Statement.
6727 * freeze.adb (Freeze_All): Replace the generation of a finalization
6728 list with a collection for access-to-controlled types.
6729 (Freeze_Entity): Code reformatting.
6730 (Freeze_Record_Type): Remove the freezing of a record controller
6732 (Freeze_Subprogram): Code reformatting.
6733 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
6735 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
6736 has a library-level finalizer.
6737 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
6738 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
6739 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
6740 files. Add a-fihema to the list of object files.
6742 Alphabetize the associations in type Is_Parameterless_Attribute.
6743 * rtsfind.ads: Ada.Finalization_List.Controller and
6744 System.Finalization_Implementation are no longer a GNAT unit.
6745 Update the range of type Ada_Finalization_Child. Remove the following
6746 recoverable entities:
6748 RE_Attach_To_Final_List
6752 RE_Finalizable_Ptr_Ptr
6753 RE_Global_Final_List
6754 RE_Limited_Record_Controller
6757 RE_Record_Controller
6758 RE_Simple_List_Controller
6760 Add the following recoverable entities:
6762 RE_Add_Offset_To_Address
6766 RE_Exception_Identity
6767 RE_Finalization_Collection
6768 RE_Finalization_Collection_Ptr
6769 RE_Needs_Finalization
6770 RE_Save_Library_Occurrence
6771 RE_Set_Finalize_Address_Ptr
6772 RE_Set_Storage_Pool_Ptr
6774 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
6776 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
6777 (First_Stored_Discriminant): Remove the mention of Name_uController.
6778 * sem_aux.ads: Comment reformatting.
6779 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
6780 to redecorate an already existing class-wide type.
6781 (Decorate_Tagged_Type): New parameter profile and associated comment.
6782 Create a "shadow class-wide type" for a shadow entity.
6783 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
6784 of the final chain along with the associated comment.
6785 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
6786 Full_Desig and set it to the full view of the designated type.
6787 Initialize the finalization collection to empty.
6788 (Build_Derived_Record_Type): Alphabetize local variables. Code
6790 (Collect_Fixed_Components): Remove the mention of Name_uController.
6791 (Create_Constrained_Components): Remove the mention of Name_uController.
6792 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
6793 class-wide type of a shadow entity.
6794 (Process_Full_View): Update the machinery which marks type
6795 Limited_Controlled's entity as limited.
6796 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
6797 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
6798 list, instead make a collection build-in-place formal.
6799 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
6800 a designated type in order to establish a match between the renaming
6801 and the renamed entity.
6802 (Find_Selected_Component): Add guard to prevent spurious exceptions
6803 from being raised on .NET/JVM.
6804 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
6805 to the list of primitive that need special processing. Update arrays
6806 C_Names and D_Names.
6807 (Replace_Types): Handle class-wide types.
6808 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
6809 different parameter profile, look at the first formal.
6810 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
6811 use clauses for Exp_Util.
6812 * sem_res.adb: Remove with and use clauses for Elists.
6813 (Propagate_Coextensions): Removed.
6814 (Resolve_Allocator): Do not propagate the list of coextensions from one
6815 allocator to another.
6816 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
6817 Deaccessed_T to Desig_Typ.
6818 (Enter_Name): Remove the mention of Name_uController.
6819 (Gather_Components): Remove the mention of Name_uController.
6820 (Incomplete_Or_Private_View): New routine.
6821 (Is_Coextension_Root): Removed.
6822 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
6823 * sem_util.ads (Incomplete_Or_Private_View): New routine.
6824 (Is_Coextension_Root): Removed.
6825 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
6826 Controlled types are now derived from a null tagged record. Remove
6827 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
6828 * sinfo.adb (Coextensions): Removed.
6829 (Set_Coextensions): Removed.
6830 * sinfo.ads: Remove Coextensions from the explanation of node fields
6831 and its uses in nodes.
6832 Update the field usage of N_Allocator.
6833 (Coextensions): Removed along with its pragma Inline.
6834 (Set_Coextensions): Removed along with its pragma Inline.
6835 * snames.ads-tmpl: Remove names
6840 Name_uLocal_Final_List
6841 Name_Finalization_Root
6848 Name_Finalize_Address
6849 * s-pooglo.adb (Allocate): Add overriding indicator.
6850 (Deallocate): Add overriding indicator.
6851 (Storage_Size): Add overriding indicator.
6852 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
6853 than Finalize_Global_List.
6854 (Null_Finalize_Global_List): Removed.
6855 (Save_Library_Occurrence): New routine.
6856 * s-soflin.ads: Remove variable Finalize_Global_List along with its
6857 initialization. Add variable Finalize_Library_Objects along with its
6858 pragma Export. Add variables Library_Exception and
6859 Library_Exception_Set along with their pragma Export.
6860 (Null_Finalize_Global_List): Removed.
6861 (Save_Library_Occurrence): New routine.
6862 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
6863 rather than Finalize_Global_List.
6864 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
6865 of the constructed node.
6867 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6869 * link.c: Include "auto-host.h" before system headers.
6871 2011-08-03 Vincent Celier <celier@adacore.com>
6873 * make.adb (Gnatmake): Add to table Library_Projs only library projects
6874 that are not extended. Do not check if a library project that is
6875 extended should be regenerated. Do not add to table Library_Paths the
6876 libraries that are in extended projects. Link only with libraries that
6877 are in libray projects that are not extended.
6878 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
6879 for a library project that is extended.
6881 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6883 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
6884 conforming subprogram renamings that appear to be completions if they
6885 are not fully conformant.
6886 Such renamings are homographs but not completions.
6887 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
6888 names in a subprogram renaming that appears in an instance.
6890 2011-08-03 Ed Schonberg <schonberg@adacore.com>
6892 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
6893 not immutably limited, build actual subtype from expression to provide
6894 proper bounds to caller.
6896 2011-08-03 Gary Dismukes <dismukes@adacore.com>
6898 * sem_ch8.adb: Minor comment correction.
6900 2011-08-03 Thomas Quinot <quinot@adacore.com>
6902 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
6903 returning a limited array, use an extended return statement.
6905 2011-08-03 Vincent Celier <celier@adacore.com>
6907 * make.adb (Initialize): If --subdirs= is used, but no project file is
6908 specified, attempt to create the specify subdir if it does not already
6909 exist and use it as the object directory as if -D had been specified.
6911 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6913 * s-tpopsp-vms.adb: New file.
6914 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
6915 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
6917 2011-08-03 Emmanuel Briot <briot@adacore.com>
6919 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
6922 2011-08-03 Yannick Moy <moy@adacore.com>
6924 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
6925 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
6926 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
6927 detect that an array has static bounds.
6929 2011-08-03 Thomas Quinot <quinot@adacore.com>
6931 * exp_dist.adb: Minor reformatting.
6933 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6935 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
6936 (ATCB_Key): Removed, not always used.
6938 2011-08-03 Emmanuel Briot <briot@adacore.com>
6940 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
6941 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
6942 most remaining global variables.
6944 2011-08-03 Robert Dewar <dewar@adacore.com>
6946 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
6947 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
6950 2011-08-03 Javier Miranda <miranda@adacore.com>
6952 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
6953 that must be passed by copy in VM targets.
6955 2011-08-03 Emmanuel Briot <briot@adacore.com>
6957 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
6958 duplicates a similar htable now in the project tree.
6960 2011-08-03 Claire Dross <dross@adacore.com>
6962 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
6963 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
6964 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
6965 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
6966 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
6967 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
6968 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
6971 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6973 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
6974 (ATCB_Key): Removed, not always used.
6975 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
6977 * s-tpopsp-tls.adb: New file.
6978 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
6979 x86/x64/ia64/powerpc/sparc Linux.
6981 2011-08-03 Arnaud Charlet <charlet@adacore.com>
6983 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
6984 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
6986 2011-08-03 Thomas Quinot <quinot@adacore.com>
6988 * rtsfind.ads, exp_dist.adb, exp_dist.ads
6989 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
6990 Fix type selection for mapping integer types to PolyORB types.
6992 2011-08-03 Bob Duff <duff@adacore.com>
6994 * sem_ch7.adb: Minor comment clarification.
6996 2011-08-03 Bob Duff <duff@adacore.com>
6998 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
6999 an error analyzing a choice, skip further processing. Further
7000 processing could cause a crash or cascade errors.
7002 2011-08-03 Emmanuel Briot <briot@adacore.com>
7004 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
7005 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
7006 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
7007 prj-env.ads (Shared_Project_Tree_Data): new type
7008 An aggregate project and its aggregated trees need to share the common
7009 data structures used for lists of strings, packages,... This makes the
7010 code simpler since otherwise we have to pass the root tree (also used
7011 for the configuration file data) in addition to the current project
7012 tree. This also avoids ambiguities as to which tree should be used.
7013 And finally this saves a bit of memory.
7014 (For_Every_Project_Imported): new parameter Tree.
7015 Since aggregated projects are using a different tree, we need to let
7016 the caller know which tree to use to manipulate the returned project.
7018 2011-08-03 Robert Dewar <dewar@adacore.com>
7020 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
7021 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
7022 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
7023 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
7025 2011-08-03 Javier Miranda <miranda@adacore.com>
7027 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
7028 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
7030 2011-08-03 Bob Duff <duff@adacore.com>
7032 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
7035 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
7037 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
7038 g-sehash.ads: Fix typo. Update header.
7040 2011-08-03 Thomas Quinot <quinot@adacore.com>
7042 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
7045 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7047 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
7048 prefixes of private types along with records, since the selector may be
7050 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
7051 private types along with records, since the selector may be a
7054 2011-08-03 Emmanuel Briot <briot@adacore.com>
7056 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
7058 2011-08-03 Javier Miranda <miranda@adacore.com>
7060 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
7061 Tagged_Type_Expansion.
7063 2011-08-03 Yannick Moy <moy@adacore.com>
7065 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
7066 violation when the argument of concatenation is the name of a
7069 2011-08-03 Emmanuel Briot <briot@adacore.com>
7071 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
7072 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
7073 (Process_Declarative_Items): new parameter Child_Env.
7075 2011-08-03 Yannick Moy <moy@adacore.com>
7077 * alfa.ads: Update format of ALFA section in ALI file in order to
7078 add a mapping from bodies to specs when both are present.
7079 (ALFA_Scope_Record): Add components for spec file/scope.
7080 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
7082 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
7083 collected, fill in the spec information when relevant.
7084 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
7087 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7089 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
7090 code unit to decide whether to add internally generated subprograms.
7092 2011-08-03 Javier Miranda <miranda@adacore.com>
7094 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
7095 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
7096 be handled by copy in VM targets.
7098 2011-08-03 Emmanuel Briot <briot@adacore.com>
7100 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
7101 code with Makeutl.Get_Switches.
7102 * prj-tree.adb: Update comment.
7104 2011-08-03 Thomas Quinot <quinot@adacore.com>
7106 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
7107 subprogram with a limited formal that does not support external
7110 2011-08-03 Yannick Moy <moy@adacore.com>
7112 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
7114 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
7115 not from current unit in two phases, because it is not possible to
7116 change the table while iterating over its content.
7117 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
7119 2011-08-03 Sergey Rybin <rybin@adacore.com>
7121 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
7122 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
7124 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7126 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
7127 and the component type is composite, this is ambiguous for predefined
7128 concatenation, but if the node is not overloaded and the entity is a use
7129 -defined function its profile can be used to resolve that aggregate.
7131 2011-08-03 Robert Dewar <dewar@adacore.com>
7133 * exp_ch4.adb: Minor code cleanup.
7135 2011-08-03 Thomas Quinot <quinot@adacore.com>
7137 * exp_dist.adb: Do not generate distribution stubs if serious errors
7138 have been diagnosed.
7140 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7142 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
7143 the first formal of a primitive operation, go to the base type to
7144 handle properly an access to a derived type with constrained
7146 * sem_type.adb (Disambiguate): an immediately visible operator hides a
7147 user-defined function that is only use-visible.
7149 2011-08-03 Robert Dewar <dewar@adacore.com>
7151 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
7152 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
7153 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
7154 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
7155 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
7156 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
7157 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
7158 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
7160 2011-08-03 Robert Dewar <dewar@adacore.com>
7162 * repinfo.adb (List_Mechanism): Add handling of
7163 Convention_Ada_Pass_By_XXX.
7164 * sem_mech.adb (Set_Mechanism): Ditto.
7165 * sem_prag.adb (Process_Convention): Add entries for
7166 Convention_Ada_Pass_By_XXX.
7167 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
7169 2011-08-03 Pascal Obry <obry@adacore.com>
7171 * makeutl.adb: Minor reformatting.
7173 2011-08-03 Vincent Celier <celier@adacore.com>
7176 (Get_File_Name) If the file cannot be found when there are no config
7177 pragmas file and May_Fail is True, return No_File instead of the file
7178 name, to be consistent.
7180 2011-08-03 Pascal Obry <obry@adacore.com>
7182 * adaint.c (__gnat_is_executable_file_attr): Avoid access
7185 2011-08-03 Javier Miranda <miranda@adacore.com>
7188 (Same_Representation): In VM targets the representation of arrays with
7189 aliased components differs from arrays with non-aliased components.
7191 2011-08-03 Emmanuel Briot <briot@adacore.com>
7193 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
7194 not systematically lower case attribute indexes that contain no "."
7195 Fix definition of several Naming attributes, which take
7196 a unit name as index and therefore should be case insensitive.
7197 Minor refactoring (reduce length of variable names).
7199 2011-08-03 Emmanuel Briot <briot@adacore.com>
7201 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
7203 2011-08-03 Emmanuel Briot <briot@adacore.com>
7205 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
7206 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
7207 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
7208 prj-tree.ads (Prj.Tree.Environment): new type.
7210 2011-08-03 Emmanuel Briot <briot@adacore.com>
7212 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
7213 prj-tree.adb, prj-tree.ads (Environment): new type.
7215 2011-08-03 Emmanuel Briot <briot@adacore.com>
7217 * prj-tree.ads: Remove unused variable.
7219 2011-08-03 Yannick Moy <moy@adacore.com>
7221 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
7222 issuing messages related to SPARK restriction violation.
7224 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7226 * sem_ch6.adb: guard against error nodes in return statements.
7228 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7230 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
7231 a warning can only appear on a configuration file, so emit warning
7232 without further checks.
7234 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7236 * s-interr.ads: add overriding keyword.
7238 2011-08-03 Geert Bosch <bosch@adacore.com>
7240 * exp_attr.adb: Fix minor typo.
7242 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7244 * par-ch4.adb: improve error recovery.
7246 2011-08-03 Emmanuel Briot <briot@adacore.com>
7248 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
7249 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
7252 2011-08-03 Emmanuel Briot <briot@adacore.com>
7254 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
7255 "external" as an attribute name in aggregate projects.
7257 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7259 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
7260 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
7261 from 0, so we need to adjust.
7263 2011-08-03 Emmanuel Briot <briot@adacore.com>
7265 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
7266 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
7268 2011-08-03 Yannick Moy <moy@adacore.com>
7270 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
7271 restriction on overloaded entity if the entity is not an operator.
7273 2011-08-03 Yannick Moy <moy@adacore.com>
7275 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
7276 restrict.ads: Rename remaining Check_Formal_Restriction* into
7277 Check_SPARK_Restriction*.
7279 2011-08-03 Emmanuel Briot <briot@adacore.com>
7281 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
7282 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
7284 (Project_Empty): removed
7285 (Empty_Project): new parameter Qualifier
7286 This is used to have fields specific to aggregate projects, cleaner
7287 New field to store the list of aggregated projects.
7288 (Check_Aggregate_Project): removed
7289 (Process_Aggregated_Projects, Free): new subprograms.
7291 2011-08-03 Olivier Hainque <hainque@adacore.com>
7293 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
7295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7297 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
7298 explicit dereference of an unconstrained type, create a constrained
7299 subtype for it, as is done for function calls that return an
7302 2011-08-03 Thomas Quinot <quinot@adacore.com>
7304 * g-pehage.adb (Finalize): Avoid possible double-free.
7306 2011-08-03 Steve Baird <baird@adacore.com>
7308 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
7309 Elab_Spec/Body attrs in CodePeer_Mode.
7311 2011-08-03 Javier Miranda <miranda@adacore.com>
7313 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
7314 low bound is not known at compile time but they have no others choice.
7315 Done because in this case the bounds can be obtained directly from the
7318 2011-08-03 Ed Falis <falis@adacore.com>
7320 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
7321 on VxWorks SMP. Remove unusable constant ANY_CPU.
7323 2011-08-03 Emmanuel Briot <briot@adacore.com>
7325 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
7326 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
7327 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
7328 Prj.Env.Initialize_Empty): new subprograms
7329 (Get_Env, Find_Project): remove parameter Target_Name.
7331 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7333 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
7334 as a condition for the delayed call to Derived_Subprograms done for the
7335 case of the rewriting of a derived type that constrains the
7336 discriminants of its parent type.
7337 Avoids redundant subprogram derivations for private subtype derivations.
7339 2011-08-03 Javier Miranda <miranda@adacore.com>
7341 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
7342 Build_Record_Aggr_Code.
7343 (Build_Record_Aggr_Code): Add missing support to initialize hidden
7344 discriminants in extension aggregates.
7346 2011-08-03 Emmanuel Briot <briot@adacore.com>
7348 * prj-pp.adb (Print): also output project qualifiers, since in
7349 particular "aggregate" is mandatory in an aggregate project.
7351 2011-08-03 Emmanuel Briot <briot@adacore.com>
7353 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
7354 (Debug_Output): new function.
7356 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7358 * gnat_ugn.texi: Document -Wstack-usage.
7359 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
7361 2011-08-03 Thomas Quinot <quinot@adacore.com>
7363 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
7364 have keyword LIMITED.
7366 2011-08-03 Yannick Moy <moy@adacore.com>
7368 * alfa.adb, alfa.ads, alfa_test.adb: New files.
7369 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
7370 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
7371 section (does not happen in compiler, only if code directly calls
7373 * get_alfa.adb, get_alfa.ads: New files.
7374 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
7376 * lib-xref-alfa.adb: New file.
7377 * lib-xref.adb, lib-xref.ads
7378 (Xref_Entry): redefine information needed in cross-references for ALFA.
7379 Push ALFA treatments in separated local package.
7380 (Enclosing_Subpragram_Or_Package): treat specially subprogram
7381 identifiers. Return entity of package body instead of spec. Return
7382 Empty for a scope with no location.
7383 (Generate_Reference): adapt to new components for ALFA information.
7384 Remove the need for D references on definitions.
7385 (Is_Local_Reference): moved to ALFA local package
7386 (Output_References): extract subfunction as Extract_Source_Name
7387 (Output_Local_References): remove procedure, replaced by filtering of
7388 cross-references in package ALFA and printing in Put_ALFA.
7389 (Write_Entity_Name): remove procedure
7390 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
7391 print exact name of entity as it appears in source file
7392 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
7393 * put_alfa.adb, put_alfa.ads: New files.
7394 * xref_lib.adb (Search_Xref): protect read of cross-references against
7395 reading other sections of the ALI file, in gnatxref
7396 (Search): protect read of cross-references against reading other
7397 sections of the ALI file, in gnatfind.
7398 * gcc-interface/Make-lang.in: Update dependencies.
7400 2011-08-03 Thomas Quinot <quinot@adacore.com>
7402 * sem_ch3.adb: Minor reformatting.
7404 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7406 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
7407 raising an exception.
7409 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7411 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
7412 type, always use 1 as the lower bound or string, even if lower bound of
7413 context is not static, to handle properly null strings in a non-static
7416 2011-08-03 Bob Duff <duff@adacore.com>
7418 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
7419 always legal on the right-hand side of an assignment statement; there
7420 is always an applicable index constraint in this case. Therefore, the
7421 check for Pkind = N_Assignment_Statement is now unconditional -- it
7422 doesn't depend on whether Is_Constrained (Typ).
7424 2011-08-03 Robert Dewar <dewar@adacore.com>
7426 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
7428 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7430 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
7431 for an itype created within a generic unit.
7433 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7435 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
7436 suppresses all inlining.
7438 2011-08-03 Robert Dewar <dewar@adacore.com>
7440 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
7441 exp_aggr.adb: Minor reformatting.
7443 2011-08-03 Thomas Quinot <quinot@adacore.com>
7445 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
7446 tagged assignment when discriminant checks are suppressed. This is
7447 useless and extremely costly in terms of static stack usage.
7449 2011-08-03 Bob Duff <duff@adacore.com>
7451 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
7452 of generics, because this leads to the wrong entity in the wrong scope,
7453 causing (e.g.) pragma Export_Procedure to get an error if the entity is
7455 (Process_Interface_Name): Follow Alias for instances of generics, to
7456 correct for the above change.
7458 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7460 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
7461 is an integer literal it is always safe to replace the reference. In
7462 addition, if the reference appears in the generated code for an object
7463 declaration it is necessary to copy because otherwise the reference
7464 might be to the uninitilized value of the discriminant of the object
7467 2011-08-03 Pascal Obry <obry@adacore.com>
7469 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
7470 ACL used, in this case we want to check for ending .exe, not .exe
7471 anywhere in the path.
7473 2011-08-03 Sergey Rybin <rybin@adacore.com>
7475 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7476 the tree structure (semantic decoration of references to record
7479 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7481 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
7482 choices of a named array aggregate, bail out when any choices are
7483 marked as Errors_Posted.
7485 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7487 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
7488 in which entity is frozen, to handle properly loop variables in
7491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7493 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
7494 subtype is not static, compute the upper bound using attributes, to
7495 handle properly index types that are not integer types.
7497 2011-08-03 Bob Duff <duff@adacore.com>
7499 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
7500 Update copyright notice.
7502 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7504 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
7505 Original_Discriminant if within an instance.
7506 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
7508 2011-08-03 Thomas Quinot <quinot@adacore.com>
7510 * einfo.ads: Minor reformatting.
7512 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7514 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
7515 composite type with an unfrozen subcomponent, in the profile of a
7516 primitive operation.
7518 2011-08-03 Robert Dewar <dewar@adacore.com>
7520 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
7522 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7524 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
7525 unconstrained type with discriminants is initialized with an aggregate,
7526 use the constrained subtype of the aggregate as the type of the object,
7527 because it is immutable, and this allows the back-end to generate no
7528 code for the object declaration.
7530 2011-08-03 Robert Dewar <dewar@adacore.com>
7532 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
7533 comparison operand is variable, and turns out to be zero or negative.
7535 2011-08-03 Javier Miranda <miranda@adacore.com>
7538 (Expand_Dispatching_Constructor_Call): Disable expansion of
7539 code required for native targets. Done to avoid generating
7540 references to unavailable runtime entities in VM targets.
7542 (Expand_N_Object_Declaration): Add missing support to handle
7543 the explicit initialization of class-wide interface objects.
7546 2011-08-03 Matthew Heaney <heaney@adacore.com>
7548 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
7550 2011-08-03 Matthew Heaney <heaney@adacore.com>
7552 * a-cbdlli.adb (Splice): move source items from first to last
7554 2011-08-03 Yannick Moy <moy@adacore.com>
7556 * sem_util.ads: comment added.
7558 2011-08-03 Javier Miranda <miranda@adacore.com>
7561 (Expand_Record_Aggregate): In VM targets disable the expansion into
7562 assignments of aggregates whose type is not known at compile time.
7564 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7566 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
7567 protected entries and task entries, to build the proper renaming
7568 declaration for entry formals, used in debugging.
7569 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
7570 parameters in the same way.
7572 2011-08-02 Robert Dewar <dewar@adacore.com>
7574 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
7575 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
7576 code reorganization.
7578 2011-08-02 Robert Dewar <dewar@adacore.com>
7580 * debug.adb: Debug flag d.P to suppress length comparison optimization
7581 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
7582 comparison of Length by comparing First/Last instead.
7584 2011-08-02 Matthew Heaney <heaney@adacore.com>
7586 * a-cobove.ads: Code clean up.
7588 2011-08-02 Vincent Celier <celier@adacore.com>
7590 * adaint.c (file_names_case_sensitive_cache): New static int.
7591 (__gnat_get_file_names_case_sensitive): Cache the return value in
7592 file_names_case_sensitive_cache at the first invocation, to avoid
7593 multiple calls to getenv.
7595 2011-08-02 Bob Duff <duff@adacore.com>
7597 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
7599 2011-08-02 Yannick Moy <moy@adacore.com>
7601 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
7602 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
7603 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
7604 indicate that we are in a precondition or postcondition. This is used in
7605 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
7606 decide whether to flag the spec or body of the current subprogram as
7609 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
7611 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
7613 * a-extiin.ads: New file.
7615 2011-08-02 Bob Duff <duff@adacore.com>
7617 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
7618 now raises Name_Error instead of Use_Error in certain cases. The other
7619 parts of this AI were already implemented properly.
7621 2011-08-02 Vincent Celier <celier@adacore.com>
7623 * link.c: Only import "auto-host.h" when building the gnattools.
7625 2011-08-02 Yannick Moy <moy@adacore.com>
7627 * sem_util.adb: Inter-unit inlining does not work for a subprogram
7628 which calls a local subprogram, so extract subprogram
7629 from Mark_Non_ALFA_Subprogram_Body.
7631 2011-08-02 Javier Miranda <miranda@adacore.com>
7634 (Extract_Dispatching_Call): If the type of the dispatching object is an
7635 access type then return an explicit dereference in the Object out-mode
7638 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7640 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
7641 compatibility checks for all indexes of an array subtype, not just the
7642 first. Reset Has_Dynamic_Range_Check on the subtype before each
7643 potential check to ensure that Insert_Range_Checks will not elide any
7644 of the dynamic checks.
7646 2011-08-02 Yannick Moy <moy@adacore.com>
7648 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
7649 SPARK restriction at parsing time.
7650 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
7651 directive only if the SPARK restriction is set for this unit.
7653 2011-08-02 Yannick Moy <moy@adacore.com>
7655 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
7656 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
7657 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
7658 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
7659 Mark_Non_ALFA_Subprogram_Body.
7660 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
7663 2011-08-02 Yannick Moy <moy@adacore.com>
7665 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
7668 2011-08-02 Robert Dewar <dewar@adacore.com>
7670 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
7671 exp_ch3.adb: Minor reformatting.
7673 2011-08-02 Emmanuel Briot <briot@adacore.com>
7675 * adaint.c (__gnat_locate_exec_on_path): only returns executable
7676 files, not any regular file.
7677 (__gnat_locate_file_with_predicate): new subprogram.
7679 2011-08-02 Yannick Moy <moy@adacore.com>
7681 * sinfo.adb, sinfo.ads: Restrict the use of flags
7682 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
7683 nodes, plus N_Subtype_Declaration for the 2nd one.
7685 2011-08-02 Sergey Rybin <rybin@adacore.com>
7687 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7688 - fix bugs in the description of Source_Trace;
7689 - get rid of UNIT_NAME;
7691 2011-08-02 Javier Miranda <miranda@adacore.com>
7694 (Build_Dispatching_Requeue): Adding support for VM targets
7695 since we cannot directly reference the Tag entity.
7696 * exp_sel.adb (Build_K): Adding support for VM targets.
7697 (Build_S_Assignment): Adding support for VM targets.
7699 (Default_Prim_Op_Position): In VM targets do not restrict availability
7700 of predefined interface primitives to compiling in Ada 2005 mode.
7701 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7702 restricted to compiling in Ada 2005 mode.
7703 (Make_VM_TSD): Generate code that declares and initializes the OSD
7704 record. Needed to support dispatching calls through synchronized
7707 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7708 primitives associated with synchronized interfaces.
7709 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7710 primitives associated with synchronized interfaces.
7712 2011-08-02 Yannick Moy <moy@adacore.com>
7714 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7715 statements hidden in SPARK if preceded by the HIDE directive
7716 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7717 exception handlers as hidden in SPARK if preceded by the HIDE directive
7718 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7719 if starting with the HIDE directive
7720 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7721 starting with the HIDE directive; mark the declarations in a private
7722 part as hidden in SPARK if the private part starts with the HIDE
7724 * restrict.adb, restrict.ads
7725 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7726 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7727 argument node belongs to a part which is hidden in SPARK
7728 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7729 parts in SPARK; protect the possibly costly call to
7730 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7731 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7732 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7733 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7735 (Scan): recognize special comment starting with '#' and followed by
7736 SPARK keyword "hide" as a HIDE directive.
7738 2011-08-02 Yannick Moy <moy@adacore.com>
7740 * types.ads, erroutc.ads: Minor reformatting.
7742 2011-08-02 Vincent Celier <celier@adacore.com>
7744 * link.c: Add response file support for cross platforms.
7746 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7748 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7749 in an association, set parent field of copy before partial analysis.
7750 * sem_res.adb (Resolve_Slice): create reference to itype only when
7751 expansion is enabled.
7753 2011-08-02 Yannick Moy <moy@adacore.com>
7755 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7756 for new flag denoting which subprogram bodies are in ALFA
7757 * restrict.adb, sem_ch7.adb: Update comment
7758 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7759 sem_ch9.adb, sem_res.adb: Add calls to
7760 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7761 * sem_ch6.adb (Analyze_Function_Return): add calls to
7762 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7763 middle of the body, and extended return.
7764 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7765 False when missing return.
7766 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7767 to True for subprograms whose spec is in ALFA. Remove later on the flag
7768 on the entity used for a subprogram body when there exists a separate
7770 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7771 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7772 False, otherwise do nothing.
7774 2011-08-02 Robert Dewar <dewar@adacore.com>
7776 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7778 2011-08-02 Yannick Moy <moy@adacore.com>
7780 * sem_ch4.ads: minor formatting.
7782 2011-08-02 Yannick Moy <moy@adacore.com>
7784 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7785 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7786 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7787 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7788 opt.ads: cleanup of SPARK mode
7790 2011-08-02 Yannick Moy <moy@adacore.com>
7792 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7794 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7795 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7797 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7798 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7799 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7800 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7802 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7804 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7805 functions whose return type is not in ALFA.
7806 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7808 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7809 parameter's type is not in ALFA.
7810 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7815 * sem_ch6 (Analyze_Expression_Function): treat the function as
7816 Inline_Always, and introduce a subprogram declaration for it when it is
7818 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7819 expression functions, so that the back-end can determine whether they
7820 can in fact be inlined.
7821 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7822 a function body comes from an expression function.
7824 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7826 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7827 null exclusions to test Can_Never_Be_Null on the anonymous access types
7828 of the formals rather than testing the formals themselves. Exclude this
7829 check in cases where the Old_Formal is marked as a controlling formal,
7830 to avoid issuing spurious errors for bodies completing dispatching
7831 operations (due to the flag not getting set on controlling access
7832 formals in body specs).
7833 (Find_Corresponding_Spec): When checking full and subtype conformance of
7834 subprogram bodies in instances, pass Designated and E in that order, for
7835 consistency with the expected order of the formals (New_Id followed by
7838 2011-08-02 Robert Dewar <dewar@adacore.com>
7840 * sem_ch8.adb: Minor reformatting.
7842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7844 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7845 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7846 primitive operations of class-wide actuals.
7848 2011-08-02 Javier Miranda <miranda@adacore.com>
7850 * exp_atag.ads, exp_atag.adb
7851 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7852 since its value is implicitly passed in argument Typ.
7853 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7854 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7855 Build_Common_Dispatching_Select_Statements.
7857 2011-08-02 Robert Dewar <dewar@adacore.com>
7859 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7860 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7863 2011-08-02 Robert Dewar <dewar@adacore.com>
7865 * sem_res.adb: Minor reformatting.
7866 * sem_prag.adb: Minor reformatting.
7868 2011-08-02 Javier Miranda <miranda@adacore.com>
7870 * exp_atag.adb, exp_atags.ads
7871 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7872 by the tagged type Entity. Required to use this routine in the VM
7873 targets since we do not have available the Tag entity in the VM
7876 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7877 Ada.Tags has not been previously loaded.
7879 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7880 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7882 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7883 view of enclosing scopes. Required to handle enclosing scopes that
7884 are synchronized types whose full view is a task type.
7886 (Build_VM_TSDs): Minor code improvement to avoid generating and
7887 analyzing lists with empty nodes.
7888 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7889 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7890 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7891 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7892 (Make_Select_Specific_Data_Table): Add support for VM targets.
7893 (Make_VM_TSD): Generate code to initialize the SSD structure of
7896 2011-08-02 Yannick Moy <moy@adacore.com>
7898 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7899 cross-references section in ALI.
7900 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7901 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7903 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7904 subprogram or package entity of a node
7905 (Is_Local_Reference_Type): new function returns True for references
7906 selected in local cross-references.
7907 (Lt): function extracted from Lt in Output_References
7908 (Write_Entity_Name): function extracted from Output_References
7909 (Generate_Definition): generate reference with type 'D' for definition
7910 of objects (object declaration and parameter specification), with
7911 appropriate locations and units, for use in local cross-references.
7912 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7913 references of type 'I' for initialization in object definition.
7914 (Output_References): move part of function Lt and procedure
7915 Write_Entity_Name outside of the body. Ignore references of types 'D'
7916 and 'I' introduced for local cross-references.
7917 (Output_Local_References): new procedure to output the local
7918 cross-references sections.
7919 (Lref_Entity_Status): new array defining whether an entity is a local
7920 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7921 with 'I' type when initialization expression is present.
7922 * get_scos.adb, get_scos.ads: Correct comments and typos
7924 2011-08-02 Javier Miranda <miranda@adacore.com>
7926 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7928 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7930 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7933 2011-08-02 Vincent Celier <celier@adacore.com>
7935 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7936 (No_Space_Img): New function
7937 (Find_Excluded_Sources): When reading from a file, record the file name
7938 and the line number for each excluded source.
7939 (Mark_Excluded_Sources): When reporting an error, if the excluded
7940 sources were read from a file, include file name and line number in
7943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7945 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7947 2011-08-02 Robert Dewar <dewar@adacore.com>
7949 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7951 2011-08-02 Javier Miranda <miranda@adacore.com>
7953 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7954 generation of TSDs to the DOTNET compiler.
7955 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7956 generation of TSDs to the DOTNET compiler.
7958 2011-08-02 Javier Miranda <miranda@adacore.com>
7960 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7961 record of all the tagged types declared inside library level package
7962 declarations, library level package bodies or library level subprograms.
7963 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7964 associated with a given tagged type.
7965 (Build_VM_TSDs): New subprogram.
7966 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7967 compilation units that are subprograms.
7968 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7969 compilation units that are package bodies.
7970 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7971 units that are a package declaration or a package instantiation.
7972 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7973 reorganization to improve the error generated by the frontend when the
7974 function Ada.Tags.Secondary_Tag is not available.
7975 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7976 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7978 2011-08-02 Javier Miranda <miranda@adacore.com>
7980 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7982 2011-08-02 Robert Dewar <dewar@adacore.com>
7984 * s-imenne.ads: Minor reformatting.
7986 2011-08-02 Robert Dewar <dewar@adacore.com>
7988 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7989 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7990 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7992 2011-08-02 Robert Dewar <dewar@adacore.com>
7994 * einfo.ads (Materialize_Entity): Document this is only for renamings
7995 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7996 required debug information in the case where we transform the object
7997 declaration into a renaming declaration.
7998 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8000 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8003 2011-08-02 Robert Dewar <dewar@adacore.com>
8005 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8006 Suppress_Init_Procs.
8007 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8008 Suppress_Initialization/Initialization_Suppressed.
8009 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8010 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8011 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8012 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8014 2011-08-02 Robert Dewar <dewar@adacore.com>
8016 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8021 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8022 only have inheritable classwide pre/postconditions.
8024 2011-08-02 Javier Miranda <miranda@adacore.com>
8026 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8027 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8028 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8029 checks if the external tag of a type is the same as the external tag
8030 of some other declaration.
8032 2011-08-02 Thomas Quinot <quinot@adacore.com>
8034 * s-taskin.ads: Minor reformatting.
8036 2011-08-02 Emmanuel Briot <briot@adacore.com>
8038 * g-comlin.adb (Display_Help): swap the order in which it prints the
8039 short help and the general usage.
8041 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8043 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8044 the aspect declarations and attach them to the generic copy for
8045 subsequent analysis.
8046 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8047 declarations of the generic tree to the new subprogram declarations.
8048 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8049 conditions that apply to a subprogram instance.
8051 2011-08-02 Robert Dewar <dewar@adacore.com>
8053 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8057 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8058 private type with a tagged full view is not derived in the immediate
8059 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8061 2011-08-02 Robert Dewar <dewar@adacore.com>
8063 * exp_ch4.adb: Minor reformatting.
8065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8067 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8068 Ada2012 iterator, the loop will be rewritten during expansion into a
8069 while loop with a cursor and an element declaration. Do not analyze the
8070 body in this case, because if the container is for indefinite types the
8071 actual subtype of the elements will only be determined when the cursor
8072 declaration is analyzed.
8074 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8076 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8077 size/alignment related attributes in CodePeer_Mode.
8079 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8081 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8082 Prepend_Element, since this can result in the operation getting the
8083 wrong slot in the full type's dispatch table if the full type has
8084 inherited operations. The incomplete type's operation will get added
8085 to the proper position in the full type's primitives
8086 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8087 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8088 dispatching operations, since there are cases where nonprimitive
8089 subprograms can get added to the list of incomplete dependents (such
8090 as subprograms in nested packages).
8091 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8092 private part when determining whether to add a primitive with a
8093 parameter of a tagged incomplete type to the Private_Dependents list.
8094 Such primitives can also occur in the visible part, and should not have
8095 been excluded from being private dependents.
8096 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8097 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8098 list of a Taft-amendment incomplete type is a primitive before issuing
8099 an error that the full type must appear in the same unit. There are
8100 cases where nonprimitives can be in the list (such as subprograms in
8102 * sem_disp.adb (Derives_From): Use correct condition for checking that
8103 a formal's type is derived from the type of the corresponding formal in
8104 the parent subprogram (the condition was completely wrong). Add
8105 checking that was missing for controlling result types being derived
8106 from the result type of the parent operation.
8108 2011-08-02 Yannick Moy <moy@adacore.com>
8110 * errout.adb (First_Node): minor renaming
8111 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8114 2011-08-02 Yannick Moy <moy@adacore.com>
8116 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8117 before accessing operands.
8118 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8119 decide whether an initialization expression respects SPARK rules, as
8120 the plain node is the expanded one. This allows for more valid warnings
8122 * gnat_rm.texi: Minor update.
8124 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8126 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8129 2011-08-02 Robert Dewar <dewar@adacore.com>
8131 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8133 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8135 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8136 loop statements and the element renaming declaration with a block when
8137 the element type is controlled.
8139 2011-08-02 Yannick Moy <moy@adacore.com>
8141 * sinfo.ads: Minor formatting.
8143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8145 * sem_aggr.adb (Add_Association): if the association has a box and no
8146 expression, use the Sloc of the aggregate itself for the new
8148 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8151 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8153 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8154 When a container is provided via a function call, generate a renaming
8155 of the function result. This avoids the creation of a transient scope
8156 and the premature finalization of the container.
8157 * exp_ch7.adb (Is_Container_Cursor): Removed.
8158 (Wrap_Transient_Declaration): Remove the supression of the finalization
8159 of the list controller when the declaration denotes a container cursor,
8162 2011-08-02 Yannick Moy <moy@adacore.com>
8164 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8165 node is from source, instead of the original node being from source.
8167 (Resolve_Array_Aggregate): refine the check for a static expression, to
8168 recognize also static ranges
8169 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8170 Array_Type_Declaration): postpone the test for the type being a subtype
8171 mark after the type has been resolved, so that component-selection and
8172 expanded-name are discriminated.
8173 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8174 to distinguish the case of an iteration scheme, so that an error is
8175 issed on a non-static range in SPARK except in an iteration scheme.
8176 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8177 In_Iter_Schm = True.
8178 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8179 user-defined operators so that they are allowed in renaming
8181 (Find_Selected_Component): refine the check for prefixing of operators
8182 so that they are allowed in renaming. Move the checks for restrictions
8183 on selector name after analysis discriminated between
8184 component-selection and expanded-name.
8185 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8186 concatenation argument of string type if it is static.
8187 * sem_util.adb, sem_util.ads
8188 (Check_Later_Vs_Basic_Declarations): add a new function
8189 Is_Later_Declarative_Item to decice which declarations are allowed as
8190 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8191 mode, add that renamings are considered as later items.
8192 (Enclosing_Package): new function to return the enclosing package
8193 (Enter_Name): correct the rule for homonyms in SPARK
8194 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8195 from source (result of expansion) to avoid issuing wrong warnings.
8197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8199 * errout.adb: On anything but an expression First_Node returns its
8202 2011-08-02 Pascal Obry <obry@adacore.com>
8204 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8206 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8208 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8209 Set the associated loop as the related expression of internally
8211 * exp_ch7.adb (Is_Container_Cursor): New routine.
8212 (Wrap_Transient_Declaration): Supress the finalization of the list
8213 controller when the declaration denotes a container cursor.
8215 2011-08-02 Yannick Moy <moy@adacore.com>
8217 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8219 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8220 expression is a simple expression. This check cannot be performed in
8221 the semantics, so just drop it.
8222 (P_Index_Or_Discriminant_Constraint): move check that the index or
8223 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8224 semantics. Other cases were previously checked in the semantics.
8225 * par-ch4.adb (P_Name): move checks that a selector name is not
8226 character literal or an operator symbol to Find_Selected_Component in
8228 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8229 declarations are not placed after later declarations in a separate
8230 procedure in Sem_Util (possibly not the best choice?), to be used both
8231 during parsing, for Ada 83 mode, and during semantic analysis, for
8233 * par-endh.adb (Check_End): move check that end label is not missing
8234 to Process_End_Label in the semantics
8235 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8236 the special case for SPARK restriction
8237 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8238 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8239 parameter Force to issue the error message even on internal node (used
8240 for generated end label). Call Check_Restriction to check when an error
8241 must be issued. In SPARK mode, issue an error message even if the
8242 restriction is not set.
8243 (Check_Restriction): new procedure with an additional out parameter to
8244 inform the caller that a message has been issued
8245 * sem_aggr.adb: Minor modification of message
8246 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8247 instead of issuing an error message directly
8248 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8249 declarations are not placed after later declarations, by calling
8250 Check_Later_Vs_Basic_Declarations
8251 (Analyze_Subtype_Declaration): move here the check that an index or
8252 discriminant constraint must be a subtype mark. Change the check that
8253 a subtype of String must start at one so that it works on subtype marks.
8254 * sem_ch4.adb (Analyze_Call): move here the check that a named
8255 association cannot follow a positional one in a call
8256 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8257 instead of issuing an error message directly
8258 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8259 selector name is not a character literal or an operator symbol. Move
8260 here the check that the prefix of an expanded name cannot be a
8261 subprogram or a loop statement.
8262 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8263 procedure called from parsing and semantics to check that basic
8264 declarations are not placed after later declarations
8265 (Process_End_Label): move here the check that end label is not missing
8267 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8269 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8270 representation clause in codepeer mode, since it confuses CodePeer and
8271 does not bring useful info.
8273 2011-08-02 Ed Falis <falis@adacore.com>
8275 * init.c: initialize fp hw on MILS.
8277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8279 * errout.adb (First_Node): for bodies, return the node itself (small
8280 optimization). For other nodes, do not check source_unit if the node
8281 comes from Standard.
8283 2011-08-02 Robert Dewar <dewar@adacore.com>
8285 * exp_ch3.adb: Minor comment additions.
8286 * sem_ch13.adb: Minor reformatting.
8288 2011-08-02 Pascal Obry <obry@adacore.com>
8290 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8292 2011-08-02 Robert Dewar <dewar@adacore.com>
8294 * sem_attr.adb: Minor reformatting.
8296 2011-08-02 Robert Dewar <dewar@adacore.com>
8298 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8299 (Has_Default_Component_Value): Removed
8300 * einfo.ads Comment updates
8301 (Has_Default_Aspect): Replaces Has_Default_Value
8302 (Has_Default_Component_Value): Removed
8304 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8306 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8307 (Get_Simple_Init_Val): Handle Default_Value aspect
8308 (Needs_Simple_Initialization): Handle Default_Value aspect
8309 * exp_ch3.ads: Needs_Simple_Initialization
8310 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8311 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8313 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8314 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8315 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8319 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8320 package containing iteration primitives.
8321 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8325 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8326 "of", pre-analyze expression in case it is a function call with
8327 finalization actions that must be placed ahead of the loop.
8328 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8329 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8331 2011-08-02 Geert Bosch <bosch@adacore.com>
8333 * cstand.adb (Create_Float_Types): Only consider C's long double for
8334 Long_Long_Float, in addition to double.
8336 2011-08-02 Robert Dewar <dewar@adacore.com>
8338 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8339 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8340 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8345 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8348 2011-08-02 Javier Miranda <miranda@adacore.com>
8350 * einfo.ads, einfo.adb
8351 (Original_Access_Type): Move this attribute to Node26 since there was
8352 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8353 which causes conflicts and breaks the generation of the .NET compiler.
8354 (Interface_Name): Add missing documentation on JGNAT only uses of
8357 2011-08-02 Geert Bosch <bosch@adacore.com>
8359 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8360 (Find_Back_End_Float_Type): Likewise
8361 (Create_Back_End_Float_Types): Likewise
8362 (Create_Float_Types): Likewise
8363 (Register_Float_Type): Likewise
8364 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8365 Nlist and split out type selection in new local Find_Base_Type function.
8366 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8368 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8370 2011-08-02 Robert Dewar <dewar@adacore.com>
8372 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8374 * opt.ads: Minor comment change.
8375 * sem_ch12.adb: Minor code reorganization.
8377 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8379 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8380 subtype's list of rep items to the list on the full subtype in the case
8381 where the lists are the same.
8383 2011-08-02 Geert Bosch <bosch@adacore.com>
8385 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8386 using the one from System.Strings, which also deallocates all strings.
8388 2011-08-02 Geert Bosch <bosch@adacore.com>
8390 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8392 * gcc-interface/Make-lang.in: Update dependencies.
8394 2011-08-02 Olivier Hainque <hainque@adacore.com>
8396 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8399 2011-08-02 Javier Miranda <miranda@adacore.com>
8401 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8402 associated with anonymous access to subprograms.
8404 2011-08-02 Geert Bosch <bosch@adacore.com>
8407 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8408 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8409 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8410 (Add_Symbol_Definition): Move to switch-c.adb
8411 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8412 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8413 (Add_Symbol_Definition): Move to switch-c.adb.
8414 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8416 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8418 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8419 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8421 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8422 (Add_Symbol_Definition): Moved from Prepcomp.
8423 * switch-c.ads: Update copyright notice. Use String_List instead of
8424 Argument_List, removing dependency on System.OS_Lib.
8426 2011-08-02 Yannick Moy <moy@adacore.com>
8428 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8429 mode on initialization expression which does not respect SPARK
8431 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8432 if the tree referenced by its argument represents an initialization
8433 expression in SPARK, suitable for initializing an object in an object
8436 2011-08-02 Javier Miranda <miranda@adacore.com>
8438 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8439 internally generated access to subprogram with its associated protected
8441 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8443 2011-08-02 Geert Bosch <bosch@adacore.com>
8445 * cstand.adb (Register_Float_Type): Print information about type to
8446 register, if the Debug_Flag_Dot_B is set.
8447 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8448 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8449 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8450 with a requested precision of more than Max_Digits digits and no more
8451 than Max_Base_Digits digits, if a range specification is present and the
8452 Predefined_Float_Types list has a suitable type to derive from.
8453 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8454 case of type completion with pragma Import
8456 (Process_Import_Predefined_Type): Processing to complete a type
8457 with pragma Import. Currently supports floating point types only.
8458 (Set_Convention_From_Pragma): Do nothing without underlying type.
8459 (Process_Convention): Guard against absence of underlying type,
8460 which may happen when importing incomplete types.
8461 (Process_Import_Or_Interface): Handle case of importing predefined
8462 types. Tweak error message.
8464 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8466 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8467 functions to previous change. Reorganize code slightly.
8469 2011-08-02 Geert Bosch <bosch@adacore.com>
8471 * back_end.ads (Register_Type_Proc): New call back procedure type for
8472 allowing the back end to provide information about available types.
8473 (Register_Back_End_Types): New procedure to register back end types.
8474 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8476 * cstand.adb (Back_End_Float_Types): New list for floating point types
8477 supported by the back end.
8478 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8479 (Copy_Float_Type): New procedure to make new copies of predefined types.
8480 (Register_Float_Type): New call back procedure to populate the BEFT list
8481 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8482 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8483 (Create_Float_Types): New procedure to create entities for floating
8484 point types predefined in Standard, and put these and any remaining
8485 BEFTs on the Predefined_Float_Types list.
8486 * stand.ads (Predefined_Float_Types): New list for predefined floating
8487 point types that do not have declarations in package Standard.
8489 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8491 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8492 entity node for the unit containing the parameter.
8493 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8494 (Add_Inlined_Subprogram): Likewise.
8495 * gcc-interface/Make-lang.in: Update dependencies.
8497 2011-08-02 Thomas Quinot <quinot@adacore.com>
8499 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8502 2011-08-02 Geert Bosch <bosch@adacore.com>
8504 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8506 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8508 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8509 computed value of Base_Type.
8511 2011-08-02 Yannick Moy <moy@adacore.com>
8513 * restrict.adb (Check_Restriction): issue an error for any use of
8514 class-wide, even if the No_Dispatch restriction is not set.
8515 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8516 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8517 when completing a private extension, the type named in the private part
8518 is not the same as that named in the visible part.
8519 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8520 of an inherited primitive operations of a tagged type or type extension
8521 that returns the tagged type.
8522 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8523 function which returns True for an implicit operation inherited by the
8524 derived type declaration for the argument type.
8525 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8530 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8531 Process_Bounds, to perform analysis with expansion of a range or an
8532 expression that is the iteration scheme for a loop.
8533 (Analyze_Iterator_Specification): If domain of iteration is given by a
8534 function call with a controlled result, as is the case if call returns
8535 a predefined container, ensure that finalization actions are properly
8537 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8539 2011-08-02 Javier Miranda <miranda@adacore.com>
8541 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8542 * gcc-interface/Make-lang.in: Update dependencies.
8544 2011-08-02 Javier Miranda <miranda@adacore.com>
8546 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8547 determine if the analysis is performed using N or Original_Node (N).
8548 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8549 functionality of routine Is_Variable avoids code duplication.
8550 * checks.adb (Determine_Range): Handle temporaries generated by
8551 Remove_Side_Effects.
8553 2011-08-02 Javier Miranda <miranda@adacore.com>
8555 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8556 expansion of the condition. Required since the previous analysis was
8557 done with expansion disabled (see Resolve_Quantified_Expression) and
8558 hence checks were not inserted and record comparisons have not been
8561 2011-08-02 Ed Falis <falis@adacore.com>
8563 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8566 2011-08-02 Bob Duff <duff@adacore.com>
8568 * opt.ads: Minor comment fix.
8570 2011-08-02 Bob Duff <duff@adacore.com>
8572 * sem_ch12.adb (Analyze_Package_Instantiation,
8573 Analyze_Subprogram_Instantiation): Turn off style checking while
8574 analyzing an instance. Whatever style checks that apply to the generic
8575 unit should apply, so it makes no sense to apply them in an instance.
8576 This was causing trouble when compiling an instance of a runtime
8577 unit that violates the -gnatyO switch.
8578 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8579 one of the two case statements, causing spurious errors.
8581 2011-08-02 Robert Dewar <dewar@adacore.com>
8583 * uname.adb: Minor reformatting.
8584 * gnatcmd.adb: Minor reformatting.
8585 * exp_attr.adb: Minor reformatting.
8587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8589 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8590 No_Dispatching_Calls, do not look for the Assign primitive, because
8591 predefined primitives are not created in this case.
8593 2011-08-02 Bob Duff <duff@adacore.com>
8595 * stylesw.ads: Minor comment fixes.
8597 2011-08-02 Robert Dewar <dewar@adacore.com>
8599 * freeze.adb (Add_To_Result): New procedure.
8601 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8603 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8604 time, if the specific run-time routines for handling streams of strings
8605 are not available, use the default mechanism.
8607 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8609 * s-regpat.ads: Fix typo.
8611 2011-08-02 Vincent Celier <celier@adacore.com>
8613 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8614 not null, call it to create the in memory config project file without
8615 parsing an existing default config project file.
8617 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8619 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8623 * sem_elim.adb: an abstract subprogram does not need an eliminate
8624 pragma for its descendant to be eliminable.
8626 2011-08-02 Ed Falis <falis@adacore.com>
8628 * init.c: revert to handling before previous checkin for VxWorks
8629 * s-intman-vxworks.adb: delete unnecessary declarations related to
8630 using Ada interrupt facilities for handling signals.
8631 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8632 * s-intman-vxworks.ads: Import __gnat_install_handler as
8633 Initialize_Interrupts.
8634 * s-taprop-vxworks.adb: Delete Signal_Mask.
8635 (Abort_Handler): change construction of mask to unblock exception
8638 2011-08-02 Jerome Guitton <guitton@adacore.com>
8640 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8641 Debug_Raise_Exception before propagation starts.
8643 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8645 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8646 to Restriction_Check_Required.
8647 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8648 * sem_res.adb (Resolve_Call): Likewise.
8649 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8651 2011-08-02 Bob Duff <duff@adacore.com>
8653 * stylesw.ads: Update comment.
8654 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8655 * errout.ads: Remove obsolete comment.
8657 2011-08-02 Javier Miranda <miranda@adacore.com>
8659 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8660 (Set_Is_Safe_To_Reevaluate): new procedure.
8661 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8662 assignment is allowed on safe-to-reevaluate variables.
8663 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8664 temporary created to remove side effects in expressions that use
8665 the secondary stack as safe-to-reevaluate.
8666 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8667 variables that are not true constants.
8669 2011-08-02 Robert Dewar <dewar@adacore.com>
8671 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8672 sem_res.adb, sem_ch6.adb: Minor reformatting.
8674 2011-08-02 Jerome Guitton <guitton@adacore.com>
8676 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8678 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8680 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8681 not set Overridden_Operation if subprogram is an initialization
8684 2011-08-02 Yannick Moy <moy@adacore.com>
8686 * par-ch6.adb: Correct obsolete name in comments
8687 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8688 which takes two message arguments (existing function takes one), with
8689 second message used for continuation.
8690 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8691 block statements that originate from a source block statement, not
8692 generated block statements
8693 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8694 symmetry with procedure case
8695 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8696 function to issue an error in formal mode if a package specification
8697 contains more than one tagged type or type extension.
8698 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8699 parameters matching formals of tagged types are objects (or ancestor
8700 type conversions of objects), not general expressions. Issue an error
8701 on view conversions that are not involving ancestor conversion of an
8703 (Resolve_Type_Conversion): in formal mode, issue an error on the
8704 operand of an ancestor type conversion which is not an object
8705 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8706 procedure so that it works also for actuals of function calls
8707 (Is_Actual_Tagged_Parameter): new function which determines if its
8708 argument is an actual parameter of a formal of tagged type in a
8710 (Is_SPARK_Object_Reference): new function which determines if the tree
8711 referenced by its argument represents an object in SPARK
8713 2011-08-02 Robert Dewar <dewar@adacore.com>
8715 * sem_ch3.adb: Minor reformatting
8716 Minor comment addition
8717 Minor error msg text change
8719 2011-08-02 Javier Miranda <miranda@adacore.com>
8721 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8722 function. Used to be more precise when we generate a variable plus one
8723 assignment to remove side effects in the evaluation of the Bound
8725 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8726 of the bound expression to force its re-analysis and thus expand the
8727 associated transient scope (if required). Code cleanup replacing the
8728 previous code that declared the constant entity by an invocation to
8729 routine Force_Evaluation which centralizes this work in the frontend.
8731 2011-08-02 Robert Dewar <dewar@adacore.com>
8733 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8734 (Base_Type): Now uses improved Is_Base_Type function
8735 * einfo.ads (Base_Type): Inline this function
8737 2011-08-02 Robert Dewar <dewar@adacore.com>
8739 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8740 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8744 * gcc-interface/Make-lang.in: Update dependencies.
8745 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8748 2011-08-02 Yannick Moy <moy@adacore.com>
8750 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8751 non-simple expression used in delta constraint
8752 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8753 index constraint which is not a subtype mark
8754 * par.adb: With and use Restrict
8755 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8756 mode on component type which is not a subtype mark and default
8757 expression on component
8758 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8759 of string which does not have a lower index bound equal to 1
8760 (Array_Type_Declaration): issue an error in formal mode on index or
8761 component type which is not a subtype mark, and on aliased keyword on
8763 (Derived_Type_Declaration): issue an error in formal mode on interface,
8764 limited or abstract type
8765 (Record_Type_Declaration): issue an error in formal mode on interface
8766 (Record_Type_Definition): issue an error in formal mode on tagged types
8767 and type extensions not declared in the specification of a library unit
8768 package; on null non-tagged record; on variant part
8770 2011-08-02 Vincent Celier <celier@adacore.com>
8772 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8773 not declared for qualified library project when Library_Name is not
8774 declared, but Library_Dir is.
8776 2011-08-02 Robert Dewar <dewar@adacore.com>
8778 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8779 pragmas (affects aspects [Component_]Default_Value
8780 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8781 component type for the resolution
8783 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8785 * einfo.adb (Base_Type): Tune implementation for speed.
8787 2011-08-02 Robert Dewar <dewar@adacore.com>
8789 * freeze.adb: Minor reformatting.
8791 2011-08-02 Thomas Quinot <quinot@adacore.com>
8793 * scos.ads: Update comments.
8795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8797 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8798 base type, because the parent may be a subtype of a private type whose
8799 convention is established in a private part.
8801 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8804 statement in a block when the expansion of the return expression has
8805 created a finalization chain.
8806 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8807 with the parent node.
8808 Add N_Extended_Return_Statement to handle the case where a transient
8809 object declaration appears in the Return_Object_Declarations list of
8810 an extended return statement.
8812 2011-08-02 Matthew Gingell <gingell@adacore.com>
8814 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8815 unused parameter 'name'.
8817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8819 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8820 inherited operation, check whether its alias, which is the source
8821 operastion that it renames, has been marked eliminated.
8823 2011-08-02 Javier Miranda <miranda@adacore.com>
8825 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8826 in-mode parameter whose type is an access type since it can be used to
8827 modify its designated object. Enforce code that handles as safe an
8828 access type that is not access-to-constant but it is the result of a
8829 previous removal of side-effects.
8830 (Remove_Side_Effects): Minor code reorganization of cases which require
8831 no action. Done to incorporate documentation on new cases uncovered
8832 working in this ticket: no action needed if this routine was invoked
8833 too early and the nodes are not yet decorated.
8834 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8835 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8836 were issued with actuals that are implicitly provided by
8839 2011-08-02 Robert Dewar <dewar@adacore.com>
8841 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8843 2011-08-02 Yannick Moy <moy@adacore.com>
8845 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8846 to issue an error in formal mode on attribute not supported in this mode
8847 (Analyze_Attribute): issue errors on standard attributes not supported
8849 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8850 comment, and issue error in formal mode on modulus which is not a power
8852 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8854 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8856 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8857 operator on modular type (except 'not').
8859 2011-08-02 Robert Dewar <dewar@adacore.com>
8861 * gnat_rm.texi: Minor reformatting.
8863 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8865 * s-osinte-linux.ads: Minor comment update and reformatting.
8866 * i-cexten.ads: Make this unit pure, as for its parent.
8867 Will allow its usage in more contexts if needed.
8869 2011-08-02 Robert Dewar <dewar@adacore.com>
8871 * s-utf_32.ads: Minor comment fix.
8873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8875 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8876 operation of a tagged synchronized type, handle the case where the
8877 controlling argument is overloaded.
8879 2011-08-02 Yannick Moy <moy@adacore.com>
8881 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8882 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8883 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8884 SPARK mode and formal verification mode on processing SPARK restriction
8885 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8886 requiring consistency checking.
8888 2011-08-02 Robert Dewar <dewar@adacore.com>
8890 * sem_res.adb: Minor reformatting.
8892 2011-08-02 Robert Dewar <dewar@adacore.com>
8894 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8895 a-cforse.ads: Remove unneeded with of Ada.Containers
8896 Remove commented out pragma Inline's
8897 Move specifications of new subprograms to the actual specs
8899 2011-08-02 Yannick Moy <moy@adacore.com>
8901 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8902 a-cforse.ads: Update comments.
8904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8906 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8908 2011-08-02 Robert Dewar <dewar@adacore.com>
8910 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8911 a-cforse.ads, a-cofove.ads: Minor reformatting.
8913 2011-08-02 Claire Dross <dross@adacore.com>
8915 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8916 a-cofove.ads: Add comments.
8918 2011-08-02 Yannick Moy <moy@adacore.com>
8920 * gnat_rm.texi: Document formal containers.
8922 2011-08-02 Emmanuel Briot <briot@adacore.com>
8924 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8927 2011-08-02 Robert Dewar <dewar@adacore.com>
8929 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8932 2011-08-02 Robert Dewar <dewar@adacore.com>
8934 * aspects.adb: New aspects Default_Value and Default_Component_Value
8935 New format of Aspect_Names table checks for omitted entries
8936 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8937 handling of boolean aspects for derived types.
8938 New aspects Default_Value and Default_Component_Value
8939 New format of Aspect_Names table checks for omitted entries
8940 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8941 (Has_Default_Value): New flag
8942 (Has_Default_Component_Value): New flag
8943 (Has_Default_Value): New flag
8944 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8946 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8947 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8948 Default_Value and Default_Component_Value
8949 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8950 New aspects Default_Value and Default_Component_Value
8951 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8952 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8954 2011-08-02 Vincent Celier <celier@adacore.com>
8956 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8957 inherit library kind.
8959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8961 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8964 2011-08-02 Robert Dewar <dewar@adacore.com>
8966 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8968 2011-08-02 Yannick Moy <moy@adacore.com>
8970 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8972 2011-08-02 Robert Dewar <dewar@adacore.com>
8974 * impunit.adb: Add comment.
8976 2011-08-02 Yannick Moy <moy@adacore.com>
8978 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8979 qualification of aggregates in formal mode
8980 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8982 (Resolve_Aggregate): complete the test that an aggregate is adequately
8983 qualified in formal mode
8985 2011-08-02 Pascal Obry <obry@adacore.com>
8987 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8988 * mlib-prj.adb: Supress warning when compiling binder generated file.
8989 (Build_Library): Supress all warnings when compiling the binder
8992 2011-08-02 Yannick Moy <moy@adacore.com>
8994 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8996 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8997 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8998 Add with/use clauses to make Check_Formal_Restriction visible
9000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9002 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9003 in-parameters when type of the generic formal is private in the generic
9004 spec and non-private in the body.
9006 2011-08-02 Claire Dross <dross@adacore.com>
9008 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9009 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9010 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9011 * impunit.adb, Makefile.rtl: Take new files into account.
9013 2011-08-02 Robert Dewar <dewar@adacore.com>
9015 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9016 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9018 2011-08-02 Yannick Moy <moy@adacore.com>
9020 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9022 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9023 matching static array bounds, taking into account the special case of
9025 * sem_ch3.adb: Typo in comment.
9027 2011-08-02 Yannick Moy <moy@adacore.com>
9029 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9030 which issues an error in formal mode if its argument node is originally
9032 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9033 has a discriminant specification so that it does not include the case
9035 (Derived_Type_Declaration): move here the test that a derived type has a
9036 discriminant specification
9037 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9038 first element of a component association before accessing its choices
9039 (presence of component association is not enough)
9040 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9041 declaration is a library item before accessing the next element in a
9042 list, as library items are not member of lists
9043 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9044 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9045 Check_Formal_Restriction whenever possible.
9047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9049 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9050 reference when needed.
9052 2011-08-02 Bob Duff <duff@adacore.com>
9054 * gnat_ugn.texi: Fix typo.
9056 2011-08-02 Vincent Celier <celier@adacore.com>
9058 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9059 archive file name. Do not use the full path name of archives for Open
9062 2011-08-02 Robert Dewar <dewar@adacore.com>
9064 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9065 Analyze_Aspect_Specifications
9067 (Analyze_Aspect_Specifications): New handling for boolean aspects
9068 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9069 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9070 sequence for Analyze_Aspect_Specifications
9071 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9072 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9074 2011-08-02 Robert Dewar <dewar@adacore.com>
9076 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9077 aspects, since these no longer exist.
9079 2011-08-02 Robert Dewar <dewar@adacore.com>
9081 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9082 semicolon, do not try to see if there are aspects following it.
9083 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9086 2011-08-02 Robert Dewar <dewar@adacore.com>
9088 * sem_ch8.adb, aspects.ads: Minor reformatting.
9090 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9092 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9093 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9095 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9097 2011-08-02 Yannick Moy <moy@adacore.com>
9099 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9100 mode on subprogram declaration outside of package specification, unless
9101 it is followed by a pragma Import
9102 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9103 Access_Type_Declaration): issue error in formal mode on access type
9104 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9106 (Analyze_Object_Declaration): issue error in formal mode on object
9107 declaration which does not respect SPARK restrictions
9108 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9109 declaration which does not respect SPARK restrictions
9110 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9111 error in formal mode on digits or delta constraint
9112 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9113 decimal fixed point type
9114 (Derived_Type_Declaration): issue error in formal mode on derived type
9115 other than type extensions of tagged record types
9116 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9117 with check on access definition
9118 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9119 mode on protected definition.
9120 (Analyze_Task_Definition): issue error in formal mode on task definition
9122 2011-08-02 Robert Dewar <dewar@adacore.com>
9124 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9126 2011-08-02 Javier Miranda <miranda@adacore.com>
9128 * sem_ch6.adb (Can_Override_Operator): New function.
9129 (Verify_Overriding_Indicator): Add missing code to check overriding
9130 indicator in operators. Fixes regression.
9131 (Check_Overriding_Indicator): Minor reformating after replacing the
9132 code that evaluates if the subprogram can override an operator by
9133 invocations to the above new function.
9135 (Write_Field26_Name): Add missing code to ensure that, following
9136 the documentation in einfo.ads, this field is not shown as attribute
9137 "Static_Initialization" on non-dispatching functions.
9139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9141 * sem_res.adb (Resolve_Call): A call to
9142 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9143 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9144 i.e., when the second parameter is of type Time_Span.
9146 2011-08-02 Vincent Celier <celier@adacore.com>
9148 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9149 with an archive instead of -L<library dir> -l<library name>.
9151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9153 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9154 mark the base types In_Use in addition to making the operations
9157 2011-08-02 Ed Falis <falis@adacore.com>
9159 * init.c: add and setup __gnat_signal_mask for the exception signals
9160 * s-inmaop-vxworks.adb: new file.
9161 * s-intman-vxworks.adb: remove unnecessary initializations and
9163 * s-intman-vxworks.ads: remove unnecessary variable
9164 * s-taprop-vxworks.adb: simplify signal initialization
9166 2011-08-02 Robert Dewar <dewar@adacore.com>
9168 * sem_ch8.adb: Minor code reorganization, comment updates.
9170 2011-08-02 Robert Dewar <dewar@adacore.com>
9172 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9173 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9175 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9176 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9180 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9181 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9182 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9183 use_type_clauses, to handle more efficiently use_type and use_all_type
9185 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9186 Ada2012 Use_All_Type clause.
9187 (Use_Class_Wide_Operations): new procedure.
9189 2011-08-02 Robert Dewar <dewar@adacore.com>
9191 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9192 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9193 expression to expression function.
9195 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9197 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9198 if types are compatible.
9200 2011-08-02 Yannick Moy <moy@adacore.com>
9202 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9203 returns True if its argument array types have same dimension and same
9204 static bounds at each index.
9205 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9206 OUT or IN OUT paramaters which are not view conversions in SPARK.
9207 (Resolve_Arithmetic_Op): issue an error in formal mode on
9208 multiplication or division with operands of fixed point types which are
9209 not qualified or explicitly converted.
9210 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9211 Boolean or array type (except String) operands.
9212 (Resolve_Equality_Op): issue an error in formal mode on equality
9213 operators for array types other than String with non-matching static
9215 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9216 for array types with non-matching static bounds. Factorize the code in
9217 Matching_Static_Array_Bounds.
9218 (Resolve_Qualified_Expression): issue an error in formal mode on
9219 qualified expressions for array types with non-matching static bounds.
9220 (Resolve_Type_Conversion): issue an error in formal mode on type
9221 conversion for array types with non-matching static bounds
9223 2011-08-02 Robert Dewar <dewar@adacore.com>
9225 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9229 * par-ch9.adb: save location of entry for proper error message.
9231 2011-08-02 Javier Miranda <miranda@adacore.com>
9233 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9234 (Use_Full_View) which permits this routine to climb through the
9235 ancestors using the full-view of private parents.
9236 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9237 Use_Full_View to true in calls to Is_Ancestor.
9238 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9239 true in call to Is_Ancestor.
9240 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9241 Use_Full_View to true in call to Is_Ancestor.
9242 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9243 call to Is_Ancestor.
9244 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9245 Use_Full_View to true in calls to Is_Ancestor.
9246 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9247 Make_Select_Specific_Data_Table, Register_Primitive,
9248 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9249 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9250 to true in call to Is_Ancestor.
9251 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9252 Use_Full_View to true in calls to Is_Ancestor.
9254 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9255 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9257 2011-08-02 Robert Dewar <dewar@adacore.com>
9259 * gnat_rm.texi: Minor reformatting.
9260 * sem_prag.adb: Minor reformatting.
9262 2011-08-02 Tristan Gingold <gingold@adacore.com>
9264 * vms_data.ads: Add VMS qualifier for -gnateP.
9266 2011-08-02 Robert Dewar <dewar@adacore.com>
9268 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9269 * par-ch7.adb (P_Package): Proper placement of aspects for package
9271 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9272 (End_Statements): Add Is_Sloc parameterr
9273 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9274 (Check_End): Ad Is_Sloc parameter
9275 (End_Statements): Add Is_Sloc parameterr
9277 2011-08-02 Vincent Celier <celier@adacore.com>
9279 * ug_words: Add VMS qualifier equivalent to -gnateP:
9280 /SYMBOL_PREPROCESSING.
9282 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9284 * gnat-style.texi: For hexadecimal numeric literals the typical
9285 grouping of digits is 4 to represent 2 bytes.
9286 A procedure spec which is split into several lines is indented two
9289 2011-08-02 Yannick Moy <moy@adacore.com>
9291 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9292 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9293 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9295 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9296 choice in array aggregate
9297 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9299 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9300 positional and named aggregate for record, or others in record
9301 aggregate, or multiple choice in record aggregate
9302 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9303 array operands to logical operations AND, OR and XOR do not have the
9304 same static lower and higher bounds
9305 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9307 2011-08-01 Robert Dewar <dewar@adacore.com>
9309 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9310 Replaces Last_Source_Node_In_Sequence.
9311 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9312 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9313 parens and blank in string (this was inconsistently implemented).
9315 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9316 blank in string (this was inconsistently implemented).
9318 (Set_Global_Switches): Set formal mode switches appropriately
9319 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9321 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9322 call Set_Error_Msg_Lang to set "spark" as language name.
9323 * par.adb: Remove unnecessary call to set formal language for errout
9324 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9325 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9327 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9328 calls to it, moved after resolution so that types are known
9329 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9330 result of concatenation is not of type String
9331 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9332 concatenation is not properly restricted
9333 * gnat_rm.texi: Add doc on pragma Spark_95.
9334 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9335 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9336 * gcc-interface/Make-lang.in: Update dependencies.
9338 2011-08-01 Javier Miranda <miranda@adacore.com>
9340 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9341 condition that detects if the overridden operation must replace an
9344 2011-08-01 Javier Miranda <miranda@adacore.com>
9346 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9347 code declarations inserted by Insert_Actions in each alternative of the
9348 N_Case_Expression node.
9350 2011-08-01 Robert Dewar <dewar@adacore.com>
9352 * sem_ch6.adb: Minor code reorganization.
9353 * sem_util.adb: Minor reformatting.
9355 2011-08-01 Pascal Obry <obry@adacore.com>
9357 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9358 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9360 2011-08-01 Yannick Moy <moy@adacore.com>
9362 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9363 literal or operator symbol which is prefixed
9364 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9365 mode on access attributes.
9366 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9367 that concatenation operands are properly restricted in formal mode
9368 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9369 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9370 result of the concatenation has a type different from String.
9371 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9372 Analyze_Quantified_Expression, Analyze_Slice,
9373 Analyze_Null): issue an error in formal mode on unsupported constructs
9375 (Analyze_Block_Statement): only issue error on source block statement
9376 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9377 function which returns the last node in a list of nodes for which
9378 Comes_From_Source returns True, if any
9379 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9380 Last_Source_Node_In_Sequence
9381 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9382 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9383 mode on unsupported constructs
9384 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9385 rest of the actions may be needed later on since the error is marked as
9387 * sinfo.ads: Typos in comments.
9389 2011-08-01 Pascal Obry <obry@adacore.com>
9391 * projects.texi: Minor editing.
9393 2011-08-01 Yannick Moy <moy@adacore.com>
9395 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9396 insertion character ~~
9397 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9398 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9399 with insertion character ~~
9400 (Set_Msg_Text): treat insertion character ~~
9401 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9402 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9403 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9404 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9405 errors related to the formal language restriction not serious
9406 (insertion character |).
9407 * par.adb (Par): set formal language for error messages if needed
9408 * sem_ch6.adb (Check_Missing_Return): take into account possible
9409 generated statements at the end of the function
9410 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9411 enumeration value to define a new pragma SPARK_95
9412 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9413 SPARK_Version): new type and variables to store the SPARK version
9415 (SPARK_Mode): return True when SPARK_Version is set
9416 * par-prag.adb: Correct indentation
9417 (Prag): take Pragma_SPARK_95 into account
9418 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9421 2011-08-01 Robert Dewar <dewar@adacore.com>
9423 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9424 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9425 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9427 2011-08-01 Pascal Obry <obry@adacore.com>
9429 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9430 Target_Name to Get_Path call.
9431 (Parse_Single_Project): Likewise.
9432 (Post_Parse_Context_Clause): Likewise.
9433 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9434 Call Initialise_Project_Path with the proper Target_Name.
9435 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9437 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9438 with the proper Target_Name.
9439 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9441 (Parse_Project_And_Apply_Config): Likewise.
9442 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9443 This is fine as this part of the code is supporting only native
9445 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9446 is fine as this part of the code is supporting only native compilation.
9448 2011-08-01 Yannick Moy <moy@adacore.com>
9450 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9451 of homonym, unless the homonym is one of the cases allowed in SPARK
9452 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9453 package declaration occurring after a body.
9455 2011-08-01 Robert Dewar <dewar@adacore.com>
9457 * checks.adb, exp_ch4.adb: Minor reformatting.
9459 2011-08-01 Javier Miranda <miranda@adacore.com>
9461 * einfo.ads (Access_Disp_Table): Fix documentation.
9462 (Dispatch_Table_Wrappers): Fix documentation.
9464 2011-08-01 Pascal Obry <obry@adacore.com>
9466 * prj-env.adb, prj-env.ads: Minor reformatting.
9468 2011-08-01 Yannick Moy <moy@adacore.com>
9470 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9471 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9472 procedures out of these packages.
9473 * errout.ads, errout.adb
9474 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9475 procedures in of this package
9476 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9477 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9478 on misplaced later vs initial declarations, like in Ada 83
9479 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9480 formal mode on attribute of private type whose full type declaration
9482 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9483 package declaration inside a package specification
9484 (Analyze_Full_Type_Declaration): issue error in formal mode on
9485 controlled type or discriminant type
9486 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9487 user-defined operator means that it should come from the source
9488 (New_Overloaded_Entity): issue error in formal mode on overloaded
9490 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9492 2011-08-01 Thomas Quinot <quinot@adacore.com>
9494 * atree.adb: Minor reformatting.
9495 * checks.adb: Minor reformatting.
9497 2011-08-01 Vincent Celier <celier@adacore.com>
9499 * s-parame-vms-ia64.ads: Fix typo in comment
9501 * s-parame-vms-restrict.ads: Removed, unused.
9503 2011-08-01 Javier Miranda <miranda@adacore.com>
9506 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9508 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9509 * sem_ch3.ads, sem_ch3.adb
9510 (Is_Constant_Bound): New extended version of the subprogram that was
9511 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9512 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9513 * sem_aux.ads (Constant_Value): Fix typo in comment.
9514 * checks.adb (Generate_Index_Checks): New implementation which, for
9515 array objects with constant bounds, generates the runtime check
9516 referencing the bounds of the array type. For other cases this routine
9517 provides its previous behavior obtaining such values from the array
9519 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9521 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9522 we cannot have semantic interpretations of the new node.
9524 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9526 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9529 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9531 * sem_ch8.adb: Minor code editing.
9532 * s-vxwext.adb: Remove trailing space.
9533 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9534 consistency with other files.
9536 2011-08-01 Thomas Quinot <quinot@adacore.com>
9538 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9540 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9542 * par-ch10.adb: reject parameterized expressions as compilation unit.
9543 * sem_ch4.adb: handle properly conditional expression with overloaded
9544 then_clause and no else_clause.
9546 2011-08-01 Tristan Gingold <gingold@adacore.com>
9548 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9549 like done by System.Aux_DEC.
9550 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9552 2011-08-01 Yannick Moy <moy@adacore.com>
9554 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9555 missing label at end of declaration (subprogram or package)
9556 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9557 of positional and named parameter association
9558 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9559 Error_Msg_SP which adds a prefix to the error message giving the name
9560 of the formal language analyzed
9561 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9562 access result type in subprogram, unconstrained array as result type,.
9563 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9565 * sem_ch8.adb: Code clean up.
9567 2011-08-01 Javier Miranda <miranda@adacore.com>
9569 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9570 * einfo.ads (Access_Disp_Table): Fix documentation.
9571 (Dispatch_Table_Wrappers): Fix documentation.
9572 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9573 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9574 to enforce the documentation of this attribute.
9575 (Set_Is_Interface): Cleanup the assertion.
9576 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9577 the Underlying_Type entity before reading attribute Access_Disp_Table.
9578 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9579 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9580 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9581 the Underlying_Type entity before reading attribute Access_Disp_Table.
9582 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9583 Locate the Underlying_Type entity before reading attribute
9586 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9588 * s-poosiz.ads: Additional overriding indicators.
9590 2011-08-01 Yannick Moy <moy@adacore.com>
9592 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9594 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9595 parameter specification does not include a subtype mark.
9596 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9597 formal mode on abstract subprogram.
9598 (Analyze_Subprogram_Specification): issue error in formal mode on
9599 user-defined operator.
9600 (Process_Formals): issue error in formal mode on access parameter and
9602 * sem_ch9.adb (Analyze_Abort_Statement,
9603 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9604 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9605 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9606 Analyze_Requeue, Analyze_Selective_Accept,
9607 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9608 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9609 issue error in formal mode on user-defined raise statement.
9611 2011-08-01 Thomas Quinot <quinot@adacore.com>
9613 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9614 declaration being hidden when overriding an implicit inherited
9616 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9617 (-gnats), do not complain about a source file that contains only a
9620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9622 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9623 variable if already set.
9625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9627 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9628 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9629 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9630 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9631 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9632 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9633 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9634 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9635 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9636 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9637 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9638 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9639 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9640 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9641 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9642 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9643 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9644 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9645 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9646 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9647 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9648 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9649 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9650 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9651 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9652 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9653 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9654 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9655 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9656 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9657 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9658 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9659 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9660 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9661 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9662 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9663 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9664 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9665 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9666 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9667 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9668 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9669 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9670 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9671 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9672 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9673 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9674 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9675 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9676 Use GNAT instead of GNARL.
9678 2011-08-01 Bob Duff <duff@adacore.com>
9680 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9681 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9682 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9685 2011-08-01 Yannick Moy <moy@adacore.com>
9687 * debug.adb (d.D) reverve flag for the SPARK mode
9688 (d.E) reverve flag for SPARK generation mode
9689 (d.F) reverve flag for Why generation mode
9690 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9691 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9692 functions which return True when the corresponding modes are set
9693 (Formal_Language): return "spark" or "alfa" when in formal verification
9695 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9696 Error_Msg to prefix the error message with a tag giving the formal
9698 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9699 message with a tag giving the formal language
9700 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9702 (Analyze_Case_Statement): issue error in formal mode on case statement
9703 with a single "others" case alternative
9704 (Analyze_Exit_Statement): issue errors in formal mode on exit
9705 statements which do not respect SPARK restrictions
9706 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9707 (Check_Unreachable_Code): always issue an error (not a warning) in
9708 formal mode on unreachable code (concerns both code after an infinite
9709 loop and after an unconditional jump, both not allowed in SPARK)
9710 * sem_ch6.adb (Analyze_Return_Statement): add call to
9711 Set_Return_Present for a procedure containing a return statement
9712 (already done for functions in Analyze_Function_Return)
9713 (Analyze_Function_Return): issue error in formal mode on extended
9714 return or if return is not last statement in function
9715 (Check_Missing_Return): issue error in formal mode if function does
9716 not end with return or if procedure contains a return
9717 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9718 function to detect if there is an inner scope of its parameter S which
9721 2011-08-01 Thomas Quinot <quinot@adacore.com>
9723 * sem_ch6.ads: Minor reformatting.
9725 2011-08-01 Javier Miranda <miranda@adacore.com>
9727 * sem_util.adb (Abstract_Interface_List): Complete condition when
9728 processing private type declarations to avoid reading unavailable
9730 (Is_Synchronized_Tagged_Type): Complete condition when processing
9731 private extension declaration nodes to avoid reading unavailable
9734 2011-08-01 Thomas Quinot <quinot@adacore.com>
9736 * sem_ch3.adb: Minor reformatting.
9738 2011-08-01 Thomas Quinot <quinot@adacore.com>
9740 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9741 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9742 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9743 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9744 for VMS, instead parametrize the common implementation with
9745 System.Parameters declarations.
9747 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9749 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9751 2011-08-01 Tristan Gingold <gingold@adacore.com>
9753 * seh_init.c: Fix SEH handler installation on win64.
9755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9757 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9758 double analysis of an anonymous access to subprogram, because it can
9759 lead to improper sharing of profiles and a back-end crash.
9761 2011-08-01 Robert Dewar <dewar@adacore.com>
9763 * make.adb, sem_ch4.adb: Minor reformatting.
9764 * gcc-interface/Make-lang.in: Update dependencies.
9765 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9769 * gnat_rm.texi: Fix definition of Long_Integer.
9771 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9773 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9774 to prevent storage exhaustion.
9775 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9776 finalized is a function body, insert the cleanup code before the final
9777 return statement, to prevent spurious warnings.
9778 * s-pooglo.ads: add overriding indicator.
9780 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9782 * sem_ch4.adb (Operator_Check): improve error message when both a
9783 with_clause and a use_clause are needed to make operator usage legal.
9784 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9785 determine whether a compilation unit is visible within an other,
9786 either through a with_clause in the current unit, or a with_clause in
9787 its library unit or one one of its parents.
9789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9791 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9792 over an arbitrary expression of an array or container type.
9793 * lib-xref.adb: clarify comment.
9795 2011-08-01 Bob Duff <duff@adacore.com>
9797 * einfo.ads: Minor reformatting.
9798 * debug.adb: Minor comment improvement.
9800 2011-08-01 Javier Miranda <miranda@adacore.com>
9802 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9803 consider hidden subprograms as valid candidates.
9805 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9807 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9809 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9811 * gnat_ugn.texi: Fix typo.
9813 2011-08-01 Robert Dewar <dewar@adacore.com>
9815 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9816 lib-xref.adb: Minor reformatting
9818 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9820 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9821 when to generate a call to Move_Final_List.
9822 (Has_Controlled_Parts): Remove this function.
9824 2011-08-01 Geert Bosch <bosch@adacore.com>
9826 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9829 2011-08-01 Thomas Quinot <quinot@adacore.com>
9831 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9832 explicit raise of a predefined exception as Comes_From_Source if the
9833 original N_Raise_Statement comes from source.
9835 2011-08-01 Robert Dewar <dewar@adacore.com>
9837 * sinfo.ads: Add comment.
9838 * sem_ch6.adb: Minor reformatting.
9840 2011-08-01 Robert Dewar <dewar@adacore.com>
9842 * freeze.adb (Freeze_Entity): Refine check for bad component size
9843 clause to avoid rejecting confirming clause when atomic/aliased present.
9845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9847 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9848 better determine whether an entity reference is a write.
9849 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9851 * lib-xref.adb (Output_References): Do no suppress a read reference at
9852 the same location as an immediately preceeding modify-reference, to
9853 handle properly in-out actuals.
9855 2011-08-01 Tristan Gingold <gingold@adacore.com>
9857 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9859 2011-08-01 Quentin Ochem <ochem@adacore.com>
9861 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9862 heap to compute the result.
9864 2011-08-01 Robert Dewar <dewar@adacore.com>
9866 * atree.ads: Minor reformatting.
9868 2011-08-01 Emmanuel Briot <briot@adacore.com>
9870 * g-expect.adb (Get_Command_Output): Fix memory leak.
9872 2011-08-01 Geert Bosch <bosch@adacore.com>
9874 * cstand.adb (P_Float_Type): New procedure to print the definition of
9875 predefined fpt types.
9876 (P_Mixed_Name): New procedure to print a name using mixed case
9877 (Print_Standard): Use P_Float_Type for printing floating point types
9878 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9879 precision IEEE float.
9881 2011-08-01 Thomas Quinot <quinot@adacore.com>
9883 * sem_ch3.adb: Minor reformatting.
9885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9887 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9888 the completion of a generic function, insert the new body rather than
9889 rewriting the original.
9891 2011-08-01 Yannick Moy <moy@adacore.com>
9893 * sinfo.ads, errout.ads: Typos in comments.
9895 2011-08-01 Robert Dewar <dewar@adacore.com>
9897 * par-endh.adb: Minor reformatting.
9899 2011-08-01 Robert Dewar <dewar@adacore.com>
9901 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9902 (Pre_Post_Aspects): New subtype.
9903 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9904 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9905 * par-ch7.adb (P_Package): Remove Decl parameter
9906 (P_Package): Handle new syntax for aspects (before IS)
9907 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9909 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9910 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9911 (P_Package): Remove Decl parameter
9912 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9914 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9916 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9917 * sinfo.ads: Document new syntax for aspects in packages etc.
9918 * sprint.adb: Handle new syntax of aspects before IS in package
9920 2011-08-01 Thomas Quinot <quinot@adacore.com>
9922 * atree.ads: Minor reformatting.
9923 * sem_prag.adb: Minor reformatting.
9925 2011-08-01 Robert Dewar <dewar@adacore.com>
9927 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9928 case expr alternative.
9930 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9932 * sem_ch12.adb: Fix typo.
9934 2011-08-01 Geert Bosch <bosch@adacore.com>
9936 * sem_prag.adb (Check_No_Link_Name): New procedure.
9937 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9938 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9939 instead of Standard_Long_Long_Float_Size global. Preparation for
9940 eventual removal of per type constants.
9941 * exp_util.ads (Get_Stream_Size): New function returning the stream
9942 size value of subtype E.
9943 * exp_util.adb (Get_Stream_Size): Implement new function.
9944 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9946 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9948 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9950 2011-08-01 Geert Bosch <bosch@adacore.com>
9952 * cstand.adb: Fix comments.
9953 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9956 2011-08-01 Robert Dewar <dewar@adacore.com>
9958 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9960 2011-08-01 Geert Bosch <bosch@adacore.com>
9962 * atree.ads: Fix comment.
9964 2011-08-01 Robert Dewar <dewar@adacore.com>
9966 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9967 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9968 * par.adb: Add with for Namet.Sp.
9969 * par-tchk.adb: Minor reformatting.
9971 2011-08-01 Vincent Celier <celier@adacore.com>
9973 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9974 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9975 of the init procedure of a SAL.
9976 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9979 2011-08-01 Thomas Quinot <quinot@adacore.com>
9981 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9984 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9986 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9988 2011-08-01 Thomas Quinot <quinot@adacore.com>
9990 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9991 conformant with its spec (return True only for types that have
9992 an overriding Initialize primitive operation that prevents them from
9993 having preelaborable initialization).
9994 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9995 initialization for controlled types in Ada 2005 or later mode.
9997 2011-08-01 Robert Dewar <dewar@adacore.com>
9999 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10001 (Same_Aspect): New function.
10002 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10003 Type_Invariant, Precondition, Postcondition.
10004 * snames.ads-tmpl: Add Name_Type_Invariant.
10006 2011-08-01 Robert Dewar <dewar@adacore.com>
10008 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10010 (Freeze_All_Ent): Fix error in handling inherited aspects.
10011 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10012 already analyzed, but don't skip entire processing of a declaration,
10013 that's wrong in some cases of declarations being rewritten.
10014 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10015 Don't delay for integer, string literals
10016 Treat predicates in usual manner for delay, remove special case code,
10018 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10019 (Build_Predicate_Function): Update saved expression in aspect
10020 (Build_Invariant_Procedure): Update saved expression in aspect
10021 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10022 of replacement of discriminant references if the reference is simple.
10024 2011-08-01 Robert Dewar <dewar@adacore.com>
10026 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10027 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10028 Static_Predicate and Dynamic_Predicate.
10029 (Build_Predicate_Function): Add processing for Static_Predicate
10030 and Dynamic_Predicate.
10031 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10032 (From_Static_Predicate): New flag
10033 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10035 2011-08-01 Robert Dewar <dewar@adacore.com>
10037 * usage.adb: Documentation cleanup for Ada version modes in usage.
10038 * expander.adb: Minor reformatting.
10040 2011-08-01 Robert Dewar <dewar@adacore.com>
10042 * atree.ads: Minor comment fix.
10043 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10044 a-witeio.ads, sem_prag.adb: Minor reformatting.
10046 2011-08-01 Doug Rupp <rupp@adacore.com>
10048 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10049 pointers. Use descrip.h header file for convenience. Add some
10052 2011-08-01 Robert Dewar <dewar@adacore.com>
10054 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10055 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10056 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10058 (Check_Aspect_At_End_Of_Declarations): New procedure
10059 (Analye_Aspect_Specification): Minor changes for above procedures
10060 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10061 specification node as well.
10063 2011-08-01 Pascal Obry <obry@adacore.com>
10065 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10066 Windows files. Use GetFilesAttributes() in this case to check for file
10067 existence instead of returning with an error code.
10069 2011-08-01 Vincent Celier <celier@adacore.com>
10071 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10072 High is above Source length.
10074 2011-08-01 Robert Dewar <dewar@adacore.com>
10076 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10078 2011-08-01 Robert Dewar <dewar@adacore.com>
10080 * aspects.ads (Boolean_Aspects): New subtype.
10081 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10082 for derived types in cases where the parent type and derived type have
10084 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10085 with aspects when parent type also has aspects.
10086 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10087 boolean expression at this point).
10088 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10089 accordance with final decision on the Ada 2012 feature.
10090 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10092 2011-08-01 Matthew Heaney <heaney@adacore.com>
10094 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10096 2011-08-01 Pascal Obry <obry@adacore.com>
10098 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10099 Fix Replace_Slice when High is above current string size.
10100 (Replace_Slice): Fix DL computation when High is above current
10103 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10105 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10107 2011-08-01 Matthew Heaney <heaney@adacore.com>
10109 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10112 2011-08-01 Pascal Obry <obry@adacore.com>
10114 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10117 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10119 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10120 access to protected subprograms in generic bodies.
10121 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10122 protected type, indicate that the convention of the subprogram is
10123 Convention_Protected, because it may be used in subsequent declarations
10124 within the protected declaration.
10126 2011-08-01 Vincent Celier <celier@adacore.com>
10128 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10129 and "final" procedures when the name of the library is "ada", to avoid
10130 duplicate symbols "adainit" and "adafinal" in executables.
10132 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10134 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10135 quantified expression that appears within a postcondition and uses the
10136 Ada2012 'Result attribute.
10138 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10140 * init.c (__gnat_error_handler): Cast reason to int.
10141 (__gnat_install_handler): Explain sa_sigaction use.
10143 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10145 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10146 subprogram has copy-in copy-out parameters, try to promote the mode of
10147 the return type if it is passed in registers.
10149 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10151 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10152 left operand as addressable.
10154 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10156 * gcc-interface/gigi.h (build_function_stub): Remove.
10157 (build_return_expr): Likewise.
10158 (convert_vms_descriptor): Declare.
10159 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10160 (build_function_stub): Move to...
10161 * gcc-interface/utils2.c (build_return_expr): Move to...
10162 * gcc-interface/trans.c (build_function_stub): ...here.
10163 (build_return_expr): ...here.
10164 (Subprogram_Body_to_gnu): Add local variable for language_function.
10165 Disconnect the parameter attributes cache, if any, once done with it.
10166 Call end_subprog_body only after setting the end_locus.
10167 Build the stub associated with the function, if any, at the very end.
10168 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10169 variables and streamline control flow.
10171 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10174 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10175 g-trasym-dwarf.adb.
10177 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10180 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10181 Assign to act.sa_sigaction.
10182 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10183 current->return_address to char * before arithmetic.
10185 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10187 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10188 Correct argument types.
10189 Extract code from reason.
10190 (__gnat_install_handler): Assign to act.sa_sigaction.
10192 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10194 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10195 (GNAT1_OBJS): ...here.
10197 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10200 * g-socthi-mingw.adb (Fill): Fix formatting.
10202 * gcc-interface/gigi.h: Move around comment.
10204 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10207 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10209 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10212 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10214 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10216 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10217 range comparison if Pmode is SImode.
10219 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10220 Eric Botcazou <ebotcazou@adacore.com>
10222 * adadecode.c: Wrap up in extern "C" block.
10223 * adadecode.h: Likewise.
10224 * adaint.c: Likewise. Remove 'const' keyword.
10225 * adaint.h: Likewise.
10226 * argv.c: Likewise.
10227 * atree.h: Likewise.
10229 * cstreams.c: Likewise.
10231 * exit.c: Likewise.
10233 * final.c: Likewise.
10234 * init.c: Likewise.
10235 * initialize.c: Likewise.
10236 * link.c: Likewise.
10237 * namet.h: Likewise.
10238 * nlists.h: Likewise.
10239 * raise.c: Likewise.
10240 * raise.h: Likewise.
10241 * repinfo.h: Likewise.
10242 * seh_init.c: Likewise.
10243 * targext.c: Likewise.
10244 * tracebak.c: Likewise.
10245 * uintp.h: Likewise.
10246 * urealp.h: Likewise.
10247 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10248 * xsinfo.adb: Likewise.
10249 * xsnamest.adb: Likewise.
10250 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10251 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10252 * gcc-interface/misc.c: Likewise.
10253 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10254 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10255 ada/targext.o here...
10256 (GNAT_ADA_OBJS): ...and not here.
10257 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10258 (GNATBIND_OBJS): Reorder.
10260 2011-07-07 Richard Henderson <rth@redhat.com>
10262 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10263 dwarf2out_frame_init.
10265 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10267 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10269 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10272 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10274 2011-07-06 Richard Guenther <rguenther@suse.de>
10276 * gcc-interface/misc.c (gnat_init): Merge calls to
10277 build_common_tree_nodes and build_common_tree_nodes_2.
10278 Re-initialize boolean_false_node.
10280 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10281 Olivier Hainque <hainque@adacore.com>
10282 Nicolas Setton <setton@adacore.com>
10284 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10285 the type according to the ARTIFICIAL_P parameter.
10286 (create_type_decl): Likewise.
10287 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10289 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10291 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10292 (gnatbind): Likewise.
10294 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10296 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10298 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10300 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10301 local variable throughout. Remove useless call to Base_Type.
10302 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10303 Take it also into account for the volatileness of the field. Set the
10304 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10306 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10308 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10309 on a dereference built for a by-ref object if it has an address clause.
10311 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10313 * einfo.ads (Address_Taken): Document use for the second argument of
10314 Asm_Input and Asm_Output attributes.
10315 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10316 argument is an entity name, then set Address_Taken on it.
10317 <Attribute_Asm_Output>: Likewise.
10318 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10319 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10320 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10321 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10323 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10325 PR middle-end/46500
10326 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10328 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10330 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10331 (ada/utils.o): Update dependencies.
10332 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10333 ../../../libcpp/libcpp.a.
10334 * gcc-interface/utils.c: Include common/common-target.h.
10335 (process_attributes): Use targetm_common.have_named_sections.
10337 2011-06-07 Richard Guenther <rguenther@suse.de>
10339 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10342 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10344 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10345 TREE_THIS_NOTRAP flag.
10347 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10349 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10352 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10354 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10355 constants whose full view has discriminants specially.
10357 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10359 * gcc-interface/utils.c: Include diagnostic.h.
10360 (gnat_write_global_declarations): Output debug information for all
10361 global type declarations before finalizing the compilation unit.
10362 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10364 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10366 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10368 2011-05-25 Kai Tietz <ktietz@redhat.com>
10370 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10371 initialization instead of const/none-const pointer assignment.
10373 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10375 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10376 $(EXTRA_GNAT1_OBJS).
10377 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10378 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10379 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10380 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10381 libcommon-target.a instead of prefix.o.
10383 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10386 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10388 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10390 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10391 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10392 instead of version.o.
10394 2011-05-18 Kai Tietz <ktietz@redhat.com>
10396 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10397 boolean_false_node instead of integer_zero_node.
10398 (convert_with_check): Likewise.
10399 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10401 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10403 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10404 type of the parameter is an unconstrained array, convert the actual to
10405 the type of the formal in the In Out and Out cases as well.
10407 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10409 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10410 call build_function_type_array or build_varargs_function_type_array
10412 (create_subprog_type): Don't call build_function_type; call
10413 build_function_type_vec instead.
10415 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10417 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10418 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10419 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10421 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10423 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10425 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10426 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10428 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10430 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10432 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10434 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10435 instead of accessing TYPE_ARG_TYPES directly.
10436 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10438 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10441 * gcc-interface/gigi.h (get_variant_part): Declare.
10442 * gcc-interface/decl.c (get_variant_part): Make global.
10443 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10444 types have the same constant size, are record types and T1 has a
10445 variant part while T2 doesn't.
10447 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10449 * gcc-interface/utils.c (begin_subprog_body): Do not call
10451 (end_subprog_body): Likewise.
10453 2011-05-04 Richard Guenther <rguenther@suse.de>
10455 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10457 (pos_to_constructor): Likewise.
10459 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10460 Eric Botcazou <ebotcazou@adacore.com>
10462 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10463 of build_function_type. Adjust calls to...
10464 (build_raise_check): ...this. Do not take a void_tree parameter.
10465 Call build_function_type_list instead of build_function_type.
10466 Fix head comment and swap couple of conditional blocks.
10468 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10470 * gnatvsn.ads (Library_Version): Bump to 4.7.
10471 (Current_Year): Bump to 2011.
10473 2011-04-29 Michael Matz <matz@suse.de>
10475 * gcc-interface/misc.c (gnat_handle_option): Set
10476 warn_maybe_uninitialized.
10478 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10480 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10481 the Watson/McCabe paper.
10483 2011-04-23 Jim Meyering <meyering@redhat.com>
10485 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10487 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10489 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10492 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10494 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10496 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10497 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10498 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10499 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10500 <all>: Do not set flags on the reused DECL node coming from an alias.
10501 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10502 don't need debug info here...
10503 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10504 (gigi): Adjust calls to create_subprog_decl.
10505 (build_raise_check): Likewise.
10506 (establish_gnat_vms_condition_handler): Likewise.
10507 (Compilation_Unit_to_gnu): Likewise.
10508 (gnat_to_gnu): Likewise.
10510 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10512 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10513 (NO_REORDER_ADAFLAGS): New variable.
10514 (EXTRA_GNATTOOLS): Always define.
10515 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10516 Clean up and adjust list of files compiled with special options.
10517 * gcc-interface/Make-lang.in: Likewise.
10518 (ada/decl.o): Cosmetical change.
10519 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10521 2011-04-20 Jim Meyering <meyering@redhat.com>
10523 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10525 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10527 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10528 $(CFLAGS) on the link line.
10530 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10533 padded type built for the return type if it is unconstrained.
10535 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10537 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10539 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10541 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10542 before calling TREE_CHAIN.
10543 * gcc-interface/misc.c (gnat_init_ts): New function.
10544 (LANG_HOOKS_INIT_TS): Define.
10546 2011-04-12 Martin Jambor <mjambor@suse.cz>
10548 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10549 instead of cgraph_node.
10551 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10553 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10554 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10557 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10559 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10560 of aggregate types that contain a placeholder.
10562 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10564 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10566 (handle_type_generic_attribute): Likewise.
10568 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10571 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10573 2011-04-04 Kai Tietz <ktietz@redhat.com>
10576 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10579 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10581 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10582 type case, do not strip a padding type around the array type.
10584 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10586 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10589 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10591 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10592 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10593 code for -feliminate-unused-debug-types.
10594 (gnat_post_options): Likewise.
10596 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10598 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10599 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10602 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10604 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10605 DECL_ARTIFICIAL flag on enumeration types.
10607 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10609 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10610 fat pointer types artificial unconditionally.
10611 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10614 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10616 * gcc-interface/gigi.h (get_dummy_type): Declare.
10617 (build_dummy_unc_pointer_types): Likewise.
10618 (finish_fat_pointer_type): Likewise.
10619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10620 fat pointer type has been built, complete it in place.
10621 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10622 and thin pointers. Remove useless variable.
10623 (finish_fat_pointer_type): Make global and move to...
10624 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10625 (get_dummy_type): New function.
10626 (build_dummy_unc_pointer_types): Likewise.
10627 (gnat_pushdecl): Propage the name to the anonymous variants only.
10628 (update_pointer_to): Only adjust the pointer types in the unconstrained
10631 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10633 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10635 if this is a Taft amendment type and the full declaration is available.
10636 * gcc-interface/trans.c (process_type): Likewise.
10637 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10638 (process_freeze_entity): Likewise.
10639 * gcc-interface/utils.c (dummy_global): New static variable.
10640 (gnat_write_global_declarations): If there are types declared as used
10641 at the global level, insert them in the global hash table.
10643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10645 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10646 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10647 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10649 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10650 flag of the type accordingly.
10651 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10653 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10655 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10656 finalizing types when updating the pointers to the designated type.
10657 <all>: Finalize the deferred types even if we didn't defer processing
10658 of incomplete types in this invocation.
10660 2011-04-01 Olivier Hainque <hainque@adacore.com>
10661 Nicolas Setton <setton@adacore.com>
10662 Eric Botcazou <ebotcazou@adacore.com>
10664 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10665 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10667 2011-03-28 Kai Tietz <ktietz@redhat.com>
10669 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10671 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10672 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10674 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10676 2011-03-28 Tristan Gingold <gingold@adacore.com>
10679 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10680 Use ada output of gnatbind.
10681 (ada/b_gnatb.adb): Ditto.
10682 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10683 (ada.mostlyclean, ada.stage1)
10684 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10685 (ada.stagefeedback): Adjust.
10686 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10687 Use ada output of gnatbind.
10688 (b_gnatm.adb): Ditto.
10689 (b_gnatl.o, b_gnatm.o): New rules.
10691 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10693 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10694 for the padded type built to support a specified size or alignment.
10696 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10698 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10699 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10700 unconditionally to the end of the unit when the designated type is
10702 <all>: Rename local variable. Attempt to un-defer types only and do it
10703 for limited_with'ed types as well.
10704 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10705 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10706 consistently and remove redundant call to finalize_from_with_types.
10708 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10710 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10711 subprograms without a previous spec declared in the same unit.
10712 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10713 subprograms at the end of the unit instead of at the beginning.
10714 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10715 isn't public for the special handling of non-inline functions nested
10716 inside inline external functions.
10718 2011-03-25 Jeff Law <law@redhat.com>
10720 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10722 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10724 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10725 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10726 to compute Set_Size_Depends_On_Discriminant.
10727 (Layout_Type): Call it on array types in back-end layout mode.
10728 * sem_util.adb (Requires_Transient_Scope): Return true for array
10729 types only if the size depends on the value of discriminants.
10730 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10731 type if the RHS is a call to a function that returns an unconstrained
10732 type with default discriminant.
10734 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10736 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10737 non-conversion to the nominal result type at the end.
10739 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10741 * gcc-interface/trans.c (create_temporary): New function taken from...
10742 (create_init_temporary): ...here. Call it.
10743 (call_to_gnu): Create the temporary for the return value early, if any.
10744 Create it for a function with copy-in/copy-out parameters if there is
10745 no target; in other cases of copy-in/copy-out, use another temporary.
10746 Push the new binding level lazily. Add and rename local variables.
10748 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10750 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10752 (set_rm_size): Likewise.
10754 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10756 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10757 for the padded type built in order to support a specified alignment.
10758 Fix incorrect formatting.
10760 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10763 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10765 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10767 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10768 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10769 to the end of the list. Adjust recursive call. Rename local variable.
10770 If REORDER is true, reorder components of the record type.
10771 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10772 components_to_record and adjust the parameter list.
10774 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10776 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10777 disabled, use the variable for bounds of loop iteration scheme.
10779 2011-03-21 Kai Tietz <ktietz@redhat.com>
10782 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10784 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10786 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10787 out whether the expression is read-only. Short-circuit placeholder
10788 case and rename a couple of local variables.
10790 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10792 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10793 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10794 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10795 (convert): Deal with conversions from a smaller form type specially.
10797 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10799 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10800 its argument, except for the special -I- switch.
10802 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10804 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10807 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10809 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10811 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10813 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10815 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10816 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10817 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10818 Do not generate the check directly, instead instantiate the template
10819 check present in the descriptor.
10820 (make_descriptor_field): Move around.
10821 (build_vms_descriptor32): Build a template check in the POINTER field.
10822 (build_vms_descriptor): Remove useless suffixes.
10823 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10825 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10828 * targext.c: Include target files if IN_RTS is defined.
10830 2011-01-26 Richard Guenther <rguenther@suse.de>
10833 * targext.c: Include config.h.
10834 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10837 2011-01-04 Pascal Obry <obry@adacore.com>
10838 Eric Botcazou <ebotcazou@adacore.com>
10840 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10842 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10844 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10845 end-of-case on the end label and its associated gotos, if any.
10847 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10849 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10850 expressions of the parameter cache within the statement group of
10851 the CICO mechanism.
10853 2011-01-04 Olivier Hainque <hainque@adacore.com>
10854 Eric Botcazou <ebotcazou@adacore.com>
10856 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10857 (set_end_locus_from_node): New function.
10858 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10859 make and the function end_locus.
10860 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10861 for the elaboration subprogram.
10862 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10863 set the end_locus of the expression as well.
10865 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10868 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10869 variables that are referenced in exception handlers volatile.
10873 Copyright (C) 2011 Free Software Foundation, Inc.
10875 Copying and distribution of this file, with or without modification,
10876 are permitted in any medium without royalty provided the copyright
10877 notice and this notice are preserved.
10879 * gnat_rm.texi: Ramification of pragma Eliminate documentation
10880 - fix bugs in the description of Source_Trace;
10881 - get rid of UNIT_NAME;
10883 2011-08-02 Javier Miranda <miranda@adacore.com>
10886 (Build_Dispatching_Requeue): Adding support for VM targets
10887 since we cannot directly reference the Tag entity.
10888 * exp_sel.adb (Build_K): Adding support for VM targets.
10889 (Build_S_Assignment): Adding support for VM targets.
10891 (Default_Prim_Op_Position): In VM targets do not restrict availability
10892 of predefined interface primitives to compiling in Ada 2005 mode.
10893 (Is_Predefined_Interface_Primitive): In VM targets this service is not
10894 restricted to compiling in Ada 2005 mode.
10895 (Make_VM_TSD): Generate code that declares and initializes the OSD
10896 record. Needed to support dispatching calls through synchronized
10899 (Make_Predefined_Primitive_Specs): Enable generation of predefined
10900 primitives associated with synchronized interfaces.
10901 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
10902 primitives associated with synchronized interfaces.
10904 2011-08-02 Yannick Moy <moy@adacore.com>
10906 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
10907 statements hidden in SPARK if preceded by the HIDE directive
10908 (Parse_Exception_Handlers): mark each exception handler in a sequence of
10909 exception handlers as hidden in SPARK if preceded by the HIDE directive
10910 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
10911 if starting with the HIDE directive
10912 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
10913 starting with the HIDE directive; mark the declarations in a private
10914 part as hidden in SPARK if the private part starts with the HIDE
10916 * restrict.adb, restrict.ads
10917 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
10918 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
10919 argument node belongs to a part which is hidden in SPARK
10920 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
10921 parts in SPARK; protect the possibly costly call to
10922 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
10923 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
10924 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
10925 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
10927 (Scan): recognize special comment starting with '#' and followed by
10928 SPARK keyword "hide" as a HIDE directive.
10930 2011-08-02 Yannick Moy <moy@adacore.com>
10932 * types.ads, erroutc.ads: Minor reformatting.
10934 2011-08-02 Vincent Celier <celier@adacore.com>
10936 * link.c: Add response file support for cross platforms.
10938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10940 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
10941 in an association, set parent field of copy before partial analysis.
10942 * sem_res.adb (Resolve_Slice): create reference to itype only when
10943 expansion is enabled.
10945 2011-08-02 Yannick Moy <moy@adacore.com>
10947 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
10948 for new flag denoting which subprogram bodies are in ALFA
10949 * restrict.adb, sem_ch7.adb: Update comment
10950 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10951 sem_ch9.adb, sem_res.adb: Add calls to
10952 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
10953 * sem_ch6.adb (Analyze_Function_Return): add calls to
10954 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
10955 middle of the body, and extended return.
10956 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
10957 False when missing return.
10958 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
10959 to True for subprograms whose spec is in ALFA. Remove later on the flag
10960 on the entity used for a subprogram body when there exists a separate
10962 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
10963 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
10964 False, otherwise do nothing.
10966 2011-08-02 Robert Dewar <dewar@adacore.com>
10968 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10970 2011-08-02 Yannick Moy <moy@adacore.com>
10972 * sem_ch4.ads: minor formatting.
10974 2011-08-02 Yannick Moy <moy@adacore.com>
10976 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
10977 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
10978 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
10979 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
10980 opt.ads: cleanup of SPARK mode
10982 2011-08-02 Yannick Moy <moy@adacore.com>
10984 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
10986 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
10987 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
10989 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
10990 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
10991 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
10992 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
10994 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
10996 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
10997 functions whose return type is not in ALFA.
10998 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
11000 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
11001 parameter's type is not in ALFA.
11002 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
11005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11007 * sem_ch6 (Analyze_Expression_Function): treat the function as
11008 Inline_Always, and introduce a subprogram declaration for it when it is
11010 * inline.adb (Add_Inlined_Body): recognize bodies that come from
11011 expression functions, so that the back-end can determine whether they
11012 can in fact be inlined.
11013 * sem_util.adb (Is_Expression_Function): predicate to determine whether
11014 a function body comes from an expression function.
11016 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11018 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
11019 null exclusions to test Can_Never_Be_Null on the anonymous access types
11020 of the formals rather than testing the formals themselves. Exclude this
11021 check in cases where the Old_Formal is marked as a controlling formal,
11022 to avoid issuing spurious errors for bodies completing dispatching
11023 operations (due to the flag not getting set on controlling access
11024 formals in body specs).
11025 (Find_Corresponding_Spec): When checking full and subtype conformance of
11026 subprogram bodies in instances, pass Designated and E in that order, for
11027 consistency with the expected order of the formals (New_Id followed by
11030 2011-08-02 Robert Dewar <dewar@adacore.com>
11032 * sem_ch8.adb: Minor reformatting.
11034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11036 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
11037 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
11038 primitive operations of class-wide actuals.
11040 2011-08-02 Javier Miranda <miranda@adacore.com>
11042 * exp_atag.ads, exp_atag.adb
11043 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
11044 since its value is implicitly passed in argument Typ.
11045 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
11046 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
11047 Build_Common_Dispatching_Select_Statements.
11049 2011-08-02 Robert Dewar <dewar@adacore.com>
11051 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
11052 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
11053 Minor reformatting.
11055 2011-08-02 Robert Dewar <dewar@adacore.com>
11057 * sem_res.adb: Minor reformatting.
11058 * sem_prag.adb: Minor reformatting.
11060 2011-08-02 Javier Miranda <miranda@adacore.com>
11062 * exp_atag.adb, exp_atags.ads
11063 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
11064 by the tagged type Entity. Required to use this routine in the VM
11065 targets since we do not have available the Tag entity in the VM
11068 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
11069 Ada.Tags has not been previously loaded.
11071 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
11072 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
11074 (Enclosing_Dynamic_Scope): Add missing support to handle the full
11075 view of enclosing scopes. Required to handle enclosing scopes that
11076 are synchronized types whose full view is a task type.
11078 (Build_VM_TSDs): Minor code improvement to avoid generating and
11079 analyzing lists with empty nodes.
11080 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
11081 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
11082 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
11083 (Make_Disp_Timed_Select_Body): Add support for VM targets.
11084 (Make_Select_Specific_Data_Table): Add support for VM targets.
11085 (Make_VM_TSD): Generate code to initialize the SSD structure of
11088 2011-08-02 Yannick Moy <moy@adacore.com>
11090 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
11091 cross-references section in ALI.
11092 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
11093 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
11095 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
11096 subprogram or package entity of a node
11097 (Is_Local_Reference_Type): new function returns True for references
11098 selected in local cross-references.
11099 (Lt): function extracted from Lt in Output_References
11100 (Write_Entity_Name): function extracted from Output_References
11101 (Generate_Definition): generate reference with type 'D' for definition
11102 of objects (object declaration and parameter specification), with
11103 appropriate locations and units, for use in local cross-references.
11104 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
11105 references of type 'I' for initialization in object definition.
11106 (Output_References): move part of function Lt and procedure
11107 Write_Entity_Name outside of the body. Ignore references of types 'D'
11108 and 'I' introduced for local cross-references.
11109 (Output_Local_References): new procedure to output the local
11110 cross-references sections.
11111 (Lref_Entity_Status): new array defining whether an entity is a local
11112 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
11113 with 'I' type when initialization expression is present.
11114 * get_scos.adb, get_scos.ads: Correct comments and typos
11116 2011-08-02 Javier Miranda <miranda@adacore.com>
11118 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
11120 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
11122 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
11125 2011-08-02 Vincent Celier <celier@adacore.com>
11127 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
11128 (No_Space_Img): New function
11129 (Find_Excluded_Sources): When reading from a file, record the file name
11130 and the line number for each excluded source.
11131 (Mark_Excluded_Sources): When reporting an error, if the excluded
11132 sources were read from a file, include file name and line number in
11135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11137 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
11139 2011-08-02 Robert Dewar <dewar@adacore.com>
11141 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
11143 2011-08-02 Javier Miranda <miranda@adacore.com>
11145 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
11146 generation of TSDs to the DOTNET compiler.
11147 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
11148 generation of TSDs to the DOTNET compiler.
11150 2011-08-02 Javier Miranda <miranda@adacore.com>
11152 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
11153 record of all the tagged types declared inside library level package
11154 declarations, library level package bodies or library level subprograms.
11155 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
11156 associated with a given tagged type.
11157 (Build_VM_TSDs): New subprogram.
11158 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
11159 compilation units that are subprograms.
11160 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
11161 compilation units that are package bodies.
11162 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
11163 units that are a package declaration or a package instantiation.
11164 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
11165 reorganization to improve the error generated by the frontend when the
11166 function Ada.Tags.Secondary_Tag is not available.
11167 * rtsfind.ads (RE_Register_TSD): New runtime entity.
11168 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
11170 2011-08-02 Javier Miranda <miranda@adacore.com>
11172 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
11174 2011-08-02 Robert Dewar <dewar@adacore.com>
11176 * s-imenne.ads: Minor reformatting.
11178 2011-08-02 Robert Dewar <dewar@adacore.com>
11180 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
11181 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
11182 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
11184 2011-08-02 Robert Dewar <dewar@adacore.com>
11186 * einfo.ads (Materialize_Entity): Document this is only for renamings
11187 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
11188 required debug information in the case where we transform the object
11189 declaration into a renaming declaration.
11190 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
11192 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
11193 Materialize_Entity.
11195 2011-08-02 Robert Dewar <dewar@adacore.com>
11197 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
11198 Suppress_Init_Procs.
11199 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
11200 Suppress_Initialization/Initialization_Suppressed.
11201 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
11202 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
11203 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
11204 * sem_prag.adb: New processing for pragma Suppress_Initialization.
11206 2011-08-02 Robert Dewar <dewar@adacore.com>
11208 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
11209 Minor reformatting.
11211 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11213 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
11214 only have inheritable classwide pre/postconditions.
11216 2011-08-02 Javier Miranda <miranda@adacore.com>
11218 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
11219 * rtsfind.ads (RE_Check_TSD): New runtime entity.
11220 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
11221 checks if the external tag of a type is the same as the external tag
11222 of some other declaration.
11224 2011-08-02 Thomas Quinot <quinot@adacore.com>
11226 * s-taskin.ads: Minor reformatting.
11228 2011-08-02 Emmanuel Briot <briot@adacore.com>
11230 * g-comlin.adb (Display_Help): swap the order in which it prints the
11231 short help and the general usage.
11233 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11235 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
11236 the aspect declarations and attach them to the generic copy for
11237 subsequent analysis.
11238 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
11239 declarations of the generic tree to the new subprogram declarations.
11240 * sem_attr.adb (Check_Precondition_Postcondition): recognize
11241 conditions that apply to a subprogram instance.
11243 2011-08-02 Robert Dewar <dewar@adacore.com>
11245 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
11247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11249 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
11250 private type with a tagged full view is not derived in the immediate
11251 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
11253 2011-08-02 Robert Dewar <dewar@adacore.com>
11255 * exp_ch4.adb: Minor reformatting.
11257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11259 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
11260 Ada2012 iterator, the loop will be rewritten during expansion into a
11261 while loop with a cursor and an element declaration. Do not analyze the
11262 body in this case, because if the container is for indefinite types the
11263 actual subtype of the elements will only be determined when the cursor
11264 declaration is analyzed.
11266 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11268 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
11269 size/alignment related attributes in CodePeer_Mode.
11271 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11273 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
11274 Prepend_Element, since this can result in the operation getting the
11275 wrong slot in the full type's dispatch table if the full type has
11276 inherited operations. The incomplete type's operation will get added
11277 to the proper position in the full type's primitives
11278 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
11279 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
11280 dispatching operations, since there are cases where nonprimitive
11281 subprograms can get added to the list of incomplete dependents (such
11282 as subprograms in nested packages).
11283 * sem_ch6.adb (Process_Formals): First, remove test for being in a
11284 private part when determining whether to add a primitive with a
11285 parameter of a tagged incomplete type to the Private_Dependents list.
11286 Such primitives can also occur in the visible part, and should not have
11287 been excluded from being private dependents.
11288 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
11289 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
11290 list of a Taft-amendment incomplete type is a primitive before issuing
11291 an error that the full type must appear in the same unit. There are
11292 cases where nonprimitives can be in the list (such as subprograms in
11294 * sem_disp.adb (Derives_From): Use correct condition for checking that
11295 a formal's type is derived from the type of the corresponding formal in
11296 the parent subprogram (the condition was completely wrong). Add
11297 checking that was missing for controlling result types being derived
11298 from the result type of the parent operation.
11300 2011-08-02 Yannick Moy <moy@adacore.com>
11302 * errout.adb (First_Node): minor renaming
11303 * restrict.adb (Check_Formal_Restriction): put restriction warning on
11306 2011-08-02 Yannick Moy <moy@adacore.com>
11308 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
11309 before accessing operands.
11310 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
11311 decide whether an initialization expression respects SPARK rules, as
11312 the plain node is the expanded one. This allows for more valid warnings
11314 * gnat_rm.texi: Minor update.
11316 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11318 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
11321 2011-08-02 Robert Dewar <dewar@adacore.com>
11323 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
11325 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11327 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
11328 loop statements and the element renaming declaration with a block when
11329 the element type is controlled.
11331 2011-08-02 Yannick Moy <moy@adacore.com>
11333 * sinfo.ads: Minor formatting.
11335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11337 * sem_aggr.adb (Add_Association): if the association has a box and no
11338 expression, use the Sloc of the aggregate itself for the new
11340 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
11343 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11345 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
11346 When a container is provided via a function call, generate a renaming
11347 of the function result. This avoids the creation of a transient scope
11348 and the premature finalization of the container.
11349 * exp_ch7.adb (Is_Container_Cursor): Removed.
11350 (Wrap_Transient_Declaration): Remove the supression of the finalization
11351 of the list controller when the declaration denotes a container cursor,
11354 2011-08-02 Yannick Moy <moy@adacore.com>
11356 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
11357 node is from source, instead of the original node being from source.
11359 (Resolve_Array_Aggregate): refine the check for a static expression, to
11360 recognize also static ranges
11361 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
11362 Array_Type_Declaration): postpone the test for the type being a subtype
11363 mark after the type has been resolved, so that component-selection and
11364 expanded-name are discriminated.
11365 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
11366 to distinguish the case of an iteration scheme, so that an error is
11367 issed on a non-static range in SPARK except in an iteration scheme.
11368 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
11369 In_Iter_Schm = True.
11370 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
11371 user-defined operators so that they are allowed in renaming
11373 (Find_Selected_Component): refine the check for prefixing of operators
11374 so that they are allowed in renaming. Move the checks for restrictions
11375 on selector name after analysis discriminated between
11376 component-selection and expanded-name.
11377 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
11378 concatenation argument of string type if it is static.
11379 * sem_util.adb, sem_util.ads
11380 (Check_Later_Vs_Basic_Declarations): add a new function
11381 Is_Later_Declarative_Item to decice which declarations are allowed as
11382 later items, in the two different modes Ada 83 and SPARK. In the SPARK
11383 mode, add that renamings are considered as later items.
11384 (Enclosing_Package): new function to return the enclosing package
11385 (Enter_Name): correct the rule for homonyms in SPARK
11386 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
11387 from source (result of expansion) to avoid issuing wrong warnings.
11389 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11391 * errout.adb: On anything but an expression First_Node returns its
11394 2011-08-02 Pascal Obry <obry@adacore.com>
11396 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
11398 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11400 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
11401 Set the associated loop as the related expression of internally
11403 * exp_ch7.adb (Is_Container_Cursor): New routine.
11404 (Wrap_Transient_Declaration): Supress the finalization of the list
11405 controller when the declaration denotes a container cursor.
11407 2011-08-02 Yannick Moy <moy@adacore.com>
11409 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
11411 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
11412 expression is a simple expression. This check cannot be performed in
11413 the semantics, so just drop it.
11414 (P_Index_Or_Discriminant_Constraint): move check that the index or
11415 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
11416 semantics. Other cases were previously checked in the semantics.
11417 * par-ch4.adb (P_Name): move checks that a selector name is not
11418 character literal or an operator symbol to Find_Selected_Component in
11420 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
11421 declarations are not placed after later declarations in a separate
11422 procedure in Sem_Util (possibly not the best choice?), to be used both
11423 during parsing, for Ada 83 mode, and during semantic analysis, for
11425 * par-endh.adb (Check_End): move check that end label is not missing
11426 to Process_End_Label in the semantics
11427 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
11428 the special case for SPARK restriction
11429 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
11430 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
11431 parameter Force to issue the error message even on internal node (used
11432 for generated end label). Call Check_Restriction to check when an error
11433 must be issued. In SPARK mode, issue an error message even if the
11434 restriction is not set.
11435 (Check_Restriction): new procedure with an additional out parameter to
11436 inform the caller that a message has been issued
11437 * sem_aggr.adb: Minor modification of message
11438 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
11439 instead of issuing an error message directly
11440 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
11441 declarations are not placed after later declarations, by calling
11442 Check_Later_Vs_Basic_Declarations
11443 (Analyze_Subtype_Declaration): move here the check that an index or
11444 discriminant constraint must be a subtype mark. Change the check that
11445 a subtype of String must start at one so that it works on subtype marks.
11446 * sem_ch4.adb (Analyze_Call): move here the check that a named
11447 association cannot follow a positional one in a call
11448 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
11449 instead of issuing an error message directly
11450 * sem_ch8.adb (Find_Selected_Component): move here the check that a
11451 selector name is not a character literal or an operator symbol. Move
11452 here the check that the prefix of an expanded name cannot be a
11453 subprogram or a loop statement.
11454 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
11455 procedure called from parsing and semantics to check that basic
11456 declarations are not placed after later declarations
11457 (Process_End_Label): move here the check that end label is not missing
11459 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11461 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
11462 representation clause in codepeer mode, since it confuses CodePeer and
11463 does not bring useful info.
11465 2011-08-02 Ed Falis <falis@adacore.com>
11467 * init.c: initialize fp hw on MILS.
11469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11471 * errout.adb (First_Node): for bodies, return the node itself (small
11472 optimization). For other nodes, do not check source_unit if the node
11473 comes from Standard.
11475 2011-08-02 Robert Dewar <dewar@adacore.com>
11477 * exp_ch3.adb: Minor comment additions.
11478 * sem_ch13.adb: Minor reformatting.
11480 2011-08-02 Pascal Obry <obry@adacore.com>
11482 * make.adb, makeutl.adb: Removes some superfluous directory separator.
11484 2011-08-02 Robert Dewar <dewar@adacore.com>
11486 * sem_attr.adb: Minor reformatting.
11488 2011-08-02 Robert Dewar <dewar@adacore.com>
11490 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
11491 (Has_Default_Component_Value): Removed
11492 * einfo.ads Comment updates
11493 (Has_Default_Aspect): Replaces Has_Default_Value
11494 (Has_Default_Component_Value): Removed
11496 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
11498 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
11499 (Get_Simple_Init_Val): Handle Default_Value aspect
11500 (Needs_Simple_Initialization): Handle Default_Value aspect
11501 * exp_ch3.ads: Needs_Simple_Initialization
11502 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
11503 * par-prag.adb (Pragma_Default[_Component]Value) Removed
11505 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
11506 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
11507 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
11509 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11511 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
11512 package containing iteration primitives.
11513 exp_ch5.adb (Expand_Iterator_Loop): ditto.
11515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11517 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
11518 "of", pre-analyze expression in case it is a function call with
11519 finalization actions that must be placed ahead of the loop.
11520 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
11521 on an Ada2012 iterator, insert them ahead of the rewritten loop.
11523 2011-08-02 Geert Bosch <bosch@adacore.com>
11525 * cstand.adb (Create_Float_Types): Only consider C's long double for
11526 Long_Long_Float, in addition to double.
11528 2011-08-02 Robert Dewar <dewar@adacore.com>
11530 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
11531 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
11532 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
11533 Minor reformatting.
11535 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11537 * sem_attr.adb: handle properly 'Result when it is a prefix of an
11540 2011-08-02 Javier Miranda <miranda@adacore.com>
11542 * einfo.ads, einfo.adb
11543 (Original_Access_Type): Move this attribute to Node26 since there was
11544 an undocumented use of Node21 in E_Access_Subprogram_Type entities
11545 which causes conflicts and breaks the generation of the .NET compiler.
11546 (Interface_Name): Add missing documentation on JGNAT only uses of
11549 2011-08-02 Geert Bosch <bosch@adacore.com>
11551 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
11552 (Find_Back_End_Float_Type): Likewise
11553 (Create_Back_End_Float_Types): Likewise
11554 (Create_Float_Types): Likewise
11555 (Register_Float_Type): Likewise
11556 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
11557 Nlist and split out type selection in new local Find_Base_Type function.
11558 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
11560 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
11562 2011-08-02 Robert Dewar <dewar@adacore.com>
11564 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
11566 * opt.ads: Minor comment change.
11567 * sem_ch12.adb: Minor code reorganization.
11569 2011-08-02 Gary Dismukes <dismukes@adacore.com>
11571 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
11572 subtype's list of rep items to the list on the full subtype in the case
11573 where the lists are the same.
11575 2011-08-02 Geert Bosch <bosch@adacore.com>
11577 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
11578 using the one from System.Strings, which also deallocates all strings.
11580 2011-08-02 Geert Bosch <bosch@adacore.com>
11582 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
11584 * gcc-interface/Make-lang.in: Update dependencies.
11586 2011-08-02 Olivier Hainque <hainque@adacore.com>
11588 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
11591 2011-08-02 Javier Miranda <miranda@adacore.com>
11593 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
11594 associated with anonymous access to subprograms.
11596 2011-08-02 Geert Bosch <bosch@adacore.com>
11599 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
11600 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
11601 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
11602 (Add_Symbol_Definition): Move to switch-c.adb
11603 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
11604 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
11605 (Add_Symbol_Definition): Move to switch-c.adb.
11606 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
11608 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11609 Move to warnsw.adb.
11610 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
11611 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
11612 Move to warnsw.adb.
11613 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
11614 (Add_Symbol_Definition): Moved from Prepcomp.
11615 * switch-c.ads: Update copyright notice. Use String_List instead of
11616 Argument_List, removing dependency on System.OS_Lib.
11618 2011-08-02 Yannick Moy <moy@adacore.com>
11620 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
11621 mode on initialization expression which does not respect SPARK
11623 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
11624 if the tree referenced by its argument represents an initialization
11625 expression in SPARK, suitable for initializing an object in an object
11628 2011-08-02 Javier Miranda <miranda@adacore.com>
11630 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
11631 internally generated access to subprogram with its associated protected
11633 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
11635 2011-08-02 Geert Bosch <bosch@adacore.com>
11637 * cstand.adb (Register_Float_Type): Print information about type to
11638 register, if the Debug_Flag_Dot_B is set.
11639 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
11640 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
11641 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
11642 with a requested precision of more than Max_Digits digits and no more
11643 than Max_Base_Digits digits, if a range specification is present and the
11644 Predefined_Float_Types list has a suitable type to derive from.
11645 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
11646 case of type completion with pragma Import
11648 (Process_Import_Predefined_Type): Processing to complete a type
11649 with pragma Import. Currently supports floating point types only.
11650 (Set_Convention_From_Pragma): Do nothing without underlying type.
11651 (Process_Convention): Guard against absence of underlying type,
11652 which may happen when importing incomplete types.
11653 (Process_Import_Or_Interface): Handle case of importing predefined
11654 types. Tweak error message.
11656 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11658 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
11659 functions to previous change. Reorganize code slightly.
11661 2011-08-02 Geert Bosch <bosch@adacore.com>
11663 * back_end.ads (Register_Type_Proc): New call back procedure type for
11664 allowing the back end to provide information about available types.
11665 (Register_Back_End_Types): New procedure to register back end types.
11666 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
11668 * cstand.adb (Back_End_Float_Types): New list for floating point types
11669 supported by the back end.
11670 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
11671 (Copy_Float_Type): New procedure to make new copies of predefined types.
11672 (Register_Float_Type): New call back procedure to populate the BEFT list
11673 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
11674 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
11675 (Create_Float_Types): New procedure to create entities for floating
11676 point types predefined in Standard, and put these and any remaining
11677 BEFTs on the Predefined_Float_Types list.
11678 * stand.ads (Predefined_Float_Types): New list for predefined floating
11679 point types that do not have declarations in package Standard.
11681 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11683 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
11684 entity node for the unit containing the parameter.
11685 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
11686 (Add_Inlined_Subprogram): Likewise.
11687 * gcc-interface/Make-lang.in: Update dependencies.
11689 2011-08-02 Thomas Quinot <quinot@adacore.com>
11691 * s-stusta.adb (Print): Make sure Pos is always initialized to a
11694 2011-08-02 Geert Bosch <bosch@adacore.com>
11696 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
11698 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11700 * sem_type.adb (Covers): Move trivial case to the top and reuse the
11701 computed value of Base_Type.
11703 2011-08-02 Yannick Moy <moy@adacore.com>
11705 * restrict.adb (Check_Restriction): issue an error for any use of
11706 class-wide, even if the No_Dispatch restriction is not set.
11707 * sem_aggr.adb: Correct typos in comments and messages in formal mode
11708 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
11709 when completing a private extension, the type named in the private part
11710 is not the same as that named in the visible part.
11711 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
11712 of an inherited primitive operations of a tagged type or type extension
11713 that returns the tagged type.
11714 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
11715 function which returns True for an implicit operation inherited by the
11716 derived type declaration for the argument type.
11717 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
11720 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11722 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
11723 Process_Bounds, to perform analysis with expansion of a range or an
11724 expression that is the iteration scheme for a loop.
11725 (Analyze_Iterator_Specification): If domain of iteration is given by a
11726 function call with a controlled result, as is the case if call returns
11727 a predefined container, ensure that finalization actions are properly
11729 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
11731 2011-08-02 Javier Miranda <miranda@adacore.com>
11733 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
11734 * gcc-interface/Make-lang.in: Update dependencies.
11736 2011-08-02 Javier Miranda <miranda@adacore.com>
11738 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
11739 determine if the analysis is performed using N or Original_Node (N).
11740 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
11741 functionality of routine Is_Variable avoids code duplication.
11742 * checks.adb (Determine_Range): Handle temporaries generated by
11743 Remove_Side_Effects.
11745 2011-08-02 Javier Miranda <miranda@adacore.com>
11747 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
11748 expansion of the condition. Required since the previous analysis was
11749 done with expansion disabled (see Resolve_Quantified_Expression) and
11750 hence checks were not inserted and record comparisons have not been
11753 2011-08-02 Ed Falis <falis@adacore.com>
11755 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
11758 2011-08-02 Bob Duff <duff@adacore.com>
11760 * opt.ads: Minor comment fix.
11762 2011-08-02 Bob Duff <duff@adacore.com>
11764 * sem_ch12.adb (Analyze_Package_Instantiation,
11765 Analyze_Subprogram_Instantiation): Turn off style checking while
11766 analyzing an instance. Whatever style checks that apply to the generic
11767 unit should apply, so it makes no sense to apply them in an instance.
11768 This was causing trouble when compiling an instance of a runtime
11769 unit that violates the -gnatyO switch.
11770 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
11771 one of the two case statements, causing spurious errors.
11773 2011-08-02 Robert Dewar <dewar@adacore.com>
11775 * uname.adb: Minor reformatting.
11776 * gnatcmd.adb: Minor reformatting.
11777 * exp_attr.adb: Minor reformatting.
11779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11781 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
11782 No_Dispatching_Calls, do not look for the Assign primitive, because
11783 predefined primitives are not created in this case.
11785 2011-08-02 Bob Duff <duff@adacore.com>
11787 * stylesw.ads: Minor comment fixes.
11789 2011-08-02 Robert Dewar <dewar@adacore.com>
11791 * freeze.adb (Add_To_Result): New procedure.
11793 2011-08-02 Jose Ruiz <ruiz@adacore.com>
11795 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
11796 time, if the specific run-time routines for handling streams of strings
11797 are not available, use the default mechanism.
11799 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11801 * s-regpat.ads: Fix typo.
11803 2011-08-02 Vincent Celier <celier@adacore.com>
11805 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
11806 not null, call it to create the in memory config project file without
11807 parsing an existing default config project file.
11809 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11811 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
11813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11815 * sem_elim.adb: an abstract subprogram does not need an eliminate
11816 pragma for its descendant to be eliminable.
11818 2011-08-02 Ed Falis <falis@adacore.com>
11820 * init.c: revert to handling before previous checkin for VxWorks
11821 * s-intman-vxworks.adb: delete unnecessary declarations related to
11822 using Ada interrupt facilities for handling signals.
11823 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
11824 * s-intman-vxworks.ads: Import __gnat_install_handler as
11825 Initialize_Interrupts.
11826 * s-taprop-vxworks.adb: Delete Signal_Mask.
11827 (Abort_Handler): change construction of mask to unblock exception
11830 2011-08-02 Jerome Guitton <guitton@adacore.com>
11832 * a-except-2005.adb (Raise_From_Signal_Handler): Call
11833 Debug_Raise_Exception before propagation starts.
11835 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11837 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
11838 to Restriction_Check_Required.
11839 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
11840 * sem_res.adb (Resolve_Call): Likewise.
11841 * sem_attr.adb (Check_Stream_Attribute): Likewise.
11843 2011-08-02 Bob Duff <duff@adacore.com>
11845 * stylesw.ads: Update comment.
11846 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
11847 * errout.ads: Remove obsolete comment.
11849 2011-08-02 Javier Miranda <miranda@adacore.com>
11851 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
11852 (Set_Is_Safe_To_Reevaluate): new procedure.
11853 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
11854 assignment is allowed on safe-to-reevaluate variables.
11855 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
11856 temporary created to remove side effects in expressions that use
11857 the secondary stack as safe-to-reevaluate.
11858 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
11859 variables that are not true constants.
11861 2011-08-02 Robert Dewar <dewar@adacore.com>
11863 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
11864 sem_res.adb, sem_ch6.adb: Minor reformatting.
11866 2011-08-02 Jerome Guitton <guitton@adacore.com>
11868 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
11870 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11872 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
11873 not set Overridden_Operation if subprogram is an initialization
11876 2011-08-02 Yannick Moy <moy@adacore.com>
11878 * par-ch6.adb: Correct obsolete name in comments
11879 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
11880 which takes two message arguments (existing function takes one), with
11881 second message used for continuation.
11882 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
11883 block statements that originate from a source block statement, not
11884 generated block statements
11885 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
11886 symmetry with procedure case
11887 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
11888 function to issue an error in formal mode if a package specification
11889 contains more than one tagged type or type extension.
11890 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
11891 parameters matching formals of tagged types are objects (or ancestor
11892 type conversions of objects), not general expressions. Issue an error
11893 on view conversions that are not involving ancestor conversion of an
11895 (Resolve_Type_Conversion): in formal mode, issue an error on the
11896 operand of an ancestor type conversion which is not an object
11897 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
11898 procedure so that it works also for actuals of function calls
11899 (Is_Actual_Tagged_Parameter): new function which determines if its
11900 argument is an actual parameter of a formal of tagged type in a
11902 (Is_SPARK_Object_Reference): new function which determines if the tree
11903 referenced by its argument represents an object in SPARK
11905 2011-08-02 Robert Dewar <dewar@adacore.com>
11907 * sem_ch3.adb: Minor reformatting
11908 Minor comment addition
11909 Minor error msg text change
11911 2011-08-02 Javier Miranda <miranda@adacore.com>
11913 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
11914 function. Used to be more precise when we generate a variable plus one
11915 assignment to remove side effects in the evaluation of the Bound
11917 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
11918 of the bound expression to force its re-analysis and thus expand the
11919 associated transient scope (if required). Code cleanup replacing the
11920 previous code that declared the constant entity by an invocation to
11921 routine Force_Evaluation which centralizes this work in the frontend.
11923 2011-08-02 Robert Dewar <dewar@adacore.com>
11925 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
11926 (Base_Type): Now uses improved Is_Base_Type function
11927 * einfo.ads (Base_Type): Inline this function
11929 2011-08-02 Robert Dewar <dewar@adacore.com>
11931 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
11932 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
11934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
11936 * gcc-interface/Make-lang.in: Update dependencies.
11937 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
11940 2011-08-02 Yannick Moy <moy@adacore.com>
11942 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
11943 non-simple expression used in delta constraint
11944 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
11945 index constraint which is not a subtype mark
11946 * par.adb: With and use Restrict
11947 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
11948 mode on component type which is not a subtype mark and default
11949 expression on component
11950 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
11951 of string which does not have a lower index bound equal to 1
11952 (Array_Type_Declaration): issue an error in formal mode on index or
11953 component type which is not a subtype mark, and on aliased keyword on
11955 (Derived_Type_Declaration): issue an error in formal mode on interface,
11956 limited or abstract type
11957 (Record_Type_Declaration): issue an error in formal mode on interface
11958 (Record_Type_Definition): issue an error in formal mode on tagged types
11959 and type extensions not declared in the specification of a library unit
11960 package; on null non-tagged record; on variant part
11962 2011-08-02 Vincent Celier <celier@adacore.com>
11964 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
11965 not declared for qualified library project when Library_Name is not
11966 declared, but Library_Dir is.
11968 2011-08-02 Robert Dewar <dewar@adacore.com>
11970 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
11971 pragmas (affects aspects [Component_]Default_Value
11972 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
11973 component type for the resolution
11975 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
11977 * einfo.adb (Base_Type): Tune implementation for speed.
11979 2011-08-02 Robert Dewar <dewar@adacore.com>
11981 * freeze.adb: Minor reformatting.
11983 2011-08-02 Thomas Quinot <quinot@adacore.com>
11985 * scos.ads: Update comments.
11987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
11989 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
11990 base type, because the parent may be a subtype of a private type whose
11991 convention is established in a private part.
11993 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
11995 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
11996 statement in a block when the expansion of the return expression has
11997 created a finalization chain.
11998 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
11999 with the parent node.
12000 Add N_Extended_Return_Statement to handle the case where a transient
12001 object declaration appears in the Return_Object_Declarations list of
12002 an extended return statement.
12004 2011-08-02 Matthew Gingell <gingell@adacore.com>
12006 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
12007 unused parameter 'name'.
12009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12011 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
12012 inherited operation, check whether its alias, which is the source
12013 operastion that it renames, has been marked eliminated.
12015 2011-08-02 Javier Miranda <miranda@adacore.com>
12017 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
12018 in-mode parameter whose type is an access type since it can be used to
12019 modify its designated object. Enforce code that handles as safe an
12020 access type that is not access-to-constant but it is the result of a
12021 previous removal of side-effects.
12022 (Remove_Side_Effects): Minor code reorganization of cases which require
12023 no action. Done to incorporate documentation on new cases uncovered
12024 working in this ticket: no action needed if this routine was invoked
12025 too early and the nodes are not yet decorated.
12026 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
12027 to routine Remove_Side_Effects by calls to Force_Evaluation since they
12028 were issued with actuals that are implicitly provided by
12031 2011-08-02 Robert Dewar <dewar@adacore.com>
12033 * sem_ch3.adb, sem_res.adb: Minor reformatting.
12035 2011-08-02 Yannick Moy <moy@adacore.com>
12037 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
12038 to issue an error in formal mode on attribute not supported in this mode
12039 (Analyze_Attribute): issue errors on standard attributes not supported
12041 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
12042 comment, and issue error in formal mode on modulus which is not a power
12044 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
12046 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
12048 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
12049 operator on modular type (except 'not').
12051 2011-08-02 Robert Dewar <dewar@adacore.com>
12053 * gnat_rm.texi: Minor reformatting.
12055 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12057 * s-osinte-linux.ads: Minor comment update and reformatting.
12058 * i-cexten.ads: Make this unit pure, as for its parent.
12059 Will allow its usage in more contexts if needed.
12061 2011-08-02 Robert Dewar <dewar@adacore.com>
12063 * s-utf_32.ads: Minor comment fix.
12065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12067 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
12068 operation of a tagged synchronized type, handle the case where the
12069 controlling argument is overloaded.
12071 2011-08-02 Yannick Moy <moy@adacore.com>
12073 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
12074 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
12075 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
12076 SPARK mode and formal verification mode on processing SPARK restriction
12077 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
12078 requiring consistency checking.
12080 2011-08-02 Robert Dewar <dewar@adacore.com>
12082 * sem_res.adb: Minor reformatting.
12084 2011-08-02 Robert Dewar <dewar@adacore.com>
12086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12087 a-cforse.ads: Remove unneeded with of Ada.Containers
12088 Remove commented out pragma Inline's
12089 Move specifications of new subprograms to the actual specs
12091 2011-08-02 Yannick Moy <moy@adacore.com>
12093 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12094 a-cforse.ads: Update comments.
12096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12098 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
12100 2011-08-02 Robert Dewar <dewar@adacore.com>
12102 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
12103 a-cforse.ads, a-cofove.ads: Minor reformatting.
12105 2011-08-02 Claire Dross <dross@adacore.com>
12107 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
12108 a-cofove.ads: Add comments.
12110 2011-08-02 Yannick Moy <moy@adacore.com>
12112 * gnat_rm.texi: Document formal containers.
12114 2011-08-02 Emmanuel Briot <briot@adacore.com>
12116 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
12117 are empty sections.
12119 2011-08-02 Robert Dewar <dewar@adacore.com>
12121 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
12124 2011-08-02 Robert Dewar <dewar@adacore.com>
12126 * aspects.adb: New aspects Default_Value and Default_Component_Value
12127 New format of Aspect_Names table checks for omitted entries
12128 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
12129 handling of boolean aspects for derived types.
12130 New aspects Default_Value and Default_Component_Value
12131 New format of Aspect_Names table checks for omitted entries
12132 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
12133 (Has_Default_Value): New flag
12134 (Has_Default_Component_Value): New flag
12135 (Has_Default_Value): New flag
12136 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
12138 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
12139 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
12140 Default_Value and Default_Component_Value
12141 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
12142 New aspects Default_Value and Default_Component_Value
12143 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
12144 * sprint.adb: Print N_Aspect_Specification node when called from gdb
12146 2011-08-02 Vincent Celier <celier@adacore.com>
12148 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
12149 inherit library kind.
12151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12153 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
12154 Minor reformatting.
12156 2011-08-02 Robert Dewar <dewar@adacore.com>
12158 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
12160 2011-08-02 Yannick Moy <moy@adacore.com>
12162 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
12164 2011-08-02 Robert Dewar <dewar@adacore.com>
12166 * impunit.adb: Add comment.
12168 2011-08-02 Yannick Moy <moy@adacore.com>
12170 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
12171 qualification of aggregates in formal mode
12172 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
12174 (Resolve_Aggregate): complete the test that an aggregate is adequately
12175 qualified in formal mode
12177 2011-08-02 Pascal Obry <obry@adacore.com>
12179 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
12180 * mlib-prj.adb: Supress warning when compiling binder generated file.
12181 (Build_Library): Supress all warnings when compiling the binder
12184 2011-08-02 Yannick Moy <moy@adacore.com>
12186 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
12188 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
12189 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
12190 Add with/use clauses to make Check_Formal_Restriction visible
12192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12194 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
12195 in-parameters when type of the generic formal is private in the generic
12196 spec and non-private in the body.
12198 2011-08-02 Claire Dross <dross@adacore.com>
12200 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
12201 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
12202 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
12203 * impunit.adb, Makefile.rtl: Take new files into account.
12205 2011-08-02 Robert Dewar <dewar@adacore.com>
12207 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
12208 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12210 2011-08-02 Yannick Moy <moy@adacore.com>
12212 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
12214 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
12215 matching static array bounds, taking into account the special case of
12217 * sem_ch3.adb: Typo in comment.
12219 2011-08-02 Yannick Moy <moy@adacore.com>
12221 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
12222 which issues an error in formal mode if its argument node is originally
12224 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
12225 has a discriminant specification so that it does not include the case
12227 (Derived_Type_Declaration): move here the test that a derived type has a
12228 discriminant specification
12229 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
12230 first element of a component association before accessing its choices
12231 (presence of component association is not enough)
12232 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
12233 declaration is a library item before accessing the next element in a
12234 list, as library items are not member of lists
12235 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
12236 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
12237 Check_Formal_Restriction whenever possible.
12239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12241 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
12242 reference when needed.
12244 2011-08-02 Bob Duff <duff@adacore.com>
12246 * gnat_ugn.texi: Fix typo.
12248 2011-08-02 Vincent Celier <celier@adacore.com>
12250 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
12251 archive file name. Do not use the full path name of archives for Open
12254 2011-08-02 Robert Dewar <dewar@adacore.com>
12256 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
12257 Analyze_Aspect_Specifications
12259 (Analyze_Aspect_Specifications): New handling for boolean aspects
12260 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
12261 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
12262 sequence for Analyze_Aspect_Specifications
12263 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
12264 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
12266 2011-08-02 Robert Dewar <dewar@adacore.com>
12268 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
12269 aspects, since these no longer exist.
12271 2011-08-02 Robert Dewar <dewar@adacore.com>
12273 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
12274 semicolon, do not try to see if there are aspects following it.
12275 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
12278 2011-08-02 Robert Dewar <dewar@adacore.com>
12280 * sem_ch8.adb, aspects.ads: Minor reformatting.
12282 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12284 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
12285 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
12287 (Analyze_Aspect_Specifications): ...here. Call above procedure.
12289 2011-08-02 Yannick Moy <moy@adacore.com>
12291 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
12292 mode on subprogram declaration outside of package specification, unless
12293 it is followed by a pragma Import
12294 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
12295 Access_Type_Declaration): issue error in formal mode on access type
12296 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
12298 (Analyze_Object_Declaration): issue error in formal mode on object
12299 declaration which does not respect SPARK restrictions
12300 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
12301 declaration which does not respect SPARK restrictions
12302 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
12303 error in formal mode on digits or delta constraint
12304 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
12305 decimal fixed point type
12306 (Derived_Type_Declaration): issue error in formal mode on derived type
12307 other than type extensions of tagged record types
12308 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
12309 with check on access definition
12310 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
12311 mode on protected definition.
12312 (Analyze_Task_Definition): issue error in formal mode on task definition
12314 2011-08-02 Robert Dewar <dewar@adacore.com>
12316 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
12318 2011-08-02 Javier Miranda <miranda@adacore.com>
12320 * sem_ch6.adb (Can_Override_Operator): New function.
12321 (Verify_Overriding_Indicator): Add missing code to check overriding
12322 indicator in operators. Fixes regression.
12323 (Check_Overriding_Indicator): Minor reformating after replacing the
12324 code that evaluates if the subprogram can override an operator by
12325 invocations to the above new function.
12327 (Write_Field26_Name): Add missing code to ensure that, following
12328 the documentation in einfo.ads, this field is not shown as attribute
12329 "Static_Initialization" on non-dispatching functions.
12331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12333 * sem_res.adb (Resolve_Call): A call to
12334 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
12335 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
12336 i.e., when the second parameter is of type Time_Span.
12338 2011-08-02 Vincent Celier <celier@adacore.com>
12340 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
12341 with an archive instead of -L<library dir> -l<library name>.
12343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12345 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
12346 mark the base types In_Use in addition to making the operations
12349 2011-08-02 Ed Falis <falis@adacore.com>
12351 * init.c: add and setup __gnat_signal_mask for the exception signals
12352 * s-inmaop-vxworks.adb: new file.
12353 * s-intman-vxworks.adb: remove unnecessary initializations and
12355 * s-intman-vxworks.ads: remove unnecessary variable
12356 * s-taprop-vxworks.adb: simplify signal initialization
12358 2011-08-02 Robert Dewar <dewar@adacore.com>
12360 * sem_ch8.adb: Minor code reorganization, comment updates.
12362 2011-08-02 Robert Dewar <dewar@adacore.com>
12364 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
12365 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
12367 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
12368 (Matching_Static_Array_Bounds): Moved here from Sem_Res
12370 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12372 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
12373 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
12374 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
12375 use_type_clauses, to handle more efficiently use_type and use_all_type
12377 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
12378 Ada2012 Use_All_Type clause.
12379 (Use_Class_Wide_Operations): new procedure.
12381 2011-08-02 Robert Dewar <dewar@adacore.com>
12383 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
12384 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
12385 expression to expression function.
12387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12389 * sem_ch4.adb: transform simple Ada2012 membership into equality only
12390 if types are compatible.
12392 2011-08-02 Yannick Moy <moy@adacore.com>
12394 * sem_res.adb (Matching_Static_Array_Bounds): new function which
12395 returns True if its argument array types have same dimension and same
12396 static bounds at each index.
12397 (Resolve_Actuals): issue an error in formal mode on actuals passed as
12398 OUT or IN OUT paramaters which are not view conversions in SPARK.
12399 (Resolve_Arithmetic_Op): issue an error in formal mode on
12400 multiplication or division with operands of fixed point types which are
12401 not qualified or explicitly converted.
12402 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
12403 Boolean or array type (except String) operands.
12404 (Resolve_Equality_Op): issue an error in formal mode on equality
12405 operators for array types other than String with non-matching static
12407 (Resolve_Logical_Op): issue an error in formal mode on logical operators
12408 for array types with non-matching static bounds. Factorize the code in
12409 Matching_Static_Array_Bounds.
12410 (Resolve_Qualified_Expression): issue an error in formal mode on
12411 qualified expressions for array types with non-matching static bounds.
12412 (Resolve_Type_Conversion): issue an error in formal mode on type
12413 conversion for array types with non-matching static bounds
12415 2011-08-02 Robert Dewar <dewar@adacore.com>
12417 * par-ch10.adb: Minor code reorganization (use Nkind_In).
12419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12421 * par-ch9.adb: save location of entry for proper error message.
12423 2011-08-02 Javier Miranda <miranda@adacore.com>
12425 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
12426 (Use_Full_View) which permits this routine to climb through the
12427 ancestors using the full-view of private parents.
12428 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
12429 Use_Full_View to true in calls to Is_Ancestor.
12430 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
12431 true in call to Is_Ancestor.
12432 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
12433 Use_Full_View to true in call to Is_Ancestor.
12434 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
12435 call to Is_Ancestor.
12436 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
12437 Use_Full_View to true in calls to Is_Ancestor.
12438 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
12439 Make_Select_Specific_Data_Table, Register_Primitive,
12440 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
12441 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
12442 to true in call to Is_Ancestor.
12443 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
12444 Use_Full_View to true in calls to Is_Ancestor.
12446 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
12447 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
12449 2011-08-02 Robert Dewar <dewar@adacore.com>
12451 * gnat_rm.texi: Minor reformatting.
12452 * sem_prag.adb: Minor reformatting.
12454 2011-08-02 Tristan Gingold <gingold@adacore.com>
12456 * vms_data.ads: Add VMS qualifier for -gnateP.
12458 2011-08-02 Robert Dewar <dewar@adacore.com>
12460 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
12461 * par-ch7.adb (P_Package): Proper placement of aspects for package
12462 decl/instantiation.
12463 * par-endh.adb (Check_End): Ad Is_Sloc parameter
12464 (End_Statements): Add Is_Sloc parameterr
12465 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
12466 (Check_End): Ad Is_Sloc parameter
12467 (End_Statements): Add Is_Sloc parameterr
12469 2011-08-02 Vincent Celier <celier@adacore.com>
12471 * ug_words: Add VMS qualifier equivalent to -gnateP:
12472 /SYMBOL_PREPROCESSING.
12474 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12476 * gnat-style.texi: For hexadecimal numeric literals the typical
12477 grouping of digits is 4 to represent 2 bytes.
12478 A procedure spec which is split into several lines is indented two
12481 2011-08-02 Yannick Moy <moy@adacore.com>
12483 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
12484 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
12485 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
12487 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
12488 choice in array aggregate
12489 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
12491 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
12492 positional and named aggregate for record, or others in record
12493 aggregate, or multiple choice in record aggregate
12494 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
12495 array operands to logical operations AND, OR and XOR do not have the
12496 same static lower and higher bounds
12497 * sem_ch5.adb, sinfo.ads: Correct typos in comments
12499 2011-08-01 Robert Dewar <dewar@adacore.com>
12501 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
12502 Replaces Last_Source_Node_In_Sequence.
12503 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
12504 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
12505 parens and blank in string (this was inconsistently implemented).
12507 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
12508 blank in string (this was inconsistently implemented).
12510 (Set_Global_Switches): Set formal mode switches appropriately
12511 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
12513 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
12514 call Set_Error_Msg_Lang to set "spark" as language name.
12515 * par.adb: Remove unnecessary call to set formal language for errout
12516 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
12517 appropriately and call Set_Error_Msg_Lang to set "spark" as language
12519 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
12520 calls to it, moved after resolution so that types are known
12521 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
12522 result of concatenation is not of type String
12523 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
12524 concatenation is not properly restricted
12525 * gnat_rm.texi: Add doc on pragma Spark_95.
12526 * gcc-interface/Makefile.in: Remove obsolete target pairs for
12527 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
12528 * gcc-interface/Make-lang.in: Update dependencies.
12530 2011-08-01 Javier Miranda <miranda@adacore.com>
12532 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
12533 condition that detects if the overridden operation must replace an
12536 2011-08-01 Javier Miranda <miranda@adacore.com>
12538 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
12539 code declarations inserted by Insert_Actions in each alternative of the
12540 N_Case_Expression node.
12542 2011-08-01 Robert Dewar <dewar@adacore.com>
12544 * sem_ch6.adb: Minor code reorganization.
12545 * sem_util.adb: Minor reformatting.
12547 2011-08-01 Pascal Obry <obry@adacore.com>
12549 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
12550 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
12552 2011-08-01 Yannick Moy <moy@adacore.com>
12554 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
12555 literal or operator symbol which is prefixed
12556 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
12557 mode on access attributes.
12558 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
12559 that concatenation operands are properly restricted in formal mode
12560 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
12561 Analyze_Concatenation_Operand. Issue an error in formal mode if the
12562 result of the concatenation has a type different from String.
12563 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
12564 Analyze_Quantified_Expression, Analyze_Slice,
12565 Analyze_Null): issue an error in formal mode on unsupported constructs
12567 (Analyze_Block_Statement): only issue error on source block statement
12568 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
12569 function which returns the last node in a list of nodes for which
12570 Comes_From_Source returns True, if any
12571 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
12572 Last_Source_Node_In_Sequence
12573 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
12574 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
12575 mode on unsupported constructs
12576 * sem_ch9.adb Do not return after issuing error in formal mode, as the
12577 rest of the actions may be needed later on since the error is marked as
12579 * sinfo.ads: Typos in comments.
12581 2011-08-01 Pascal Obry <obry@adacore.com>
12583 * projects.texi: Minor editing.
12585 2011-08-01 Yannick Moy <moy@adacore.com>
12587 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
12588 insertion character ~~
12589 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
12590 (Set_Error_Msg_Lang): new procedure which fixes the language for use
12591 with insertion character ~~
12592 (Set_Msg_Text): treat insertion character ~~
12593 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
12594 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
12595 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
12596 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
12597 errors related to the formal language restriction not serious
12598 (insertion character |).
12599 * par.adb (Par): set formal language for error messages if needed
12600 * sem_ch6.adb (Check_Missing_Return): take into account possible
12601 generated statements at the end of the function
12602 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
12603 enumeration value to define a new pragma SPARK_95
12604 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
12605 SPARK_Version): new type and variables to store the SPARK version
12607 (SPARK_Mode): return True when SPARK_Version is set
12608 * par-prag.adb: Correct indentation
12609 (Prag): take Pragma_SPARK_95 into account
12610 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
12613 2011-08-01 Robert Dewar <dewar@adacore.com>
12615 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
12616 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
12617 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
12619 2011-08-01 Pascal Obry <obry@adacore.com>
12621 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
12622 Target_Name to Get_Path call.
12623 (Parse_Single_Project): Likewise.
12624 (Post_Parse_Context_Clause): Likewise.
12625 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
12626 Call Initialise_Project_Path with the proper Target_Name.
12627 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
12629 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
12630 with the proper Target_Name.
12631 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
12632 Part.Parse routine.
12633 (Parse_Project_And_Apply_Config): Likewise.
12634 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
12635 This is fine as this part of the code is supporting only native
12637 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
12638 is fine as this part of the code is supporting only native compilation.
12640 2011-08-01 Yannick Moy <moy@adacore.com>
12642 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
12643 of homonym, unless the homonym is one of the cases allowed in SPARK
12644 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
12645 package declaration occurring after a body.
12647 2011-08-01 Robert Dewar <dewar@adacore.com>
12649 * checks.adb, exp_ch4.adb: Minor reformatting.
12651 2011-08-01 Javier Miranda <miranda@adacore.com>
12653 * einfo.ads (Access_Disp_Table): Fix documentation.
12654 (Dispatch_Table_Wrappers): Fix documentation.
12656 2011-08-01 Pascal Obry <obry@adacore.com>
12658 * prj-env.adb, prj-env.ads: Minor reformatting.
12660 2011-08-01 Yannick Moy <moy@adacore.com>
12662 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
12663 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12664 procedures out of these packages.
12665 * errout.ads, errout.adb
12666 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
12667 procedures in of this package
12668 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
12669 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
12670 on misplaced later vs initial declarations, like in Ada 83
12671 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
12672 formal mode on attribute of private type whose full type declaration
12674 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
12675 package declaration inside a package specification
12676 (Analyze_Full_Type_Declaration): issue error in formal mode on
12677 controlled type or discriminant type
12678 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
12679 user-defined operator means that it should come from the source
12680 (New_Overloaded_Entity): issue error in formal mode on overloaded
12682 * sem_ch6.ads, sem_ch13.ads: typos in comments.
12684 2011-08-01 Thomas Quinot <quinot@adacore.com>
12686 * atree.adb: Minor reformatting.
12687 * checks.adb: Minor reformatting.
12689 2011-08-01 Vincent Celier <celier@adacore.com>
12691 * s-parame-vms-ia64.ads: Fix typo in comment
12693 * s-parame-vms-restrict.ads: Removed, unused.
12695 2011-08-01 Javier Miranda <miranda@adacore.com>
12698 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
12700 (Constrain_Index): Remove side effects in the evaluation of the bounds.
12701 * sem_ch3.ads, sem_ch3.adb
12702 (Is_Constant_Bound): New extended version of the subprogram that was
12703 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
12704 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
12705 * sem_aux.ads (Constant_Value): Fix typo in comment.
12706 * checks.adb (Generate_Index_Checks): New implementation which, for
12707 array objects with constant bounds, generates the runtime check
12708 referencing the bounds of the array type. For other cases this routine
12709 provides its previous behavior obtaining such values from the array
12711 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
12713 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
12714 we cannot have semantic interpretations of the new node.
12716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12718 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
12721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12723 * sem_ch8.adb: Minor code editing.
12724 * s-vxwext.adb: Remove trailing space.
12725 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
12726 consistency with other files.
12728 2011-08-01 Thomas Quinot <quinot@adacore.com>
12730 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
12732 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12734 * par-ch10.adb: reject parameterized expressions as compilation unit.
12735 * sem_ch4.adb: handle properly conditional expression with overloaded
12736 then_clause and no else_clause.
12738 2011-08-01 Tristan Gingold <gingold@adacore.com>
12740 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
12741 like done by System.Aux_DEC.
12742 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
12744 2011-08-01 Yannick Moy <moy@adacore.com>
12746 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
12747 missing label at end of declaration (subprogram or package)
12748 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
12749 of positional and named parameter association
12750 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
12751 Error_Msg_SP which adds a prefix to the error message giving the name
12752 of the formal language analyzed
12753 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
12754 access result type in subprogram, unconstrained array as result type,.
12755 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
12757 * sem_ch8.adb: Code clean up.
12759 2011-08-01 Javier Miranda <miranda@adacore.com>
12761 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
12762 * einfo.ads (Access_Disp_Table): Fix documentation.
12763 (Dispatch_Table_Wrappers): Fix documentation.
12764 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
12765 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
12766 to enforce the documentation of this attribute.
12767 (Set_Is_Interface): Cleanup the assertion.
12768 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
12769 the Underlying_Type entity before reading attribute Access_Disp_Table.
12770 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
12771 Locate the Underlying_Type before reading attribute Access_Disp_Table.
12772 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
12773 the Underlying_Type entity before reading attribute Access_Disp_Table.
12774 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
12775 Locate the Underlying_Type entity before reading attribute
12778 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12780 * s-poosiz.ads: Additional overriding indicators.
12782 2011-08-01 Yannick Moy <moy@adacore.com>
12784 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
12786 (Analyze_Iteration_Scheme): issue error in formal mode when loop
12787 parameter specification does not include a subtype mark.
12788 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
12789 formal mode on abstract subprogram.
12790 (Analyze_Subprogram_Specification): issue error in formal mode on
12791 user-defined operator.
12792 (Process_Formals): issue error in formal mode on access parameter and
12793 default expression.
12794 * sem_ch9.adb (Analyze_Abort_Statement,
12795 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
12796 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
12797 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
12798 Analyze_Requeue, Analyze_Selective_Accept,
12799 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
12800 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
12801 issue error in formal mode on user-defined raise statement.
12803 2011-08-01 Thomas Quinot <quinot@adacore.com>
12805 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
12806 declaration being hidden when overriding an implicit inherited
12808 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
12809 (-gnats), do not complain about a source file that contains only a
12812 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12814 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
12815 variable if already set.
12817 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12819 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
12820 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
12821 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
12822 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
12823 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
12824 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
12825 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
12826 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
12827 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
12828 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
12829 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
12830 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
12831 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
12832 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
12833 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
12834 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
12835 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
12836 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
12837 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
12838 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
12839 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
12840 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
12841 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
12842 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
12843 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
12844 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
12845 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
12846 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
12847 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
12848 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
12849 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
12850 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
12851 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
12852 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
12853 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
12854 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
12855 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
12856 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
12857 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
12858 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
12859 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
12860 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
12861 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
12862 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
12863 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
12864 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
12865 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
12866 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
12867 s-osinte-mingw.ads: Update to GPLv3 run-time license.
12868 Use GNAT instead of GNARL.
12870 2011-08-01 Bob Duff <duff@adacore.com>
12872 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
12873 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
12874 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
12877 2011-08-01 Yannick Moy <moy@adacore.com>
12879 * debug.adb (d.D) reverve flag for the SPARK mode
12880 (d.E) reverve flag for SPARK generation mode
12881 (d.F) reverve flag for Why generation mode
12882 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
12883 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
12884 functions which return True when the corresponding modes are set
12885 (Formal_Language): return "spark" or "alfa" when in formal verification
12887 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
12888 Error_Msg to prefix the error message with a tag giving the formal
12890 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
12891 message with a tag giving the formal language
12892 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
12894 (Analyze_Case_Statement): issue error in formal mode on case statement
12895 with a single "others" case alternative
12896 (Analyze_Exit_Statement): issue errors in formal mode on exit
12897 statements which do not respect SPARK restrictions
12898 (Analyze_Goto_Statement): issue error in formal mode on goto statement
12899 (Check_Unreachable_Code): always issue an error (not a warning) in
12900 formal mode on unreachable code (concerns both code after an infinite
12901 loop and after an unconditional jump, both not allowed in SPARK)
12902 * sem_ch6.adb (Analyze_Return_Statement): add call to
12903 Set_Return_Present for a procedure containing a return statement
12904 (already done for functions in Analyze_Function_Return)
12905 (Analyze_Function_Return): issue error in formal mode on extended
12906 return or if return is not last statement in function
12907 (Check_Missing_Return): issue error in formal mode if function does
12908 not end with return or if procedure contains a return
12909 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
12910 function to detect if there is an inner scope of its parameter S which
12913 2011-08-01 Thomas Quinot <quinot@adacore.com>
12915 * sem_ch6.ads: Minor reformatting.
12917 2011-08-01 Javier Miranda <miranda@adacore.com>
12919 * sem_util.adb (Abstract_Interface_List): Complete condition when
12920 processing private type declarations to avoid reading unavailable
12922 (Is_Synchronized_Tagged_Type): Complete condition when processing
12923 private extension declaration nodes to avoid reading unavailable
12926 2011-08-01 Thomas Quinot <quinot@adacore.com>
12928 * sem_ch3.adb: Minor reformatting.
12930 2011-08-01 Thomas Quinot <quinot@adacore.com>
12932 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
12933 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
12934 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
12935 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
12936 for VMS, instead parametrize the common implementation with
12937 System.Parameters declarations.
12939 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
12941 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
12943 2011-08-01 Tristan Gingold <gingold@adacore.com>
12945 * seh_init.c: Fix SEH handler installation on win64.
12947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12949 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
12950 double analysis of an anonymous access to subprogram, because it can
12951 lead to improper sharing of profiles and a back-end crash.
12953 2011-08-01 Robert Dewar <dewar@adacore.com>
12955 * make.adb, sem_ch4.adb: Minor reformatting.
12956 * gcc-interface/Make-lang.in: Update dependencies.
12957 * sem_util.adb, exp_ch5.adb: Minor reformatting.
12959 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12961 * gnat_rm.texi: Fix definition of Long_Integer.
12963 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12965 * exp_aggr.adb: check limit size of static aggregate unconditionally,
12966 to prevent storage exhaustion.
12967 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
12968 finalized is a function body, insert the cleanup code before the final
12969 return statement, to prevent spurious warnings.
12970 * s-pooglo.ads: add overriding indicator.
12972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12974 * sem_ch4.adb (Operator_Check): improve error message when both a
12975 with_clause and a use_clause are needed to make operator usage legal.
12976 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
12977 determine whether a compilation unit is visible within an other,
12978 either through a with_clause in the current unit, or a with_clause in
12979 its library unit or one one of its parents.
12981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
12983 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
12984 over an arbitrary expression of an array or container type.
12985 * lib-xref.adb: clarify comment.
12987 2011-08-01 Bob Duff <duff@adacore.com>
12989 * einfo.ads: Minor reformatting.
12990 * debug.adb: Minor comment improvement.
12992 2011-08-01 Javier Miranda <miranda@adacore.com>
12994 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
12995 consider hidden subprograms as valid candidates.
12997 2011-08-01 Arnaud Charlet <charlet@adacore.com>
12999 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
13001 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
13003 * gnat_ugn.texi: Fix typo.
13005 2011-08-01 Robert Dewar <dewar@adacore.com>
13007 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
13008 lib-xref.adb: Minor reformatting
13010 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13012 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
13013 when to generate a call to Move_Final_List.
13014 (Has_Controlled_Parts): Remove this function.
13016 2011-08-01 Geert Bosch <bosch@adacore.com>
13018 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
13019 "," in choice list.
13021 2011-08-01 Thomas Quinot <quinot@adacore.com>
13023 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
13024 explicit raise of a predefined exception as Comes_From_Source if the
13025 original N_Raise_Statement comes from source.
13027 2011-08-01 Robert Dewar <dewar@adacore.com>
13029 * sinfo.ads: Add comment.
13030 * sem_ch6.adb: Minor reformatting.
13032 2011-08-01 Robert Dewar <dewar@adacore.com>
13034 * freeze.adb (Freeze_Entity): Refine check for bad component size
13035 clause to avoid rejecting confirming clause when atomic/aliased present.
13037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13039 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
13040 better determine whether an entity reference is a write.
13041 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
13043 * lib-xref.adb (Output_References): Do no suppress a read reference at
13044 the same location as an immediately preceeding modify-reference, to
13045 handle properly in-out actuals.
13047 2011-08-01 Tristan Gingold <gingold@adacore.com>
13049 * env.c (__gnat_setenv) [VMS]: Refine previous change.
13051 2011-08-01 Quentin Ochem <ochem@adacore.com>
13053 * i-cstrin.adb (New_String): Changed implementation, now uses only the
13054 heap to compute the result.
13056 2011-08-01 Robert Dewar <dewar@adacore.com>
13058 * atree.ads: Minor reformatting.
13060 2011-08-01 Emmanuel Briot <briot@adacore.com>
13062 * g-expect.adb (Get_Command_Output): Fix memory leak.
13064 2011-08-01 Geert Bosch <bosch@adacore.com>
13066 * cstand.adb (P_Float_Type): New procedure to print the definition of
13067 predefined fpt types.
13068 (P_Mixed_Name): New procedure to print a name using mixed case
13069 (Print_Standard): Use P_Float_Type for printing floating point types
13070 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
13071 precision IEEE float.
13073 2011-08-01 Thomas Quinot <quinot@adacore.com>
13075 * sem_ch3.adb: Minor reformatting.
13077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13079 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
13080 the completion of a generic function, insert the new body rather than
13081 rewriting the original.
13083 2011-08-01 Yannick Moy <moy@adacore.com>
13085 * sinfo.ads, errout.ads: Typos in comments.
13087 2011-08-01 Robert Dewar <dewar@adacore.com>
13089 * par-endh.adb: Minor reformatting.
13091 2011-08-01 Robert Dewar <dewar@adacore.com>
13093 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
13094 (Pre_Post_Aspects): New subtype.
13095 * par-ch12.adb (P_Generic): New syntax for aspects in packages
13096 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
13097 * par-ch7.adb (P_Package): Remove Decl parameter
13098 (P_Package): Handle new syntax for aspects (before IS)
13099 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
13101 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
13102 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
13103 (P_Package): Remove Decl parameter
13104 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
13106 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
13108 * sem_util.ads, sem_util.adb (Static_Boolean): New function
13109 * sinfo.ads: Document new syntax for aspects in packages etc.
13110 * sprint.adb: Handle new syntax of aspects before IS in package
13112 2011-08-01 Thomas Quinot <quinot@adacore.com>
13114 * atree.ads: Minor reformatting.
13115 * sem_prag.adb: Minor reformatting.
13117 2011-08-01 Robert Dewar <dewar@adacore.com>
13119 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
13120 case expr alternative.
13122 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13124 * sem_ch12.adb: Fix typo.
13126 2011-08-01 Geert Bosch <bosch@adacore.com>
13128 * sem_prag.adb (Check_No_Link_Name): New procedure.
13129 (Process_Import_Or_Interface): Use Check_No_Link_Name.
13130 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
13131 instead of Standard_Long_Long_Float_Size global. Preparation for
13132 eventual removal of per type constants.
13133 * exp_util.ads (Get_Stream_Size): New function returning the stream
13134 size value of subtype E.
13135 * exp_util.adb (Get_Stream_Size): Implement new function.
13136 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
13138 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
13140 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
13142 2011-08-01 Geert Bosch <bosch@adacore.com>
13144 * cstand.adb: Fix comments.
13145 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
13146 count of arguments.
13148 2011-08-01 Robert Dewar <dewar@adacore.com>
13150 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
13152 2011-08-01 Geert Bosch <bosch@adacore.com>
13154 * atree.ads: Fix comment.
13156 2011-08-01 Robert Dewar <dewar@adacore.com>
13158 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
13159 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
13160 * par.adb: Add with for Namet.Sp.
13161 * par-tchk.adb: Minor reformatting.
13163 2011-08-01 Vincent Celier <celier@adacore.com>
13165 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
13166 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
13167 of the init procedure of a SAL.
13168 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
13171 2011-08-01 Thomas Quinot <quinot@adacore.com>
13173 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
13176 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
13178 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
13180 2011-08-01 Thomas Quinot <quinot@adacore.com>
13182 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
13183 conformant with its spec (return True only for types that have
13184 an overriding Initialize primitive operation that prevents them from
13185 having preelaborable initialization).
13186 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
13187 initialization for controlled types in Ada 2005 or later mode.
13189 2011-08-01 Robert Dewar <dewar@adacore.com>
13191 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
13193 (Same_Aspect): New function.
13194 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
13195 Type_Invariant, Precondition, Postcondition.
13196 * snames.ads-tmpl: Add Name_Type_Invariant.
13198 2011-08-01 Robert Dewar <dewar@adacore.com>
13200 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
13202 (Freeze_All_Ent): Fix error in handling inherited aspects.
13203 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
13204 already analyzed, but don't skip entire processing of a declaration,
13205 that's wrong in some cases of declarations being rewritten.
13206 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
13207 Don't delay for integer, string literals
13208 Treat predicates in usual manner for delay, remove special case code,
13210 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
13211 (Build_Predicate_Function): Update saved expression in aspect
13212 (Build_Invariant_Procedure): Update saved expression in aspect
13213 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
13214 of replacement of discriminant references if the reference is simple.
13216 2011-08-01 Robert Dewar <dewar@adacore.com>
13218 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
13219 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
13220 Static_Predicate and Dynamic_Predicate.
13221 (Build_Predicate_Function): Add processing for Static_Predicate
13222 and Dynamic_Predicate.
13223 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
13224 (From_Static_Predicate): New flag
13225 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
13227 2011-08-01 Robert Dewar <dewar@adacore.com>
13229 * usage.adb: Documentation cleanup for Ada version modes in usage.
13230 * expander.adb: Minor reformatting.
13232 2011-08-01 Robert Dewar <dewar@adacore.com>
13234 * atree.ads: Minor comment fix.
13235 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
13236 a-witeio.ads, sem_prag.adb: Minor reformatting.
13238 2011-08-01 Doug Rupp <rupp@adacore.com>
13240 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
13241 pointers. Use descrip.h header file for convenience. Add some
13244 2011-08-01 Robert Dewar <dewar@adacore.com>
13246 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
13247 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
13248 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
13250 (Check_Aspect_At_End_Of_Declarations): New procedure
13251 (Analye_Aspect_Specification): Minor changes for above procedures
13252 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
13253 specification node as well.
13255 2011-08-01 Pascal Obry <obry@adacore.com>
13257 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
13258 Windows files. Use GetFilesAttributes() in this case to check for file
13259 existence instead of returning with an error code.
13261 2011-08-01 Vincent Celier <celier@adacore.com>
13263 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
13264 High is above Source length.
13266 2011-08-01 Robert Dewar <dewar@adacore.com>
13268 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
13270 2011-08-01 Robert Dewar <dewar@adacore.com>
13272 * aspects.ads (Boolean_Aspects): New subtype.
13273 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
13274 for derived types in cases where the parent type and derived type have
13276 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
13277 with aspects when parent type also has aspects.
13278 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
13279 boolean expression at this point).
13280 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
13281 accordance with final decision on the Ada 2012 feature.
13282 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
13284 2011-08-01 Matthew Heaney <heaney@adacore.com>
13286 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
13288 2011-08-01 Pascal Obry <obry@adacore.com>
13290 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
13291 Fix Replace_Slice when High is above current string size.
13292 (Replace_Slice): Fix DL computation when High is above current
13295 2011-08-01 Gary Dismukes <dismukes@adacore.com>
13297 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
13299 2011-08-01 Matthew Heaney <heaney@adacore.com>
13301 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
13304 2011-08-01 Pascal Obry <obry@adacore.com>
13306 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
13309 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13311 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
13312 access to protected subprograms in generic bodies.
13313 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
13314 protected type, indicate that the convention of the subprogram is
13315 Convention_Protected, because it may be used in subsequent declarations
13316 within the protected declaration.
13318 2011-08-01 Vincent Celier <celier@adacore.com>
13320 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
13321 and "final" procedures when the name of the library is "ada", to avoid
13322 duplicate symbols "adainit" and "adafinal" in executables.
13324 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13326 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
13327 quantified expression that appears within a postcondition and uses the
13328 Ada2012 'Result attribute.
13330 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13332 * init.c (__gnat_error_handler): Cast reason to int.
13333 (__gnat_install_handler): Explain sa_sigaction use.
13335 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13337 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
13338 subprogram has copy-in copy-out parameters, try to promote the mode of
13339 the return type if it is passed in registers.
13341 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13343 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
13344 left operand as addressable.
13346 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
13348 * gcc-interface/gigi.h (build_function_stub): Remove.
13349 (build_return_expr): Likewise.
13350 (convert_vms_descriptor): Declare.
13351 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
13352 (build_function_stub): Move to...
13353 * gcc-interface/utils2.c (build_return_expr): Move to...
13354 * gcc-interface/trans.c (build_function_stub): ...here.
13355 (build_return_expr): ...here.
13356 (Subprogram_Body_to_gnu): Add local variable for language_function.
13357 Disconnect the parameter attributes cache, if any, once done with it.
13358 Call end_subprog_body only after setting the end_locus.
13359 Build the stub associated with the function, if any, at the very end.
13360 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
13361 variables and streamline control flow.
13363 2011-07-23 Arnaud Charlet <charlet@adacore.com>
13366 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
13367 g-trasym-dwarf.adb.
13369 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13372 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
13373 Assign to act.sa_sigaction.
13374 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
13375 current->return_address to char * before arithmetic.
13377 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13379 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
13380 Correct argument types.
13381 Extract code from reason.
13382 (__gnat_install_handler): Assign to act.sa_sigaction.
13384 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
13386 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
13387 (GNAT1_OBJS): ...here.
13389 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
13392 * g-socthi-mingw.adb (Fill): Fix formatting.
13394 * gcc-interface/gigi.h: Move around comment.
13396 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
13399 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
13401 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
13404 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
13406 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
13408 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
13409 range comparison if Pmode is SImode.
13411 2011-07-12 Laurent GUERBY <laurent@guerby.net>
13412 Eric Botcazou <ebotcazou@adacore.com>
13414 * adadecode.c: Wrap up in extern "C" block.
13415 * adadecode.h: Likewise.
13416 * adaint.c: Likewise. Remove 'const' keyword.
13417 * adaint.h: Likewise.
13418 * argv.c: Likewise.
13419 * atree.h: Likewise.
13421 * cstreams.c: Likewise.
13423 * exit.c: Likewise.
13425 * final.c: Likewise.
13426 * init.c: Likewise.
13427 * initialize.c: Likewise.
13428 * link.c: Likewise.
13429 * namet.h: Likewise.
13430 * nlists.h: Likewise.
13431 * raise.c: Likewise.
13432 * raise.h: Likewise.
13433 * repinfo.h: Likewise.
13434 * seh_init.c: Likewise.
13435 * targext.c: Likewise.
13436 * tracebak.c: Likewise.
13437 * uintp.h: Likewise.
13438 * urealp.h: Likewise.
13439 * xeinfo.adb: Wrap up generated C code in extern "C" block.
13440 * xsinfo.adb: Likewise.
13441 * xsnamest.adb: Likewise.
13442 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
13443 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
13444 * gcc-interface/misc.c: Likewise.
13445 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
13446 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
13447 ada/targext.o here...
13448 (GNAT_ADA_OBJS): ...and not here.
13449 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
13450 (GNATBIND_OBJS): Reorder.
13452 2011-07-07 Richard Henderson <rth@redhat.com>
13454 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
13455 dwarf2out_frame_init.
13457 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
13459 * gcc-interface/misc.c (gnat_init): Tweak previous change.
13461 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13464 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
13466 2011-07-06 Richard Guenther <rguenther@suse.de>
13468 * gcc-interface/misc.c (gnat_init): Merge calls to
13469 build_common_tree_nodes and build_common_tree_nodes_2.
13470 Re-initialize boolean_false_node.
13472 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
13473 Olivier Hainque <hainque@adacore.com>
13474 Nicolas Setton <setton@adacore.com>
13476 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
13477 the type according to the ARTIFICIAL_P parameter.
13478 (create_type_decl): Likewise.
13479 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
13481 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
13483 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
13484 (gnatbind): Likewise.
13486 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13488 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
13490 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13492 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
13493 local variable throughout. Remove useless call to Base_Type.
13494 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
13495 Take it also into account for the volatileness of the field. Set the
13496 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
13498 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13500 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
13501 on a dereference built for a by-ref object if it has an address clause.
13503 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
13505 * einfo.ads (Address_Taken): Document use for the second argument of
13506 Asm_Input and Asm_Output attributes.
13507 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
13508 argument is an entity name, then set Address_Taken on it.
13509 <Attribute_Asm_Output>: Likewise.
13510 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
13511 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
13512 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
13513 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
13515 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
13517 PR middle-end/46500
13518 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
13520 2011-06-14 Joseph Myers <joseph@codesourcery.com>
13522 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
13523 (ada/utils.o): Update dependencies.
13524 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
13525 ../../../libcpp/libcpp.a.
13526 * gcc-interface/utils.c: Include common/common-target.h.
13527 (process_attributes): Use targetm_common.have_named_sections.
13529 2011-06-07 Richard Guenther <rguenther@suse.de>
13531 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
13534 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13536 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
13537 TREE_THIS_NOTRAP flag.
13539 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13541 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
13544 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13546 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
13547 constants whose full view has discriminants specially.
13549 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
13551 * gcc-interface/utils.c: Include diagnostic.h.
13552 (gnat_write_global_declarations): Output debug information for all
13553 global type declarations before finalizing the compilation unit.
13554 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
13556 2011-05-25 Jakub Jelinek <jakub@redhat.com>
13558 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
13560 2011-05-25 Kai Tietz <ktietz@redhat.com>
13562 * adaint.c (__gnat_to_canonical_file_list_next): Use array
13563 initialization instead of const/none-const pointer assignment.
13565 2011-05-24 Joseph Myers <joseph@codesourcery.com>
13567 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
13568 $(EXTRA_GNAT1_OBJS).
13569 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
13570 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
13571 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
13572 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
13573 libcommon-target.a instead of prefix.o.
13575 2011-05-21 Joseph Myers <joseph@codesourcery.com>
13578 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
13580 2011-05-20 Joseph Myers <joseph@codesourcery.com>
13582 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
13583 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
13584 instead of version.o.
13586 2011-05-18 Kai Tietz <ktietz@redhat.com>
13588 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
13589 boolean_false_node instead of integer_zero_node.
13590 (convert_with_check): Likewise.
13591 * gcc-interface/decl.c (choices_to_gnu): Likewise.
13593 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
13595 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
13596 type of the parameter is an unconstrained array, convert the actual to
13597 the type of the formal in the In Out and Out cases as well.
13599 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13601 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
13602 call build_function_type_array or build_varargs_function_type_array
13604 (create_subprog_type): Don't call build_function_type; call
13605 build_function_type_vec instead.
13607 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
13609 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
13610 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
13611 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
13613 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
13615 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
13617 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
13618 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
13620 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13622 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
13624 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
13626 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
13627 instead of accessing TYPE_ARG_TYPES directly.
13628 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
13630 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13633 * gcc-interface/gigi.h (get_variant_part): Declare.
13634 * gcc-interface/decl.c (get_variant_part): Make global.
13635 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
13636 types have the same constant size, are record types and T1 has a
13637 variant part while T2 doesn't.
13639 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
13641 * gcc-interface/utils.c (begin_subprog_body): Do not call
13643 (end_subprog_body): Likewise.
13645 2011-05-04 Richard Guenther <rguenther@suse.de>
13647 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
13649 (pos_to_constructor): Likewise.
13651 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
13652 Eric Botcazou <ebotcazou@adacore.com>
13654 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
13655 of build_function_type. Adjust calls to...
13656 (build_raise_check): ...this. Do not take a void_tree parameter.
13657 Call build_function_type_list instead of build_function_type.
13658 Fix head comment and swap couple of conditional blocks.
13660 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
13662 * gnatvsn.ads (Library_Version): Bump to 4.7.
13663 (Current_Year): Bump to 2011.
13665 2011-04-29 Michael Matz <matz@suse.de>
13667 * gcc-interface/misc.c (gnat_handle_option): Set
13668 warn_maybe_uninitialized.
13670 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
13672 * gnat_ugn.texi (Complexity Metrics Control): Update link to
13673 the Watson/McCabe paper.
13675 2011-04-23 Jim Meyering <meyering@redhat.com>
13677 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
13679 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13681 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
13684 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
13686 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
13688 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
13689 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
13690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
13691 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
13692 <all>: Do not set flags on the reused DECL node coming from an alias.
13693 Set DECL_IGNORED_P on the DECL node built for subprograms if they
13694 don't need debug info here...
13695 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
13696 (gigi): Adjust calls to create_subprog_decl.
13697 (build_raise_check): Likewise.
13698 (establish_gnat_vms_condition_handler): Likewise.
13699 (Compilation_Unit_to_gnu): Likewise.
13700 (gnat_to_gnu): Likewise.
13702 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
13704 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
13705 (NO_REORDER_ADAFLAGS): New variable.
13706 (EXTRA_GNATTOOLS): Always define.
13707 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
13708 Clean up and adjust list of files compiled with special options.
13709 * gcc-interface/Make-lang.in: Likewise.
13710 (ada/decl.o): Cosmetical change.
13711 (ada/misc.o): Remove dependency on $(PLUGIN_H).
13713 2011-04-20 Jim Meyering <meyering@redhat.com>
13715 * initialize.c (__gnat_initialize): Remove useless if-before-free.
13717 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13719 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
13720 $(CFLAGS) on the link line.
13722 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
13724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
13725 padded type built for the return type if it is unconstrained.
13727 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
13729 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
13731 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
13733 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
13734 before calling TREE_CHAIN.
13735 * gcc-interface/misc.c (gnat_init_ts): New function.
13736 (LANG_HOOKS_INIT_TS): Define.
13738 2011-04-12 Martin Jambor <mjambor@suse.cz>
13740 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
13741 instead of cgraph_node.
13743 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13745 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
13746 alignment on fields of the RETURN type built for the Copy-In Copy-Out
13749 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
13751 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
13752 of aggregate types that contain a placeholder.
13754 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
13756 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
13758 (handle_type_generic_attribute): Likewise.
13760 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
13763 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
13765 2011-04-04 Kai Tietz <ktietz@redhat.com>
13768 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
13771 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13773 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
13774 type case, do not strip a padding type around the array type.
13776 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13778 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
13781 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13783 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
13784 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
13785 code for -feliminate-unused-debug-types.
13786 (gnat_post_options): Likewise.
13788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13790 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13791 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
13794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13796 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
13797 DECL_ARTIFICIAL flag on enumeration types.
13799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13801 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
13802 fat pointer types artificial unconditionally.
13803 <E_Array_Subtype>: Attach the base array type as a parallel type if it
13806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13808 * gcc-interface/gigi.h (get_dummy_type): Declare.
13809 (build_dummy_unc_pointer_types): Likewise.
13810 (finish_fat_pointer_type): Likewise.
13811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
13812 fat pointer type has been built, complete it in place.
13813 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
13814 and thin pointers. Remove useless variable.
13815 (finish_fat_pointer_type): Make global and move to...
13816 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
13817 (get_dummy_type): New function.
13818 (build_dummy_unc_pointer_types): Likewise.
13819 (gnat_pushdecl): Propage the name to the anonymous variants only.
13820 (update_pointer_to): Only adjust the pointer types in the unconstrained
13823 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13825 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
13826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
13827 if this is a Taft amendment type and the full declaration is available.
13828 * gcc-interface/trans.c (process_type): Likewise.
13829 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
13830 (process_freeze_entity): Likewise.
13831 * gcc-interface/utils.c (dummy_global): New static variable.
13832 (gnat_write_global_declarations): If there are types declared as used
13833 at the global level, insert them in the global hash table.
13835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13837 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
13838 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
13839 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
13841 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
13842 flag of the type accordingly.
13843 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
13845 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
13847 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13848 finalizing types when updating the pointers to the designated type.
13849 <all>: Finalize the deferred types even if we didn't defer processing
13850 of incomplete types in this invocation.
13852 2011-04-01 Olivier Hainque <hainque@adacore.com>
13853 Nicolas Setton <setton@adacore.com>
13854 Eric Botcazou <ebotcazou@adacore.com>
13856 * gcc-interface/misc.c (gnat_descriptive_type): New function.
13857 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
13859 2011-03-28 Kai Tietz <ktietz@redhat.com>
13861 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
13863 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
13864 * system-mingw.ads (System): Change ZCX_By_Default default to True.
13866 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
13868 2011-03-28 Tristan Gingold <gingold@adacore.com>
13871 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
13872 Use ada output of gnatbind.
13873 (ada/b_gnatb.adb): Ditto.
13874 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
13875 (ada.mostlyclean, ada.stage1)
13876 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
13877 (ada.stagefeedback): Adjust.
13878 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
13879 Use ada output of gnatbind.
13880 (b_gnatm.adb): Ditto.
13881 (b_gnatl.o, b_gnatm.o): New rules.
13883 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13885 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13886 for the padded type built to support a specified size or alignment.
13888 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13890 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
13891 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
13892 unconditionally to the end of the unit when the designated type is
13894 <all>: Rename local variable. Attempt to un-defer types only and do it
13895 for limited_with'ed types as well.
13896 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
13897 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
13898 consistently and remove redundant call to finalize_from_with_types.
13900 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
13902 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
13903 subprograms without a previous spec declared in the same unit.
13904 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
13905 subprograms at the end of the unit instead of at the beginning.
13906 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
13907 isn't public for the special handling of non-inline functions nested
13908 inside inline external functions.
13910 2011-03-25 Jeff Law <law@redhat.com>
13912 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
13914 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13916 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
13917 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
13918 to compute Set_Size_Depends_On_Discriminant.
13919 (Layout_Type): Call it on array types in back-end layout mode.
13920 * sem_util.adb (Requires_Transient_Scope): Return true for array
13921 types only if the size depends on the value of discriminants.
13922 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
13923 type if the RHS is a call to a function that returns an unconstrained
13924 type with default discriminant.
13926 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
13928 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
13929 non-conversion to the nominal result type at the end.
13931 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13933 * gcc-interface/trans.c (create_temporary): New function taken from...
13934 (create_init_temporary): ...here. Call it.
13935 (call_to_gnu): Create the temporary for the return value early, if any.
13936 Create it for a function with copy-in/copy-out parameters if there is
13937 no target; in other cases of copy-in/copy-out, use another temporary.
13938 Push the new binding level lazily. Add and rename local variables.
13940 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13942 * gcc-interface/decl.c (validate_size): Improve comments and tweak
13944 (set_rm_size): Likewise.
13946 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
13948 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
13949 for the padded type built in order to support a specified alignment.
13950 Fix incorrect formatting.
13952 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13955 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
13957 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13959 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
13960 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
13961 to the end of the list. Adjust recursive call. Rename local variable.
13962 If REORDER is true, reorder components of the record type.
13963 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
13964 components_to_record and adjust the parameter list.
13966 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
13968 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
13969 disabled, use the variable for bounds of loop iteration scheme.
13971 2011-03-21 Kai Tietz <ktietz@redhat.com>
13974 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
13976 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13978 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
13979 out whether the expression is read-only. Short-circuit placeholder
13980 case and rename a couple of local variables.
13982 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
13984 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
13985 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
13986 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
13987 (convert): Deal with conversions from a smaller form type specially.
13989 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
13991 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
13992 its argument, except for the special -I- switch.
13994 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
13996 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
13999 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
14001 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
14003 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
14005 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
14007 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
14008 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
14009 instead of GNAT_FORMAL. Protect the expression against multiple uses.
14010 Do not generate the check directly, instead instantiate the template
14011 check present in the descriptor.
14012 (make_descriptor_field): Move around.
14013 (build_vms_descriptor32): Build a template check in the POINTER field.
14014 (build_vms_descriptor): Remove useless suffixes.
14015 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
14017 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
14020 * targext.c: Include target files if IN_RTS is defined.
14022 2011-01-26 Richard Guenther <rguenther@suse.de>
14025 * targext.c: Include config.h.
14026 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
14029 2011-01-04 Pascal Obry <obry@adacore.com>
14030 Eric Botcazou <ebotcazou@adacore.com>
14032 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
14034 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14036 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
14037 end-of-case on the end label and its associated gotos, if any.
14039 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14041 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
14042 expressions of the parameter cache within the statement group of
14043 the CICO mechanism.
14045 2011-01-04 Olivier Hainque <hainque@adacore.com>
14046 Eric Botcazou <ebotcazou@adacore.com>
14048 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
14049 (set_end_locus_from_node): New function.
14050 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
14051 make and the function end_locus.
14052 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
14053 for the elaboration subprogram.
14054 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
14055 set the end_locus of the expression as well.
14057 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
14060 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
14061 variables that are referenced in exception handlers volatile.
14065 Copyright (C) 2011 Free Software Foundation, Inc.
14067 Copying and distribution of this file, with or without modification,
14068 are permitted in any medium without royalty provided the copyright
14069 notice and this notice are preserved.