1 2011-08-30 Yannick Moy <moy@adacore.com>
3 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
4 common shorthand for (Expander_Active and not ALFA_Mode) that can be
5 used for testing full expansion, that is active expansion not in the
7 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
8 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
9 of the verbose (Expander_Active and not ALFA_Mode)
11 2011-08-30 Tristan Gingold <gingold@adacore.com>
13 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
14 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
15 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads: Renames Ratio to
16 Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage.
18 2011-08-30 Gary Dismukes <dismukes@adacore.com>
20 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
21 access conversions to check that the conversion is a rewritten node,
22 rather than just having Comes_From_Source set to False, which wasn't
25 2011-08-30 Robert Dewar <dewar@adacore.com>
27 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
28 g-socket.ads: Minor reformatting.
30 2011-08-30 Thomas Quinot <quinot@adacore.com>
32 * sem_util.adb: Minor reformatting.
34 2011-08-30 Tristan Gingold <gingold@adacore.com>
36 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
37 to be compliant with the ABI.
39 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
41 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
42 of a designated type when the related access type is an actual in an
43 instance. This ensures that the full view of designated type is
44 available when inside the body of the instance.
46 2011-08-30 Ed Schonberg <schonberg@adacore.com>
48 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
49 in a position to be modified, a slice is treated like an indexed
52 2011-08-30 Thomas Quinot <quinot@adacore.com>
54 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
55 field tv_sec in struct timeval.
57 2011-08-30 Yannick Moy <moy@adacore.com>
59 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
60 blocks of code doing full expansion, previously only guarded by
61 Expander_Active, by anding the test that ALFA_Mode is not set
63 2011-08-30 Ed Schonberg <schonberg@adacore.com>
65 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
66 add the function to the list of private dependents, for subsequent
67 legality check on Taft amendment types.
68 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
69 Private_Dependents, as for other incomplete types.
70 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
71 Taft-amendment type is used as the return type of a function.
73 2011-08-30 Javier Miranda <miranda@adacore.com>
75 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
76 which emits an error by a call to a new routine which report the error.
77 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
78 entity does not cover an existing interface.
79 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
81 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
82 protected procedures or entries whose mode is not conformant.
83 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
84 an error by a call to a new routine which report the error.
86 2011-08-30 Robert Dewar <dewar@adacore.com>
88 * gnat_rm.texi: Minor change.
89 * exp_attr_light.adb: Minor reformatting.
91 2011-08-30 Ed Schonberg <schonberg@adacore.com>
93 * sem_ch3.adb: Patch inheritance of aspects in
94 Complete_Private_Subtype, to avoid infinite loop.
96 2011-08-30 Javier Miranda <miranda@adacore.com>
98 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
99 been reported and a subprogram covering an interface primitive is not
100 found then skip generating the internal entity. Done to avoid crashing
102 (Check_Abstract_Overriding): Change text of error of wrong formal of
103 protected subprogram or entry. Done for consistency to emit exactly the
104 same error reported by Check_Synchronized_Overriding. In addition, the
105 error is restricted to protected types (bug found working on AI05-0090)
107 2011-08-30 Yannick Moy <moy@adacore.com>
109 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
110 expansion in Alfa mode.
111 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
112 * exp_light.adb, exp_light.ads: New package defining light expansion.
113 * expander.adb (Expand): Call light expansion in Alfa mode
114 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
116 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
118 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
119 * gnat1drv.adb (Adjust_Global_Switches): Comment
121 2011-08-30 Yannick Moy <moy@adacore.com>
123 * lib-xref-alfa.adb: Minor refactoring.
125 2011-08-30 Yannick Moy <moy@adacore.com>
127 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
129 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
130 expansion in Alfa mode.
131 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
134 2011-08-30 Robert Dewar <dewar@adacore.com>
136 * debug_a.adb: Update comment.
138 2011-08-30 Robert Dewar <dewar@adacore.com>
140 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
141 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
142 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
143 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
145 2011-08-30 Robert Dewar <dewar@adacore.com>
147 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
150 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
152 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
153 Build_Finalization_Master by supplying an insertion node and enclosing
154 scope. In its old version, the call did not generate a finalization
156 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
157 recognize anonymous access-to-controlled components. Rewrite the
158 machinery which creates finalization masters to service anonymous
159 access-to-controlled components of a record type. In its current state,
160 only one heterogeneous master is necessary to handle multiple anonymous
162 (Freeze_Type): Comment reformatting.
163 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
165 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
166 associates TSS primitive Finalize_Address with either the master itself
167 or with the internal hash table depending on the mode of operation of
170 2011-08-30 Javier Miranda <miranda@adacore.com>
172 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
173 interface type then do not generate code to compare this component.
174 Required since they have no components and their equality operator is
177 2011-08-30 Steve Baird <baird@adacore.com>
179 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
180 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
181 returns the (static) accessibility level of the object. Otherwise, the
182 same as Type_Access_Level.
183 (Dynamic_Accessibility_Level): New function; given an expression which
184 could occur as the rhs of an assignment to a saooaaat (i.e., an
185 expression of an access-to-object type), return the new value for the
186 saooaaat's associated Extra_Accessibility object.
187 (Effective_Extra_Accessibility): New function; same as
188 Einfo.Extra_Accessibility except that object renames are looked through.
190 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
191 (Dynamic_Accessibility_Level): New function; see sem_util.ads
193 (Effective_Extra_Accessibility): New function; see sem_util.ads
195 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
196 (Extra_Accessibility): Update comments.
197 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
198 except RM_Size field (which is only for types) is unaffected.
200 (Extra_Accessibility): Expand domain to allow objects, not just formals.
201 (Set_Extra_Accessibility): Expand domain to allow objects, not just
203 (Init_Size): Add assertion that we are not trashing the
204 Extra_Accessibility attribute of an object.
205 (Init_Size_Align): Add assertion that we are not trashing the
206 Extra_Accessibility attribute of an object.
207 (Init_Object_Size_Align): New procedure; see einfo.ads description.
208 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
209 differently for the type of a (non-library-level) saooaaat depending
210 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
211 is queried in this set of changes - everything else (in particular,
212 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
213 driven off of the setting of the Is_Local_Anonymous_Access attribute.
214 The special treatment of library-level saooaaats is an optimization,
215 not required for correctnesss. This is based on the observation that the
216 Ada2012 rules (static and dynamic) for saooaaats turn out to be
217 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
219 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
220 false for the type of a saooaaat, declare and initialize its
221 accessibility level object and set the Extra_Accessibility attribute
222 of the saooaaat to refer to this object.
223 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
224 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
225 calls to Effective_Extra_Accessibility in order to support
226 renames of saooaaats.
227 (Expand_N_Type_Conversion): Add new local function,
228 Has_Extra_Accessibility, and call it when determining whether an
229 accessibility check is needed.
230 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
231 evaluate to True (without raising an exception).
233 (Expand_N_Assignment_Statement): When assigning to an Ada2012
234 saooaaat, update its associated Extra_Accessibility object (if
235 it has one). This includes an accessibility check.
236 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
237 a saooaaat, update its Extra_Accessibility object too (if it
239 (Expand_Call): Replace a couple of calls to Type_Access_Level
240 with calls to Dynamic_Access_Level to handle cases where
241 passing a literal (any literal) is incorrect.
242 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
243 checks associated with "Saooaat := Some_Object'Access;"; this must
244 be rejected if Some_Object is declared in a more nested scope
246 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
247 assignment to a saooaaat even if Is_Local_Anonymous_Access
248 returns False for its type (indicating a 2012-style saooaaat).
250 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
251 (which is only appropriate for objects, not types) with a call
252 of Init_Object_Size_Align in order to avoid trashing the
253 Extra_Accessibility attribute of a rename (the two attributes
256 (Valid_Conversion) Replace six calls to Type_Access_Level with
257 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
258 Ada2012 non-library-level saooaaat, the former returns library level
259 while the latter returns the (static) accessibility level of the
260 saooaaat. A type conversion to the anonymous type of a saooaaat
261 can only occur as part of an assignment to the saooaaat, so we
262 know that such a conversion must be in a lhs context, so Deepest
263 yields the result that we need. If such a conversion could occur,
264 say, as the operand of an equality operator, then this might not
265 be right. Also add a test so that static accessibilty checks are
266 performed for converting to a saooaaat's type even if
267 Is_Local_Anonymous_Access yields False for the type.
269 2011-08-30 Javier Miranda <miranda@adacore.com>
271 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
272 controls generation of a warning associated with late declaration of
273 dispatching functions. Required to avoid generating spurious
276 2011-08-30 Gary Dismukes <dismukes@adacore.com>
278 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
279 return object has an anonymous access type and the function's type is
281 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
282 conversions on implicit conversions, since such conversions can occur
283 for anonymous access cases due to expansion. Issue error for attempt
284 to rename an anonymous expression as an object of a named access type.
285 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
286 to indicate whether this function should report errors on invalid
288 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
289 the expression is of an anonymous access type and the expected type is
290 a named general access type, rewrite the expression as a type
291 conversion, unless this is an expression of a membership test.
292 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
293 calling of Error_Msg_N on new formal Report_Errs.
294 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
295 calling of Error_Msg_NE on new formal Report_Errs.
296 (Valid_Conversion): Move declaration of this function to the package
297 spec, to allow calls from membership test processing. For Ada 2012,
298 enforce legality restrictions on implicit conversions of anonymous
299 access values to general access types, disallowing such conversions in
300 cases where the expression has a dynamic accessibility level (access
301 parameters, stand-alone anonymous access objects, or a component of a
302 dereference of one of the first two cases).
303 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
304 in the context of a named general access expected type.
305 * exp_ch4.adb Add with and use of Exp_Ch2.
306 (Expand_N_In): Add processing for membership tests applied to
307 expressions of an anonymous access type. First, Valid_Conversion is
308 called to check whether the test is statically False, and then the
309 conversion is expanded to test that the expression's accessibility
310 level is no deeper than that of the tested type. In the case of
311 anonymous access-to-tagged types, a tagged membership test is applied
313 (Tagged_Membership): Extend to handle access type cases, applying the
314 test to the designated types.
315 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
316 accessibility level, and the actual is a 'Access applied to a current
317 instance, pass the accessibility level of the type of the current
318 instance rather than applying Object_Access_Level to the prefix. Add a
319 ??? comment, since this level isn't quite right either (will eventually
320 need to pass an implicit level parameter to init procs).
322 2011-08-30 Bob Duff <duff@adacore.com>
324 * s-taskin.ads: Minor comment fix.
326 2011-08-30 Ed Schonberg <schonberg@adacore.com>
328 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
329 component and the selector is a dispatching operation, check if it is
330 a prefixed call before rewriting as a parameterless function call.
332 2011-08-29 Jakub Jelinek <jakub@redhat.com>
334 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
335 tsystem.h into $(RTSDIR) instead of rts.
337 2011-08-29 Robert Dewar <dewar@adacore.com>
339 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
341 * gcc-interface/Make-lang.in: Update dependencies.
343 2011-08-29 Yannick Moy <moy@adacore.com>
345 * alfa.ads (Name_Of_Heap_Variable): New constant name.
346 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
347 table to hold dereferences.
348 (Add_ALFA_Xrefs): Take into account dereferences as special
349 reads/writes to the variable "HEAP".
350 (Enclosing_Subprogram_Or_Package): Move subprogram here.
351 (Generate_Dereference): New procedure to store a read/write dereferencew
353 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
354 the special "HEAP" var.
355 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
357 * sem_util.adb (Note_Possible_Modification): Store write dereference
360 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
362 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
363 ensures that the level of the subpool access type is not deeper than
364 that of the pool object.
365 * sem_util.adb (Object_Access_Level): Expand to handle defining
367 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
368 subpool handle name of a rewritten allocator.
370 2011-08-29 Robert Dewar <dewar@adacore.com>
372 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
374 2011-08-29 Thomas Quinot <quinot@adacore.com>
376 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
377 values, we generate multiple triples of parameters in the TypeCode.
378 Bump Choice_Index for each such triple so that a subsequent default
379 choice is associated with the correct index in the typecode.
381 2011-08-29 Ed Schonberg <schonberg@adacore.com>
383 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
385 (First, Last): Handle properly an iterator over a null container.
387 2011-08-29 Bob Duff <duff@adacore.com>
389 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
390 processing if we run across a node with no Scope. This can happen if
391 we're with-ing an library-level instance, and that instance got errors
392 that caused "instantiation abandoned".
393 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
394 an exception instead of using Assert, so it won't go into an infinite
395 loop, even when assertions are turned off.
397 2011-08-29 Ed Schonberg <schonberg@adacore.com>
399 * a-coorse.adb: Proper handling of empty ordered sets.
401 2011-08-29 Johannes Kanig <kanig@adacore.com>
403 * debug.adb: Add comments.
405 2011-08-29 Thomas Quinot <quinot@adacore.com>
407 * a-except.adb, a-except-2005.adb: Minor comment rewording and
410 2011-08-29 Yannick Moy <moy@adacore.com>
412 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
413 declaration for Itypes in Alfa mode.
415 2011-08-29 Robert Dewar <dewar@adacore.com>
417 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
418 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
419 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
422 2011-08-29 Tristan Gingold <gingold@adacore.com>
424 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
426 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
427 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
430 2011-08-29 Robert Dewar <dewar@adacore.com>
432 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
434 2011-08-29 Javier Miranda <miranda@adacore.com>
436 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
437 renamings of formal subprograms when the actual for a formal type is
440 2011-08-29 Matthew Heaney <heaney@adacore.com>
442 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
445 2011-08-29 Matthew Heaney <heaney@adacore.com>
447 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
448 components of record type.
449 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
452 2011-08-29 Ed Schonberg <schonberg@adacore.com>
454 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
455 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
458 2011-08-29 Robert Dewar <dewar@adacore.com>
460 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
463 2011-08-29 Matthew Heaney <heaney@adacore.com>
465 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
466 components of record type.
468 2011-08-29 Bob Duff <duff@adacore.com>
470 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
471 by the termination handler.
473 2011-08-29 Yannick Moy <moy@adacore.com>
475 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
476 created in Alfa mode, instead of inserting artificial declarations of
477 non-Itypes in the tree.
478 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
479 know if an Itype has a corresponding declaration, as defined in
482 2011-08-29 Yannick Moy <moy@adacore.com>
484 * gnat1drv.adb: Minor rewrite.
486 2011-08-29 Bob Duff <duff@adacore.com>
488 * s-tasuti.adb (Make_Passive): Work around race condition in
489 Make_Independent, which can cause Wait_Count to be zero. So instead of
490 asserting that Wait_Count > 0, and then decrementing it, decrement it
491 only if Wait_Count > 0.
492 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
493 should be nonnegative, so declare them Natural instead of Integer.
495 2011-08-29 Robert Dewar <dewar@adacore.com>
497 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
498 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
499 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
500 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
501 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
503 2011-08-29 Tristan Gingold <gingold@adacore.com>
505 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
507 2011-08-29 Vadim Godunko <godunko@adacore.com>
509 * s-parint.ads: Minor comment clarification.
511 2011-08-29 Vincent Celier <celier@adacore.com>
513 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
514 may be used as identifiers.
516 2011-08-29 Ed Schonberg <schonberg@adacore.com>
518 * a-coinho.ads: Minor reformating.
520 2011-08-29 Ed Schonberg <schonberg@adacore.com>
522 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
523 container of a derived type.
525 2011-08-29 Ed Schonberg <schonberg@adacore.com>
527 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
528 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
530 2011-08-29 Pascal Obry <obry@adacore.com>
532 * exp_disp.adb: Minor comment fix.
533 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
534 to avoid warnings when compiling with -Wall.
535 (Make_Disp_Conditional_Select_Body): Likewise.
536 (Make_Disp_Timed_Select_Body): Likewise.
538 2011-08-29 Ed Schonberg <schonberg@adacore.com>
540 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
541 an entity name, generate reference for it.
543 2011-08-29 Ed Schonberg <schonberg@adacore.com>
545 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
547 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
549 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
551 2011-08-29 Ed Schonberg <schonberg@adacore.com>
553 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
554 subtype for an object whose type is an unconstrained union.
556 2011-08-29 Ed Schonberg <schonberg@adacore.com>
558 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
559 is allowed in a component definition, by AI95-406.
561 2011-08-29 Matthew Heaney <heaney@adacore.com>
563 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
565 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
567 * a-except-2005.adb: Alphabetize all routines.
568 (Triggered_By_Abort): New routine.
569 * a-except-2005.ads (Triggered_By_Abort): New routine.
570 * a-except.adb Alphabetize all routines.
571 (Triggered_By_Abort): New routine.
572 * a-except.ads (Triggered_By_Abort): New routine.
573 * exp_ch7.adb: Update all comments involving the detection of aborts in
575 (Build_Object_Declarations): Do not generate code to detect the
576 presence of an abort at the start of finalization code, use a runtime
578 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
580 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
581 allocate a task on a subpool.
582 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
583 The flag disables all actions related to the maintenance of
584 Finalize_Address_Table when subpools are not in use.
585 (Allocate_Any_Controlled): Signal the machinery that subpools are in
587 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
588 performs costly task locking when subpools are not in use.
590 2011-08-29 Yannick Moy <moy@adacore.com>
592 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
593 types and dispatching calls in Alfa mode.
594 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
595 correspondance between body and spec scopes, to reuse utility functions
596 (Traverse_Declarations_Or_Statements): Protect access to body for stub
597 by testing the presence of the library unit for the body
598 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
599 mode the expansion of accept statements is skipped
600 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
601 the unique entity corresponding to the one returned by
602 Unique_Defining_Entity applied to the enclosing declaration of the
605 2011-08-29 Bob Duff <duff@adacore.com>
607 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
608 gdb when x is not a node (it can be a node list, name_id, etc). pp is
609 an alias for pn. ppp is an alias for pt.
611 2011-08-29 Javier Miranda <miranda@adacore.com>
613 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
614 aggregate to take a consistent decision on the need to convert into
615 assignments aggregates that initialize constant objects.
617 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
619 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
620 Build_Allocate_Deallocate_Proc in order to handle allocation of
621 non-controlled objects on subpools.
622 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
623 to be end-user visible.
624 * s-finmas.adb: Add with and use clause for System.HTable.
625 Add an instantiation of Simple_HTable which provides a mapping between
626 the address of a controlled object and the corresponding
627 Finalize_Address used to clean up the object. The table is used when a
628 master is operating in heterogeneous mode.
629 (Attach): Explain why the input node is not verified on being already
631 (Delete_Finalize_Address): New routine.
632 (Detach): Add pragma Assert which ensures that a node is already
634 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
635 since nodes are no longer removed on traversal. Explain why node
636 detachment is undesirable in this case.
637 (Get_Finalize_Address): New routine.
639 (Is_Empty_List): Removed.
640 (pm): Renamed to Print_Master. Add output for discriminant
642 Comment reformatting.
643 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
644 * s-finmas.ads: Various comments additions / improvements.
645 Type Finalization_Master has a discriminant which determines the mode of
647 (Delete_Finalize_Address): New routine.
648 (Get_Finalize_Address): New routine.
649 (pm): Renamed to Print_Master.
650 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
651 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
652 use clause for System.IO.
653 (Allocate_Any_Controlled): Add machinery to set TSS primitive
654 Finalize_Address depending on the mode of allocation and the mode of
656 (Deallocate_Any_Controlled): Remove the relation pair object -
657 Finalize_Address regardless of the master mode. Add comment explaining
659 (Detach): Ensure that fields Prev and Next are null after detachment.
660 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
661 scheme to check whether the list of subpools is empty. There is no
662 longer need to store the next subpool or advance the current pointer.
663 (Is_Empty_List): New routine.
664 (Print_Pool): New routine.
665 (Print_Subpool): New routine.
666 * s-stposu.ads: Various comments additions / improvements.
667 Field Master of type Root_Subpool is now a heterogeneous collection.
668 (Print_Pool): New routine.
669 (Print_Subpool): New routine.
671 2011-08-29 Ed Schonberg <schonberg@adacore.com>
673 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
674 forms, using aspects of container types.
675 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
676 Has_Implicit_Dereference flags, that may be set on the partial view.
677 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
678 container type with an indexing aspect.
679 (Analyze_Quantified_Expression): Analyze construct with expansion
680 disabled, because it will be rewritten as a loop during expansion.
681 (Try_Container_Indexing): The prefix itself may be a container type
682 with an indexing aspect, as with a vector of vectors.
683 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
684 the original doamin of iteration, for name capture.
685 (Analyze_Iterator_Specification): If the domain is an expression that
686 needs finalization, create a separate declaration for it.
687 For an iterator with "of" retrieve default iterator info from aspect of
688 container type. For "in" iterator, retrieve type of Iterate function.
689 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
690 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
691 analysis, to prevent spurious errors about late attributes.
692 * sprint.adb: Handle quantified expression with either loop or iterator
694 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
697 2011-08-29 Vincent Celier <celier@adacore.com>
699 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
700 Binder or Linker of the main project file.
702 2011-08-29 Ed Schonberg <schonberg@adacore.com>
704 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
707 2011-08-29 Yannick Moy <moy@adacore.com>
709 * exp_ch9.adb: Partial revert of previous change for Alfa mode
711 2011-08-29 Yannick Moy <moy@adacore.com>
713 * exp_ch11.adb: Minor expansion of comment.
715 2011-08-29 Yannick Moy <moy@adacore.com>
717 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
719 2011-08-29 Ed Schonberg <schonberg@adacore.com>
721 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
722 interpretation, set the type before resolving the operands, because
723 legality checks on an exponention operand need to know the type of the
726 2011-08-29 Ed Schonberg <schonberg@adacore.com>
728 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
729 cleanups on a master if the instance is within a generic unit.
730 Complement to the corresponding fix to inline.adb for K520-030.
732 2011-08-29 Tristan Gingold <gingold@adacore.com>
734 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
736 * exp_intr.adb: Minor comment fix.
738 2011-08-29 Bob Duff <duff@adacore.com>
740 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
741 Delay_Required was used as an uninitialized variable.
743 2011-08-29 Robert Dewar <dewar@adacore.com>
745 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
746 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
747 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
749 2011-08-29 Thomas Quinot <quinot@adacore.com>
751 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
752 Remove unused variables.
754 2011-08-29 Ed Schonberg <schonberg@adacore.com>
756 * sem_res.adb: Remove Build_Explicit_Dereference.
757 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
758 from sem_res.adb, used in analysis of additional constructs.
759 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
760 expansion of iterators.
761 (Is_Object_Reference): Recognize variables rewritten as explicit
762 dereferences in Ada2012.
763 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
764 Reversible_Iterator names, for expansion of Ada2012 iterators.
765 * aspects.ads, aspects.adb (Find_Aspect): Utility.
766 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
767 linked list container.
768 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
769 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
771 2011-08-29 Ed Schonberg <schonberg@adacore.com>
773 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
776 2011-08-29 Vincent Celier <celier@adacore.com>
778 * make.adb (Gnatmake): Get the maximum number of simultaneous
779 compilation processes after the Builder switches has been scanned, as
780 there may include -jnn.
782 2011-08-29 Matthew Heaney <heaney@adacore.com>
784 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
786 2011-08-29 Tristan Gingold <gingold@adacore.com>
788 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
789 GNAT_DRIVER_COMMAND_LINE to 255.
791 2011-08-29 Pascal Obry <obry@adacore.com>
793 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
794 reformatting and style fix (class attribute casing).
796 2011-08-29 Yannick Moy <moy@adacore.com>
798 * exp_ch11.adb: Yet another case where expansion should be common
799 between CodePeer and Alfa.
801 2011-08-29 Yannick Moy <moy@adacore.com>
803 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
805 2011-08-29 Ed Schonberg <schonberg@adacore.com>
807 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
808 incomplete type and its completion match.
810 2011-08-29 Yannick Moy <moy@adacore.com>
812 * exp_ch13.adb: Adjust previous change.
814 2011-08-29 Robert Dewar <dewar@adacore.com>
816 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
817 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
820 2011-08-29 Emmanuel Briot <briot@adacore.com>
822 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
823 initialize aggregated projects.
825 2011-08-29 Ed Schonberg <schonberg@adacore.com>
827 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
828 depth of candidates to resolve a potentially spurious ambiguity between
829 two visible subprograms.
831 2011-08-29 Yannick Moy <moy@adacore.com>
833 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
835 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
836 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
839 2011-08-29 Arnaud Charlet <charlet@adacore.com>
841 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
844 2011-08-29 Thomas Quinot <quinot@adacore.com>
846 * sem_res.adb: Minor reformatting.
848 2011-08-29 Johannes Kanig <kanig@adacore.com>
850 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
852 * gnat1drv.adb (Adjust_Global_Switches): Set
853 Use_Expressions_With_Actions to False in ALFA mode.
854 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
857 2011-08-29 Yannick Moy <moy@adacore.com>
859 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
860 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
861 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
862 tagged types and dispatching calls in Alfa mode.
864 2011-08-29 Javier Miranda <miranda@adacore.com>
866 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
867 we do not report an error on an Empty node.
869 2011-08-29 Geert Bosch <bosch@adacore.com>
871 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
872 a-nlrear.o and a-nurear.o.
874 2011-08-29 Robert Dewar <dewar@adacore.com>
876 * freeze.adb: Minor code reorganization.
878 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
879 sem_ch6.adb: Minor reformatting
881 2011-08-29 Tristan Gingold <gingold@adacore.com>
883 * s-except.ads, s-except.adb: Provide dummy body.
885 2011-08-29 Yannick Moy <moy@adacore.com>
887 * sem_warn.adb (Within_Postcondition): Take into account the case of
888 an Ensures component in a Test_Case.
890 2011-08-29 Tristan Gingold <gingold@adacore.com>
892 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
893 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
894 System_Exceptions_Debug
895 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
896 * a-except.adb: With and use System.Exceptions_Debug instead of
898 * a-except-2005.adb: Likewise.
899 * s-assert.adb: Likewise.
900 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
901 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
902 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
903 s-excdeb. Update dependencies.
904 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
905 as these no longer need external libraries.
907 2011-08-29 Ed Schonberg <schonberg@adacore.com>
909 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
910 exponentiation operator on universal values in a context that requires
913 2011-08-29 Tristan Gingold <gingold@adacore.com>
915 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
916 before calling notify_handled_exception.
917 * a-exextr.adb: Fix comment.
919 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
921 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
922 Finalize_Address of the access type's finalization master.
923 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
924 access type's finalization master. Add a guard to prevent
925 Associated_Storage_Pool from being set on .NET/JVM.
926 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
927 attribute Finalize_Address of the access type's finalization master.
928 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
929 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
930 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
932 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
933 use clause for System.IO
934 (Detach): Relax the assertion, to be reinstated later.
935 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
936 Relax the assertion on Finalize_Address, to be reinstated later.
937 (Is_Empty_List): New routine.
938 (pm): New debug routine.
939 (Set_Finalize_Address): New routine.
940 * s-finmas.ads (pm): New debug routine.
941 (Set_Finalize_Address): New routine.
942 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
944 2011-08-29 Tristan Gingold <gingold@adacore.com>
946 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
949 2011-08-29 Tristan Gingold <gingold@adacore.com>
951 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
952 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
953 (Finalize_TCB): Remove its finalization.
954 (Initialize): Remove assignment of GET_Exc_Stack_Addr
955 * s-soflin.adb (NT_Exc_Stack): Remove
956 (Get_Exc_Stack_Addr_NT): Likewise.
957 (Get_Exc_Stack_Addr_Soft): Likewise.
958 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
959 (Get_Exc_Stack_Addr): Likewise.
960 (Get_Exc_Stack_Addr_Soft): Likewise
961 * s-taspri-vms.ads (Exc_Stack_T): Remove.
962 (Exc_Stack_Ptr_T): Likewise.
963 (Private_Data): Remove Exc_Stack_Ptr component.
965 2011-08-29 Tristan Gingold <gingold@adacore.com>
967 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
969 2011-08-29 Tristan Gingold <gingold@adacore.com>
971 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
973 2011-08-29 Geert Bosch <bosch@adacore.com>
975 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
976 L2_Norm, Swap_Column): New generic subprograms
977 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
978 L2_Norm, Swap_Column): Implement new subprograms in order to
979 eliminate dependency on BLAS and LAPACK libraries in
980 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
981 version. Forward_Eliminate/Back_Substitute can be used to put a
982 matrix in row echelon or reduced row echelon form using partial
984 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
985 Swap_Column): Instantiate from System.Generic_Array_Operations.
986 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
987 (Sqrt): Local function for simple computation of square root without
988 adding dependencies on Generic_Elementary_Functions.
989 (Swap): New subprogram to exchange floating point numbers.
990 (Inverse): Reimplement using Jordan-Gauss elimination.
991 (Jacobi): New procedure implementing Jacobi's method for computation
992 of eigensystems, based on Rutishauser's implementation.
993 (L2_Norm): Implement directly using the inner product.
994 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
995 decreasing eigenvalue as required by the Ada RM.
996 (Swap_Column): New helper procedure for Sort_Eigensystem.
997 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
998 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
1001 2011-08-29 Thomas Quinot <quinot@adacore.com>
1003 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
1006 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1008 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
1009 than the current node.
1010 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
1011 Finalization_Master. The list headers have two fields instead of three.
1012 This should fix alignment issue but subpool allocations are now
1013 unusable. Alphabetize subprograms.
1014 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
1015 the size of the header when converting the beginning of the object to
1016 a FM_Node. Set the master's Finalize_Address attribute if not already
1018 (Deallocate_Any_Controlled): Use the offset rather than the size of the
1019 header when converting the beginning of the object to a FM_Node.
1021 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1023 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
1024 reraise when compiling for CodePeer.
1026 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1028 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
1029 now needed by a-convec.adb. Fix warning.
1031 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1033 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
1034 processing of TSS routine Finalize_Address when compiling in
1037 2011-08-29 Thomas Quinot <quinot@adacore.com>
1039 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
1040 sem_warn.adb: Minor reformatting.
1042 2011-08-29 Emmanuel Briot <briot@adacore.com>
1044 * prj-conf.adb (Get_Config_Switches): Also collect the list of
1045 languages from aggregated projects.
1047 2011-08-29 Yannick Moy <moy@adacore.com>
1049 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
1050 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
1051 Traverse_Package_Declaration, Traverse_Subprogram_Body,
1052 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
1053 for stubs are traversed too when parameter is set
1054 (Traverse_All_Compilation_Units): Traverse without going inside stubs
1055 (Traverse_Declarations_Or_Statements): Do the special traversing for
1056 stubs when required.
1057 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
1058 return subprogram or package body from stub.
1059 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
1060 stubs without prior subprogram decl.
1062 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1064 * gnat_ugn.texi: Fix typo.
1066 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1068 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
1069 which accounts for size vs alignment issues and calculates the size of
1071 (Deallocate_Any_Controlled): Ditto.
1072 (Nearest_Multiple_Rounded_Up): New routine.
1074 2011-08-29 Tristan Gingold <gingold@adacore.com>
1076 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
1077 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
1078 (Set_Exception_Msg): Ditto.
1079 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
1081 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
1082 Use Save_Occurrence instead of Save_Occurrence_No_Private.
1083 (Raise_With_Msg): Remove Cleanup_Flag.
1084 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
1085 Clean_Flag and Private_Data components.
1087 2011-08-29 Yannick Moy <moy@adacore.com>
1089 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
1091 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
1092 of an explicitly declared type, so that the base types of the original
1093 type and this generated type are the same, and a "type" (not a subtype
1095 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
1096 small" in Alfa mode, like in CodePeer mode.
1097 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
1098 clauses in Alfa mode.
1100 2011-08-29 Javier Miranda <miranda@adacore.com>
1102 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
1103 function to the package spec.
1104 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
1105 internally generated bodies of null procedures locate the internally
1106 generated spec enforcing mode conformance.
1107 (Is_Interface_Conformant): Ensure that the controlling formal of the
1110 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1112 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
1113 reject the pragma if it appears to apply to a formal subprogram.
1115 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1117 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
1118 inner expression, to prevent double evaluation.
1120 2011-08-29 Tristan Gingold <gingold@adacore.com>
1122 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
1124 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
1125 * a-except-2005.adb (Propagate_Exception): Adjust spec.
1126 (Raise_Current_Excep): Adjust call.
1127 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
1129 2011-08-29 Thomas Quinot <quinot@adacore.com>
1131 * exp_disp.adb: Minor reformatting.
1133 2011-08-29 Tristan Gingold <gingold@adacore.com>
1135 * a-exexpr.adb (Setup_Exception): Removed.
1136 * a-exexpr-gcc.adb (Setup_Exception): Removed.
1137 * a-except.adb (Exception_Propagation): Removed.
1138 * a-except-2005.adb (Setup_Exception): Removed.
1139 (Reraise): Remove call to Setup_Exception.
1140 (Reraise_Occurrence): Ditto.
1141 (Reraise_Occurrence_Always): Ditto.
1142 (Reraise_Occurrence_No_Defer): Ditto.
1143 (Transfer_Occurrence): Ditto.
1144 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
1145 (Set_Exception_Msg): Ditto.
1147 2011-08-29 Robert Dewar <dewar@adacore.com>
1149 * a-convec.adb, exp_disp.adb: Minor reformatting.
1151 2011-08-29 Tristan Gingold <gingold@adacore.com>
1153 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
1155 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1157 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
1158 Exception_Handlers to No_List instead of Empty_List in the case where
1159 there are no handlers.
1161 2011-08-29 Tristan Gingold <gingold@adacore.com>
1163 * gcc-interface/gigi.h (enum standard_datatypes): Add
1164 ADT_reraise_zcx_decl
1165 (reraise_zcx_decl): New macro.
1166 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
1167 (gigi): Set reraise_zcx_decl.
1168 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
1169 (gnat_to_gnu): Handle N_Raise_Statement.
1171 2011-08-29 Robert Dewar <dewar@adacore.com>
1173 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
1174 a-undesu.adb: Minor reformatting.
1176 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1178 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
1179 table, accept an unfrozen untagged component if it is an actual for a
1180 formal incomplete type.
1181 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
1182 provide new iterator forms over vectors.
1183 Introduce type Iterator in package body to implement operations of
1184 Reversible_Iterator interface.
1185 * a-iteint.ads: Make package pure so it is usable with new container
1186 packages, that are categorized Remote_Types.
1188 2011-08-29 Robert Dewar <dewar@adacore.com>
1190 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
1192 2011-08-29 Bob Duff <duff@adacore.com>
1194 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
1195 of <>, because this is the routine that checks for dimensionality
1196 errors (for example, for a two-dimensional array, (others => <>) should
1197 be (others => (others => <>)).
1199 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1201 * impunit.adb: Add new run-time units.
1202 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
1203 s-stposu.ads, s-stposu.adb: Code clean up.
1204 Handle protected class-wide or task class-wide types
1205 Handle C/C++/CIL/Java types.
1206 * s-spsufi.adb, s-spsufi.ads: New files.
1208 2011-08-29 Yannick Moy <moy@adacore.com>
1210 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
1211 library-level subprogram.
1212 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
1214 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
1216 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
1218 * gnat_rm.texi: Update doc for Test_Case pragma.
1220 2011-08-29 Tristan Gingold <gingold@adacore.com>
1222 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
1224 (GCC_Exception_Access): New type.
1225 (Unwind_DeleteException): New imported procedure
1226 (Foreign_Exception): Import it.
1227 (GNAT_GCC_Exception): Simply have the occurrence inside.
1228 (To_GCC_Exception): New function.
1229 (To_GNAT_GCC_Exception): New function.
1230 (GNAT_GCC_Exception_Cleanup): New procedure..
1231 (Propagate_GCC_Exception): New procedure.
1232 (Reraise_GCC_Exception): New procedure.
1233 (Setup_Current_Excep): New procedure.
1234 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
1235 (Unwind_RaiseException): Ditto.
1236 (Unwind_ForcedUnwind): Ditto.
1238 (Begin_Handler): Change type of parameter.
1239 (End_Handler): Ditto. Now delete the exception if still present.
1240 (Setup_Key): Removed.
1241 (Is_Setup_And_Not_Propagated): Removed.
1242 (Set_Setup_And_Not_Propagated): Ditto.
1243 (Clear_Setup_And_Not_Propagated): Ditto.
1244 (Save_Occurrence_And_Private): Ditto.
1245 (EID_For): Add 'not null' constraint on parameter.
1246 (Setup_Exception): Does nothing.
1247 (Propagate_Exception): Simplified.
1248 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
1249 re-raise is not expanded anymore.
1250 * s-except.ads (Foreign_Exception): New exception - placeholder for
1252 * raise-gcc.c (__gnat_setup_current_excep): Declare
1253 (CXX_EXCEPTION_CLASS): Define (not yet used)
1254 (GNAT_EXCEPTION_CLASS): Define.
1255 (is_handled_by): Handle foreign exceptions.
1256 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
1258 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1260 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
1262 2011-08-29 Thomas Quinot <quinot@adacore.com>
1264 * a-synbar-posix.adb: Minor reformatting.
1266 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1268 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
1269 a-exetim-default.ads (Interrupt_Clocks_Supported,
1270 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1271 definitions to be compliant with AI-0171. The target systems do not
1272 support separate account for the execution time of interrupt handlers.
1274 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1276 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
1277 in the barrier to put first the easiest to evaluate (and the one which
1278 will be True more often). More efficient.
1280 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
1282 * s-atocou-x86.adb: Fix constraint in machine code insertion.
1284 2011-08-29 Bob Duff <duff@adacore.com>
1286 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
1287 attributes that are now aspects, as specified by AI05-0229-1.
1288 * sem_ch13.adb (Analyze_Aspect_Specifications,
1289 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
1290 pragmas or attribute references, as appropriate.
1292 2011-08-29 Robert Dewar <dewar@adacore.com>
1294 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
1295 a-synbar-posix.ads: Minor reformatting.
1297 2011-08-29 Yannick Moy <moy@adacore.com>
1299 * snames.ads-tmpl: Add name Force.
1301 2011-08-29 Pascal Obry <obry@adacore.com>
1303 * prj-nmsc.adb: Minor reformatting.
1305 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1307 * a-exetim.ads (Interrupt_Clocks_Supported,
1308 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
1309 definitions to be compliant with AI-0171.
1311 2011-08-29 Robert Dewar <dewar@adacore.com>
1313 * a-ngelfu.adb: Add comments.
1315 2011-08-29 Geert Bosch <bosch@adacore.com>
1317 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
1318 the closest machine number to Pi / 2.0.
1320 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1322 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
1323 package Ada.Synchronous_Barriers.
1324 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
1325 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
1326 default implementation using protected objects and another one
1327 a-synbar-posix using POSIX barriers as the underlying support.
1328 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
1329 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
1330 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
1331 Clean up dependencies.
1332 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
1334 2011-08-29 Robert Dewar <dewar@adacore.com>
1336 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
1337 exp_dist.adb: Minor code reorganization.
1340 2011-08-29 Thomas Quinot <quinot@adacore.com>
1342 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
1343 primitive operation must support external streaming if it is not a
1344 controlling access result.
1346 2011-08-29 Thomas Quinot <quinot@adacore.com>
1348 * sinfo.ads, sem_ch7.adb: Minor reformatting.
1350 2011-08-29 Bob Duff <duff@adacore.com>
1352 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
1353 restriction on allocators, as required by AI05-0013-1.
1354 * restrict.ads: Minor comment fix.
1356 2011-08-29 Tristan Gingold <gingold@adacore.com>
1358 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
1359 (To_Jmpbuf_Address): Ditto
1360 (builtin_longjmp): Ditto
1362 2011-08-29 Thomas Quinot <quinot@adacore.com>
1364 * sem_res.adb: Minor reformatting.
1366 2011-08-29 Vincent Celier <celier@adacore.com>
1368 * make.adb (Gnatmake): Move special processing for VM targets after the
1369 call to Get_Target_Parameters.
1371 2011-08-29 Thomas Quinot <quinot@adacore.com>
1373 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
1375 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1377 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
1378 where an anonymous access discriminant of a limited designated type
1379 appears in a non-immutably limited discriminated type and issue an
1380 error message. Add local variable Desig_T and replace all occurrences
1383 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1385 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
1386 implementation is compliant to RM D.15(15/2) after the modification
1387 imposed by AI05-0094-1 (binding interpretation).
1389 2011-08-29 Robert Dewar <dewar@adacore.com>
1391 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
1392 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
1394 2011-08-29 Thomas Quinot <quinot@adacore.com>
1396 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
1397 the scope name, do not report a missing label as a style violation (it
1398 will be diagnosed as an illegality).
1399 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
1400 variant records: Get_Enum_Lit_From_Pos already returns a usage
1401 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
1402 on Expr in Integer_Literal case so that it can be used by
1405 2011-08-29 Tristan Gingold <gingold@adacore.com>
1407 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
1409 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
1410 (Build_Abort_Block_Handler): New function to build an Abort_Signal
1412 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
1413 Build_Abort_Block_Handler to build the exception handler. Do not
1414 undefer aborts for the Abort_Signal exception handler if back-end
1415 exception mechanism.
1416 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
1417 back_end exceptions for all others and abort_signal.
1418 * s-except.ads (ZCX_By_Default): New constant.
1419 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
1420 (Raise_Exception_Always): Ditto.
1421 (Raise_From_Signal_Handler): Ditto.
1422 (Raise_With_Location_And_Msg): Ditto.
1423 (Raise_With_Msg): Ditto.
1425 (Reraise_Occurence): Ditto.
1426 (Reraise_Occurrence_Always): Ditto.
1427 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
1428 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1430 2011-08-29 Thomas Quinot <quinot@adacore.com>
1432 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
1434 2011-08-29 Robert Dewar <dewar@adacore.com>
1436 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
1437 Minor code reorganization.
1439 2011-08-29 Bob Duff <duff@adacore.com>
1441 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
1442 2012, not just Ada 2005.
1444 2011-08-29 Vincent Celier <celier@adacore.com>
1446 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
1447 with a project file or with gprbuid, if -gnatep= is specified, the
1448 builder may need to be invoked with -x.
1450 2011-08-29 Tristan Gingold <gingold@adacore.com>
1452 * a-exexpr-gcc.adb: Minor comment fix.
1454 2011-08-29 Robert Dewar <dewar@adacore.com>
1456 * sem_ch8.adb: Minor reformatting.
1458 2011-08-29 Bob Duff <duff@adacore.com>
1460 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
1461 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
1462 treating "some" as unreserved in earlier Ada versions. This is now
1463 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
1464 rather than Name_Some, since Tok_Some is now recognized as reserved.
1465 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
1467 * scans.ads: Minor comment fixes.
1468 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
1469 for other language versions.
1470 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
1471 treating "some" as unreserved in earlier Ada versions. This is now
1472 handled in Snames.Is_Keyword_Name.
1473 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
1475 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
1476 unreserved in earlier Ada versions. This is now handled in
1477 Snames.Is_Keyword_Name.
1478 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
1479 words as for other language versions.
1480 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
1481 Ada 2012, not just Ada 2005.
1483 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1485 * sem_ch13.adb: Additional semantic checks for aspects involved in
1488 2011-08-29 Matthew Heaney <heaney@adacore.com>
1490 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
1491 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
1492 Container parameter.
1493 (Ancestor_Find): ditto.
1495 2011-08-29 Thomas Quinot <quinot@adacore.com>
1497 * par-endh.adb: Minor reformatting.
1499 2011-08-29 Tristan Gingold <gingold@adacore.com>
1501 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
1502 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
1503 (Adjust_N_CLeanups_For): Remove.
1504 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
1506 (Propgate_Exception): Adjust.
1507 * raise-gcc.c: Add a few static/const.
1508 (Adjust_N_Cleanups_For): Remove declaration.
1509 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
1511 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1513 * sem_ch8.adb: Use type of function return when rewriting as object
1516 2011-08-29 Gary Dismukes <dismukes@adacore.com>
1518 * sem_type.adb: Minor reformatting.
1520 2011-08-29 Robert Dewar <dewar@adacore.com>
1522 * makeutl.adb: Minor reformatting.
1524 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1526 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
1527 function call of a limited type, the expansion of the renaming is
1528 complicated by the presence of various temporaries and subtypes that
1529 capture constraints of the renamed object.
1530 Rewrite node as an object declaration, whose expansion is simpler.
1531 Given that the object is limited there is no copy involved and no
1534 2011-08-29 Robert Dewar <dewar@adacore.com>
1536 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
1537 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
1539 2011-08-29 Tristan Gingold <gingold@adacore.com>
1541 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
1542 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
1543 system-linux-hppa.ads, system-linux-s390.ads,
1544 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
1545 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
1546 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
1547 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
1548 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
1549 system-solaris-sparc.ads, system-lynxos-x86.ads,
1550 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
1551 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
1552 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
1553 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
1554 system-vxworks-x86.ads: Remove GCC_ZCX_Support
1555 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
1556 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
1557 * opt.ads: Adjust comment.
1558 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
1559 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
1560 * system.ads: Move GCC_ZCX_Support to obsolete entries.
1562 2011-08-29 Emmanuel Briot <briot@adacore.com>
1564 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
1565 file name is specified on the gnatmake or gprbuild command line, and
1566 before we search for that file in the project.
1568 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1570 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
1571 used to determine whether a possible interpretation for an overloadable
1572 entity is declared within the current instantiation and should be
1573 included in the candidate set.
1575 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
1577 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
1579 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1581 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
1582 access subtype is access_to_subprogram, when applying checks for
1585 2011-08-29 Matthew Heaney <heaney@adacore.com>
1587 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
1588 for sibling when common parent.
1590 2011-08-29 Thomas Quinot <quinot@adacore.com>
1592 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
1595 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1597 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
1598 for the return type when in ASIS mode.
1600 2011-08-29 Vincent Celier <celier@adacore.com>
1602 * make.adb (Gnatmake): Get the default search dirs, then the target
1603 parameters after getting the Builder switches, as the Builder switches
1604 may include --RTS= and that could change the default search dirs.
1606 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1608 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
1609 Make_Final_Call. Move the processing for class-wide types before the
1610 processing for derivations from [Limited_]Controlled.
1611 (Make_Final_Call): Move the processing for class-wide types before the
1612 processing for derivations from [Limited_]Controlled.
1613 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
1614 Add code to account for alignments larger than the list header. Add a
1615 comment illustrating the structure of the allocated object + padding +
1617 (Deallocate_Any_Controlled): Add code to account for alignments larger
1618 than the list header.
1620 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1622 * sinfo.ads, sinfo.adb: New node kind
1623 N_Formal_Incomplete_Type_Definition, related flags.
1624 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
1625 Parse formal incomplete types.
1626 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
1628 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
1629 Formal incomplete types do not need completion.
1630 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
1631 Validate_Incomplete_Type_Instance): New procedures to handle formal
1633 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
1634 that corresponds to a formal incomplete type.
1635 * sprint.adb: Handle formal incomplete type declarations.
1636 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
1639 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
1641 * a-fihema.ads, a-fihema.adb: Unit removed.
1642 * a-undesu.ads, a-undesu.adb: New unit implementing
1643 Ada.Unchecked_Deallocate_Subpool.
1644 * einfo.adb: Remove Associated_Collection from the node usage.
1645 Add Finalization_Master to the node usage.
1646 (Associated_Collection): Removed.
1647 (Finalization_Master): New routine.
1648 (Set_Associated_Collection): Removed.
1649 (Set_Finalization_Master): New routine.
1650 (Write_Field23_Name): Remove Associated_Collection from the output. Add
1651 Finalization_Master to the output.
1652 * einfo.ads: Remove attribute Associated_Collection and its uses in
1654 Add new attribute Finalization_Master along with its uses in entitites.
1655 (Associated_Collection): Removed along with its pragma import.
1656 (Finalization_Master): New routine along with a pragma import.
1657 (Set_Associated_Collection): Removed along with its pragma import.
1658 (Set_Finalization_Master): New routine along with a pragma import.
1659 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
1660 Build_Finalization_Collection with Build_Finalization_Master.
1661 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
1662 before the bodies of the predefined routines. Add comment explaining
1663 this. Replace call to Build_Finalization_Collection with
1664 Build_Finalization_Master.
1665 (Freeze_Type): Replace call to Build_Finalization_Collection with
1666 Build_Finalization_Master.
1667 (Make_Finalize_Address_Body): Comment reformatting.
1668 (Make_Predefined_Primitive_Specs): Code reformatting.
1669 (Stream_Operation_OK): Update comment mentioning finalization
1670 collections. Replace RE_Finalization_Collection with
1671 RE_Finalization_Master.
1672 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
1673 Associated_Collection with Finalization_Master. Replace call to
1674 Build_Finalization_Collection with Build_Finalization_Master.
1675 (Expand_Allocator_Expression): Replace call to Associated_Collection
1676 with Finalization_Master. Replace call to Set_Associated_Collection with
1677 Set_Finalization_Master. Remove the generation of
1678 Set_Finalize_Address_Ptr.
1679 (Expand_N_Allocator): Replace call to Associated_Collection with
1680 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
1681 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
1682 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
1683 comment on usage. Replace call to Needs_BIP_Collection with
1684 Needs_BIP_Finalization_Master Remplace BIP_Collection with
1685 BIP_Finalization_Master. Update all comments which mention finalization
1686 collections. Replace Associated_Collection with
1687 Finalization_Master. Replace Build_Finalization_Collection with
1688 Build_Finalization_Master.
1689 (BIP_Formal_Suffix): Update BIP_Collection's case.
1690 (Build_Heap_Allocator): Update the related comment. Rename local
1691 variable Collect to Fin_Mas_Id and update its occurrences. Update
1692 comments which mention finalization collections. Replace
1693 Set_Associated_Collection with Set_Finalization_Master.
1694 (Expand_Call): Update the code which detects a special piece of library
1696 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
1697 Add_Collection_Actual_To_Build_In_Place_Call with
1698 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
1699 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
1700 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
1701 Add_Collection_Actual_To_Build_In_Place_Call with
1702 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1703 (Make_Build_In_Place_Call_In_Assignment): Replace call to
1704 Add_Collection_Actual_To_Build_In_Place_Call with
1705 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
1706 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1707 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
1708 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
1709 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
1710 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
1711 Replace call to Set_Associated_Collection with Set_Finalization_Master.
1712 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
1713 Replace the call to Associated_Collection with Finalization_Master.
1714 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
1715 Update the way finalization master names are generated. Update the
1716 retrieval of the correct access type which will carry the pool and
1718 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
1719 (Make_Finalize_Address_Body): Abstract types do not need
1720 Finalize_Address. Code reformatting.
1721 (Make_Finalize_Address_Stmts): Update comment on usage.
1722 (Make_Set_Finalize_Address_Ptr_Call): Removed.
1723 (Process_Declarations): Update comments.
1724 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
1725 Build_Finalization_Master. Update associated comment.
1726 (Make_Set_Finalize_Address_Ptr_Call): Removed.
1727 * exp_ch13.adb: Update comments which mention finalization collections.
1728 (Expand_N_Free_Statement): Replace the call to Associated_Collection
1729 with Finalization_Master.
1730 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
1731 create calls to routines Allocate_Any_Controlled and
1732 Deallocate_Any_Controlled.
1733 (Find_Finalize_Address): New routine.
1734 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
1736 (Requires_Cleanup_Actions): Update the comment on freeze node
1738 * exp_util.ads: Remove comment on generated code for
1739 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
1740 is better to simply look in the body.
1741 * freeze.adb (Freeze_All): Update the comment of finalization
1742 collections. Replace the call to Associated_Collection with
1743 Finalization_Master. Replace the call to Build_Finalization_Collection
1744 with Build_Finalization_Master.
1745 * impunit.adb: Add a-undesu and s-stposu to the list of units.
1746 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
1748 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
1749 Ada.Finalization. Add processing for children of System.Storage_Pools.
1750 * rtsfind.ads: Remove the naming of second level children of
1752 Remove Ada_Finalization_Heap_Management from the list of units.
1753 Remove subtype Ada_Finalization_Child.
1754 Remove the following subprogram entities:
1758 RE_Finalization_Collection
1759 RE_Finalization_Collection_Ptr
1760 RE_Set_Finalize_Address_Ptr
1762 Add the naming of second level children of System.Storage_Pools.
1763 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
1765 Add subtype System_Storage_Pools_Child.
1766 Add the following subprogram entities to System.Finalization_Masters:
1768 RE_Finalization_Master
1769 RE_Finalization_Master_Ptr
1771 Add the following subprogram entities to System.Storage_Pools.Subpools:
1773 RE_Allocate_Any_Controlled
1774 RE_Deallocate_Any_Controlled
1775 RE_Root_Storage_Pool_With_Subpools
1779 Move the following subprogram entities from
1780 Ada.Finalization.Heap_Management to System.Finalization_Masters:
1782 RE_Add_Offset_To_Address
1787 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
1788 Set_Associated_Collection with Set_Finalization_Master.
1789 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
1790 BIP_Finalization_Master is created.
1791 * s-finmas.adb: New unit System.Finalization_Masters.
1792 * s-finmas.ads: New unit System.Finalization_Masters.
1793 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
1794 * s-stposu.ads, s-stposu.adb: New unit implementing
1795 System.Storage_Pools.Subpools.
1797 2011-08-29 Bob Duff <duff@adacore.com>
1799 * tbuild.adb: Add assertion.
1801 2011-08-29 Thomas Quinot <quinot@adacore.com>
1803 * s-pooglo.adb: Minor reformatting.
1805 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1807 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
1808 an indexed component of a packed array whose element type is a record
1809 with a representation clause different from that of the right-hand
1810 side, generate a temporary to minimuze the number of bit-field
1811 operations generated.
1813 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1815 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
1816 declarations, and thus are likely insertion points for actions.
1818 2011-08-29 Bob Duff <duff@adacore.com>
1820 * einfo.ads: Minor comment fix.
1822 2011-08-29 Robert Dewar <dewar@adacore.com>
1824 * frontend.adb, gnat1drv.adb: Minor reformatting.
1826 2011-08-29 Tristan Gingold <gingold@adacore.com>
1828 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
1829 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
1830 space in front of the header.
1832 2011-08-29 Johannes Kanig <kanig@adacore.com>
1834 * frontend.adb (Frontend): Exit after creating Standard package when
1835 -gnatd.H is present.
1836 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
1839 2011-08-29 Robert Dewar <dewar@adacore.com>
1841 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
1842 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
1843 snames.ads-tmpl: Minor reformatting.
1845 2011-08-29 Philippe Gil <gil@adacore.com>
1847 * prj.adb (Reset_Units_In_Table): New procedure.
1848 Reset units to avoid access to freed memory.
1850 2011-08-29 Thomas Quinot <quinot@adacore.com>
1852 * get_scos.adb: When reading a P statement SCO without a pragma name
1853 (from an older ALI file), ensure that the Pragma_Name component is set
1854 to Unknown_Pragma (not left uninitialized).
1856 2011-08-29 Vincent Celier <celier@adacore.com>
1858 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
1859 modified to compute correctly the object path of a SAL project that is
1860 extending another library project.
1861 (Write_Path_File): New procedure.
1862 * makeutl.ads (Directories): New table moved from Buildgpr
1863 (Get_Directories): New procedure moved from Buildgpr
1864 (Write_Path_File): New procedure
1865 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
1866 paths before binding SALs, instead of Set_Ada_Paths.
1867 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
1869 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
1870 (Current_Source_Path_File_Of): New function
1871 (Set_Current_Object_Path_File_Of): New procedure
1872 (Current_Source_Object_File_Of): New function
1873 (Set_Current_Object_Path_File_Of): New procedure
1874 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
1875 (Current_Source_Path_File_Of): New function
1876 (Set_Current_Object_Path_File_Of): New procedure
1877 (Current_Source_Object_File_Of): New function
1878 (Set_Current_Object_Path_File_Of): New procedure
1880 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1882 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
1883 packed entity, use a bit-field assignment only if there is no change of
1886 2011-08-29 Thomas Quinot <quinot@adacore.com>
1888 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
1889 Is_RTU instead of using Chars comparisons.
1891 2011-08-29 Thomas Quinot <quinot@adacore.com>
1893 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
1894 temporary object if the actual is constrained, and the discriminants
1895 read from the stream don't match.
1897 2011-08-29 Tristan Gingold <gingold@adacore.com>
1899 * sem_attr.adb, exp_attr.adb: Add handling of
1900 Attribute_System_Allocator_Alignment
1901 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
1902 Attribute_System_Allocator_Alignment.
1903 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
1904 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
1905 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
1906 get_target_system_allocator_alignment.
1908 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1910 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
1913 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1915 * exp_ch3.adb (In_Runtime): Fix typo.
1917 2011-08-29 Bob Duff <duff@adacore.com>
1919 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
1921 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1923 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
1924 and a separate tag assignment is generated, ensure that the tag
1925 assignment is analyzed.
1927 2011-08-29 Ed Schonberg <schonberg@adacore.com>
1929 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
1930 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
1931 of statement lists that may contain local declarations.
1932 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
1933 duplicate the triggering statements needed for the expansion of this
1934 construct, when the trigger is a dispatching call to a synchronized
1937 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1939 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
1940 * bindgen.adb: Add comments.
1941 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
1944 2011-08-29 Robert Dewar <dewar@adacore.com>
1946 * exp_attr.adb: Minor reformatting.
1947 Minor code reorganization and commenting.
1948 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
1951 2011-08-29 Thomas Quinot <quinot@adacore.com>
1953 * get_scos.adb: Ignore chaining indicators not currently supported
1956 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1958 * system.ads: Minor editing.
1960 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1962 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
1964 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
1965 Attribute_Elab_Subp_Body.
1966 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
1967 * sem_util.adb: Update comments.
1969 2011-08-29 Thomas Quinot <quinot@adacore.com>
1971 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
1972 pragma name for each SCO statement corresponding to a pragma.
1974 2011-08-29 Arnaud Charlet <charlet@adacore.com>
1976 * opt.ads: Minor editing.
1978 2011-08-29 Yannick Moy <moy@adacore.com>
1980 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
1981 that only made sense for CodePeer mode.
1983 2011-08-29 Jose Ruiz <ruiz@adacore.com>
1985 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
1986 which is no longer used.
1987 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
1988 handling of the 64-bit division check.
1989 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
1991 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
1994 2011-08-29 Thomas Quinot <quinot@adacore.com>
1996 * get_scos.adb: Minor reformatting.
1998 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2000 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
2001 statement list is wrapped in a block, the block is explicitly analyzed
2002 in order to properly redecorate the entities and create a servicing
2005 2011-08-29 Tristan Gingold <gingold@adacore.com>
2007 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
2008 (Set_Zero_Cost_Handling): Remove.
2010 2011-08-29 Thomas Quinot <quinot@adacore.com>
2012 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
2014 2011-08-29 Geert Bosch <bosch@adacore.com>
2016 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
2017 instruction, as the latter may produce -0.0, which is not a valid VAX
2019 (Neg_G): Likewise for VAX F float.
2021 2011-08-29 Robert Dewar <dewar@adacore.com>
2023 * exp_util.adb: Minor reformatting.
2025 2011-08-29 Yannick Moy <moy@adacore.com>
2027 * sem_ch3.adb: Minor comment update.
2029 2011-08-29 Thomas Quinot <quinot@adacore.com>
2031 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
2034 2011-08-29 Thomas Quinot <quinot@adacore.com>
2036 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
2037 current statement sequence on a generic instantiation or a subprogram
2040 2011-08-29 Robert Dewar <dewar@adacore.com>
2042 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
2045 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
2047 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
2048 Correct the check which involves the freeze node of a controlled or
2049 access-to-controlled type.
2051 2011-08-29 Geert Bosch <bosch@adacore.com>
2053 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
2055 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
2058 2011-08-29 Yannick Moy <moy@adacore.com>
2060 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
2061 for every index type and component type that is not a subtype_mark.
2062 (Process_Subtype): Set Etype of subtype.
2064 2011-08-29 Robert Dewar <dewar@adacore.com>
2066 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
2067 reorganization. Minor reformatting.
2069 2011-08-29 Steve Baird <baird@adacore.com>
2071 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
2072 for CodePeer and ALFA modes.
2074 2011-08-29 Ed Schonberg <schonberg@adacore.com>
2076 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
2077 that comes from an enclosing scope if it is not the renaming of an
2078 actual, to handle properly a spurious ambiguity in an instance.
2080 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
2082 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
2083 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
2084 use it instead of the Esize of the first parameter.
2085 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
2087 <Size>: Likewise. Call it for composite types on the RM size.
2089 2011-08-29 Yannick Moy <moy@adacore.com>
2091 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
2092 * sem_util.adb (Unique_Name): Correct behaviour for names of
2095 2011-08-29 Yannick Moy <moy@adacore.com>
2097 * sem_prag.adb (Check_Precondition_Postcondition): In formal
2098 verification mode, analyze pragma expression for correctness, for
2099 pre/post on library-level subprogram, as it is not expanded later.
2101 2011-08-29 Yannick Moy <moy@adacore.com>
2103 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
2104 in formal verification.
2106 2011-08-29 Thomas Quinot <quinot@adacore.com>
2108 * sem_util.adb: Minor reformatting.
2109 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
2111 * par_sco.ads, par_sco.adb: Update comments.
2113 2011-08-29 Yannick Moy <moy@adacore.com>
2115 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
2116 associated getter/setter.
2117 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
2119 2011-08-29 Vincent Celier <celier@adacore.com>
2121 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
2122 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
2123 with declarations for Language_Kind and Dependency_Kind for Ada.
2124 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
2125 (Process_Compiler): Take into account the new attributes Dependency_Kind
2127 (Check_Configuration): Check if language kind is unit based, not if the
2128 language name is Ada.
2129 (Process_Exceptions_Unit_Based): Ditto
2130 (Add_Language): Remove default additions of language and dependency kind
2131 * prj.ads: Minor comment change
2132 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
2134 2011-08-29 Johannes Kanig <kanig@adacore.com>
2136 * debug.adb: Update comments.
2138 2011-08-24 Joseph Myers <joseph@codesourcery.com>
2140 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
2141 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
2142 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
2143 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
2144 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
2146 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2148 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
2149 (GNATLIBCFLAGS_FOR_C): Replace
2150 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
2151 (gnatlib-shared-default, gnatlib-shared-dual-win32)
2152 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
2153 (gnatlib-sjlj, gnatlib-zcx): Likewise.
2155 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
2157 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
2159 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
2161 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
2163 2011-08-05 Nicolas Roche <roche@adacore.com>
2165 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
2166 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
2168 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
2170 2011-08-05 Matthew Heaney <heaney@adacore.com>
2172 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
2173 subprogram bodies declared out-of-order.
2175 2011-08-05 Yannick Moy <moy@adacore.com>
2177 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
2178 entities directly in package Standard, otherwise skip the standard
2181 2011-08-05 Robert Dewar <dewar@adacore.com>
2183 * a-cbmutr.adb: Minor reformatting
2184 (Allocate_Node): refactor node allocation algorithm
2186 2011-08-05 Robert Dewar <dewar@adacore.com>
2188 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
2189 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
2191 (Analyze_Pragma, case Check_Policy): Ditto.
2192 * sem_prag.ads (Check_Disabled): New function
2193 * snames.ads-tmpl: Add Name_Disable.
2195 2011-08-05 Robert Dewar <dewar@adacore.com>
2197 * gnat_rm.texi: Document implementation-defined policy DISABLE for
2198 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
2200 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2202 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
2203 that appears in a generic formal part and applies to a formal
2206 2011-08-05 Robert Dewar <dewar@adacore.com>
2208 * a-cbmutr.ads: Minor reformatting.
2210 2011-08-05 Matthew Heaney <heaney@adacore.com>
2212 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
2213 to check count, check sign of value instead.
2214 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
2215 (Copy_Subtree): allocate copy of source element
2216 (Equal_Subtree): compare elements, not access objects
2218 2011-08-05 Vincent Celier <celier@adacore.com>
2220 * gnat_ugn.texi: Fix VMS alternative.
2222 2011-08-05 Thomas Quinot <quinot@adacore.com>
2224 * sem_ch11.adb: Add comment.
2226 2011-08-05 Robert Dewar <dewar@adacore.com>
2228 * exp_util.adb: Minor comment fix.
2230 2011-08-05 Robert Dewar <dewar@adacore.com>
2232 * scng.adb (Error_Unterminated_String): Improve flag position when
2235 2011-08-05 Matthew Heaney <heaney@adacore.com>
2237 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
2239 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
2240 multiway tree containers.
2242 2011-08-05 Robert Dewar <dewar@adacore.com>
2244 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
2245 * stylesw.adb: Implement -gnatyC to control comment spacing
2246 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
2248 * usage.adb: Add line for -gnatyC.
2250 2011-08-05 Robert Dewar <dewar@adacore.com>
2252 * gnat_ugn.texi: Document -gnatyC.
2253 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
2254 synonym for COMMENTS2).
2256 2011-08-05 Robert Dewar <dewar@adacore.com>
2258 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
2259 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
2260 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
2261 a-comutr.ads, lib-xref.adb: Minor reformatting.
2263 2011-08-05 Robert Dewar <dewar@adacore.com>
2265 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
2266 warning if there is an exception handler present.
2268 2011-08-05 Pascal Obry <obry@adacore.com>
2270 * a-iteint.ads: Fix copyright year.
2272 2011-08-05 Thomas Quinot <quinot@adacore.com>
2274 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
2275 statement SCO for a USE clause or a representation clause.
2277 2011-08-05 Yannick Moy <moy@adacore.com>
2279 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
2280 between body and spec for stub.
2281 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
2282 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
2283 pragma precondition or postcondition, for which the enclosing
2284 subprogram or package in the AST is not the desired one, return empty.
2286 2011-08-05 Thomas Quinot <quinot@adacore.com>
2288 * g-expect.adb: Minor reformatting.
2290 2011-08-05 Bob Duff <duff@adacore.com>
2292 * a-fihema.adb: Comment out OS_Lib.
2294 2011-08-05 Matthew Heaney <heaney@adacore.com>
2296 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
2297 (unbounded multiway tree containers) and a-iteint.ads.
2298 * a-comutr.ads, a-comutr.adb:
2299 This is the new Ada 2012 unit for unbounded multiway tree containers
2300 * a-cimutr.ads, a-cimutr.adb
2301 This is the new Ada 2012 unit for indefinite multiway tree containers
2302 * a-iteint.ads: New file.
2304 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2306 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
2308 2011-08-05 Bob Duff <duff@adacore.com>
2310 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
2312 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
2314 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2316 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
2317 general indexing aspects of Ada2012. Called when analyzing indexed
2318 components when other interpretations fail.
2319 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
2320 in an expression context where overloading is meaningful. This excludes
2321 the occurrence in an aspect specification (efficiency only).
2322 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
2323 related to iterators can be set by an attribute specification, but
2325 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
2326 Constant_Indexing and Variable_Indexing.
2327 (Check_Indexing_Functions): New procedure to perform legality checks.
2328 Additional semantic checks at end of declarations.
2330 2011-08-05 Sergey Rybin <rybin@adacore.com>
2332 * tree_io.ads: Update ASIS_Version_Number because of the change of the
2333 order of calling Tree_Write/Tree_Read routines made for aspects.
2335 2011-08-05 Bob Duff <duff@adacore.com>
2337 * a-fihema.adb (Finalize): Fix race condition.
2339 2011-08-05 Yannick Moy <moy@adacore.com>
2341 * sem_ch12.adb (Analyze_Package_Instantiation,
2342 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
2345 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2347 * sem_type.adb (Specific_Type): in an instance, the type-specific
2348 operand of an equality check that involves null may have a private
2349 type. Use full view to determine legality of construct.
2351 2011-08-05 Vincent Celier <celier@adacore.com>
2353 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2354 delete or close the file when the call to gnatmake was successful.
2356 2011-08-05 Yannick Moy <moy@adacore.com>
2358 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
2359 Global_Discard_Names.
2361 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2363 * sinfo.ads: comments on use of entity field for aspect specifications.
2365 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2367 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
2368 node is not itself an entity but a selected component, it is a
2369 rewritten parameterless call to an en enclosing synchronized operation,
2370 and this expansion will be performed again in the instance, so there is
2371 no global information to preserve.
2373 2011-08-05 Javier Miranda <miranda@adacore.com>
2375 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
2376 for renamings of predefined primitives.
2377 (In_Predef_Prims_DT): New subprogram.
2379 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2381 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
2382 possible interpretation of name is a reference type, add an
2383 interpretation that is the designated type of the reference
2384 discriminant of that type.
2385 * sem_res.adb (resolve): If the interpretation imposed by context is an
2386 implicit dereference, rewrite the node as the deference of the
2387 reference discriminant.
2388 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
2389 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
2390 parent type or base type.
2391 * sem_ch4.adb (Process_Indexed_Component,
2392 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
2393 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
2394 Check for implicit dereference.
2395 (List_Operand_Interps): Indicate when an implicit dereference is
2397 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
2399 2011-08-05 Thomas Quinot <quinot@adacore.com>
2401 * scos.ads: Update documentation of SCO table. Pragma statements can now
2402 be marked as disabled (using 'p' instead of 'P' as the statement kind).
2403 * par_sco.ads, par_sco.adb: Implement the above change.
2404 (Process_Decisions_Defer): Generate a P decision for the first parameter
2405 of a dyadic pragma Debug.
2406 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
2408 * put_scos.adb: Code simplification based on above change.
2410 2011-08-05 Robert Dewar <dewar@adacore.com>
2412 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
2413 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
2414 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
2415 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
2417 2011-08-05 Bob Duff <duff@adacore.com>
2419 * a-stunau.ads, g-spipat.adb: Update comments.
2421 2011-08-05 Bob Duff <duff@adacore.com>
2423 * a-fihema.ads: Minor comment fix.
2424 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
2426 (Attach, Detach): Remove some unnecessary code.
2427 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
2429 2011-08-05 Bob Duff <duff@adacore.com>
2431 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
2432 allocation for Objects component. This simplifies the code somewhat. It
2433 is also a little more efficient in the not-so-unusual case where there
2434 are no controlled objects allocated.
2435 Make Finalization_Started flag atomic.
2436 (Finalize): Avoid unnecessary detachment of items from the list.
2437 (pcol): Minor cleanup.
2439 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2441 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
2442 package whose name is the same as that of the generic unit, or its
2445 2011-08-05 Bob Duff <duff@adacore.com>
2447 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
2448 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
2449 Minor comment fixes.
2451 2011-08-05 Arnaud Charlet <charlet@adacore.com>
2453 * make.adb (Linking_Phase): No longer need to set source search path
2454 before calling gnatlink in CodePeer mode.
2455 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
2456 gcc in CodePeer mode, since the binder generated file no longer has a
2458 * switch.ads, switch.adb (Is_Language_Switch): Removed.
2459 * switch-c.adb: Update comment.
2461 2011-08-05 Thomas Quinot <quinot@adacore.com>
2463 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
2465 2011-08-05 Nicolas Roche <roche@adacore.com>
2467 * gnat_ugn.texi: Fix minor syntax error issue.
2469 2011-08-05 Vincent Celier <celier@adacore.com>
2471 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
2472 delete or close the file when the call to gnatmake returns a non
2473 successful return code.
2475 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2477 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
2478 check, indicate that the copy of the original node does not come from
2479 source, to prevent an infinite recursion of the expansion.
2481 2011-08-05 Johannes Kanig <kanig@adacore.com>
2483 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
2484 VC generation for subprogram bodies.
2486 2011-08-05 Yannick Moy <moy@adacore.com>
2489 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
2490 the base type with the smallest allowed base type.
2492 2011-08-05 Sergey Rybin <rybin@adacore.com>
2494 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
2497 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2499 * sem_ch12.ads: minor comment updates.
2501 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2503 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
2504 instantiation and a formal package the compiler generates a package
2505 renaming declaration so that the generic name within the declaration
2506 is interpreted as a renaming of the instance. At the end of a formal
2507 package declaration, this renaming must become invisible.
2509 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2511 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
2512 comparison and rely on concrete entities instead.
2514 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2516 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
2517 and discriminants, to indicate that the type has an access discriminant
2518 that supports implicit dereference.
2519 * snames.ads-tmpl: Add names of aspects and attributes related to
2520 Ada2012 iterators: constant_indexing, default_iterator,
2521 iterator_element, implicit_dereference, variable_indexing.
2522 * aspects.ads, aspects.adb: entries for iterator-related aspects.
2523 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
2524 iterator-related aspects.
2525 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
2527 2011-08-05 Sergey Rybin <rybin@adacore.com>
2529 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
2530 metrics in gnatmetric to cover new kinds of coupling mentrics.
2532 2011-08-05 Steve Baird <baird@adacore.com>
2534 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2535 of calling the user-defined main subprogram.
2536 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
2537 is set) Call_Main_Subprogram ahead of, as opposed to
2539 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
2540 generation of a "with" of the user-defined main subprogram.
2541 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
2542 (which is now called from Gen_Main instead).
2544 2011-08-05 Emmanuel Briot <briot@adacore.com>
2546 * projects.texi: Added reference to the Makefile package.
2548 2011-08-05 Thomas Quinot <quinot@adacore.com>
2550 * exp_ch7.adb: Minor comment rewording.
2552 2011-08-05 Ed Falis <falis@adacore.com>
2554 * env.c: Fix comment.
2556 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2558 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
2559 character comparison and rely on concrete entities instead.
2561 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2563 * sem_ch3.adb: (Check_Private_Overriding): better error message,
2564 suggested by AI95-0068.
2566 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
2568 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
2569 the two potential initialization calls. This accounts for any
2570 access-before-elaboration checks which may precede the initialization
2572 (Next_Suitable_Statement): New routine. Returns the next real statement
2573 after the input node while skipping generated checks.
2574 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
2575 with comment on usage.
2576 Do not generate Elaborate_All when the trigger is a finalization call
2577 coming from a type init proc.
2578 (Check_Elab_Call): Propagate the initialization procedure context to
2579 subsequent calls to Check_A_Call.
2580 (Check_Internal_Call_Continue): Propagate the initialization procedure
2581 context to subsequent calls to Check_Elab_Call.
2582 (Is_Finalization_Procedure): New routine. Returns True if the input
2583 entity denotes a [Deep_]Finalize routine.
2584 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
2585 along with comment on usage.
2587 2011-08-05 Vadim Godunko <godunko@adacore.com>
2589 * s-atocou.ads: Add list of supported platforms.
2591 2011-08-05 Yannick Moy <moy@adacore.com>
2593 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
2595 * opt.ads (Disable_ALI_File): new Boolean flag
2596 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
2598 2011-08-05 Ed Falis <falis@adacore.com>
2600 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
2601 environ is properly defined.
2603 2011-08-05 Vincent Celier <celier@adacore.com>
2605 * make.adb (Compilation_Phase): Exit immediately when all objects have
2606 been found up to date, to avoid multiple exit messages.
2607 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
2608 same project for languages with no compiler.
2609 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
2611 2011-08-05 Robert Dewar <dewar@adacore.com>
2613 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
2614 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
2615 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
2616 s-atocou-builtin.adb: Minor reformatting.
2618 2011-08-05 Yannick Moy <moy@adacore.com>
2620 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
2621 if the node to wrap is a pragma check, this node and enclosed
2622 expression are not expanded, so do not apply any transformations here.
2623 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
2624 introducing transient scopes.
2626 2011-08-05 Jose Ruiz <ruiz@adacore.com>
2628 * adaint.c (__gnat_set_writable, __gnat_set_readable,
2629 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
2630 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
2631 routine is available, so we use the default implementation of these
2633 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
2634 support for copying attributes on VxWorks 6.
2636 2011-08-05 Yannick Moy <moy@adacore.com>
2638 * debug.adb: Remove use of -gnatd.D.
2639 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
2640 * opt.ads: Simplify variables for ALFA mode, to keep one only
2641 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
2644 2011-08-05 Vincent Celier <celier@adacore.com>
2646 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
2647 Builder'Default_Switches.
2649 2011-08-05 Vincent Celier <celier@adacore.com>
2651 * makeusg.adb: Add lines for --create-map-file switches.
2653 2011-08-05 Ed Schonberg <schonberg@adacore.com>
2655 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
2656 profile is incomplete and the full view is available, replace it with
2658 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
2659 incomplete, freezing the subprogram is delayed until the full view is
2661 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
2662 fixed-point multiplication operator and the predefined operator is
2663 resolved in favor of the user-defined one.
2665 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2667 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
2670 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2672 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
2673 whether a type lacks user-defined Read or Write operations, or has a
2674 component that lacks them.
2675 * sem_attr.adb (Check_Stream_Attribute): if restriction
2676 No_Default_Stream_Attributes is active, verify that all subcomponent
2677 types of the target have user-defined stream operations, and report
2679 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
2680 * exp_strm.adb: Build_Elementary_Input_Call,
2681 Build_Elementary_Write_Call): remove checks for restriction
2682 No_Default_Stream_Attributes, now checked in semantics.
2684 2011-08-04 Vincent Celier <celier@adacore.com>
2686 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
2687 switches on the command line, look for all valid --RTS switches in the
2688 Builder switches and for each language use the first runtime name found
2689 to invoke gprconfig.
2690 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
2691 command line and there is no auto-configuration.
2692 (Runtime_Name_Set_For): New function.
2694 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2696 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
2697 elaborate initialization expression for variable Abort when processing
2698 a package body or a declaration.
2699 (Create_Finalizer): Propagate the package context when creating the
2700 exception-related variables.
2701 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
2702 For_Package along with usage comment.
2704 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2706 * gcc-interface/Makefile.in: Clean up targets.
2707 Enable new package for atomic counters and copy-on-write implementation
2708 of unbounded strings on x86 platforms.
2709 * gcc-interface/Make-lang.in: Update dependencies.
2711 2011-08-04 Robert Dewar <dewar@adacore.com>
2713 * exp_ch7.adb: Minor reformatting.
2715 2011-08-04 Robert Dewar <dewar@adacore.com>
2717 * exp_strm.adb: Minor reformatting.
2719 2011-08-04 Vadim Godunko <godunko@adacore.com>
2721 * s-atocou.adb: Replace by dummy version and use on targets where atomic
2722 operations are not supported.
2723 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
2724 * s-atocou-x86.adb: New file.
2725 * Makefile.rtl: Add s-atocou.o file
2727 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2729 * make.adb (Compile): Move setting of CodePeer_Mode to ...
2730 (Compilation_Phase): ... here.
2731 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
2733 2011-08-04 Thomas Quinot <quinot@adacore.com>
2735 * Make-generated.in: Fix minor typo in comment.
2737 2011-08-04 Thomas Quinot <quinot@adacore.com>
2739 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
2742 2011-08-04 Robert Dewar <dewar@adacore.com>
2744 * a-coinho.adb: Minor reformatting.
2746 2011-08-04 Robert Dewar <dewar@adacore.com>
2748 * a-coinho.ads: Minor reformatting.
2750 2011-08-04 Vadim Godunko <godunko@adacore.com>
2752 * s-atocou.ads, s-atocou.adb: New files.
2753 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
2754 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
2755 direct use of GCC's atomic builtins and replace them by use of new
2756 atomic counter package.
2758 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2760 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
2762 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2764 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
2765 with a call to Get_External_Tag.
2766 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
2767 subprogram usage. Remove the guard against package declarations and
2768 bodies since Build_Cleanup_Statements is no longer invoked in that
2770 (Build_Components): Initialize Tagged_Type_Stmts when the context
2771 contains at least one library-level tagged type.
2772 (Build_Finalizer): New local variables Has_Tagged_Types and
2773 Tagged_Type_Stmts along with associated comments on usage. Update the
2774 logic to include tagged type processing.
2775 (Create_Finalizer): Insert all library-level tagged type unregistration
2776 code before the jump block circuitry.
2777 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
2778 (Expand_N_Package_Declaration): Remove the call to
2779 Build_Cleanup_Statements.
2780 (Process_Tagged_Type_Declaration): New routine. Generate a call to
2781 unregister the external tag of a tagged type.
2782 (Processing_Actions): Reimplemented to handle tagged types.
2783 (Process_Declarations): Detect the declaration of a library-level
2784 tagged type and carry out the appropriate actions.
2785 (Unregister_Tagged_Types): Removed. The machinery has been directly
2786 merged with Build_Finalizer.
2788 2011-08-04 Robert Dewar <dewar@adacore.com>
2790 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
2791 gnatls.adb, exp_ch3.adb: Minor reformatting.
2793 2011-08-04 Marc Sango <sango@adacore.com>
2795 * sem_attr.adb (Analyze_Attribute): Replace the message
2796 "invisible attribute of}" of the spark restriction violation in
2797 attribute reference by the simple message "invisible attribute of type".
2798 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
2799 two insertion characters: '&' and '}'.
2801 2011-08-04 Vadim Godunko <godunko@adacore.com>
2803 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
2804 * a-coinho.ads, a-coinho.adb: New file.
2805 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
2807 2011-08-04 Nicolas Roche <roche@adacore.com>
2809 * alfa_test.adb: Not all ali files are containing alfa information even
2810 if compiled with -gnatd.F. So suppress warning about missing ALFA
2813 2011-08-04 Yannick Moy <moy@adacore.com>
2815 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
2817 * put_alfa.adb: Check that scope name is not empty.
2819 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2821 * exp_ch3.adb (Stream_Operation_Ok): new predicate
2822 Needs_Elementary_Stream_Operation, to determine whether user-defined
2823 Read and Write attributes are available for the elementary components
2824 of the given type. If only the predefined attributes are available,
2825 then when restriction No_Default_Stream_Attributes is active the
2826 predefined stream attributes for the composite type cannot be created.
2828 2011-08-04 Robert Dewar <dewar@adacore.com>
2830 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
2831 Put routines in alpha order
2833 2011-08-04 Jose Ruiz <ruiz@adacore.com>
2835 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
2836 * gcc-interface/Make-lang.in: Update dependencies.
2838 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2840 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
2841 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
2844 2011-08-04 Robert Dewar <dewar@adacore.com>
2846 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
2847 lib-xref-alfa.adb: Minor reformatting.
2849 2011-08-04 Marc Sango <sango@adacore.com>
2851 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
2852 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
2853 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
2856 2011-08-04 Tristan Gingold <gingold@adacore.com>
2858 * bindgen.adb (Gen_Adainit_C): Remove.
2859 (Gen_Adafinal_C): Ditto.
2860 (Gen_Elab_Externals_C): Ditto.
2861 (Gen_Elab_Calls_C): Ditto.
2862 (Gen_Elab_Order_C): Ditto.
2863 (Gen_Elab_Defs_C): Ditto.
2864 (Gen_Finalize_Library_C): Ditto.
2865 (Gen_Finalize_Library_Defs_C): Ditto.
2866 (Gen_Main_C): Ditto.
2867 (Gen_Output_File_C): Ditto.
2868 (Gen_Restrictions_C): Ditto.
2869 (Gen_Versions_C): Ditto.
2870 (Write_Info_Ada_C): Ditto.
2871 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
2872 (Gen_Output_File): Do not force Ada_Bind_File anymore.
2873 Always call Gen_Output_File_Ada.
2874 * gnatlink.adb (Begin_Info): Now a constant.
2876 (Ada_Bind_File): Remove
2877 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
2878 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
2879 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
2880 * opt.ads (Ada_Bind_File): Remove.
2882 2011-08-04 Thomas Quinot <quinot@adacore.com>
2884 * projects.texi: Document target-specific directory in default project
2887 2011-08-04 Thomas Quinot <quinot@adacore.com>
2889 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
2892 2011-08-04 Yannick Moy <moy@adacore.com>
2894 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
2895 opt.ads, lib-xref.ads: Code clean up.
2897 2011-08-04 Yannick Moy <moy@adacore.com>
2899 * gnat_rm.texi: Update description of Test_Case
2900 * gnat_ugn.texi: Typo.
2902 2011-08-04 Ed Falis <falis@adacore.com>
2904 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
2906 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2908 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
2909 it is of type Root_Controlled. This action eliminates fields Prev and
2910 Next from type equality.
2912 2011-08-04 Yannick Moy <moy@adacore.com>
2914 * lib-xref-alfa.adb: Correct typo.
2916 2011-08-04 Matthew Heaney <heaney@adacore.com>
2918 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
2921 2011-08-04 Yannick Moy <moy@adacore.com>
2923 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
2924 (Analyze_Pragma): allow static string expression for name of Test_Case,
2925 instead of simply string literals.
2926 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
2929 2011-08-04 Vincent Celier <celier@adacore.com>
2931 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
2932 case suffixes to find truncated main sources.
2934 2011-08-04 Tristan Gingold <gingold@adacore.com>
2936 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
2937 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
2938 (Compute_Current_Task): Ditto.
2940 2011-08-04 Tristan Gingold <gingold@adacore.com>
2942 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
2944 2011-08-04 Yannick Moy <moy@adacore.com>
2946 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
2947 library-level constant.
2948 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
2949 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
2950 used as selector of parameter association, in ALFA mode.
2952 2011-08-04 Robert Dewar <dewar@adacore.com>
2954 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
2955 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
2958 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2960 * make.adb (Linking_Phase): Set source search path before calling
2961 gnatlink in CodePeer mode.
2963 2011-08-04 Javier Miranda <miranda@adacore.com>
2965 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
2966 Remove code which takes care of building TSDs.
2967 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
2968 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
2969 the accessibility check in VM targets.
2970 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
2971 (Building_Static_DT): Now returns false for VM targets.
2972 (Build_VM_TSDs): Removed.
2973 (Expand_Interface_Conversion): Generate missing runtime check for
2974 conversions to interface types whose target type is unknown at compile
2976 (Make_VM_TSD): Add missing code to disable the generation of calls to
2977 Check_TSD if the tagged type is not defined at library level, or not
2978 has a representation clause specifying its external tag, or -gnatdQ is
2980 * exp_disp.ads (Build_VM_TSDs): Removed.
2981 (Make_VM_TSDs): Spec relocated from exp_disp.adb
2982 * sem_disp.adb (Check_Dispatching_Operation): No code required to
2983 register primitives in the dispatch tables in VM targets.
2984 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
2985 initialization of class-wide interface objects in VM targets.
2986 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
2989 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2991 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
2992 when dotnet-ld cannot be found.
2994 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2996 * bindgen.adb: Simplify significantly generation of binder body file in
2998 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
2999 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
3002 2011-08-04 Yannick Moy <moy@adacore.com>
3004 * sem_prag.adb, sem.ads: Code cleanup.
3006 2011-08-04 Tristan Gingold <gingold@adacore.com>
3008 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
3009 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
3010 results if possible.
3011 * s-stusta.adb (Print): Adjust after changes in s-stausa.
3012 * gnat_ugn.texi: Update dynamic stack usage section.
3014 2011-08-04 Steve Baird <baird@adacore.com>
3016 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
3017 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
3018 contains only a call to the user-defined main subprogram.
3019 (Gen_Main_Ada) - If CodePeer_Mode is set, then
3020 call the "wrapper" subprogram instead of directly
3021 calling the user-defined main subprogram.
3023 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3025 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
3026 alternatives of a case statement for controlled objects. Rename local
3027 variable A to Dead_Alt.
3028 (Expand_N_If_Statement): Check the then and else statements of an if
3029 statement for controlled objects. Check the then statements of all
3030 elsif parts of an if statement for controlled objects.
3031 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
3033 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
3034 detects a loop associated with the expansion of an array object.
3035 Augment the processing of the loop statements to account for a possible
3036 wrap done by Process_Statements_For_Controlled_Objects.
3037 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
3038 statements and abortable part of an asynchronous select for controlled
3040 (Expand_N_Conditional_Entry_Call): Check the else statements of a
3041 conditional entry call for controlled objects.
3042 (Expand_N_Selective_Accept): Check the alternatives of a selective
3043 accept for controlled objects.
3044 (Expand_N_Timed_Entry_Call): Check the entry call and delay
3045 alternatives of a timed entry call for controlled objects.
3046 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
3047 exception handler for controlled objects.
3048 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
3049 Add formal parameter Nested_Constructs along with its associated
3051 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
3052 Requires_Cleanup_Actions.
3053 (Process_Statements_For_Controlled_Objects): New routine.
3054 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
3055 routine. Inspect a node which contains a non-handled sequence of
3056 statements for controlled objects. If such an object is found, the
3057 statements are wrapped in a block.
3059 2011-08-04 Bob Duff <duff@adacore.com>
3061 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
3062 need to compare with Class_Wide_Type (T2), in order to get at the
3063 original class-wide type node.
3064 * sem_type.ads (Covers): Improve the comment.
3065 * einfo.ads (Class_Wide_Type): Improve the comment.
3066 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
3067 the type of the Deref.
3069 2011-08-04 Yannick Moy <moy@adacore.com>
3071 * gnat_rm.texi: Document that Test_Case pragma can only appear on
3072 separate declarations.
3073 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
3074 check identifier of pragma argument.
3075 (Chain_TC): check that no other test case associated to the same entity
3076 share the same name.
3077 (Check_Test_Case): disallow test case inside subprogram body
3078 (Analyze_Pragma): correct call to check identifier and not argument
3079 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
3080 function gets name from test case pragma.
3082 2011-08-04 Yannick Moy <moy@adacore.com>
3084 * gnat_rm.texi: Document new pragma and aspect.
3085 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
3086 (No_Duplicates_Allowed): new constant array defining whether duplicates
3087 aspects of each kind can appear on the same declaration.
3088 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
3089 field, which points to a node holding the previous Spec_PPC_List.
3090 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
3091 through the indirection with Contract.
3092 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
3093 * par-prag.adb (Prag): do nothing on Test_Case pragma
3094 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
3096 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
3097 component Ensures of Test_Case.
3098 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
3099 (Analyze_Generic_Subprogram_Declaration,
3100 Analyze_Subprogram_Instantiation,
3101 Analyze_Abstract_Subprogram_Declaration,
3102 Analyze_Subprogram_Body_Helper,
3103 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
3104 insert contract in subprogram node at point of definition
3106 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
3107 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
3108 corresponding pragma
3109 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
3110 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
3111 similar to the analysis of pre/post
3112 (Derive_Subprogram): insert contract in subprogram node at point of
3114 * sem_prag.adb, sem_prag.ads
3115 (Check_Arg_Is_String_Literal, Check_Identifier):
3116 new checking procedures to be called in treatment of pragmas
3117 (Check_Test_Case): new procedure to check that a Test_Case aspect or
3118 pragma is well-formed. This does not check currently that 'Result is
3119 used only in the Ensures component of a Test_Case.
3120 (Analyze_Pragma): add case for Test_Case
3121 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
3122 components of a Test_Case.
3123 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
3124 expressions in the 3rd (and 4th if present) arguments of a Test_Case
3125 pragma, treated as spec expressions.
3126 (Sig_Flags): add value -1 for Test_Case.
3127 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
3128 Get_Requires_From_Test_Case_Pragma): getters for both expression
3129 components of a Test_Case.
3130 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
3131 indirection between an entry or [generic] subprogram entity and its
3132 pre/post + test-cases.
3133 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
3134 get/set for fields of an N_Contract node.
3135 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
3136 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
3137 names and pragma for Test_Case.
3138 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
3140 2011-08-04 Vincent Celier <celier@adacore.com>
3142 * gnat_ugn.texi: Improve documentation of gnatmake switch
3143 --source-info-file=.
3145 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3147 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
3148 type). Initialize Atyp to the appropriate type which is later checked
3149 for completion. Rewrite the assertion associated with private type
3152 2011-08-04 Ed Falis <falis@adacore.com>
3154 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
3155 initialize the number of CPUs.
3157 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3159 * sem_type.adb (Disambiguate): New subsidiary routine
3160 In_Same_Declaration_List, to implement AI05-0020: a user-defined
3161 equality on an anonymous access type whose designated type is private
3162 does not lead to an ambiguity with the universal access equality
3163 operator in the body or child units of the defining package. The same
3164 is true for a multiplication operator on a private type completed with
3167 2011-08-04 Javier Miranda <miranda@adacore.com>
3169 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
3170 (Normalize_Scalars_Config): Removed.
3172 (Register_Opt_Config_Switches): Remove registering config values of
3173 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
3174 (Restore_Opt_Config_Switches): Remove code which restores the values of
3175 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3176 Init_Or_Norm_Scalars.
3177 (Save_Opt_Config_Switches): Remove code which saves values of
3178 Init_Or_Norm_Scalars and Normalize_Scalars.
3179 (Set_Opt_Config_Switches): Remove code which restores config values of
3180 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
3181 Init_Or_Norm_Scalars.
3183 2011-08-04 Yannick Moy <moy@adacore.com>
3185 * frontend.adb (Frontend): remove previous patch to avoid full
3186 qualification in ALFA mode.
3187 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
3188 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
3189 unique name for an entity, which could be used to identify the entity
3190 across compilation units.
3192 2011-08-04 Thomas Quinot <quinot@adacore.com>
3195 (Initialize_Default_Project_Path): Add target specific directory
3196 ($prefix/$target/lib/gnat) in front of project path in all cases
3197 (making gnatmake's behaviour consistent with gprbuild).
3198 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
3199 Pass target name from Sdefault to project subsystem.
3200 * gnatls.adb: Show new target specific default project directory.
3202 2011-08-04 Johannes Kanig <kanig@adacore.com>
3204 * cstand.adb: Add Information to Identifier in Standard
3205 (Identifer_For): Set Entity to the corresponding entity
3207 2011-08-04 Sergey Rybin <rybin@adacore.com>
3209 * gnat_ugn.texi: Update doc on gnatcheck.
3211 2011-08-04 Yannick Moy <moy@adacore.com>
3213 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
3216 2011-08-04 Yannick Moy <moy@adacore.com>
3218 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
3219 performing expansion.
3220 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
3221 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
3222 it is not called in ALFA mode.
3224 2011-08-04 Emmanuel Briot <briot@adacore.com>
3226 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
3227 after all, so removed.
3229 2011-08-04 Sergey Rybin <rybin@adacore.com>
3231 * vms_data.ads: Add missing VMS qualifiers.
3233 2011-08-04 Emmanuel Briot <briot@adacore.com>
3235 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
3236 the list of files on the command line after processing it through
3239 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3241 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
3242 processing for .NET/JVM. These targets can now benefit from
3243 Raise_From_Controlled_Operation and they share the same processing with
3245 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
3246 These targets need transient scopes in order to properly finalize short
3247 lived controlled objects.
3248 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
3249 NET/JVM. These targets can now benefit from
3250 Raise_From_Controlled_Operation and they share the same processing with
3253 2011-08-04 Geert Bosch <bosch@adacore.com>
3255 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
3257 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3259 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
3260 Expand_Record_Aggregate, to determine whether aggregate must be
3261 expanded into assignments. This is the case if the ancestor part is
3262 private, regarless of the setting of the flag Has_Private_Ancestor.
3264 2011-08-04 Ed Falis <falis@adacore.com>
3266 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
3268 2011-08-04 Bob Duff <duff@adacore.com>
3270 * sinfo.ads: Fix comment.
3272 2011-08-04 Steve Baird <baird@adacore.com>
3274 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
3275 choose a package name in much the same way as is
3276 done for JGNAT when VM_Target /= No_VM, except that
3277 a slightly more distinctive prefix string is used.
3279 2011-08-04 Emmanuel Briot <briot@adacore.com>
3281 * makeutl.adb (Complete_Mains): no longer accept unit names on the
3282 gnatmake command line.
3283 This behavior was never documented (and was supported only because of
3284 an early bug in the code). This case might lead to ambiguous cases
3285 (between unit names and truncated base names without suffixes).
3287 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3289 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
3290 Remove the external tag of a tagged type from the internal hash table.
3291 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
3292 expanded usage of the routine. Strenghten the check for Is_Master. Add
3293 processing for tagged types.
3294 (Build_Finalizer): Create all the necessary lists used in finalizer
3295 creation when the processed context is a package that may contain
3297 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
3298 Requires_Cleanup_Actions.
3299 (Expand_N_Package_Body): Package bodies may need clean up code
3300 depending on whether they contain tagged types.
3301 (Expand_N_Package_Declaration): Package declarations may need clean up
3302 code depending on whether they contain tagged types.
3303 (Unregister_Tagged_Types): New routine. Search through a list of
3304 declarations or statements, looking for non-abstract Ada tagged types.
3305 For each such type, generate code to unregister the external tag.
3306 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
3307 Requires_Cleanup_Actions.
3308 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
3309 through a list of declarations or statements looking for non-abstract
3310 Ada tagged types or controlled objects.
3311 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
3312 Requires_Cleanup_Actions.
3313 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
3314 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
3317 2011-08-04 Vincent Celier <celier@adacore.com>
3319 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
3320 has Ada sources, not project Project, because if the root project
3321 Project has no sources of its own, all projects will be deemed without
3324 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3326 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
3327 of the No_Param_Proc acc-to-subp type used for initialization of
3328 __gnat_finalize_library_objects so that it's declared at library level
3329 rather than nested inside of the adainit routine.
3331 2011-08-04 Javier Miranda <miranda@adacore.com>
3333 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
3334 if the tagged type has a representation clause which specifies its
3337 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3339 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
3340 Remove previous procedure with that name.
3341 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
3343 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
3344 subtype mark, the ancestor cannot have unknown discriminants.
3345 (Resolve_Record_Aggregate): if the type has invisible components
3346 because of a private ancestor, the aggregate is illegal.
3348 2011-08-04 Vincent Celier <celier@adacore.com>
3350 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
3351 account switches -gnat2005, -gnat12 and -gnat2012.
3353 2011-08-04 Bob Duff <duff@adacore.com>
3355 * s-tasdeb.ads: Minor comment fix.
3357 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3359 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
3361 * switch.ads, switch.adb (Is_Language_Switch): New function.
3363 2011-08-04 Vincent Celier <celier@adacore.com>
3365 * switch-c.adb: Minor comment addition.
3367 2011-08-04 Vincent Celier <celier@adacore.com>
3369 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
3370 ending with '=' is followed by a space (missing file name).
3372 2011-08-04 Pascal Obry <obry@adacore.com>
3374 * g-regist.ads: Fix size of HKEY on x86_64-windows.
3376 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3378 * sem_ch12.adb (Analyze_Associations): New routine
3379 Check_Overloaded_Formal_Subprogram to reject a formal package when
3380 there is a named association or a box initialisation for an overloaded
3381 formal subprogram of the corresponding generic.
3383 2011-08-04 Yannick Moy <moy@adacore.com>
3385 * alfa.ads (ALFA_Xref_Record): add component for type of entity
3386 * get_alfa.adb, put_alfa.adb: Read and write new component of
3388 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
3390 2011-08-04 Pascal Obry <obry@adacore.com>
3392 * urealp.adb: Minor reformatting.
3394 2011-08-04 Tristan Gingold <gingold@adacore.com>
3396 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
3397 Handle the case when Cleanup_Protected_Object returns Empty.
3399 2011-08-04 Yannick Moy <moy@adacore.com>
3401 * frontend.adb (Frontend): only qualify names in non-ALFA mode
3403 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3405 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
3406 call, ignore functions.
3408 2011-08-04 Geert Bosch <bosch@adacore.com>
3410 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
3413 2011-08-04 Emmanuel Briot <briot@adacore.com>
3415 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
3416 as an index for Builder'Switches. This conforms to the documentation.
3417 * make.adb (Insert_Project_Sources): avoid duplicate code
3419 2011-08-04 Emmanuel Briot <briot@adacore.com>
3421 * makeutl.adb (Complete_Mains): if the user has passed a relative file
3422 name on the command line (for instance "../dummy"), never assume it can
3425 2011-08-04 Tristan Gingold <gingold@adacore.com>
3427 * bindgen.adb: Remove code the reference or create the
3428 Break_Start/__gnat_break_start procedure.
3429 * s-stalib.adb (Break_Start): Removed.
3431 2011-08-04 Emmanuel Briot <briot@adacore.com>
3433 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
3434 shared with gprbuild.
3436 2011-08-04 Yannick Moy <moy@adacore.com>
3438 * par-ch4.adb (P_Primary): preferentially issue an error message about
3439 a missing parenthesis arount a conditional or case expression in Ada
3440 2012 mode, if we detect that the alignment is not correct for a
3443 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3445 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
3446 tag-to-class-wide conversion as needing finalization actions.
3447 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
3448 a tag-to-class-wide conversion as needing finalization actions.
3449 (Is_Finalizable_Transient): The result of a tag-to-class-wide
3450 conversion does not need finalization actions.
3451 (Is_Tag_To_CW_Conversion): New routine.
3452 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
3453 whether an object is the result of a tag-to-class-wide conversion.
3455 2011-08-04 Yannick Moy <moy@adacore.com>
3457 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
3458 the left-hand-side and right-hand-side of a conjunct are inserted when
3459 translating a pre- or postcondition
3460 * sem_ch6.adb: Correct typo in comment
3462 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3464 * gnat_rm.texi: Ravenscar does not prohibit dependence on
3465 Unchecked_Conversion and Unchecked_Deallocation.
3467 2011-08-04 Thomas Quinot <quinot@adacore.com>
3469 * make.adb: Minor reformatting.
3471 2011-08-04 Emmanuel Briot <briot@adacore.com>
3473 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
3474 sources in the project and its imported projects, but not in the whole
3477 2011-08-04 Emmanuel Briot <briot@adacore.com>
3479 * make.adb: Remove debug trace.
3481 2011-08-04 Vincent Celier <celier@adacore.com>
3483 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
3484 path in canonical form, to be able to compare path names on platforms
3485 such as Windows or Darwin.
3487 2011-08-04 Thomas Quinot <quinot@adacore.com>
3489 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
3490 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
3491 * scos.ads: Update documentation accordingly.
3492 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
3495 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3497 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
3498 attribute only if prefix type is scalar.
3500 2011-08-04 Emmanuel Briot <briot@adacore.com>
3502 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
3503 in gnatmake for specifying mains on the command line that do not belong
3504 to the main project. These mains must currently all belong to the same
3506 (Ultimate_Extension_Of): removed, since duplicated
3507 Ultimate_Extending_Project.
3509 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3511 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
3513 (CodePeer_Mode_String): New.
3514 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
3516 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
3517 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
3518 mode, since no useful elaboration subprogram is needed by CodePeer.
3519 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
3520 In this mode, compile binder file with -gnatC and do stop after this
3523 2011-08-04 Vincent Celier <celier@adacore.com>
3525 * exp_ch7.adb: Minor comment fix.
3527 2011-08-04 Robert Dewar <dewar@adacore.com>
3529 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
3530 exp_ch4.adb, makeutl.adb: Minor reformatting.
3532 2011-08-04 Emmanuel Briot <briot@adacore.com>
3534 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
3535 Create several new subprograms to move code out of Make. This makes the
3536 code more readable, removes code duplication, and is a preparation work
3537 for adding support for aggregate projects.
3539 2011-08-04 Tristan Gingold <gingold@adacore.com>
3541 * s-po32gl.ads, s-po32gl.adb: New files.
3542 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
3543 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
3544 (Build_Finalization_Collection): Use it.
3545 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
3546 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
3548 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
3549 * gcc-interface/Make-lang.in: Update dependencies.
3551 2011-08-04 Emmanuel Briot <briot@adacore.com>
3553 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
3556 2011-08-04 Emmanuel Briot <briot@adacore.com>
3558 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
3559 command line is not a file name, also check whether it could be a unit
3562 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3564 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
3565 the header of the finalization routine.
3566 If the unit has no finalizer but is a body whose spec has one, then
3567 generate the decrement of the elaboration entity only.
3568 If the unit has a finalizer and is a spec, then do not generate the
3569 decrement of the elaboration entity.
3570 (Gen_Finalize_Library_C): Likewise.
3572 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3574 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
3575 (Bounds_Size_Expression): Removed.
3576 (Double_Alignment_Of): New subsidiary routine.
3577 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
3578 for a hole in the dope vector of unconstrained arrays due to different
3579 index and element alignments.
3581 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3583 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
3584 raise program_error because body has not been seen yet.
3586 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3588 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
3591 2011-08-04 Vincent Celier <celier@adacore.com>
3593 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
3595 2011-08-04 Yannick Moy <moy@adacore.com>
3597 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
3598 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
3600 2011-08-04 Thomas Quinot <quinot@adacore.com>
3602 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
3603 instantiation in RCI.
3605 2011-08-04 Emmanuel Briot <briot@adacore.com>
3607 * make.adb: Share more code with gprbuild
3609 2011-08-04 Emmanuel Briot <briot@adacore.com>
3611 * projects.texi: Added documentation for the IDE'Gnat project file
3614 2011-08-04 Nicolas Roche <roche@adacore.com>
3616 * gnat_rm.texi: Minor editing.
3618 2011-08-04 Javier Miranda <miranda@adacore.com>
3620 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
3621 and the library case for VM targets.
3622 (Gen_Adainit_Ada): Likewise.
3624 2011-08-04 Robert Dewar <dewar@adacore.com>
3626 * g-altive.ads: Minor comment updates.
3627 * prj-nmsc.adb: Minor reformatting.
3629 2011-08-04 Javier Miranda <miranda@adacore.com>
3632 (Normalize_Scalars_Config): Value of the configuration switch set by
3633 pragma Normalize_Scalars when it appears in the gnat.adc file.
3634 (Normalize_Scalars): New field for record Config_Switches_Type. Used
3635 to save and restore settings of this pragma.
3637 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
3638 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
3640 2011-08-04 Vincent Celier <celier@adacore.com>
3642 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
3644 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3646 * makeutl.adb: Minor reformatting.
3648 2011-08-04 Olivier Hainque <hainque@adacore.com>
3650 * g-altive.ads: Update comments to reflect that only the soft
3651 binding is available today.
3653 2011-08-04 Robert Dewar <dewar@adacore.com>
3655 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
3656 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
3657 * gcc-interface/Make-lang.in: Update dependencies.
3659 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3661 * prj-env.adb: Remove local debug traces.
3663 2011-08-04 Yannick Moy <moy@adacore.com>
3665 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
3666 was used instead of Hi_OK, which could cause a read of an uninitialized
3667 value later on. Detected while working on the new warning.
3668 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
3670 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
3671 in more cases, in order to detect more unreferenced values.
3672 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
3673 object for expression, if any.
3675 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3677 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
3678 the operand types instead of the Esize.
3680 2011-08-04 Steve Baird <baird@adacore.com>
3682 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
3683 enable CodePeer_Mode.
3684 * bindusg.adb (Display): Add help message describing -P binder switch.
3685 * gnat_ugn.texi: Document -P binder switch.
3686 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
3687 user-defined main program directly.
3688 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
3689 user-defined main program in the context clause of the package body.
3691 2011-08-04 Yannick Moy <moy@adacore.com>
3693 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
3694 duplicate of Defining_Entity
3695 (Get_Unique_Entity_For_Decl): rename function into
3696 Unique_Defining_Entity
3697 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
3698 (Formal_Proof_On): remove synthesized flag
3699 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
3700 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
3701 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
3702 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
3703 Annotate (Formal_Proof)
3705 2011-08-04 Emmanuel Briot <briot@adacore.com>
3707 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
3708 source files with non-standard naming schemes, in imported projects
3710 2011-08-04 Emmanuel Briot <briot@adacore.com>
3712 * makeutl.adb (Complete_Mains): when a multi-unit source file is
3713 specified on the gprbuild command line, we need to compile all units
3714 within that file, not just the first one we find
3715 Fix error message for mains that are not found.
3717 2011-08-04 Thomas Quinot <quinot@adacore.com>
3719 * sem_ch6.adb: Update comment.
3720 * sem_ch12.adb: Minor reformatting.
3722 2011-08-04 Bob Duff <duff@adacore.com>
3724 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
3725 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
3726 race condition whose symptom is to fail to lock Parent. That, in turn,
3727 causes Parent.Awake_Count to be accessed without locking Parent, which
3728 causes another race condition whose symptom is that Parent.Awake_Count
3729 can be off by 1 (either too high or too low). The solution is to lock
3730 Parent unconditionally, and then lock Acceptor, before reading
3731 Acceptor.Terminate_Alternative.
3733 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3735 * debug.adb: Update comment.
3737 2011-08-04 Robert Dewar <dewar@adacore.com>
3739 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
3740 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
3741 exp_ch6.adb: Minor reformatting.
3743 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3745 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
3748 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3750 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
3752 2011-08-04 Thomas Quinot <quinot@adacore.com>
3754 * sinfo.ads: Minor reformatting.
3756 2011-08-04 Emmanuel Briot <briot@adacore.com>
3758 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
3759 even if there is no location.
3761 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3763 * sem_res.adb, sem_ch4.adb: move check for restriction
3764 No_Task_Hierarchy to resolve_allocator.
3766 2011-08-04 Thomas Quinot <quinot@adacore.com>
3768 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
3769 This flag of N_Pragma nodes is not used, remove it as well as all of
3770 the associated circuitry.
3772 2011-08-04 Javier Miranda <miranda@adacore.com>
3774 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
3775 runtime check on duplicated externa tags
3776 * debug.adb Document switch -gnatdQ.
3778 2011-08-04 Gary Dismukes <dismukes@adacore.com>
3780 * a-fihema.ads: Minor typo fix.
3782 2011-08-04 Yannick Moy <moy@adacore.com>
3784 * sem_ch10.adb: Minor comment update.
3786 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3788 * einfo.adb: Update the node field usage to reflect the renaming of
3789 Return_Flag to Return_ Flag_Or_Transient_Decl.
3790 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
3791 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
3792 (Write_Field15_Name): Change Return_Flag to
3793 Return_Flag_Or_Transient_Decl.
3794 * einfo.ads: Rename node field Return_Flag to
3795 Return_Flag_Or_Transient_Decl. Update the associated comment and all
3796 occurrences in entities.
3797 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
3798 associated Inline pragma.
3799 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
3800 associated Inline pragma.
3801 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
3803 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
3804 Return_Flag and Set_Return_Flag.
3805 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
3806 objects generated for controlled transients declared inside an
3807 Exception_With_Actions. Update the calls to Return_Flag.
3808 (Process_Object_Declaration): Add code to add a null guard for hook
3809 objects generated for controlled transients declared inside an
3810 Exception_With_Actions. Update related comment.
3811 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
3812 objects generated for controlled transients declared inside an
3813 Exception_With_Actions. Update the calls to Return_Flag.
3814 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
3816 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3818 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
3819 positional aggregate.
3821 2011-08-04 Vincent Celier <celier@adacore.com>
3823 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
3824 SLOC only for pragmas.
3826 2011-08-04 Emmanuel Briot <briot@adacore.com>
3828 * projects.texi: Minor typo fix.
3830 2011-08-04 Emmanuel Briot <briot@adacore.com>
3832 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
3833 on case-sensitive file systems.
3835 2011-08-04 Thomas Quinot <quinot@adacore.com>
3837 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
3838 nested in a disabled pragma.
3839 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
3840 enclosing pragma, if any, for X decisions.
3842 2011-08-04 Thomas Quinot <quinot@adacore.com>
3844 * sem_prag.adb: Minor reformatting.
3846 2011-08-04 Vincent Celier <celier@adacore.com>
3848 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
3849 allowed in no run time mode.
3851 2011-08-04 Vincent Celier <celier@adacore.com>
3853 * make.adb (Check): When -gnatc is used, check for the source file
3854 inside the ALI file with a canonical case file name.
3856 2011-08-04 Emmanuel Briot <briot@adacore.com>
3858 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
3859 overriding the separator.
3861 2011-08-04 Robert Dewar <dewar@adacore.com>
3863 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
3864 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
3866 2011-08-04 Robert Dewar <dewar@adacore.com>
3868 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
3870 2011-08-04 Yannick Moy <moy@adacore.com>
3872 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
3873 'Result only appears in postcondition of function.
3875 2011-08-04 Thomas Quinot <quinot@adacore.com>
3877 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
3878 external tag, include the value of the external tag in the exception
3881 2011-08-04 Yannick Moy <moy@adacore.com>
3883 * sem_attr.adb (Result): modify error message for misplaced 'Result
3885 2011-08-04 Sergey Rybin <rybin@adacore.com>
3887 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
3888 clear that the second argument must be an identifier.
3890 2011-08-04 Thomas Quinot <quinot@adacore.com>
3892 * exp_ch9.adb (Build_Barrier_Function): When compiling with
3893 -fpreserve-control-flow, insert an IF statement on the barrier
3894 condition to ensure that a conditional branch instruction is generated.
3896 2011-08-04 Emmanuel Briot <briot@adacore.com>
3898 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
3899 (Processing_Flags.Ignore_Missing_With): new flag.
3901 2011-08-04 Emmanuel Briot <briot@adacore.com>
3903 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
3904 Source_List_File on case-insensitive systems where the file is actually
3905 on a case-sensitive file system (NFS,...).
3907 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3909 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
3910 function return contains a controlled [extension] aggregate and the
3911 return statement is not part of a handled sequence of statements, wrap
3912 the return in a block. This ensures that all controlled temporaries
3913 generated during aggregate resolution will be picked up by the
3914 finalization machinery.
3916 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3918 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
3919 components, freeze type before resolution, to ensure that default
3920 initializations are present for all components.
3921 * sem_res.adb (Resolve_Actuals): the designated object of an
3922 accces-to-constant type is a legal actual in a call to an
3923 initialization procedure.
3925 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3927 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
3928 N_Unchecked_Type_Conversion to the possible containers of a renamed
3931 2011-08-04 Yannick Moy <moy@adacore.com>
3933 * par-ch13.adb (Aspect_Specifications_Present): recognize
3934 "with Identifier'Class =>" as an aspect, so that a meaningful warning
3935 is issued in Strict mode.
3936 * par.adb: Fix typos in comments.
3938 2011-08-04 Yannick Moy <moy@adacore.com>
3940 * sem_attr.adb (Result): modify error message to take into account Post
3941 aspect when compiling Ada 2012 (or newer) code.
3943 2011-08-04 Nicolas Roche <roche@adacore.com>
3945 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
3946 remove need for GCC exceptions.
3948 2011-08-04 Vincent Celier <celier@adacore.com>
3950 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
3951 project, not the source file name.
3952 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
3953 excluded, continue looking. This excluded source will only be returned
3954 if there is no other source with the same base name that is not locally
3957 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3959 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
3960 private and one of the operands is a real literal, use a qualified
3961 expression rather than a conversion which is not meaningful to the
3964 2011-08-04 Yannick Moy <moy@adacore.com>
3966 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
3967 corresponding aspect X'Class are allowed, proceed with analysis of the
3968 aspect instead of skipping it.
3970 2011-08-04 Tristan Gingold <gingold@adacore.com>
3972 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
3973 This will allow to have an Ada implementation for the subprogram.
3975 2011-08-04 Ed Schonberg <schonberg@adacore.com>
3977 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
3978 completion and aspects are present, apply them to the entity for the
3979 type which is currently the partial view, but which is the one that
3981 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
3982 applies to a partial view, indicate that the full view has predicates
3983 and delayed aspects.
3984 (Replace_Type_Reference): Handle properly predicates that apply to the
3985 full view of a private completion.
3987 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3989 * layout.adb (Layout_Type): For composite types, do not set Esize.
3990 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
3992 (Size_Known): Look at the RM size of components instead of the Esize.
3993 (Freeze_Record_Type): Look at the RM size instead of the Esize to
3994 issue warning and activate Implicit_Packing.
3995 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
3996 if the Esize is not known.
3997 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
3998 for elementary types only.
3999 (Analyze_Record_Representation_Clause): Look at the RM size instead
4000 of the Esize to issue errors.
4001 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
4003 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
4005 Look at the RM size instead of the Esize for types if the latter is
4007 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
4009 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4011 * sem_type.adb: proper handling of equality not involving anonymous
4014 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4016 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
4017 Vis_Decls. When creating a library-level finalizer for a package spec,
4018 both the declaration and body of the finalizer are inserted either in
4019 the visible or private declarations of the package spec.
4021 2011-08-04 Javier Miranda <miranda@adacore.com>
4023 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
4024 use of the full-view of a type when invoking Is_Ancestor.
4025 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
4026 the full-view of private parents is requested, then use also the
4027 full-view of the parent of the first derivation.
4029 2011-08-04 Tristan Gingold <gingold@adacore.com>
4031 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
4032 instead of the locally imported procedure.
4033 * s-taprop-mingw.adb (Enter_Task): Ditto.
4034 * s-valrea.adb (Scan_Real): Ditto.
4035 * s-imgrea.adb (Set_Image_Real): Ditto.
4036 * s-flocon.ads: Make the package pure.
4038 2011-08-04 Thomas Quinot <quinot@adacore.com>
4040 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
4041 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
4042 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
4043 New subprogram, moved here from...
4044 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
4045 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
4046 rewriting of the last argument into a procedure call statement here...
4047 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
4050 2011-08-04 Thomas Quinot <quinot@adacore.com>
4052 * par_sco.adb: Minor reformatting.
4054 2011-08-04 Robert Dewar <dewar@adacore.com>
4056 * erroutc.adb: Minor reformatting.
4058 2011-08-04 Thomas Quinot <quinot@adacore.com>
4060 * par_sco.adb: Comment update.
4062 2011-08-04 Tristan Gingold <gingold@adacore.com>
4064 * s-flocon.ads: New file.
4065 * g-flocon.ads: Now a renaming of s-flocon.
4066 * Makefile.rtl: Add s-flocon.o
4068 2011-08-04 Javier Miranda <miranda@adacore.com>
4070 * exp_strm.adb (Build_Array_Input_Function): if the array type is
4071 constrained, do not attempt to build a subtype of it.
4073 2011-08-04 Yannick Moy <moy@adacore.com>
4075 * errout.ads Change comments: remove 'R'M as an example where quotes
4076 are needed; add ALFA as another case where quotes are not needed
4077 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
4078 case where quotes are not needed.
4079 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
4080 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
4081 Remove all occurrences of 'A'L'F'A
4083 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4085 * sem_ch13.adb: check legality of invariant pragma.
4087 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4089 * bindgen.adb: Add comments.
4091 2011-08-04 Yannick Moy <moy@adacore.com>
4093 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
4095 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
4096 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
4098 2011-08-04 Robert Dewar <dewar@adacore.com>
4100 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
4101 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
4102 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
4104 2011-08-04 Thomas Quinot <quinot@adacore.com>
4106 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
4108 2011-08-04 Thomas Quinot <quinot@adacore.com>
4111 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
4114 2011-08-04 Robert Dewar <dewar@adacore.com>
4116 * einfo.ads, exp_ch4.adb: Minor reformatting.
4118 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4120 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
4122 2011-08-04 Ed Schonberg <schonberg@adacore.com>
4124 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
4125 type in all cases to compute list of primitive operations, because full
4126 view may be an itype that is not attached to the list of declarations.
4128 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4130 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
4131 library has already been finalized.
4132 (Gen_Adafinal_C): Likewise.
4133 (Gen_Adainit_Ada): Generate an early return if the library has
4134 already been elaborated.
4135 (Gen_Adainit_C): Likewise.
4136 (Gen_Output_File_Ada): Generate an elaboration flag.
4137 (Gen_Output_File_C): Likewise.
4139 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4141 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
4142 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
4143 built in the first place.
4144 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
4145 for CodePeer because Finalize_Address was not built to begin with.
4146 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
4148 2011-08-04 Pascal Obry <obry@adacore.com>
4150 * adaint.c (__gnat_tmp_name): Use current process id to create temp
4151 filenames, this ensures unicity of filenames across processes.
4153 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4155 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
4156 Raise_Controlled to Raise_From_Controlled_Operation. Update the
4157 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
4158 Add False as the actual to From_Abort in the generated call to
4159 Raise_From_Controlled_Operation.
4161 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4163 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
4164 so that the ali file name can be retrieved from outside of this package.
4165 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
4166 doing nothing in the general case, but used to update the object file
4167 timestamp if directly generated by the backend.
4168 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
4169 to a later time than the ali file one.
4171 2011-08-04 Yannick Moy <moy@adacore.com>
4173 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
4174 entities whose body contains an Annotate pragma which forces formal
4176 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4177 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
4178 Mark_Non_ALFA_Subprogram to pass in a message and node.
4179 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
4180 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
4181 surrounding subprogram.
4182 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
4183 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
4184 as not in ALFA is annotated with Formal_Proof being On, then an error
4185 is issued based on the additional parameters for message and node.
4186 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
4187 * gcc-interface/Make-lang.in: Update dependencies.
4189 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4191 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
4192 Finalize_Address when CodePeer is enabled.
4194 2011-08-04 Pascal Obry <obry@adacore.com>
4196 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
4197 the latter returns a pointer to a static buffer which is deallocated
4198 at the end of the routine.
4200 2011-08-04 Yannick Moy <moy@adacore.com>
4202 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
4203 after index creation; mark unconstrained base array type generated as
4204 being in/not in ALFA as well
4205 (Make_Index): mark subtype created as in/not in ALFA
4206 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
4207 over a loop as in/not in ALFA, depending on its type and form of loop
4210 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4212 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
4213 directly to False on .NET and JVM.
4215 2011-08-04 Yannick Moy <moy@adacore.com>
4217 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
4218 constraint that subtype must come from source code to be in ALFA, so
4219 that anonymous subtypes can be in ALFA too.
4221 2011-08-04 Yannick Moy <moy@adacore.com>
4223 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
4224 reference for ALFA mode.
4225 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
4226 procedure public so as to use it from formal verification back-end.
4228 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
4230 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
4231 invalid checks of the Parameter, making Remove_Switch not working
4234 2011-08-04 Arnaud Charlet <charlet@adacore.com>
4236 * targparm.ads: Update header: no run-time exception is needed on this
4239 2011-08-04 Vincent Celier <celier@adacore.com>
4241 * a-fihema.adb: Use System.IO instead of GNAT.IO
4243 2011-08-04 Thomas Quinot <quinot@adacore.com>
4245 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
4246 are forbidden in Compiler_Unit mode.
4248 2011-08-04 Robert Dewar <dewar@adacore.com>
4250 * sem_util.adb: Minor reformatting.
4252 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4254 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
4255 library-level finalizers.
4256 (Gen_Finalize_Library_C): Update the import string for library-level
4258 (Gen_Finalize_Library_Defs_C): Update the definition name of a
4259 library-level finalizer.
4260 * exp_ch7.adb: Remove with and use clauses for Stringt.
4261 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
4262 Spec_Decl. Add local variable Body_Id. The names of library-level
4263 finalizers are now manually fully qualified and are no longer external.
4264 A single name is now capable of servicing .NET, JVM and non-VM targets.
4265 Pragma Export is no longer required to provide visibility for the name.
4266 (Create_Finalizer_String): Removed.
4267 (New_Finalizer_Name): New routine which mimics New_..._Name.
4269 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4271 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
4272 elaboration counter to Standard_Short_Integer.
4273 * sem_util.adb (Build_Elaboration_Entity): Likewise.
4274 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
4275 (Gen_Elab_Externals_C): Likewise.
4277 2011-08-04 Ed Falis <falis@adacore.com>
4279 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
4280 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
4281 system-vxworks-mips.ads, system-vxworks-x86.ads
4282 (Always_Compatible_Rep): set to False for all VxWorks targets.
4284 2011-08-04 Robert Dewar <dewar@adacore.com>
4286 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
4287 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
4288 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
4289 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
4290 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
4291 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
4292 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
4293 Minor reformatting and code reorganization.
4295 2011-08-04 Emmanuel Briot <briot@adacore.com>
4297 * projects.texi: Added doc for aggregate projects.
4299 2011-08-04 Emmanuel Briot <briot@adacore.com>
4301 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
4302 Add support for overriding the Project_Path in aggregate projects.
4304 2011-08-04 Robert Dewar <dewar@adacore.com>
4306 * a-cofove.ads: Minor reformatting.
4308 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
4310 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
4311 on the generated code.
4312 (Build_Finalize_Statements): Update the comment on the generated code.
4313 (Build_Initialize_Statements): Update the comment on the generated code.
4314 (Build_Object_Declarations): Add local variable Result. The object
4315 declarations are now built in sequence.
4316 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
4319 2011-08-04 Robert Dewar <dewar@adacore.com>
4321 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
4323 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
4325 * einfo.ads (Elaboration_Entity): Document new definition and use.
4326 (Elaboration_Entity_Required): Adjust to above change.
4327 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
4328 * exp_ch12.adb: And with and use for Snames.
4329 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
4330 * exp_util.adb (Set_Elaboration_Flag): Likewise.
4331 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
4332 <Check_Unit_Name>: Deal with N_Expanded_Name.
4333 <Attribute_Elaborated>: Extend to all unit names.
4334 * sem_elab.adb: And with and use for Uintp.
4335 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
4336 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
4337 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
4338 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
4339 from Gen_Adainit_Ada.
4340 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
4341 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
4342 case, do not call System.Standard_Library.Adafinal; instead call
4343 finalize_library if needed.
4344 (Gen_Adafinal_C): Likewise.
4345 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
4346 non-main program case.
4347 (Gen_Adainit_C): Generate a couple of external declarations here.
4348 In the main program case, set SSL.Finalize_Library_Objects.
4349 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
4350 (Gen_Elab_Calls_C): Likewise.
4351 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
4352 (Gen_Finalize_Library_C): Likewise. Generate a full function.
4353 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
4355 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
4356 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
4358 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
4359 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
4360 of external declarations. Call Gen_Finalize_Library_C.
4362 2011-08-04 Emmanuel Briot <briot@adacore.com>
4364 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
4365 Compute_Compilation_Phases): new subprogram.
4366 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
4367 The number of mains as well as the various compilation phases that
4368 need to be run are now project tree specific, since various
4369 aggregated trees might have different requirements. In particular,
4370 they do not all require bind or link phases.
4372 2011-08-04 Emmanuel Briot <briot@adacore.com>
4374 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
4375 (Project_Tree_Appdata): New type.
4376 It is now possible to associate application-specific data to a project
4377 tree. In particular, this is used in the gprbuild builder to avoid a
4378 number of global tables and htables, especially now that there can be
4379 several project trees loaded at once because of aggregate projects.
4380 (Debug_Name): new procedure.
4381 * projects.texi: Clarify syntax of "**" for Source_Dirs
4383 2011-08-03 Emmanuel Briot <briot@adacore.com>
4385 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
4386 the "roots" for a main.
4387 (Fill_From_Project): add support for aggregate projects. Main units
4388 in aggregated projects are now automatically added in the list of
4389 files to build (although this fails later on in gprbuild, because
4390 these files are not using the root proejct tree, so this needs
4392 * gcc-interface/Make-lang.in: Update dependencies.
4394 2011-08-03 Yannick Moy <moy@adacore.com>
4396 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
4397 conditional expression in ALFA.
4398 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
4399 expressions as not in ALFA.
4401 2011-08-03 Robert Dewar <dewar@adacore.com>
4403 * a-cofove.adb: Minor reformatting.
4405 2011-08-03 Emmanuel Briot <briot@adacore.com>
4407 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
4408 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
4410 These packages are more logically placed in the Queue package, since
4411 they manipulate the queue. It is also likely that they can be adapted
4412 for gnatmake, thus sharing more code.
4413 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
4414 that we could move the above.
4416 2011-08-03 Emmanuel Briot <briot@adacore.com>
4418 * errutil.adb (Finalize): clean up the list of error messages on exit.
4419 Calling this subprogram multiple times will no longer show duplicate
4420 error messages on stderr.
4422 2011-08-03 Emmanuel Briot <briot@adacore.com>
4424 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
4425 Getopt_Switches when we have already define a command line
4428 2011-08-03 Yannick Moy <moy@adacore.com>
4430 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
4431 in ALFA. Instead, they are considered as assertions to prove.
4432 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
4433 nodes as not in ALFA. Instead, include conditional expressions in ALFA
4434 if they have no ELSE part, or if they occur in pre- and postconditions,
4435 where the Condition cannot have side-effects in ALFA
4436 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
4437 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
4438 Instead, include type conversion between scalar types in ALFA.
4439 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
4440 if-and-only-if its type is in ALFA.
4442 2011-08-03 Thomas Quinot <quinot@adacore.com>
4444 * scos.adb, get_scos.adb, put_scos.adb
4445 New code letter for decisions: G (entry guard)
4447 (Traverse_Subprogram_Body): Rename to...
4448 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
4449 (Traverse_Protected_Body): New subprogram
4450 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
4451 protected bodies and entry bodies.
4453 2011-08-03 Yannick Moy <moy@adacore.com>
4455 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
4456 entities with get/set subprograms, which is set on procedure entities
4457 generated by the compiler for a postcondition.
4458 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
4459 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
4460 entity for a declaration
4461 (Get_Unique_Entity_For_Decl): new function returning an entity which
4462 represents a declaration, so that matching spec and body have the same
4465 2011-08-03 Robert Dewar <dewar@adacore.com>
4467 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
4468 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
4470 2011-08-03 Yannick Moy <moy@adacore.com>
4472 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
4473 library-level because retriction No_Implicit_Dynamic_Code in the
4474 front-end prevents its definition as a local subprogram
4475 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
4476 for reuse in other contexts
4477 (Traverse_Declarations_Or_Statements,
4478 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4479 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
4480 procedures take a callback parameter to be called on all declarations
4482 (Traverse_All_Compilation_Units): new generic function to traverse a
4483 compilation unit and call a callback parameter on all declarations
4485 2011-08-03 Javier Miranda <miranda@adacore.com>
4487 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
4488 in Java since they are always enclosed in a namespace that
4489 differentiates them, and overloaded entities are supported by the VM.
4491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4493 * checks.adb (Determine_Range): If a computed bound of an operation is
4494 outside the range of the base type of the expression, and overflow
4495 checks are enabled, the result is unknown and cannot be used for any
4496 subsequent constant folding.
4497 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
4498 unknown, so is the result of the comparison.
4500 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4502 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
4503 From_Abort. When finalization was triggered by an abort, propagate
4504 Standard'Abort_Signal rather than Program_Error.
4505 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
4507 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
4508 From_Abort. When finalization was triggered by an abort, propagate
4509 Standard'Abort_Signal rather than Program_Error.
4510 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
4512 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
4513 Abort_Id. Update the calls to Build_Object_Declarations and
4514 Build_Raise_Statement to include Abort_Id.
4515 (Build_Adjust_Statements): New local variable Abort_Id. Update the
4516 calls to Build_Object_Declarations and Build_Raise_Statement to include
4518 (Build_Finalize_Statements): New local variable Abort_Id. Update the
4519 calls to Build_Object_Declarations and Build_Raise_Statement to include
4521 (Build_Components): Create an entity for Abort_Id when exceptions are
4522 allowed on the target.
4523 (Build_Finalizer): New local variable Abort_Id.
4524 (Build_Initialize_Statements): New local variable Abort_Id. Update the
4525 calls to Build_Object_Declarations and Build_Raise_Statement to include
4527 (Build_Object_Declarations): Add new formal Abort_Id. Create the
4528 declaration of flag Abort_Id to preserve the original abort status
4529 before finalization code is executed.
4530 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
4531 runtime routine Raise_From_Controlled_Operation.
4532 (Create_Finalizer): Update the call to Build_Raise_Statement to include
4533 Abort_Id. Update the call to Build_Object_Declarations to include
4534 Abort_Id. Update the layout of the finalizer body.
4535 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
4536 (Process_Transient_Objects): New local variable Abort_Id. Remove the
4537 clunky code to create all flags and objects related to
4538 exception propagation and replace it with a call to
4539 Build_Object_Declarations. Update the call to Build_Raise_Statement to
4541 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
4542 Add new formal Abort_Id and associated comment on its use.
4543 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
4545 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
4546 Remove the clunky code to create all flags and objects related to
4547 exception propagation and replace it with a call to
4548 Build_Object_Declarations. Update the call to Build_Raise_Statement.
4550 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4552 * s-tassta.adb: Fix minor typos.
4554 2011-08-03 Robert Dewar <dewar@adacore.com>
4556 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
4557 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
4559 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4561 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
4562 to packages. This ensures that the finalizer body will not end up
4563 inside the freeze node.
4564 (Process_Declarations): Add code to detect whether a freeze node has a
4565 nested finalization collection.
4567 2011-08-03 Pascal Obry <obry@adacore.com>
4569 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
4570 (Current_Session): Return a not null access to Session_Type.
4571 (Default_Session): Likewise.
4573 2011-08-03 Robert Dewar <dewar@adacore.com>
4575 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
4576 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
4578 2011-08-03 Pascal Obry <obry@adacore.com>
4580 * g-awk.ads: Minor comment fix.
4582 2011-08-03 Sergey Rybin <rybin@adacore.com>
4584 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4585 the tree structure related to discriminant constraints.
4586 Original_Discriminant cannot be used any more for computing the
4587 defining name for the reference to a discriminant.
4589 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4591 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
4592 function is not visibly tagged, this is not a dispatching call and
4593 therfore is not Tag_Indeterminate, even if the function is marked as
4594 dispatching on result.
4596 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4598 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
4599 (Expand_N_Free_Statement): Add a guard to protect against run-times
4600 which do not support controlled types.
4601 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
4602 against run-times which do not support controlled types.
4603 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
4604 against run-times which do not support controlled types.
4605 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
4606 against run-times which do not support controlled types.
4607 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
4608 protect against run-times which do not support controlled types.
4610 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4612 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
4613 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
4615 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4617 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
4618 modified in the source, to prevent spurious warnings when compiling
4621 2011-08-03 Thomas Quinot <quinot@adacore.com>
4623 * a-except-2005.adb: Minor reformatting.
4625 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4627 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
4628 is a renaming declaration in the private part of a package, do not emit
4629 a warning that the with_clause could be moved because the renaming may
4630 be used in the body or in a child unit.
4632 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4634 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4635 Propagate the Comes_From_Source attribute from the original return
4636 object to the renaming.
4638 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4640 * exp_ch7.adb (Build_Raise_Statement): Do not call
4641 Raise_From_Controlled_Operation when this routine is not present in
4642 the run-time library.
4643 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
4644 libraries (Ravenscar), tasks are non-terminating, and protected objects
4645 and tasks can only appear at library level, so we do not want
4646 finalization of protected objects nor tasks.
4647 * exp_intr.adb: Minor clarification in comment.
4648 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
4649 Gen_Output_File_C): Remove references to finalization of library-level
4650 objects when using restricted run-time libraries.
4652 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4654 * sem_ch3.adb (Build_Discriminant_Constraints): Set
4655 Original_Discriminant only if the parent type is a generic formal.
4657 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4659 * exp_ch13.adb: Add with and use clause for Targparm;
4660 (Expand_N_Free_Statement): Prevent the generation of a custom
4661 Deallocate on .NET/JVM targets since this requires pools and address
4663 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
4664 .NET/JVM targets, attach the newly allocated object to the access
4665 type's finalization collection. Do not generate a call to
4666 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
4667 exist in the runtime.
4668 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
4669 create a custom Allocate for object that do not require initialization.
4670 Attach a newly allocated object to the access type's finalization
4671 collection on .NET/JVM.
4672 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
4673 assignment of controlled types on .NET/JVM. The two hidden pointers
4674 Prev and Next and stored and later restored after the assignment takes
4676 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
4677 kludge for .NET/JVM to recognize a particular piece of code coming from
4678 Heap_Management and change the call to Finalize into Deep_Finalize.
4679 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
4680 finalization collections on .NET/JVM only for types derived from
4681 Controlled. Separate the association of storage pools with a collection
4682 and only allow it on non-.NET/JVM targets.
4683 (Make_Attach_Call): New routine.
4684 (Make_Detach_Call): New routine.
4685 (Process_Object_Declarations): Suppress the generation of
4686 build-in-place return object clean up code on .NET/JVM since it uses
4688 * exp_ch7.ads (Make_Attach_Call): New routine.
4689 (Make_Detach_Call): New routine.
4690 * exp_intr.adb Add with and use clause for Targparm.
4691 (Expand_Unc_Deallocation): Detach a controlled object from a collection
4692 on .NET/JVM targets.
4693 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
4694 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
4695 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
4696 names used in finalization.
4698 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4700 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
4701 (Attach, Detach): Lock the current task when chaining an object onto a
4704 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
4706 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
4707 Rewritten to create the message strings when the exception is not
4708 raised by an abort during finalization.
4709 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
4710 Raise_From_Controlled_Operation and update its associated comment.
4711 * a-fihema.ads, a-fihema.adb: New GNAT unit.
4712 Ada.Finalization.Heap_Management provides key functionality
4713 associated with controlled objects on the heap, their creation,
4714 finalization and reclamation. Type Finalization_Collection is
4715 effectively a wrapper which sits ontop of a storage pool and performs
4716 all necessary bookkeeping for all the objects it contains. Each
4717 access-to-controlled or access-to-class-wide type receives a collection
4718 as part of its expansion. The compiler generates buffer code and
4719 invokes Allocate / Deallocate to create and destroy allocated
4721 * a-finali.adb ("="): Removed.
4722 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
4723 fields Prev and Next.
4724 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
4725 A library unit with at least one controlled object on the library level
4726 has a special finalizer which is invoked by the binder. To signal this,
4727 ali files carry field PF.
4728 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
4729 associated comment on field usage.
4730 * a-tags.adb (Get_RC_Offset): Removed.
4731 (Needs_Finalization): New routine.
4732 * a-tags.ads: Update the structure of the GNAT dispatch tables.
4733 Dispatch tables now carry field Needs_Finalization which provides
4734 runtime indication whether a type is controlled or has controlled
4735 components or both. Remove field RC_Offset.
4736 (Get_RC_Offset): Removed along with its associated pragma Export.
4737 Since tagged types with controlled components no longer carry hidden
4738 field _controller, the special mechanism to retrieve its location is no
4740 (Needs_Finalization): New routine.
4741 * atree.ads, atree.adb (Elist24): New routine.
4742 (Set_Elist24): New routine.
4743 * atree.h: Add a define clause for Elist24.
4744 * bindgen.adb New library-level variable Lib_Final_Built.
4745 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
4746 presence of a VM target, the routine generates calls to the proper
4747 library finalization routine.
4748 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
4749 targets. Set the correct library finalization routine depending on
4750 whether the library has controlled objects or this is a VM compilation.
4751 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
4752 to library-level finalizers of compiled units in reverse order of
4753 elaboration. It also produces exception management code and reraises a
4754 potential exception after all units have been finalized.
4755 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
4756 library-level finalizers of compiled units in reverse order of
4758 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
4759 definitions of all library-level finalizers available to the compilation
4760 (Gen_Main_Ada): Directly call Adafinal which now contails all target
4762 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
4763 System.Standard_Library.Adafinal directly. If the library needs
4764 finalization actions, create the sequence of finalization calls.
4765 (Gen_Output_File_Ada): Alphabetize local variables and constants.
4766 Generate a with clause for System.Soft_Links when compiling for a VM.
4767 Remove the code which imports System.Standard_Library.Adafinal as
4768 Do_Finalize. Generate the library finalization routine.
4769 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
4770 If the library needs finalization actions, create all the definitions
4771 of library- level finalizers.
4772 (Has_Finalizer): New routine. Determines whether at least one compiled
4773 unit has a library-level finalizer.
4774 Add type Qualification_Mode.
4775 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
4776 * einfo.adb: New usage of field 15 as Return_Flag.
4777 Remove Finalization_Chain_Entity from the usages of field 19.
4778 Remove Associated_Final_Chain from the usages of field 23.
4779 New usage of field 23 as Associated_Collection.
4780 New usage of field 24 as Finalizer.
4781 New usage of flag 252 as Is_Processed_Transient.
4782 (Associated_Final_Chain): Removed.
4783 (Associated_Collection): New routine.
4784 (Finalization_Chain_Entity): Removed.
4785 (Finalizer): New routine.
4786 (Is_Finalizer): New routine.
4787 (Is_Processed_Transient): New routine.
4788 (Return_Flag): New routine.
4789 (Set_Associated_Final_Chain): Removed.
4790 (Set_Associated_Collection): New routine.
4791 (Set_Finalization_Chain_Entity): Removed.
4792 (Set_Finalizer): New routine.
4793 (Set_Is_Processed_Transient): New routine.
4794 (Set_Return_Flag): New routine.
4795 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
4797 (Write_Field8_Name): Alphabetize the output.
4798 (Write_Field11_Name): Alphabetize the output.
4799 (Write_Field12_Name): Alphabetize the output.
4800 (Write_Field13_Name): Alphabetize the output.
4801 (Write_Field14_Name): Alphabetize the output.
4802 (Write_Field15_Name): Alphabetize the output.
4803 (Write_Field16_Name): Alphabetize the output.
4804 (Write_Field17_Name): Alphabetize the output.
4805 (Write_Field18_Name): Alphabetize the output.
4806 (Write_Field19_Name): Alphabetize the output. Remove the output of
4807 Finalization_Chain_Entity.
4808 (Write_Field20_Name): Alphabetize the output.
4809 (Write_Field21_Name): Alphabetize the output.
4810 (Write_Field22_Name): Alphabetize the output.
4811 (Write_Field23_Name): Alphabetize the output. Remove the output of
4812 Associated_Final_Chain. Add output for Associated_Collection.
4813 (Write_Field24_Name): Alphabetize the output.
4814 (Write_Field25_Name): Add output for Finalizer.
4815 (Write_Field26_Name): Alphabetize the output.
4816 (Write_Field27_Name): Alphabetize the output.
4817 (Write_Field28_Name): Alphabetize the output.
4818 * einfo.ads: Add new field description for Associated_Collection and
4820 Remove Associated_Final_Chain and its uses in nodes.
4821 Remove Finalization_Chain_Entity and its uses in nodes.
4822 Add new field description for Finalizer and its uses in nodes.
4823 Add new synthesized attribute Is_Finalizer.
4824 Add new flag description for Is_Processed_Transient and its uses in
4826 Add new field description for Return_Flag and its uses in nodes.
4827 (Associated_Final_Chain): Removed along with its pragma Inline.
4828 (Associated_Collection): New routine and pragma Inline.
4829 (Finalization_Chain_Entity): Removed along with its pragma Inline.
4830 (Finalizer): New routine and pragma Inline.
4831 (Is_Finalizer): New routine and pragma Inline.
4832 (Is_Processed_Transient): New routine and pragma Inline.
4833 (Return_Flag): New routine and pragma Inline.
4834 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
4835 (Set_Associated_Collection): New routine and pragma Inline.
4836 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
4837 (Set_Finalizer): New routine and pragma Inline.
4838 (Set_Is_Processed_Transient): New routine and pragma Inline.
4839 (Set_Return_Flag): New routine and pragma Inline.
4840 * exp_aggr.adb: Alphabetize subprograms.
4841 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
4842 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
4843 associated comments. Remove local variables External_Final_List and
4845 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
4846 Ancestor. Remove the retrieval of finalization lists. Update the call to
4848 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
4849 lists. Update the call to Late_Expansion.
4850 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
4851 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
4852 (Gen_Assign): Remove the retrieval of the finalization list used to
4853 build the assignment. Update the calls to Make_Init_Call and
4855 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
4856 Remove the mechanism to determine attachment levels and finalization
4857 list retrieval. Remove the processing for coextensions.
4858 (Init_Controller): Removed. Controllers no longer exist.
4859 (Late_Expansion): Remove formals Flist and Obj along with their
4860 associated comments. Update the calls to Build_Record_Aggr_Code and
4861 Build_Array_Aggr_Code.
4862 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
4863 (Expand_N_Freeze_Entity): Add special processing for finalizers which
4864 appear in entry bodies, protected subprograms and task bodies.
4865 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
4866 * exp_ch3.adb (Add_Final_Chain): Removed.
4867 (Build_Array_Init_Proc): Alphabetize local variables.
4868 (Build_Assignment): Alphabetize local variables. Update the call to
4870 (Build_Class_Wide_Master): Rename local variables to better reflect
4872 (Build_Discriminant_Assignments): Code reformatting.
4873 (Build_Init_Call_Thru): Code reformatting.
4874 (Build_Init_Procedure): Code reformatting. Generate a special version
4875 of Deep_Finalize which is capable of finalizing all initialized
4876 components and ignore the rest.
4877 (Build_Init_Statements): Rename local variables to better reflect their
4879 Reimplement the mechanism to include the creation and update of an index
4880 variable called a "counter". It is used as a bookmark for tracing
4881 initialized and non-initialized components.
4882 (Build_Initialization_Call): Remove local variable Controller_Typ.
4883 Alphabetize all local variables. Remove the initialization of the
4884 record controller and update the call to Make_Init_Call.
4885 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
4886 New local variable Counter.
4887 (Constrain_Array): Alphabetize.
4888 (Expand_Freeze_Array_Type): Create a collection instead of a
4890 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
4891 Finalize_Address which is used in conjunction with allocated controlled
4893 (Expand_N_Object_Declaration): Remove the creation of a finalization
4894 list for anonymous access types. Update the calls to Make_Init_Call and
4896 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
4897 retrieval of finalization lists. Remove the expansion of the record
4898 controller. Create TSS primitive Finalize_Address used in conjunction
4899 with controlled objects on the heap. Create finalization collections
4900 for access-to-controlled record components.
4901 (Expand_Record_Controller): Removed.
4902 (Freeze_Type): Remove the freezing of record controllers. Freezing of
4903 class-wide types now requires additional processing. Create
4904 finalization collections for access-to-controlled types.
4905 (Increment_Counter): New routine.
4906 (Make_Counter): New routine.
4907 (Make_Eq_If): Remove the mention of Name_uController.
4908 (Make_Predefined_Primitive_Specs): There is no longer need to skip
4909 types coming from System.Finalization_Root.
4910 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
4911 (Predefined_Primitive_Bodies): There is no longer need to skip types
4912 coming from System.Finalization_Root.
4913 (Stream_Operation_OK): Do not generate stream routines for
4914 type Ada.Finalization.Heap_Management.Finalization_Collection.
4915 * exp_ch3.ads: Alphabetize subprograms.
4916 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
4917 Add with and use clause for Lib.
4918 (Complete_Coextension_Finalization): Removed.
4919 (Complete_Controlled_Allocation): New routine. Create a finalization
4920 collection for anonymous access-to-controlled types. Create a custom
4921 Allocate which interfaces with the back end and the machinery in
4923 (Expand_Allocator_Expression): Add necessary calls to
4924 Complete_Controlled_Allocation. Remove the retrieval of finalization
4925 lists. Update the calls to Make_Adjust_Call. Generate a call to
4926 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4927 the associated collection.
4928 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
4929 Code clean up. Remove the retrieval of finalization lists and
4931 Update the call to Make_Init_Call. Generate a call to
4932 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
4933 the associated collection.
4934 (Get_Allocator_Final_List): Removed. Finalization lists are not
4936 (Suitable_Element): Remove the mention of Name_uController.
4937 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
4938 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
4939 the left hand side, carry out the assignment and adjust the left hand
4941 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
4942 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
4943 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
4944 BIP_Collection and BIPcollection.
4945 (Build_Heap_Allocator): New routine used to allocate the return object
4946 of a build-in-place function onto a collection.
4947 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
4948 (Expand_Call): Do not replace direct calls to Deep routines with their
4950 (Expand_N_Extended_Return_Statement): Give all variables shorter names
4951 and update their occurrences. Add a special return flag to monitor the
4952 [ab]normal execution of the function. The flag is set right before the
4954 Rewrite the mechanism used to allocate a build-in-place return object
4955 on the heap or on a storage pool.
4956 (Is_Direct_Deep_Call): New routine.
4957 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
4958 build-in-place function call instead of a final list. Build a call to
4959 Set_Finalize_Address_Ptr to decorate the associated collection.
4960 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
4961 order to name the build-in-place function call's result for later
4962 finalization. Add a collection to a build-in-place function call
4963 instead of a final list.
4964 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
4965 build-in-place function call instead of a final list. Remove the code
4966 which moves one final list and transforms it into the actual in a
4967 nested build-in-place call.
4968 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
4969 build-in-place function call instead of a final list.
4970 (Move_Final_List): Removed.
4971 (Needs_BIP_Collection): New routine.
4972 (Needs_BIP_Final_List): Removed.
4973 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
4974 enumeration type BIP_Formal_Kind.
4975 Update the related comment.
4976 (Needs_BIP_Collection): New routine.
4977 (Needs_BIP_Final_List): Removed.
4978 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
4979 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
4980 majority of subprograms in this unit. Add Name_Finalize_Address to
4981 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
4982 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
4983 statements for an array type.
4984 (Build_Adjust_Statements): Create the adjust statements for a record
4986 (Build_Cleanup_Statements): New routine. A procedure which given any
4987 construct containing asynchronous calls, references to _master, or is a
4988 task body, a task allocation or a protected body produces the necessary
4989 runtime calls to clean up these constructs.
4990 (Build_Exception_Handler): New routine.
4991 (Build_Final_List): Removed.
4992 (Build_Finalization_Collection): New routine. A core procedure which
4993 creates a collection to service heap allocated controlled objects
4994 associated with an access-to-controlled type.
4995 (Build_Finalize_Statements): Create the finalization statements for a
4997 (Build_Finalizer): New routine. A core procedure which given any
4998 construct with declarations and/or statements detects all objects which
4999 need any type of clean up (controlled objects, protected objects) and
5000 generates all necessary code to clean up the said objects in the proper
5002 (Build_Finalizer_Call): New routine.
5003 (Build_Initialize_Statements): Create the initialization statements for
5004 an array type. The generated routine contains code to finalize partially
5006 (Build_Object_Declarations): New routine.
5007 (Build_Raise_Statement): New routine.
5008 (Clean_Simple_Protected_Objects): Removed.
5009 (Controller_Component): Removed.
5010 (Enclosing_Function): New routine.
5011 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
5012 either declarations or statements or both.
5013 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
5014 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
5016 (Find_Final_List): Removed.
5017 (Global_Flist_Ref): Removed.
5018 (In_Finalization_Root): Removed.
5019 (Insert_Actions_In_Scope_Around): Determine the range of the transient
5020 scope in terms of tree nodes. Process all transient variables within
5022 (Make_Adjust_Call): Rewritten. There is no longer an attach call
5023 generated after the adjust.
5024 (Make_Attach_Call): Removed.
5025 (Make_Call): New routine.
5026 (Make_Clean): Removed.
5027 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
5029 (Make_Deep_Proc): Rewritten to generate the new profile signature used
5031 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
5033 (Make_Final_Call): Modified to simply create a call to either
5034 Deep_Finalize or Finalize.
5035 (Make_Finalize_Address_Body): New routine.
5036 (Make_Finalize_Address_Stmts): New routine. A function which produces
5037 TSS primitive Finalize_Address used in conjunction with heap allocated
5039 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
5040 (Make_Init_Call): Rewritten. There is no longer an attach call
5041 generated after initialization.
5042 (Make_Local_Deep_Finalize): New routine.
5043 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5044 (Make_Transient_Block): Remove the finalization list retrieval and
5046 (Needs_Finalization): Moved to Exp_Util.
5047 (Parent_Field_Type): New routine.
5048 (Preprocess_Components): New routine.
5049 (Process_Transient_Objects): New routine.
5050 (Wrap_HSS_In_Block): New routine.
5051 (Wrap_Transient_Declaration): Remove finalization list management and
5052 controller insertion.
5053 (Wrap_Transient_Expression): Code reformatting.
5054 (Wrap_Transient_Statement): Code reformatting.
5055 * exp_ch7.ads (Build_Final_List): Removed.
5056 (Build_Finalization_Collection): New routine.
5057 (Build_Raise_Statement): New routine.
5058 (Controller_Component): Removed.
5059 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
5060 (Find_Final_List): Removed.
5061 (In_Finalization_Root): Removed.
5062 (Is_Simple_Protected_Type): Update related comment.
5063 (Make_Adjust_Call): New parameter profile and associated comments.
5064 (Make_Attach_Call): Removed.
5065 (Make_Final_Call): New parameter profile and associated comments.
5066 (Make_Finalize_Address_Body): New routine.
5067 (Make_Init_Call): New parameter profile and associated comments.
5068 (Make_Local_Deep_Finalize): New routine.
5069 (Make_Set_Finalize_Address_Ptr_Call): New routine.
5070 (Needs_Finalization): Moved to Exp_Util.
5071 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
5072 (Expand_N_Protected_Body): Remove the handling of finalization lists.
5073 (Find_Protection_Type): Moved to Exp_Util.
5074 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
5075 (Make_DT): Update sequence of dispatch table initialization. Remove the
5076 initialization of field RC_Offset. Add initialization of field Needs_
5078 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
5079 Reimplement how an object is first finalized, then deallocated.
5080 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
5082 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
5083 Register TSS_Finalize_Address with type TSS_Names.
5084 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
5085 procedure provides the interface between an allocation / deallocation
5086 and the support machinery in Ada.Finalization.Heap_Management.
5087 (Find_Init_Call): Code reformatting.
5088 (Find_Init_Call_In_List): Code reformatting.
5089 (Find_Protection_Type): Moved from Exp_Ch9.
5090 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
5091 (Has_Controlled_Coextensions): Removed.
5092 (Has_Controlled_Objects): New routine.
5093 (In_Library_Level_Package_Body): New routine.
5094 (Insert_Action_After): New routine.
5095 (Is_Finalizable_Transient): New routine. This predicate determines
5096 whether an object declaration is one of the many variants of controlled
5098 (Is_Null_Access_BIP_Func_Call): New routine.
5099 (Is_Non_BIP_Func_Call): New routine.
5100 (Is_Related_To_Func_Return): New routine.
5101 (Needs_Finalization): Moved from Exp_Ch7.
5102 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
5103 (Find_Protection_Type): Moved from Exp_Ch9.
5104 (Has_Controlled_Coextensions): Removed.
5105 (Has_Controlled_Objects): New routine.
5106 (In_Library_Level_Package_Body): New routine.
5107 (Insert_Action_After): New routine.
5108 (Is_Finalizable_Transient): New routine.
5109 (Is_Null_Access_BIP_Func_Call): New routine.
5110 (Is_Non_BIP_Func_Call): New routine.
5111 (Is_Related_To_Func_Return): New routine.
5112 (Needs_Finalization): Moved from Exp_ch7.
5113 * expander.adb (Expand): Add a case for N_Free_Statement.
5114 * freeze.adb (Freeze_All): Replace the generation of a finalization
5115 list with a collection for access-to-controlled types.
5116 (Freeze_Entity): Code reformatting.
5117 (Freeze_Record_Type): Remove the freezing of a record controller
5119 (Freeze_Subprogram): Code reformatting.
5120 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
5122 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
5123 has a library-level finalizer.
5124 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
5125 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
5126 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
5127 files. Add a-fihema to the list of object files.
5129 Alphabetize the associations in type Is_Parameterless_Attribute.
5130 * rtsfind.ads: Ada.Finalization_List.Controller and
5131 System.Finalization_Implementation are no longer a GNAT unit.
5132 Update the range of type Ada_Finalization_Child. Remove the following
5133 recoverable entities:
5135 RE_Attach_To_Final_List
5139 RE_Finalizable_Ptr_Ptr
5140 RE_Global_Final_List
5141 RE_Limited_Record_Controller
5144 RE_Record_Controller
5145 RE_Simple_List_Controller
5147 Add the following recoverable entities:
5149 RE_Add_Offset_To_Address
5153 RE_Exception_Identity
5154 RE_Finalization_Collection
5155 RE_Finalization_Collection_Ptr
5156 RE_Needs_Finalization
5157 RE_Save_Library_Occurrence
5158 RE_Set_Finalize_Address_Ptr
5159 RE_Set_Storage_Pool_Ptr
5161 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
5163 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
5164 (First_Stored_Discriminant): Remove the mention of Name_uController.
5165 * sem_aux.ads: Comment reformatting.
5166 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
5167 to redecorate an already existing class-wide type.
5168 (Decorate_Tagged_Type): New parameter profile and associated comment.
5169 Create a "shadow class-wide type" for a shadow entity.
5170 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
5171 of the final chain along with the associated comment.
5172 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
5173 Full_Desig and set it to the full view of the designated type.
5174 Initialize the finalization collection to empty.
5175 (Build_Derived_Record_Type): Alphabetize local variables. Code
5177 (Collect_Fixed_Components): Remove the mention of Name_uController.
5178 (Create_Constrained_Components): Remove the mention of Name_uController.
5179 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
5180 class-wide type of a shadow entity.
5181 (Process_Full_View): Update the machinery which marks type
5182 Limited_Controlled's entity as limited.
5183 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
5184 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
5185 list, instead make a collection build-in-place formal.
5186 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
5187 a designated type in order to establish a match between the renaming
5188 and the renamed entity.
5189 (Find_Selected_Component): Add guard to prevent spurious exceptions
5190 from being raised on .NET/JVM.
5191 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
5192 to the list of primitive that need special processing. Update arrays
5193 C_Names and D_Names.
5194 (Replace_Types): Handle class-wide types.
5195 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
5196 different parameter profile, look at the first formal.
5197 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
5198 use clauses for Exp_Util.
5199 * sem_res.adb: Remove with and use clauses for Elists.
5200 (Propagate_Coextensions): Removed.
5201 (Resolve_Allocator): Do not propagate the list of coextensions from one
5202 allocator to another.
5203 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
5204 Deaccessed_T to Desig_Typ.
5205 (Enter_Name): Remove the mention of Name_uController.
5206 (Gather_Components): Remove the mention of Name_uController.
5207 (Incomplete_Or_Private_View): New routine.
5208 (Is_Coextension_Root): Removed.
5209 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
5210 * sem_util.ads (Incomplete_Or_Private_View): New routine.
5211 (Is_Coextension_Root): Removed.
5212 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
5213 Controlled types are now derived from a null tagged record. Remove
5214 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
5215 * sinfo.adb (Coextensions): Removed.
5216 (Set_Coextensions): Removed.
5217 * sinfo.ads: Remove Coextensions from the explanation of node fields
5218 and its uses in nodes.
5219 Update the field usage of N_Allocator.
5220 (Coextensions): Removed along with its pragma Inline.
5221 (Set_Coextensions): Removed along with its pragma Inline.
5222 * snames.ads-tmpl: Remove names
5227 Name_uLocal_Final_List
5228 Name_Finalization_Root
5235 Name_Finalize_Address
5236 * s-pooglo.adb (Allocate): Add overriding indicator.
5237 (Deallocate): Add overriding indicator.
5238 (Storage_Size): Add overriding indicator.
5239 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
5240 than Finalize_Global_List.
5241 (Null_Finalize_Global_List): Removed.
5242 (Save_Library_Occurrence): New routine.
5243 * s-soflin.ads: Remove variable Finalize_Global_List along with its
5244 initialization. Add variable Finalize_Library_Objects along with its
5245 pragma Export. Add variables Library_Exception and
5246 Library_Exception_Set along with their pragma Export.
5247 (Null_Finalize_Global_List): Removed.
5248 (Save_Library_Occurrence): New routine.
5249 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
5250 rather than Finalize_Global_List.
5251 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
5252 of the constructed node.
5254 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5256 * link.c: Include "auto-host.h" before system headers.
5258 2011-08-03 Vincent Celier <celier@adacore.com>
5260 * make.adb (Gnatmake): Add to table Library_Projs only library projects
5261 that are not extended. Do not check if a library project that is
5262 extended should be regenerated. Do not add to table Library_Paths the
5263 libraries that are in extended projects. Link only with libraries that
5264 are in libray projects that are not extended.
5265 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
5266 for a library project that is extended.
5268 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5270 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
5271 conforming subprogram renamings that appear to be completions if they
5272 are not fully conformant.
5273 Such renamings are homographs but not completions.
5274 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
5275 names in a subprogram renaming that appears in an instance.
5277 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5279 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
5280 not immutably limited, build actual subtype from expression to provide
5281 proper bounds to caller.
5283 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5285 * sem_ch8.adb: Minor comment correction.
5287 2011-08-03 Thomas Quinot <quinot@adacore.com>
5289 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
5290 returning a limited array, use an extended return statement.
5292 2011-08-03 Vincent Celier <celier@adacore.com>
5294 * make.adb (Initialize): If --subdirs= is used, but no project file is
5295 specified, attempt to create the specify subdir if it does not already
5296 exist and use it as the object directory as if -D had been specified.
5298 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5300 * s-tpopsp-vms.adb: New file.
5301 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
5302 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
5304 2011-08-03 Emmanuel Briot <briot@adacore.com>
5306 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
5309 2011-08-03 Yannick Moy <moy@adacore.com>
5311 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
5312 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
5313 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
5314 detect that an array has static bounds.
5316 2011-08-03 Thomas Quinot <quinot@adacore.com>
5318 * exp_dist.adb: Minor reformatting.
5320 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5322 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
5323 (ATCB_Key): Removed, not always used.
5325 2011-08-03 Emmanuel Briot <briot@adacore.com>
5327 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
5328 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
5329 most remaining global variables.
5331 2011-08-03 Robert Dewar <dewar@adacore.com>
5333 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
5334 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
5337 2011-08-03 Javier Miranda <miranda@adacore.com>
5339 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
5340 that must be passed by copy in VM targets.
5342 2011-08-03 Emmanuel Briot <briot@adacore.com>
5344 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
5345 duplicates a similar htable now in the project tree.
5347 2011-08-03 Claire Dross <dross@adacore.com>
5349 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
5350 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
5351 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
5352 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
5353 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
5354 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
5355 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
5358 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5360 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
5361 (ATCB_Key): Removed, not always used.
5362 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
5364 * s-tpopsp-tls.adb: New file.
5365 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
5366 x86/x64/ia64/powerpc/sparc Linux.
5368 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5370 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
5371 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
5373 2011-08-03 Thomas Quinot <quinot@adacore.com>
5375 * rtsfind.ads, exp_dist.adb, exp_dist.ads
5376 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
5377 Fix type selection for mapping integer types to PolyORB types.
5379 2011-08-03 Bob Duff <duff@adacore.com>
5381 * sem_ch7.adb: Minor comment clarification.
5383 2011-08-03 Bob Duff <duff@adacore.com>
5385 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
5386 an error analyzing a choice, skip further processing. Further
5387 processing could cause a crash or cascade errors.
5389 2011-08-03 Emmanuel Briot <briot@adacore.com>
5391 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
5392 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
5393 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
5394 prj-env.ads (Shared_Project_Tree_Data): new type
5395 An aggregate project and its aggregated trees need to share the common
5396 data structures used for lists of strings, packages,... This makes the
5397 code simpler since otherwise we have to pass the root tree (also used
5398 for the configuration file data) in addition to the current project
5399 tree. This also avoids ambiguities as to which tree should be used.
5400 And finally this saves a bit of memory.
5401 (For_Every_Project_Imported): new parameter Tree.
5402 Since aggregated projects are using a different tree, we need to let
5403 the caller know which tree to use to manipulate the returned project.
5405 2011-08-03 Robert Dewar <dewar@adacore.com>
5407 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
5408 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
5409 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
5410 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
5412 2011-08-03 Javier Miranda <miranda@adacore.com>
5414 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
5415 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
5417 2011-08-03 Bob Duff <duff@adacore.com>
5419 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
5422 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
5424 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
5425 g-sehash.ads: Fix typo. Update header.
5427 2011-08-03 Thomas Quinot <quinot@adacore.com>
5429 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
5432 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5434 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
5435 prefixes of private types along with records, since the selector may be
5437 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
5438 private types along with records, since the selector may be a
5441 2011-08-03 Emmanuel Briot <briot@adacore.com>
5443 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
5445 2011-08-03 Javier Miranda <miranda@adacore.com>
5447 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
5448 Tagged_Type_Expansion.
5450 2011-08-03 Yannick Moy <moy@adacore.com>
5452 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
5453 violation when the argument of concatenation is the name of a
5456 2011-08-03 Emmanuel Briot <briot@adacore.com>
5458 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
5459 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
5460 (Process_Declarative_Items): new parameter Child_Env.
5462 2011-08-03 Yannick Moy <moy@adacore.com>
5464 * alfa.ads: Update format of ALFA section in ALI file in order to
5465 add a mapping from bodies to specs when both are present.
5466 (ALFA_Scope_Record): Add components for spec file/scope.
5467 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
5469 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
5470 collected, fill in the spec information when relevant.
5471 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
5474 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5476 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
5477 code unit to decide whether to add internally generated subprograms.
5479 2011-08-03 Javier Miranda <miranda@adacore.com>
5481 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
5482 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
5483 be handled by copy in VM targets.
5485 2011-08-03 Emmanuel Briot <briot@adacore.com>
5487 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
5488 code with Makeutl.Get_Switches.
5489 * prj-tree.adb: Update comment.
5491 2011-08-03 Thomas Quinot <quinot@adacore.com>
5493 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
5494 subprogram with a limited formal that does not support external
5497 2011-08-03 Yannick Moy <moy@adacore.com>
5499 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
5501 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
5502 not from current unit in two phases, because it is not possible to
5503 change the table while iterating over its content.
5504 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
5506 2011-08-03 Sergey Rybin <rybin@adacore.com>
5508 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
5509 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
5511 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5513 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
5514 and the component type is composite, this is ambiguous for predefined
5515 concatenation, but if the node is not overloaded and the entity is a use
5516 -defined function its profile can be used to resolve that aggregate.
5518 2011-08-03 Robert Dewar <dewar@adacore.com>
5520 * exp_ch4.adb: Minor code cleanup.
5522 2011-08-03 Thomas Quinot <quinot@adacore.com>
5524 * exp_dist.adb: Do not generate distribution stubs if serious errors
5525 have been diagnosed.
5527 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5529 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
5530 the first formal of a primitive operation, go to the base type to
5531 handle properly an access to a derived type with constrained
5533 * sem_type.adb (Disambiguate): an immediately visible operator hides a
5534 user-defined function that is only use-visible.
5536 2011-08-03 Robert Dewar <dewar@adacore.com>
5538 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
5539 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
5540 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
5541 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
5542 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
5543 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
5544 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
5545 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
5547 2011-08-03 Robert Dewar <dewar@adacore.com>
5549 * repinfo.adb (List_Mechanism): Add handling of
5550 Convention_Ada_Pass_By_XXX.
5551 * sem_mech.adb (Set_Mechanism): Ditto.
5552 * sem_prag.adb (Process_Convention): Add entries for
5553 Convention_Ada_Pass_By_XXX.
5554 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
5556 2011-08-03 Pascal Obry <obry@adacore.com>
5558 * makeutl.adb: Minor reformatting.
5560 2011-08-03 Vincent Celier <celier@adacore.com>
5563 (Get_File_Name) If the file cannot be found when there are no config
5564 pragmas file and May_Fail is True, return No_File instead of the file
5565 name, to be consistent.
5567 2011-08-03 Pascal Obry <obry@adacore.com>
5569 * adaint.c (__gnat_is_executable_file_attr): Avoid access
5572 2011-08-03 Javier Miranda <miranda@adacore.com>
5575 (Same_Representation): In VM targets the representation of arrays with
5576 aliased components differs from arrays with non-aliased components.
5578 2011-08-03 Emmanuel Briot <briot@adacore.com>
5580 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
5581 not systematically lower case attribute indexes that contain no "."
5582 Fix definition of several Naming attributes, which take
5583 a unit name as index and therefore should be case insensitive.
5584 Minor refactoring (reduce length of variable names).
5586 2011-08-03 Emmanuel Briot <briot@adacore.com>
5588 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
5590 2011-08-03 Emmanuel Briot <briot@adacore.com>
5592 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
5593 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
5594 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
5595 prj-tree.ads (Prj.Tree.Environment): new type.
5597 2011-08-03 Emmanuel Briot <briot@adacore.com>
5599 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
5600 prj-tree.adb, prj-tree.ads (Environment): new type.
5602 2011-08-03 Emmanuel Briot <briot@adacore.com>
5604 * prj-tree.ads: Remove unused variable.
5606 2011-08-03 Yannick Moy <moy@adacore.com>
5608 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
5609 issuing messages related to SPARK restriction violation.
5611 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5613 * sem_ch6.adb: guard against error nodes in return statements.
5615 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5617 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
5618 a warning can only appear on a configuration file, so emit warning
5619 without further checks.
5621 2011-08-03 Arnaud Charlet <charlet@adacore.com>
5623 * s-interr.ads: add overriding keyword.
5625 2011-08-03 Geert Bosch <bosch@adacore.com>
5627 * exp_attr.adb: Fix minor typo.
5629 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5631 * par-ch4.adb: improve error recovery.
5633 2011-08-03 Emmanuel Briot <briot@adacore.com>
5635 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
5636 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
5639 2011-08-03 Emmanuel Briot <briot@adacore.com>
5641 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
5642 "external" as an attribute name in aggregate projects.
5644 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5646 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
5647 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
5648 from 0, so we need to adjust.
5650 2011-08-03 Emmanuel Briot <briot@adacore.com>
5652 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
5653 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
5655 2011-08-03 Yannick Moy <moy@adacore.com>
5657 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
5658 restriction on overloaded entity if the entity is not an operator.
5660 2011-08-03 Yannick Moy <moy@adacore.com>
5662 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
5663 restrict.ads: Rename remaining Check_Formal_Restriction* into
5664 Check_SPARK_Restriction*.
5666 2011-08-03 Emmanuel Briot <briot@adacore.com>
5668 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
5669 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
5671 (Project_Empty): removed
5672 (Empty_Project): new parameter Qualifier
5673 This is used to have fields specific to aggregate projects, cleaner
5674 New field to store the list of aggregated projects.
5675 (Check_Aggregate_Project): removed
5676 (Process_Aggregated_Projects, Free): new subprograms.
5678 2011-08-03 Olivier Hainque <hainque@adacore.com>
5680 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
5682 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5684 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
5685 explicit dereference of an unconstrained type, create a constrained
5686 subtype for it, as is done for function calls that return an
5689 2011-08-03 Thomas Quinot <quinot@adacore.com>
5691 * g-pehage.adb (Finalize): Avoid possible double-free.
5693 2011-08-03 Steve Baird <baird@adacore.com>
5695 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
5696 Elab_Spec/Body attrs in CodePeer_Mode.
5698 2011-08-03 Javier Miranda <miranda@adacore.com>
5700 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
5701 low bound is not known at compile time but they have no others choice.
5702 Done because in this case the bounds can be obtained directly from the
5705 2011-08-03 Ed Falis <falis@adacore.com>
5707 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
5708 on VxWorks SMP. Remove unusable constant ANY_CPU.
5710 2011-08-03 Emmanuel Briot <briot@adacore.com>
5712 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
5713 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
5714 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
5715 Prj.Env.Initialize_Empty): new subprograms
5716 (Get_Env, Find_Project): remove parameter Target_Name.
5718 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5720 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
5721 as a condition for the delayed call to Derived_Subprograms done for the
5722 case of the rewriting of a derived type that constrains the
5723 discriminants of its parent type.
5724 Avoids redundant subprogram derivations for private subtype derivations.
5726 2011-08-03 Javier Miranda <miranda@adacore.com>
5728 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
5729 Build_Record_Aggr_Code.
5730 (Build_Record_Aggr_Code): Add missing support to initialize hidden
5731 discriminants in extension aggregates.
5733 2011-08-03 Emmanuel Briot <briot@adacore.com>
5735 * prj-pp.adb (Print): also output project qualifiers, since in
5736 particular "aggregate" is mandatory in an aggregate project.
5738 2011-08-03 Emmanuel Briot <briot@adacore.com>
5740 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
5741 (Debug_Output): new function.
5743 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5745 * gnat_ugn.texi: Document -Wstack-usage.
5746 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
5748 2011-08-03 Thomas Quinot <quinot@adacore.com>
5750 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
5751 have keyword LIMITED.
5753 2011-08-03 Yannick Moy <moy@adacore.com>
5755 * alfa.adb, alfa.ads, alfa_test.adb: New files.
5756 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
5757 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
5758 section (does not happen in compiler, only if code directly calls
5760 * get_alfa.adb, get_alfa.ads: New files.
5761 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
5763 * lib-xref-alfa.adb: New file.
5764 * lib-xref.adb, lib-xref.ads
5765 (Xref_Entry): redefine information needed in cross-references for ALFA.
5766 Push ALFA treatments in separated local package.
5767 (Enclosing_Subpragram_Or_Package): treat specially subprogram
5768 identifiers. Return entity of package body instead of spec. Return
5769 Empty for a scope with no location.
5770 (Generate_Reference): adapt to new components for ALFA information.
5771 Remove the need for D references on definitions.
5772 (Is_Local_Reference): moved to ALFA local package
5773 (Output_References): extract subfunction as Extract_Source_Name
5774 (Output_Local_References): remove procedure, replaced by filtering of
5775 cross-references in package ALFA and printing in Put_ALFA.
5776 (Write_Entity_Name): remove procedure
5777 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
5778 print exact name of entity as it appears in source file
5779 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
5780 * put_alfa.adb, put_alfa.ads: New files.
5781 * xref_lib.adb (Search_Xref): protect read of cross-references against
5782 reading other sections of the ALI file, in gnatxref
5783 (Search): protect read of cross-references against reading other
5784 sections of the ALI file, in gnatfind.
5785 * gcc-interface/Make-lang.in: Update dependencies.
5787 2011-08-03 Thomas Quinot <quinot@adacore.com>
5789 * sem_ch3.adb: Minor reformatting.
5791 2011-08-03 Jose Ruiz <ruiz@adacore.com>
5793 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
5794 raising an exception.
5796 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5798 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
5799 type, always use 1 as the lower bound or string, even if lower bound of
5800 context is not static, to handle properly null strings in a non-static
5803 2011-08-03 Bob Duff <duff@adacore.com>
5805 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
5806 always legal on the right-hand side of an assignment statement; there
5807 is always an applicable index constraint in this case. Therefore, the
5808 check for Pkind = N_Assignment_Statement is now unconditional -- it
5809 doesn't depend on whether Is_Constrained (Typ).
5811 2011-08-03 Robert Dewar <dewar@adacore.com>
5813 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
5815 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5817 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
5818 for an itype created within a generic unit.
5820 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
5822 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
5823 suppresses all inlining.
5825 2011-08-03 Robert Dewar <dewar@adacore.com>
5827 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
5828 exp_aggr.adb: Minor reformatting.
5830 2011-08-03 Thomas Quinot <quinot@adacore.com>
5832 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
5833 tagged assignment when discriminant checks are suppressed. This is
5834 useless and extremely costly in terms of static stack usage.
5836 2011-08-03 Bob Duff <duff@adacore.com>
5838 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
5839 of generics, because this leads to the wrong entity in the wrong scope,
5840 causing (e.g.) pragma Export_Procedure to get an error if the entity is
5842 (Process_Interface_Name): Follow Alias for instances of generics, to
5843 correct for the above change.
5845 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5847 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
5848 is an integer literal it is always safe to replace the reference. In
5849 addition, if the reference appears in the generated code for an object
5850 declaration it is necessary to copy because otherwise the reference
5851 might be to the uninitilized value of the discriminant of the object
5854 2011-08-03 Pascal Obry <obry@adacore.com>
5856 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
5857 ACL used, in this case we want to check for ending .exe, not .exe
5858 anywhere in the path.
5860 2011-08-03 Sergey Rybin <rybin@adacore.com>
5862 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
5863 the tree structure (semantic decoration of references to record
5866 2011-08-03 Gary Dismukes <dismukes@adacore.com>
5868 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
5869 choices of a named array aggregate, bail out when any choices are
5870 marked as Errors_Posted.
5872 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5874 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
5875 in which entity is frozen, to handle properly loop variables in
5878 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5880 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
5881 subtype is not static, compute the upper bound using attributes, to
5882 handle properly index types that are not integer types.
5884 2011-08-03 Bob Duff <duff@adacore.com>
5886 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
5887 Update copyright notice.
5889 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5891 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
5892 Original_Discriminant if within an instance.
5893 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
5895 2011-08-03 Thomas Quinot <quinot@adacore.com>
5897 * einfo.ads: Minor reformatting.
5899 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5901 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
5902 composite type with an unfrozen subcomponent, in the profile of a
5903 primitive operation.
5905 2011-08-03 Robert Dewar <dewar@adacore.com>
5907 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
5909 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5911 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
5912 unconstrained type with discriminants is initialized with an aggregate,
5913 use the constrained subtype of the aggregate as the type of the object,
5914 because it is immutable, and this allows the back-end to generate no
5915 code for the object declaration.
5917 2011-08-03 Robert Dewar <dewar@adacore.com>
5919 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
5920 comparison operand is variable, and turns out to be zero or negative.
5922 2011-08-03 Javier Miranda <miranda@adacore.com>
5925 (Expand_Dispatching_Constructor_Call): Disable expansion of
5926 code required for native targets. Done to avoid generating
5927 references to unavailable runtime entities in VM targets.
5929 (Expand_N_Object_Declaration): Add missing support to handle
5930 the explicit initialization of class-wide interface objects.
5933 2011-08-03 Matthew Heaney <heaney@adacore.com>
5935 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
5937 2011-08-03 Matthew Heaney <heaney@adacore.com>
5939 * a-cbdlli.adb (Splice): move source items from first to last
5941 2011-08-03 Yannick Moy <moy@adacore.com>
5943 * sem_util.ads: comment added.
5945 2011-08-03 Javier Miranda <miranda@adacore.com>
5948 (Expand_Record_Aggregate): In VM targets disable the expansion into
5949 assignments of aggregates whose type is not known at compile time.
5951 2011-08-03 Ed Schonberg <schonberg@adacore.com>
5953 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
5954 protected entries and task entries, to build the proper renaming
5955 declaration for entry formals, used in debugging.
5956 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
5957 parameters in the same way.
5959 2011-08-02 Robert Dewar <dewar@adacore.com>
5961 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
5962 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
5963 code reorganization.
5965 2011-08-02 Robert Dewar <dewar@adacore.com>
5967 * debug.adb: Debug flag d.P to suppress length comparison optimization
5968 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
5969 comparison of Length by comparing First/Last instead.
5971 2011-08-02 Matthew Heaney <heaney@adacore.com>
5973 * a-cobove.ads: Code clean up.
5975 2011-08-02 Vincent Celier <celier@adacore.com>
5977 * adaint.c (file_names_case_sensitive_cache): New static int.
5978 (__gnat_get_file_names_case_sensitive): Cache the return value in
5979 file_names_case_sensitive_cache at the first invocation, to avoid
5980 multiple calls to getenv.
5982 2011-08-02 Bob Duff <duff@adacore.com>
5984 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
5986 2011-08-02 Yannick Moy <moy@adacore.com>
5988 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
5989 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
5990 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
5991 indicate that we are in a precondition or postcondition. This is used in
5992 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
5993 decide whether to flag the spec or body of the current subprogram as
5996 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
5998 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
6000 * a-extiin.ads: New file.
6002 2011-08-02 Bob Duff <duff@adacore.com>
6004 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
6005 now raises Name_Error instead of Use_Error in certain cases. The other
6006 parts of this AI were already implemented properly.
6008 2011-08-02 Vincent Celier <celier@adacore.com>
6010 * link.c: Only import "auto-host.h" when building the gnattools.
6012 2011-08-02 Yannick Moy <moy@adacore.com>
6014 * sem_util.adb: Inter-unit inlining does not work for a subprogram
6015 which calls a local subprogram, so extract subprogram
6016 from Mark_Non_ALFA_Subprogram_Body.
6018 2011-08-02 Javier Miranda <miranda@adacore.com>
6021 (Extract_Dispatching_Call): If the type of the dispatching object is an
6022 access type then return an explicit dereference in the Object out-mode
6025 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6027 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
6028 compatibility checks for all indexes of an array subtype, not just the
6029 first. Reset Has_Dynamic_Range_Check on the subtype before each
6030 potential check to ensure that Insert_Range_Checks will not elide any
6031 of the dynamic checks.
6033 2011-08-02 Yannick Moy <moy@adacore.com>
6035 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
6036 SPARK restriction at parsing time.
6037 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
6038 directive only if the SPARK restriction is set for this unit.
6040 2011-08-02 Yannick Moy <moy@adacore.com>
6042 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
6043 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
6044 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
6045 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
6046 Mark_Non_ALFA_Subprogram_Body.
6047 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
6050 2011-08-02 Yannick Moy <moy@adacore.com>
6052 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
6055 2011-08-02 Robert Dewar <dewar@adacore.com>
6057 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
6058 exp_ch3.adb: Minor reformatting.
6060 2011-08-02 Emmanuel Briot <briot@adacore.com>
6062 * adaint.c (__gnat_locate_exec_on_path): only returns executable
6063 files, not any regular file.
6064 (__gnat_locate_file_with_predicate): new subprogram.
6066 2011-08-02 Yannick Moy <moy@adacore.com>
6068 * sinfo.adb, sinfo.ads: Restrict the use of flags
6069 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
6070 nodes, plus N_Subtype_Declaration for the 2nd one.
6072 2011-08-02 Sergey Rybin <rybin@adacore.com>
6074 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6075 - fix bugs in the description of Source_Trace;
6076 - get rid of UNIT_NAME;
6078 2011-08-02 Javier Miranda <miranda@adacore.com>
6081 (Build_Dispatching_Requeue): Adding support for VM targets
6082 since we cannot directly reference the Tag entity.
6083 * exp_sel.adb (Build_K): Adding support for VM targets.
6084 (Build_S_Assignment): Adding support for VM targets.
6086 (Default_Prim_Op_Position): In VM targets do not restrict availability
6087 of predefined interface primitives to compiling in Ada 2005 mode.
6088 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6089 restricted to compiling in Ada 2005 mode.
6090 (Make_VM_TSD): Generate code that declares and initializes the OSD
6091 record. Needed to support dispatching calls through synchronized
6094 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6095 primitives associated with synchronized interfaces.
6096 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6097 primitives associated with synchronized interfaces.
6099 2011-08-02 Yannick Moy <moy@adacore.com>
6101 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6102 statements hidden in SPARK if preceded by the HIDE directive
6103 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6104 exception handlers as hidden in SPARK if preceded by the HIDE directive
6105 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6106 if starting with the HIDE directive
6107 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6108 starting with the HIDE directive; mark the declarations in a private
6109 part as hidden in SPARK if the private part starts with the HIDE
6111 * restrict.adb, restrict.ads
6112 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6113 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6114 argument node belongs to a part which is hidden in SPARK
6115 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6116 parts in SPARK; protect the possibly costly call to
6117 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6118 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6119 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6120 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6122 (Scan): recognize special comment starting with '#' and followed by
6123 SPARK keyword "hide" as a HIDE directive.
6125 2011-08-02 Yannick Moy <moy@adacore.com>
6127 * types.ads, erroutc.ads: Minor reformatting.
6129 2011-08-02 Vincent Celier <celier@adacore.com>
6131 * link.c: Add response file support for cross platforms.
6133 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6135 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6136 in an association, set parent field of copy before partial analysis.
6137 * sem_res.adb (Resolve_Slice): create reference to itype only when
6138 expansion is enabled.
6140 2011-08-02 Yannick Moy <moy@adacore.com>
6142 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6143 for new flag denoting which subprogram bodies are in ALFA
6144 * restrict.adb, sem_ch7.adb: Update comment
6145 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6146 sem_ch9.adb, sem_res.adb: Add calls to
6147 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6148 * sem_ch6.adb (Analyze_Function_Return): add calls to
6149 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6150 middle of the body, and extended return.
6151 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6152 False when missing return.
6153 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6154 to True for subprograms whose spec is in ALFA. Remove later on the flag
6155 on the entity used for a subprogram body when there exists a separate
6157 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6158 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6159 False, otherwise do nothing.
6161 2011-08-02 Robert Dewar <dewar@adacore.com>
6163 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6165 2011-08-02 Yannick Moy <moy@adacore.com>
6167 * sem_ch4.ads: minor formatting.
6169 2011-08-02 Yannick Moy <moy@adacore.com>
6171 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6172 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6173 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6174 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6175 opt.ads: cleanup of SPARK mode
6177 2011-08-02 Yannick Moy <moy@adacore.com>
6179 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6181 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6182 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6184 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6185 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6186 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6187 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6189 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6191 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6192 functions whose return type is not in ALFA.
6193 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6195 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6196 parameter's type is not in ALFA.
6197 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6202 * sem_ch6 (Analyze_Expression_Function): treat the function as
6203 Inline_Always, and introduce a subprogram declaration for it when it is
6205 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6206 expression functions, so that the back-end can determine whether they
6207 can in fact be inlined.
6208 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6209 a function body comes from an expression function.
6211 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6213 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6214 null exclusions to test Can_Never_Be_Null on the anonymous access types
6215 of the formals rather than testing the formals themselves. Exclude this
6216 check in cases where the Old_Formal is marked as a controlling formal,
6217 to avoid issuing spurious errors for bodies completing dispatching
6218 operations (due to the flag not getting set on controlling access
6219 formals in body specs).
6220 (Find_Corresponding_Spec): When checking full and subtype conformance of
6221 subprogram bodies in instances, pass Designated and E in that order, for
6222 consistency with the expected order of the formals (New_Id followed by
6225 2011-08-02 Robert Dewar <dewar@adacore.com>
6227 * sem_ch8.adb: Minor reformatting.
6229 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6231 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6232 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6233 primitive operations of class-wide actuals.
6235 2011-08-02 Javier Miranda <miranda@adacore.com>
6237 * exp_atag.ads, exp_atag.adb
6238 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6239 since its value is implicitly passed in argument Typ.
6240 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6241 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6242 Build_Common_Dispatching_Select_Statements.
6244 2011-08-02 Robert Dewar <dewar@adacore.com>
6246 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
6247 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
6250 2011-08-02 Robert Dewar <dewar@adacore.com>
6252 * sem_res.adb: Minor reformatting.
6253 * sem_prag.adb: Minor reformatting.
6255 2011-08-02 Javier Miranda <miranda@adacore.com>
6257 * exp_atag.adb, exp_atags.ads
6258 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
6259 by the tagged type Entity. Required to use this routine in the VM
6260 targets since we do not have available the Tag entity in the VM
6263 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
6264 Ada.Tags has not been previously loaded.
6266 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
6267 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
6269 (Enclosing_Dynamic_Scope): Add missing support to handle the full
6270 view of enclosing scopes. Required to handle enclosing scopes that
6271 are synchronized types whose full view is a task type.
6273 (Build_VM_TSDs): Minor code improvement to avoid generating and
6274 analyzing lists with empty nodes.
6275 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
6276 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
6277 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
6278 (Make_Disp_Timed_Select_Body): Add support for VM targets.
6279 (Make_Select_Specific_Data_Table): Add support for VM targets.
6280 (Make_VM_TSD): Generate code to initialize the SSD structure of
6283 2011-08-02 Yannick Moy <moy@adacore.com>
6285 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
6286 cross-references section in ALI.
6287 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
6288 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
6290 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
6291 subprogram or package entity of a node
6292 (Is_Local_Reference_Type): new function returns True for references
6293 selected in local cross-references.
6294 (Lt): function extracted from Lt in Output_References
6295 (Write_Entity_Name): function extracted from Output_References
6296 (Generate_Definition): generate reference with type 'D' for definition
6297 of objects (object declaration and parameter specification), with
6298 appropriate locations and units, for use in local cross-references.
6299 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
6300 references of type 'I' for initialization in object definition.
6301 (Output_References): move part of function Lt and procedure
6302 Write_Entity_Name outside of the body. Ignore references of types 'D'
6303 and 'I' introduced for local cross-references.
6304 (Output_Local_References): new procedure to output the local
6305 cross-references sections.
6306 (Lref_Entity_Status): new array defining whether an entity is a local
6307 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
6308 with 'I' type when initialization expression is present.
6309 * get_scos.adb, get_scos.ads: Correct comments and typos
6311 2011-08-02 Javier Miranda <miranda@adacore.com>
6313 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
6315 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
6317 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
6320 2011-08-02 Vincent Celier <celier@adacore.com>
6322 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
6323 (No_Space_Img): New function
6324 (Find_Excluded_Sources): When reading from a file, record the file name
6325 and the line number for each excluded source.
6326 (Mark_Excluded_Sources): When reporting an error, if the excluded
6327 sources were read from a file, include file name and line number in
6330 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6332 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
6334 2011-08-02 Robert Dewar <dewar@adacore.com>
6336 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
6338 2011-08-02 Javier Miranda <miranda@adacore.com>
6340 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
6341 generation of TSDs to the DOTNET compiler.
6342 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
6343 generation of TSDs to the DOTNET compiler.
6345 2011-08-02 Javier Miranda <miranda@adacore.com>
6347 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
6348 record of all the tagged types declared inside library level package
6349 declarations, library level package bodies or library level subprograms.
6350 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
6351 associated with a given tagged type.
6352 (Build_VM_TSDs): New subprogram.
6353 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
6354 compilation units that are subprograms.
6355 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
6356 compilation units that are package bodies.
6357 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
6358 units that are a package declaration or a package instantiation.
6359 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
6360 reorganization to improve the error generated by the frontend when the
6361 function Ada.Tags.Secondary_Tag is not available.
6362 * rtsfind.ads (RE_Register_TSD): New runtime entity.
6363 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
6365 2011-08-02 Javier Miranda <miranda@adacore.com>
6367 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
6369 2011-08-02 Robert Dewar <dewar@adacore.com>
6371 * s-imenne.ads: Minor reformatting.
6373 2011-08-02 Robert Dewar <dewar@adacore.com>
6375 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
6376 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
6377 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
6379 2011-08-02 Robert Dewar <dewar@adacore.com>
6381 * einfo.ads (Materialize_Entity): Document this is only for renamings
6382 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
6383 required debug information in the case where we transform the object
6384 declaration into a renaming declaration.
6385 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
6387 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
6390 2011-08-02 Robert Dewar <dewar@adacore.com>
6392 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
6393 Suppress_Init_Procs.
6394 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
6395 Suppress_Initialization/Initialization_Suppressed.
6396 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
6397 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
6398 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
6399 * sem_prag.adb: New processing for pragma Suppress_Initialization.
6401 2011-08-02 Robert Dewar <dewar@adacore.com>
6403 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
6406 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6408 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
6409 only have inheritable classwide pre/postconditions.
6411 2011-08-02 Javier Miranda <miranda@adacore.com>
6413 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
6414 * rtsfind.ads (RE_Check_TSD): New runtime entity.
6415 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
6416 checks if the external tag of a type is the same as the external tag
6417 of some other declaration.
6419 2011-08-02 Thomas Quinot <quinot@adacore.com>
6421 * s-taskin.ads: Minor reformatting.
6423 2011-08-02 Emmanuel Briot <briot@adacore.com>
6425 * g-comlin.adb (Display_Help): swap the order in which it prints the
6426 short help and the general usage.
6428 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6430 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
6431 the aspect declarations and attach them to the generic copy for
6432 subsequent analysis.
6433 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
6434 declarations of the generic tree to the new subprogram declarations.
6435 * sem_attr.adb (Check_Precondition_Postcondition): recognize
6436 conditions that apply to a subprogram instance.
6438 2011-08-02 Robert Dewar <dewar@adacore.com>
6440 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
6442 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6444 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
6445 private type with a tagged full view is not derived in the immediate
6446 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
6448 2011-08-02 Robert Dewar <dewar@adacore.com>
6450 * exp_ch4.adb: Minor reformatting.
6452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6454 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
6455 Ada2012 iterator, the loop will be rewritten during expansion into a
6456 while loop with a cursor and an element declaration. Do not analyze the
6457 body in this case, because if the container is for indefinite types the
6458 actual subtype of the elements will only be determined when the cursor
6459 declaration is analyzed.
6461 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6463 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
6464 size/alignment related attributes in CodePeer_Mode.
6466 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6468 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
6469 Prepend_Element, since this can result in the operation getting the
6470 wrong slot in the full type's dispatch table if the full type has
6471 inherited operations. The incomplete type's operation will get added
6472 to the proper position in the full type's primitives
6473 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
6474 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
6475 dispatching operations, since there are cases where nonprimitive
6476 subprograms can get added to the list of incomplete dependents (such
6477 as subprograms in nested packages).
6478 * sem_ch6.adb (Process_Formals): First, remove test for being in a
6479 private part when determining whether to add a primitive with a
6480 parameter of a tagged incomplete type to the Private_Dependents list.
6481 Such primitives can also occur in the visible part, and should not have
6482 been excluded from being private dependents.
6483 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
6484 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
6485 list of a Taft-amendment incomplete type is a primitive before issuing
6486 an error that the full type must appear in the same unit. There are
6487 cases where nonprimitives can be in the list (such as subprograms in
6489 * sem_disp.adb (Derives_From): Use correct condition for checking that
6490 a formal's type is derived from the type of the corresponding formal in
6491 the parent subprogram (the condition was completely wrong). Add
6492 checking that was missing for controlling result types being derived
6493 from the result type of the parent operation.
6495 2011-08-02 Yannick Moy <moy@adacore.com>
6497 * errout.adb (First_Node): minor renaming
6498 * restrict.adb (Check_Formal_Restriction): put restriction warning on
6501 2011-08-02 Yannick Moy <moy@adacore.com>
6503 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
6504 before accessing operands.
6505 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
6506 decide whether an initialization expression respects SPARK rules, as
6507 the plain node is the expanded one. This allows for more valid warnings
6509 * gnat_rm.texi: Minor update.
6511 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6513 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
6516 2011-08-02 Robert Dewar <dewar@adacore.com>
6518 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
6520 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6522 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
6523 loop statements and the element renaming declaration with a block when
6524 the element type is controlled.
6526 2011-08-02 Yannick Moy <moy@adacore.com>
6528 * sinfo.ads: Minor formatting.
6530 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6532 * sem_aggr.adb (Add_Association): if the association has a box and no
6533 expression, use the Sloc of the aggregate itself for the new
6535 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
6538 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6540 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
6541 When a container is provided via a function call, generate a renaming
6542 of the function result. This avoids the creation of a transient scope
6543 and the premature finalization of the container.
6544 * exp_ch7.adb (Is_Container_Cursor): Removed.
6545 (Wrap_Transient_Declaration): Remove the supression of the finalization
6546 of the list controller when the declaration denotes a container cursor,
6549 2011-08-02 Yannick Moy <moy@adacore.com>
6551 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
6552 node is from source, instead of the original node being from source.
6554 (Resolve_Array_Aggregate): refine the check for a static expression, to
6555 recognize also static ranges
6556 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
6557 Array_Type_Declaration): postpone the test for the type being a subtype
6558 mark after the type has been resolved, so that component-selection and
6559 expanded-name are discriminated.
6560 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
6561 to distinguish the case of an iteration scheme, so that an error is
6562 issed on a non-static range in SPARK except in an iteration scheme.
6563 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
6564 In_Iter_Schm = True.
6565 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
6566 user-defined operators so that they are allowed in renaming
6568 (Find_Selected_Component): refine the check for prefixing of operators
6569 so that they are allowed in renaming. Move the checks for restrictions
6570 on selector name after analysis discriminated between
6571 component-selection and expanded-name.
6572 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
6573 concatenation argument of string type if it is static.
6574 * sem_util.adb, sem_util.ads
6575 (Check_Later_Vs_Basic_Declarations): add a new function
6576 Is_Later_Declarative_Item to decice which declarations are allowed as
6577 later items, in the two different modes Ada 83 and SPARK. In the SPARK
6578 mode, add that renamings are considered as later items.
6579 (Enclosing_Package): new function to return the enclosing package
6580 (Enter_Name): correct the rule for homonyms in SPARK
6581 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
6582 from source (result of expansion) to avoid issuing wrong warnings.
6584 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6586 * errout.adb: On anything but an expression First_Node returns its
6589 2011-08-02 Pascal Obry <obry@adacore.com>
6591 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
6593 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6595 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
6596 Set the associated loop as the related expression of internally
6598 * exp_ch7.adb (Is_Container_Cursor): New routine.
6599 (Wrap_Transient_Declaration): Supress the finalization of the list
6600 controller when the declaration denotes a container cursor.
6602 2011-08-02 Yannick Moy <moy@adacore.com>
6604 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
6606 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
6607 expression is a simple expression. This check cannot be performed in
6608 the semantics, so just drop it.
6609 (P_Index_Or_Discriminant_Constraint): move check that the index or
6610 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
6611 semantics. Other cases were previously checked in the semantics.
6612 * par-ch4.adb (P_Name): move checks that a selector name is not
6613 character literal or an operator symbol to Find_Selected_Component in
6615 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
6616 declarations are not placed after later declarations in a separate
6617 procedure in Sem_Util (possibly not the best choice?), to be used both
6618 during parsing, for Ada 83 mode, and during semantic analysis, for
6620 * par-endh.adb (Check_End): move check that end label is not missing
6621 to Process_End_Label in the semantics
6622 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
6623 the special case for SPARK restriction
6624 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
6625 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
6626 parameter Force to issue the error message even on internal node (used
6627 for generated end label). Call Check_Restriction to check when an error
6628 must be issued. In SPARK mode, issue an error message even if the
6629 restriction is not set.
6630 (Check_Restriction): new procedure with an additional out parameter to
6631 inform the caller that a message has been issued
6632 * sem_aggr.adb: Minor modification of message
6633 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
6634 instead of issuing an error message directly
6635 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
6636 declarations are not placed after later declarations, by calling
6637 Check_Later_Vs_Basic_Declarations
6638 (Analyze_Subtype_Declaration): move here the check that an index or
6639 discriminant constraint must be a subtype mark. Change the check that
6640 a subtype of String must start at one so that it works on subtype marks.
6641 * sem_ch4.adb (Analyze_Call): move here the check that a named
6642 association cannot follow a positional one in a call
6643 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
6644 instead of issuing an error message directly
6645 * sem_ch8.adb (Find_Selected_Component): move here the check that a
6646 selector name is not a character literal or an operator symbol. Move
6647 here the check that the prefix of an expanded name cannot be a
6648 subprogram or a loop statement.
6649 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
6650 procedure called from parsing and semantics to check that basic
6651 declarations are not placed after later declarations
6652 (Process_End_Label): move here the check that end label is not missing
6654 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6656 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
6657 representation clause in codepeer mode, since it confuses CodePeer and
6658 does not bring useful info.
6660 2011-08-02 Ed Falis <falis@adacore.com>
6662 * init.c: initialize fp hw on MILS.
6664 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6666 * errout.adb (First_Node): for bodies, return the node itself (small
6667 optimization). For other nodes, do not check source_unit if the node
6668 comes from Standard.
6670 2011-08-02 Robert Dewar <dewar@adacore.com>
6672 * exp_ch3.adb: Minor comment additions.
6673 * sem_ch13.adb: Minor reformatting.
6675 2011-08-02 Pascal Obry <obry@adacore.com>
6677 * make.adb, makeutl.adb: Removes some superfluous directory separator.
6679 2011-08-02 Robert Dewar <dewar@adacore.com>
6681 * sem_attr.adb: Minor reformatting.
6683 2011-08-02 Robert Dewar <dewar@adacore.com>
6685 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
6686 (Has_Default_Component_Value): Removed
6687 * einfo.ads Comment updates
6688 (Has_Default_Aspect): Replaces Has_Default_Value
6689 (Has_Default_Component_Value): Removed
6691 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
6693 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
6694 (Get_Simple_Init_Val): Handle Default_Value aspect
6695 (Needs_Simple_Initialization): Handle Default_Value aspect
6696 * exp_ch3.ads: Needs_Simple_Initialization
6697 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
6698 * par-prag.adb (Pragma_Default[_Component]Value) Removed
6700 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
6701 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
6702 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
6704 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6706 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
6707 package containing iteration primitives.
6708 exp_ch5.adb (Expand_Iterator_Loop): ditto.
6710 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6712 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
6713 "of", pre-analyze expression in case it is a function call with
6714 finalization actions that must be placed ahead of the loop.
6715 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
6716 on an Ada2012 iterator, insert them ahead of the rewritten loop.
6718 2011-08-02 Geert Bosch <bosch@adacore.com>
6720 * cstand.adb (Create_Float_Types): Only consider C's long double for
6721 Long_Long_Float, in addition to double.
6723 2011-08-02 Robert Dewar <dewar@adacore.com>
6725 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
6726 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
6727 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
6730 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6732 * sem_attr.adb: handle properly 'Result when it is a prefix of an
6735 2011-08-02 Javier Miranda <miranda@adacore.com>
6737 * einfo.ads, einfo.adb
6738 (Original_Access_Type): Move this attribute to Node26 since there was
6739 an undocumented use of Node21 in E_Access_Subprogram_Type entities
6740 which causes conflicts and breaks the generation of the .NET compiler.
6741 (Interface_Name): Add missing documentation on JGNAT only uses of
6744 2011-08-02 Geert Bosch <bosch@adacore.com>
6746 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
6747 (Find_Back_End_Float_Type): Likewise
6748 (Create_Back_End_Float_Types): Likewise
6749 (Create_Float_Types): Likewise
6750 (Register_Float_Type): Likewise
6751 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
6752 Nlist and split out type selection in new local Find_Base_Type function.
6753 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
6755 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
6757 2011-08-02 Robert Dewar <dewar@adacore.com>
6759 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
6761 * opt.ads: Minor comment change.
6762 * sem_ch12.adb: Minor code reorganization.
6764 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6766 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
6767 subtype's list of rep items to the list on the full subtype in the case
6768 where the lists are the same.
6770 2011-08-02 Geert Bosch <bosch@adacore.com>
6772 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
6773 using the one from System.Strings, which also deallocates all strings.
6775 2011-08-02 Geert Bosch <bosch@adacore.com>
6777 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
6779 * gcc-interface/Make-lang.in: Update dependencies.
6781 2011-08-02 Olivier Hainque <hainque@adacore.com>
6783 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
6786 2011-08-02 Javier Miranda <miranda@adacore.com>
6788 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
6789 associated with anonymous access to subprograms.
6791 2011-08-02 Geert Bosch <bosch@adacore.com>
6794 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
6795 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
6796 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
6797 (Add_Symbol_Definition): Move to switch-c.adb
6798 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
6799 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
6800 (Add_Symbol_Definition): Move to switch-c.adb.
6801 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
6803 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6805 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
6806 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
6808 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
6809 (Add_Symbol_Definition): Moved from Prepcomp.
6810 * switch-c.ads: Update copyright notice. Use String_List instead of
6811 Argument_List, removing dependency on System.OS_Lib.
6813 2011-08-02 Yannick Moy <moy@adacore.com>
6815 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
6816 mode on initialization expression which does not respect SPARK
6818 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
6819 if the tree referenced by its argument represents an initialization
6820 expression in SPARK, suitable for initializing an object in an object
6823 2011-08-02 Javier Miranda <miranda@adacore.com>
6825 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
6826 internally generated access to subprogram with its associated protected
6828 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
6830 2011-08-02 Geert Bosch <bosch@adacore.com>
6832 * cstand.adb (Register_Float_Type): Print information about type to
6833 register, if the Debug_Flag_Dot_B is set.
6834 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
6835 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
6836 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
6837 with a requested precision of more than Max_Digits digits and no more
6838 than Max_Base_Digits digits, if a range specification is present and the
6839 Predefined_Float_Types list has a suitable type to derive from.
6840 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
6841 case of type completion with pragma Import
6843 (Process_Import_Predefined_Type): Processing to complete a type
6844 with pragma Import. Currently supports floating point types only.
6845 (Set_Convention_From_Pragma): Do nothing without underlying type.
6846 (Process_Convention): Guard against absence of underlying type,
6847 which may happen when importing incomplete types.
6848 (Process_Import_Or_Interface): Handle case of importing predefined
6849 types. Tweak error message.
6851 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6853 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
6854 functions to previous change. Reorganize code slightly.
6856 2011-08-02 Geert Bosch <bosch@adacore.com>
6858 * back_end.ads (Register_Type_Proc): New call back procedure type for
6859 allowing the back end to provide information about available types.
6860 (Register_Back_End_Types): New procedure to register back end types.
6861 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
6863 * cstand.adb (Back_End_Float_Types): New list for floating point types
6864 supported by the back end.
6865 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
6866 (Copy_Float_Type): New procedure to make new copies of predefined types.
6867 (Register_Float_Type): New call back procedure to populate the BEFT list
6868 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
6869 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
6870 (Create_Float_Types): New procedure to create entities for floating
6871 point types predefined in Standard, and put these and any remaining
6872 BEFTs on the Predefined_Float_Types list.
6873 * stand.ads (Predefined_Float_Types): New list for predefined floating
6874 point types that do not have declarations in package Standard.
6876 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6878 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
6879 entity node for the unit containing the parameter.
6880 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
6881 (Add_Inlined_Subprogram): Likewise.
6882 * gcc-interface/Make-lang.in: Update dependencies.
6884 2011-08-02 Thomas Quinot <quinot@adacore.com>
6886 * s-stusta.adb (Print): Make sure Pos is always initialized to a
6889 2011-08-02 Geert Bosch <bosch@adacore.com>
6891 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
6893 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6895 * sem_type.adb (Covers): Move trivial case to the top and reuse the
6896 computed value of Base_Type.
6898 2011-08-02 Yannick Moy <moy@adacore.com>
6900 * restrict.adb (Check_Restriction): issue an error for any use of
6901 class-wide, even if the No_Dispatch restriction is not set.
6902 * sem_aggr.adb: Correct typos in comments and messages in formal mode
6903 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
6904 when completing a private extension, the type named in the private part
6905 is not the same as that named in the visible part.
6906 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
6907 of an inherited primitive operations of a tagged type or type extension
6908 that returns the tagged type.
6909 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
6910 function which returns True for an implicit operation inherited by the
6911 derived type declaration for the argument type.
6912 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
6915 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6917 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
6918 Process_Bounds, to perform analysis with expansion of a range or an
6919 expression that is the iteration scheme for a loop.
6920 (Analyze_Iterator_Specification): If domain of iteration is given by a
6921 function call with a controlled result, as is the case if call returns
6922 a predefined container, ensure that finalization actions are properly
6924 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
6926 2011-08-02 Javier Miranda <miranda@adacore.com>
6928 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
6929 * gcc-interface/Make-lang.in: Update dependencies.
6931 2011-08-02 Javier Miranda <miranda@adacore.com>
6933 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
6934 determine if the analysis is performed using N or Original_Node (N).
6935 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
6936 functionality of routine Is_Variable avoids code duplication.
6937 * checks.adb (Determine_Range): Handle temporaries generated by
6938 Remove_Side_Effects.
6940 2011-08-02 Javier Miranda <miranda@adacore.com>
6942 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
6943 expansion of the condition. Required since the previous analysis was
6944 done with expansion disabled (see Resolve_Quantified_Expression) and
6945 hence checks were not inserted and record comparisons have not been
6948 2011-08-02 Ed Falis <falis@adacore.com>
6950 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
6953 2011-08-02 Bob Duff <duff@adacore.com>
6955 * opt.ads: Minor comment fix.
6957 2011-08-02 Bob Duff <duff@adacore.com>
6959 * sem_ch12.adb (Analyze_Package_Instantiation,
6960 Analyze_Subprogram_Instantiation): Turn off style checking while
6961 analyzing an instance. Whatever style checks that apply to the generic
6962 unit should apply, so it makes no sense to apply them in an instance.
6963 This was causing trouble when compiling an instance of a runtime
6964 unit that violates the -gnatyO switch.
6965 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
6966 one of the two case statements, causing spurious errors.
6968 2011-08-02 Robert Dewar <dewar@adacore.com>
6970 * uname.adb: Minor reformatting.
6971 * gnatcmd.adb: Minor reformatting.
6972 * exp_attr.adb: Minor reformatting.
6974 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6976 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
6977 No_Dispatching_Calls, do not look for the Assign primitive, because
6978 predefined primitives are not created in this case.
6980 2011-08-02 Bob Duff <duff@adacore.com>
6982 * stylesw.ads: Minor comment fixes.
6984 2011-08-02 Robert Dewar <dewar@adacore.com>
6986 * freeze.adb (Add_To_Result): New procedure.
6988 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6990 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
6991 time, if the specific run-time routines for handling streams of strings
6992 are not available, use the default mechanism.
6994 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6996 * s-regpat.ads: Fix typo.
6998 2011-08-02 Vincent Celier <celier@adacore.com>
7000 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7001 not null, call it to create the in memory config project file without
7002 parsing an existing default config project file.
7004 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7006 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7008 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7010 * sem_elim.adb: an abstract subprogram does not need an eliminate
7011 pragma for its descendant to be eliminable.
7013 2011-08-02 Ed Falis <falis@adacore.com>
7015 * init.c: revert to handling before previous checkin for VxWorks
7016 * s-intman-vxworks.adb: delete unnecessary declarations related to
7017 using Ada interrupt facilities for handling signals.
7018 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7019 * s-intman-vxworks.ads: Import __gnat_install_handler as
7020 Initialize_Interrupts.
7021 * s-taprop-vxworks.adb: Delete Signal_Mask.
7022 (Abort_Handler): change construction of mask to unblock exception
7025 2011-08-02 Jerome Guitton <guitton@adacore.com>
7027 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7028 Debug_Raise_Exception before propagation starts.
7030 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7032 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7033 to Restriction_Check_Required.
7034 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7035 * sem_res.adb (Resolve_Call): Likewise.
7036 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7038 2011-08-02 Bob Duff <duff@adacore.com>
7040 * stylesw.ads: Update comment.
7041 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7042 * errout.ads: Remove obsolete comment.
7044 2011-08-02 Javier Miranda <miranda@adacore.com>
7046 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7047 (Set_Is_Safe_To_Reevaluate): new procedure.
7048 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7049 assignment is allowed on safe-to-reevaluate variables.
7050 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7051 temporary created to remove side effects in expressions that use
7052 the secondary stack as safe-to-reevaluate.
7053 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7054 variables that are not true constants.
7056 2011-08-02 Robert Dewar <dewar@adacore.com>
7058 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7059 sem_res.adb, sem_ch6.adb: Minor reformatting.
7061 2011-08-02 Jerome Guitton <guitton@adacore.com>
7063 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7065 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7067 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7068 not set Overridden_Operation if subprogram is an initialization
7071 2011-08-02 Yannick Moy <moy@adacore.com>
7073 * par-ch6.adb: Correct obsolete name in comments
7074 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7075 which takes two message arguments (existing function takes one), with
7076 second message used for continuation.
7077 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7078 block statements that originate from a source block statement, not
7079 generated block statements
7080 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7081 symmetry with procedure case
7082 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7083 function to issue an error in formal mode if a package specification
7084 contains more than one tagged type or type extension.
7085 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7086 parameters matching formals of tagged types are objects (or ancestor
7087 type conversions of objects), not general expressions. Issue an error
7088 on view conversions that are not involving ancestor conversion of an
7090 (Resolve_Type_Conversion): in formal mode, issue an error on the
7091 operand of an ancestor type conversion which is not an object
7092 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7093 procedure so that it works also for actuals of function calls
7094 (Is_Actual_Tagged_Parameter): new function which determines if its
7095 argument is an actual parameter of a formal of tagged type in a
7097 (Is_SPARK_Object_Reference): new function which determines if the tree
7098 referenced by its argument represents an object in SPARK
7100 2011-08-02 Robert Dewar <dewar@adacore.com>
7102 * sem_ch3.adb: Minor reformatting
7103 Minor comment addition
7104 Minor error msg text change
7106 2011-08-02 Javier Miranda <miranda@adacore.com>
7108 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7109 function. Used to be more precise when we generate a variable plus one
7110 assignment to remove side effects in the evaluation of the Bound
7112 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7113 of the bound expression to force its re-analysis and thus expand the
7114 associated transient scope (if required). Code cleanup replacing the
7115 previous code that declared the constant entity by an invocation to
7116 routine Force_Evaluation which centralizes this work in the frontend.
7118 2011-08-02 Robert Dewar <dewar@adacore.com>
7120 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7121 (Base_Type): Now uses improved Is_Base_Type function
7122 * einfo.ads (Base_Type): Inline this function
7124 2011-08-02 Robert Dewar <dewar@adacore.com>
7126 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7127 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7129 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7131 * gcc-interface/Make-lang.in: Update dependencies.
7132 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7135 2011-08-02 Yannick Moy <moy@adacore.com>
7137 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7138 non-simple expression used in delta constraint
7139 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7140 index constraint which is not a subtype mark
7141 * par.adb: With and use Restrict
7142 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7143 mode on component type which is not a subtype mark and default
7144 expression on component
7145 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7146 of string which does not have a lower index bound equal to 1
7147 (Array_Type_Declaration): issue an error in formal mode on index or
7148 component type which is not a subtype mark, and on aliased keyword on
7150 (Derived_Type_Declaration): issue an error in formal mode on interface,
7151 limited or abstract type
7152 (Record_Type_Declaration): issue an error in formal mode on interface
7153 (Record_Type_Definition): issue an error in formal mode on tagged types
7154 and type extensions not declared in the specification of a library unit
7155 package; on null non-tagged record; on variant part
7157 2011-08-02 Vincent Celier <celier@adacore.com>
7159 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7160 not declared for qualified library project when Library_Name is not
7161 declared, but Library_Dir is.
7163 2011-08-02 Robert Dewar <dewar@adacore.com>
7165 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7166 pragmas (affects aspects [Component_]Default_Value
7167 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7168 component type for the resolution
7170 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7172 * einfo.adb (Base_Type): Tune implementation for speed.
7174 2011-08-02 Robert Dewar <dewar@adacore.com>
7176 * freeze.adb: Minor reformatting.
7178 2011-08-02 Thomas Quinot <quinot@adacore.com>
7180 * scos.ads: Update comments.
7182 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7184 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7185 base type, because the parent may be a subtype of a private type whose
7186 convention is established in a private part.
7188 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7190 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7191 statement in a block when the expansion of the return expression has
7192 created a finalization chain.
7193 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7194 with the parent node.
7195 Add N_Extended_Return_Statement to handle the case where a transient
7196 object declaration appears in the Return_Object_Declarations list of
7197 an extended return statement.
7199 2011-08-02 Matthew Gingell <gingell@adacore.com>
7201 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7202 unused parameter 'name'.
7204 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7206 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7207 inherited operation, check whether its alias, which is the source
7208 operastion that it renames, has been marked eliminated.
7210 2011-08-02 Javier Miranda <miranda@adacore.com>
7212 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7213 in-mode parameter whose type is an access type since it can be used to
7214 modify its designated object. Enforce code that handles as safe an
7215 access type that is not access-to-constant but it is the result of a
7216 previous removal of side-effects.
7217 (Remove_Side_Effects): Minor code reorganization of cases which require
7218 no action. Done to incorporate documentation on new cases uncovered
7219 working in this ticket: no action needed if this routine was invoked
7220 too early and the nodes are not yet decorated.
7221 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7222 to routine Remove_Side_Effects by calls to Force_Evaluation since they
7223 were issued with actuals that are implicitly provided by
7226 2011-08-02 Robert Dewar <dewar@adacore.com>
7228 * sem_ch3.adb, sem_res.adb: Minor reformatting.
7230 2011-08-02 Yannick Moy <moy@adacore.com>
7232 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7233 to issue an error in formal mode on attribute not supported in this mode
7234 (Analyze_Attribute): issue errors on standard attributes not supported
7236 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7237 comment, and issue error in formal mode on modulus which is not a power
7239 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7241 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7243 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7244 operator on modular type (except 'not').
7246 2011-08-02 Robert Dewar <dewar@adacore.com>
7248 * gnat_rm.texi: Minor reformatting.
7250 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7252 * s-osinte-linux.ads: Minor comment update and reformatting.
7253 * i-cexten.ads: Make this unit pure, as for its parent.
7254 Will allow its usage in more contexts if needed.
7256 2011-08-02 Robert Dewar <dewar@adacore.com>
7258 * s-utf_32.ads: Minor comment fix.
7260 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7262 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
7263 operation of a tagged synchronized type, handle the case where the
7264 controlling argument is overloaded.
7266 2011-08-02 Yannick Moy <moy@adacore.com>
7268 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
7269 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
7270 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
7271 SPARK mode and formal verification mode on processing SPARK restriction
7272 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
7273 requiring consistency checking.
7275 2011-08-02 Robert Dewar <dewar@adacore.com>
7277 * sem_res.adb: Minor reformatting.
7279 2011-08-02 Robert Dewar <dewar@adacore.com>
7281 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7282 a-cforse.ads: Remove unneeded with of Ada.Containers
7283 Remove commented out pragma Inline's
7284 Move specifications of new subprograms to the actual specs
7286 2011-08-02 Yannick Moy <moy@adacore.com>
7288 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7289 a-cforse.ads: Update comments.
7291 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7293 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
7295 2011-08-02 Robert Dewar <dewar@adacore.com>
7297 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
7298 a-cforse.ads, a-cofove.ads: Minor reformatting.
7300 2011-08-02 Claire Dross <dross@adacore.com>
7302 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
7303 a-cofove.ads: Add comments.
7305 2011-08-02 Yannick Moy <moy@adacore.com>
7307 * gnat_rm.texi: Document formal containers.
7309 2011-08-02 Emmanuel Briot <briot@adacore.com>
7311 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
7314 2011-08-02 Robert Dewar <dewar@adacore.com>
7316 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
7319 2011-08-02 Robert Dewar <dewar@adacore.com>
7321 * aspects.adb: New aspects Default_Value and Default_Component_Value
7322 New format of Aspect_Names table checks for omitted entries
7323 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
7324 handling of boolean aspects for derived types.
7325 New aspects Default_Value and Default_Component_Value
7326 New format of Aspect_Names table checks for omitted entries
7327 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
7328 (Has_Default_Value): New flag
7329 (Has_Default_Component_Value): New flag
7330 (Has_Default_Value): New flag
7331 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
7333 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
7334 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
7335 Default_Value and Default_Component_Value
7336 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
7337 New aspects Default_Value and Default_Component_Value
7338 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
7339 * sprint.adb: Print N_Aspect_Specification node when called from gdb
7341 2011-08-02 Vincent Celier <celier@adacore.com>
7343 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
7344 inherit library kind.
7346 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7348 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
7351 2011-08-02 Robert Dewar <dewar@adacore.com>
7353 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
7355 2011-08-02 Yannick Moy <moy@adacore.com>
7357 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
7359 2011-08-02 Robert Dewar <dewar@adacore.com>
7361 * impunit.adb: Add comment.
7363 2011-08-02 Yannick Moy <moy@adacore.com>
7365 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
7366 qualification of aggregates in formal mode
7367 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
7369 (Resolve_Aggregate): complete the test that an aggregate is adequately
7370 qualified in formal mode
7372 2011-08-02 Pascal Obry <obry@adacore.com>
7374 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
7375 * mlib-prj.adb: Supress warning when compiling binder generated file.
7376 (Build_Library): Supress all warnings when compiling the binder
7379 2011-08-02 Yannick Moy <moy@adacore.com>
7381 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
7383 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
7384 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
7385 Add with/use clauses to make Check_Formal_Restriction visible
7387 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7389 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
7390 in-parameters when type of the generic formal is private in the generic
7391 spec and non-private in the body.
7393 2011-08-02 Claire Dross <dross@adacore.com>
7395 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
7396 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
7397 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
7398 * impunit.adb, Makefile.rtl: Take new files into account.
7400 2011-08-02 Robert Dewar <dewar@adacore.com>
7402 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
7403 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7405 2011-08-02 Yannick Moy <moy@adacore.com>
7407 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
7409 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
7410 matching static array bounds, taking into account the special case of
7412 * sem_ch3.adb: Typo in comment.
7414 2011-08-02 Yannick Moy <moy@adacore.com>
7416 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
7417 which issues an error in formal mode if its argument node is originally
7419 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
7420 has a discriminant specification so that it does not include the case
7422 (Derived_Type_Declaration): move here the test that a derived type has a
7423 discriminant specification
7424 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
7425 first element of a component association before accessing its choices
7426 (presence of component association is not enough)
7427 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
7428 declaration is a library item before accessing the next element in a
7429 list, as library items are not member of lists
7430 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
7431 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
7432 Check_Formal_Restriction whenever possible.
7434 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7436 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
7437 reference when needed.
7439 2011-08-02 Bob Duff <duff@adacore.com>
7441 * gnat_ugn.texi: Fix typo.
7443 2011-08-02 Vincent Celier <celier@adacore.com>
7445 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
7446 archive file name. Do not use the full path name of archives for Open
7449 2011-08-02 Robert Dewar <dewar@adacore.com>
7451 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
7452 Analyze_Aspect_Specifications
7454 (Analyze_Aspect_Specifications): New handling for boolean aspects
7455 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
7456 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
7457 sequence for Analyze_Aspect_Specifications
7458 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
7459 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
7461 2011-08-02 Robert Dewar <dewar@adacore.com>
7463 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
7464 aspects, since these no longer exist.
7466 2011-08-02 Robert Dewar <dewar@adacore.com>
7468 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
7469 semicolon, do not try to see if there are aspects following it.
7470 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
7473 2011-08-02 Robert Dewar <dewar@adacore.com>
7475 * sem_ch8.adb, aspects.ads: Minor reformatting.
7477 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7479 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
7480 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
7482 (Analyze_Aspect_Specifications): ...here. Call above procedure.
7484 2011-08-02 Yannick Moy <moy@adacore.com>
7486 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
7487 mode on subprogram declaration outside of package specification, unless
7488 it is followed by a pragma Import
7489 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
7490 Access_Type_Declaration): issue error in formal mode on access type
7491 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
7493 (Analyze_Object_Declaration): issue error in formal mode on object
7494 declaration which does not respect SPARK restrictions
7495 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
7496 declaration which does not respect SPARK restrictions
7497 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
7498 error in formal mode on digits or delta constraint
7499 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
7500 decimal fixed point type
7501 (Derived_Type_Declaration): issue error in formal mode on derived type
7502 other than type extensions of tagged record types
7503 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
7504 with check on access definition
7505 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
7506 mode on protected definition.
7507 (Analyze_Task_Definition): issue error in formal mode on task definition
7509 2011-08-02 Robert Dewar <dewar@adacore.com>
7511 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
7513 2011-08-02 Javier Miranda <miranda@adacore.com>
7515 * sem_ch6.adb (Can_Override_Operator): New function.
7516 (Verify_Overriding_Indicator): Add missing code to check overriding
7517 indicator in operators. Fixes regression.
7518 (Check_Overriding_Indicator): Minor reformating after replacing the
7519 code that evaluates if the subprogram can override an operator by
7520 invocations to the above new function.
7522 (Write_Field26_Name): Add missing code to ensure that, following
7523 the documentation in einfo.ads, this field is not shown as attribute
7524 "Static_Initialization" on non-dispatching functions.
7526 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7528 * sem_res.adb (Resolve_Call): A call to
7529 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
7530 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
7531 i.e., when the second parameter is of type Time_Span.
7533 2011-08-02 Vincent Celier <celier@adacore.com>
7535 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
7536 with an archive instead of -L<library dir> -l<library name>.
7538 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7540 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
7541 mark the base types In_Use in addition to making the operations
7544 2011-08-02 Ed Falis <falis@adacore.com>
7546 * init.c: add and setup __gnat_signal_mask for the exception signals
7547 * s-inmaop-vxworks.adb: new file.
7548 * s-intman-vxworks.adb: remove unnecessary initializations and
7550 * s-intman-vxworks.ads: remove unnecessary variable
7551 * s-taprop-vxworks.adb: simplify signal initialization
7553 2011-08-02 Robert Dewar <dewar@adacore.com>
7555 * sem_ch8.adb: Minor code reorganization, comment updates.
7557 2011-08-02 Robert Dewar <dewar@adacore.com>
7559 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
7560 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
7562 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
7563 (Matching_Static_Array_Bounds): Moved here from Sem_Res
7565 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7567 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
7568 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
7569 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
7570 use_type_clauses, to handle more efficiently use_type and use_all_type
7572 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
7573 Ada2012 Use_All_Type clause.
7574 (Use_Class_Wide_Operations): new procedure.
7576 2011-08-02 Robert Dewar <dewar@adacore.com>
7578 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
7579 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
7580 expression to expression function.
7582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7584 * sem_ch4.adb: transform simple Ada2012 membership into equality only
7585 if types are compatible.
7587 2011-08-02 Yannick Moy <moy@adacore.com>
7589 * sem_res.adb (Matching_Static_Array_Bounds): new function which
7590 returns True if its argument array types have same dimension and same
7591 static bounds at each index.
7592 (Resolve_Actuals): issue an error in formal mode on actuals passed as
7593 OUT or IN OUT paramaters which are not view conversions in SPARK.
7594 (Resolve_Arithmetic_Op): issue an error in formal mode on
7595 multiplication or division with operands of fixed point types which are
7596 not qualified or explicitly converted.
7597 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
7598 Boolean or array type (except String) operands.
7599 (Resolve_Equality_Op): issue an error in formal mode on equality
7600 operators for array types other than String with non-matching static
7602 (Resolve_Logical_Op): issue an error in formal mode on logical operators
7603 for array types with non-matching static bounds. Factorize the code in
7604 Matching_Static_Array_Bounds.
7605 (Resolve_Qualified_Expression): issue an error in formal mode on
7606 qualified expressions for array types with non-matching static bounds.
7607 (Resolve_Type_Conversion): issue an error in formal mode on type
7608 conversion for array types with non-matching static bounds
7610 2011-08-02 Robert Dewar <dewar@adacore.com>
7612 * par-ch10.adb: Minor code reorganization (use Nkind_In).
7614 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7616 * par-ch9.adb: save location of entry for proper error message.
7618 2011-08-02 Javier Miranda <miranda@adacore.com>
7620 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
7621 (Use_Full_View) which permits this routine to climb through the
7622 ancestors using the full-view of private parents.
7623 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
7624 Use_Full_View to true in calls to Is_Ancestor.
7625 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
7626 true in call to Is_Ancestor.
7627 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
7628 Use_Full_View to true in call to Is_Ancestor.
7629 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
7630 call to Is_Ancestor.
7631 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
7632 Use_Full_View to true in calls to Is_Ancestor.
7633 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
7634 Make_Select_Specific_Data_Table, Register_Primitive,
7635 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
7636 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
7637 to true in call to Is_Ancestor.
7638 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
7639 Use_Full_View to true in calls to Is_Ancestor.
7641 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
7642 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
7644 2011-08-02 Robert Dewar <dewar@adacore.com>
7646 * gnat_rm.texi: Minor reformatting.
7647 * sem_prag.adb: Minor reformatting.
7649 2011-08-02 Tristan Gingold <gingold@adacore.com>
7651 * vms_data.ads: Add VMS qualifier for -gnateP.
7653 2011-08-02 Robert Dewar <dewar@adacore.com>
7655 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
7656 * par-ch7.adb (P_Package): Proper placement of aspects for package
7658 * par-endh.adb (Check_End): Ad Is_Sloc parameter
7659 (End_Statements): Add Is_Sloc parameterr
7660 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
7661 (Check_End): Ad Is_Sloc parameter
7662 (End_Statements): Add Is_Sloc parameterr
7664 2011-08-02 Vincent Celier <celier@adacore.com>
7666 * ug_words: Add VMS qualifier equivalent to -gnateP:
7667 /SYMBOL_PREPROCESSING.
7669 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7671 * gnat-style.texi: For hexadecimal numeric literals the typical
7672 grouping of digits is 4 to represent 2 bytes.
7673 A procedure spec which is split into several lines is indented two
7676 2011-08-02 Yannick Moy <moy@adacore.com>
7678 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
7679 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
7680 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
7682 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
7683 choice in array aggregate
7684 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
7686 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
7687 positional and named aggregate for record, or others in record
7688 aggregate, or multiple choice in record aggregate
7689 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
7690 array operands to logical operations AND, OR and XOR do not have the
7691 same static lower and higher bounds
7692 * sem_ch5.adb, sinfo.ads: Correct typos in comments
7694 2011-08-01 Robert Dewar <dewar@adacore.com>
7696 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
7697 Replaces Last_Source_Node_In_Sequence.
7698 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
7699 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
7700 parens and blank in string (this was inconsistently implemented).
7702 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
7703 blank in string (this was inconsistently implemented).
7705 (Set_Global_Switches): Set formal mode switches appropriately
7706 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
7708 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
7709 call Set_Error_Msg_Lang to set "spark" as language name.
7710 * par.adb: Remove unnecessary call to set formal language for errout
7711 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
7712 appropriately and call Set_Error_Msg_Lang to set "spark" as language
7714 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
7715 calls to it, moved after resolution so that types are known
7716 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
7717 result of concatenation is not of type String
7718 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
7719 concatenation is not properly restricted
7720 * gnat_rm.texi: Add doc on pragma Spark_95.
7721 * gcc-interface/Makefile.in: Remove obsolete target pairs for
7722 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
7723 * gcc-interface/Make-lang.in: Update dependencies.
7725 2011-08-01 Javier Miranda <miranda@adacore.com>
7727 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
7728 condition that detects if the overridden operation must replace an
7731 2011-08-01 Javier Miranda <miranda@adacore.com>
7733 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
7734 code declarations inserted by Insert_Actions in each alternative of the
7735 N_Case_Expression node.
7737 2011-08-01 Robert Dewar <dewar@adacore.com>
7739 * sem_ch6.adb: Minor code reorganization.
7740 * sem_util.adb: Minor reformatting.
7742 2011-08-01 Pascal Obry <obry@adacore.com>
7744 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
7745 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
7747 2011-08-01 Yannick Moy <moy@adacore.com>
7749 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
7750 literal or operator symbol which is prefixed
7751 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
7752 mode on access attributes.
7753 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
7754 that concatenation operands are properly restricted in formal mode
7755 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
7756 Analyze_Concatenation_Operand. Issue an error in formal mode if the
7757 result of the concatenation has a type different from String.
7758 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
7759 Analyze_Quantified_Expression, Analyze_Slice,
7760 Analyze_Null): issue an error in formal mode on unsupported constructs
7762 (Analyze_Block_Statement): only issue error on source block statement
7763 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
7764 function which returns the last node in a list of nodes for which
7765 Comes_From_Source returns True, if any
7766 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
7767 Last_Source_Node_In_Sequence
7768 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
7769 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
7770 mode on unsupported constructs
7771 * sem_ch9.adb Do not return after issuing error in formal mode, as the
7772 rest of the actions may be needed later on since the error is marked as
7774 * sinfo.ads: Typos in comments.
7776 2011-08-01 Pascal Obry <obry@adacore.com>
7778 * projects.texi: Minor editing.
7780 2011-08-01 Yannick Moy <moy@adacore.com>
7782 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
7783 insertion character ~~
7784 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
7785 (Set_Error_Msg_Lang): new procedure which fixes the language for use
7786 with insertion character ~~
7787 (Set_Msg_Text): treat insertion character ~~
7788 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
7789 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
7790 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
7791 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
7792 errors related to the formal language restriction not serious
7793 (insertion character |).
7794 * par.adb (Par): set formal language for error messages if needed
7795 * sem_ch6.adb (Check_Missing_Return): take into account possible
7796 generated statements at the end of the function
7797 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
7798 enumeration value to define a new pragma SPARK_95
7799 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
7800 SPARK_Version): new type and variables to store the SPARK version
7802 (SPARK_Mode): return True when SPARK_Version is set
7803 * par-prag.adb: Correct indentation
7804 (Prag): take Pragma_SPARK_95 into account
7805 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
7808 2011-08-01 Robert Dewar <dewar@adacore.com>
7810 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
7811 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
7812 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
7814 2011-08-01 Pascal Obry <obry@adacore.com>
7816 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
7817 Target_Name to Get_Path call.
7818 (Parse_Single_Project): Likewise.
7819 (Post_Parse_Context_Clause): Likewise.
7820 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
7821 Call Initialise_Project_Path with the proper Target_Name.
7822 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
7824 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
7825 with the proper Target_Name.
7826 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
7828 (Parse_Project_And_Apply_Config): Likewise.
7829 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
7830 This is fine as this part of the code is supporting only native
7832 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
7833 is fine as this part of the code is supporting only native compilation.
7835 2011-08-01 Yannick Moy <moy@adacore.com>
7837 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
7838 of homonym, unless the homonym is one of the cases allowed in SPARK
7839 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
7840 package declaration occurring after a body.
7842 2011-08-01 Robert Dewar <dewar@adacore.com>
7844 * checks.adb, exp_ch4.adb: Minor reformatting.
7846 2011-08-01 Javier Miranda <miranda@adacore.com>
7848 * einfo.ads (Access_Disp_Table): Fix documentation.
7849 (Dispatch_Table_Wrappers): Fix documentation.
7851 2011-08-01 Pascal Obry <obry@adacore.com>
7853 * prj-env.adb, prj-env.ads: Minor reformatting.
7855 2011-08-01 Yannick Moy <moy@adacore.com>
7857 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
7858 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7859 procedures out of these packages.
7860 * errout.ads, errout.adb
7861 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
7862 procedures in of this package
7863 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
7864 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
7865 on misplaced later vs initial declarations, like in Ada 83
7866 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
7867 formal mode on attribute of private type whose full type declaration
7869 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
7870 package declaration inside a package specification
7871 (Analyze_Full_Type_Declaration): issue error in formal mode on
7872 controlled type or discriminant type
7873 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
7874 user-defined operator means that it should come from the source
7875 (New_Overloaded_Entity): issue error in formal mode on overloaded
7877 * sem_ch6.ads, sem_ch13.ads: typos in comments.
7879 2011-08-01 Thomas Quinot <quinot@adacore.com>
7881 * atree.adb: Minor reformatting.
7882 * checks.adb: Minor reformatting.
7884 2011-08-01 Vincent Celier <celier@adacore.com>
7886 * s-parame-vms-ia64.ads: Fix typo in comment
7888 * s-parame-vms-restrict.ads: Removed, unused.
7890 2011-08-01 Javier Miranda <miranda@adacore.com>
7893 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
7895 (Constrain_Index): Remove side effects in the evaluation of the bounds.
7896 * sem_ch3.ads, sem_ch3.adb
7897 (Is_Constant_Bound): New extended version of the subprogram that was
7898 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
7899 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
7900 * sem_aux.ads (Constant_Value): Fix typo in comment.
7901 * checks.adb (Generate_Index_Checks): New implementation which, for
7902 array objects with constant bounds, generates the runtime check
7903 referencing the bounds of the array type. For other cases this routine
7904 provides its previous behavior obtaining such values from the array
7906 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
7908 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
7909 we cannot have semantic interpretations of the new node.
7911 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7913 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
7916 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7918 * sem_ch8.adb: Minor code editing.
7919 * s-vxwext.adb: Remove trailing space.
7920 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
7921 consistency with other files.
7923 2011-08-01 Thomas Quinot <quinot@adacore.com>
7925 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
7927 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7929 * par-ch10.adb: reject parameterized expressions as compilation unit.
7930 * sem_ch4.adb: handle properly conditional expression with overloaded
7931 then_clause and no else_clause.
7933 2011-08-01 Tristan Gingold <gingold@adacore.com>
7935 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
7936 like done by System.Aux_DEC.
7937 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
7939 2011-08-01 Yannick Moy <moy@adacore.com>
7941 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
7942 missing label at end of declaration (subprogram or package)
7943 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
7944 of positional and named parameter association
7945 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
7946 Error_Msg_SP which adds a prefix to the error message giving the name
7947 of the formal language analyzed
7948 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
7949 access result type in subprogram, unconstrained array as result type,.
7950 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
7952 * sem_ch8.adb: Code clean up.
7954 2011-08-01 Javier Miranda <miranda@adacore.com>
7956 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
7957 * einfo.ads (Access_Disp_Table): Fix documentation.
7958 (Dispatch_Table_Wrappers): Fix documentation.
7959 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
7960 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
7961 to enforce the documentation of this attribute.
7962 (Set_Is_Interface): Cleanup the assertion.
7963 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
7964 the Underlying_Type entity before reading attribute Access_Disp_Table.
7965 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
7966 Locate the Underlying_Type before reading attribute Access_Disp_Table.
7967 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
7968 the Underlying_Type entity before reading attribute Access_Disp_Table.
7969 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
7970 Locate the Underlying_Type entity before reading attribute
7973 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7975 * s-poosiz.ads: Additional overriding indicators.
7977 2011-08-01 Yannick Moy <moy@adacore.com>
7979 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
7981 (Analyze_Iteration_Scheme): issue error in formal mode when loop
7982 parameter specification does not include a subtype mark.
7983 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
7984 formal mode on abstract subprogram.
7985 (Analyze_Subprogram_Specification): issue error in formal mode on
7986 user-defined operator.
7987 (Process_Formals): issue error in formal mode on access parameter and
7989 * sem_ch9.adb (Analyze_Abort_Statement,
7990 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
7991 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
7992 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
7993 Analyze_Requeue, Analyze_Selective_Accept,
7994 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
7995 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
7996 issue error in formal mode on user-defined raise statement.
7998 2011-08-01 Thomas Quinot <quinot@adacore.com>
8000 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8001 declaration being hidden when overriding an implicit inherited
8003 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8004 (-gnats), do not complain about a source file that contains only a
8007 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8009 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8010 variable if already set.
8012 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8014 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8015 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8016 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8017 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8018 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8019 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8020 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8021 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8022 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8023 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8024 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8025 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8026 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8027 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8028 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8029 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8030 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8031 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8032 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8033 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8034 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8035 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8036 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8037 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8038 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8039 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8040 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8041 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8042 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8043 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8044 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8045 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8046 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8047 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8048 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8049 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8050 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8051 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8052 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8053 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8054 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8055 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8056 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8057 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8058 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8059 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8060 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8061 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8062 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8063 Use GNAT instead of GNARL.
8065 2011-08-01 Bob Duff <duff@adacore.com>
8067 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8068 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8069 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8072 2011-08-01 Yannick Moy <moy@adacore.com>
8074 * debug.adb (d.D) reverve flag for the SPARK mode
8075 (d.E) reverve flag for SPARK generation mode
8076 (d.F) reverve flag for Why generation mode
8077 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8078 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8079 functions which return True when the corresponding modes are set
8080 (Formal_Language): return "spark" or "alfa" when in formal verification
8082 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8083 Error_Msg to prefix the error message with a tag giving the formal
8085 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8086 message with a tag giving the formal language
8087 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8089 (Analyze_Case_Statement): issue error in formal mode on case statement
8090 with a single "others" case alternative
8091 (Analyze_Exit_Statement): issue errors in formal mode on exit
8092 statements which do not respect SPARK restrictions
8093 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8094 (Check_Unreachable_Code): always issue an error (not a warning) in
8095 formal mode on unreachable code (concerns both code after an infinite
8096 loop and after an unconditional jump, both not allowed in SPARK)
8097 * sem_ch6.adb (Analyze_Return_Statement): add call to
8098 Set_Return_Present for a procedure containing a return statement
8099 (already done for functions in Analyze_Function_Return)
8100 (Analyze_Function_Return): issue error in formal mode on extended
8101 return or if return is not last statement in function
8102 (Check_Missing_Return): issue error in formal mode if function does
8103 not end with return or if procedure contains a return
8104 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8105 function to detect if there is an inner scope of its parameter S which
8108 2011-08-01 Thomas Quinot <quinot@adacore.com>
8110 * sem_ch6.ads: Minor reformatting.
8112 2011-08-01 Javier Miranda <miranda@adacore.com>
8114 * sem_util.adb (Abstract_Interface_List): Complete condition when
8115 processing private type declarations to avoid reading unavailable
8117 (Is_Synchronized_Tagged_Type): Complete condition when processing
8118 private extension declaration nodes to avoid reading unavailable
8121 2011-08-01 Thomas Quinot <quinot@adacore.com>
8123 * sem_ch3.adb: Minor reformatting.
8125 2011-08-01 Thomas Quinot <quinot@adacore.com>
8127 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8128 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8129 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8130 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8131 for VMS, instead parametrize the common implementation with
8132 System.Parameters declarations.
8134 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8136 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8138 2011-08-01 Tristan Gingold <gingold@adacore.com>
8140 * seh_init.c: Fix SEH handler installation on win64.
8142 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8144 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8145 double analysis of an anonymous access to subprogram, because it can
8146 lead to improper sharing of profiles and a back-end crash.
8148 2011-08-01 Robert Dewar <dewar@adacore.com>
8150 * make.adb, sem_ch4.adb: Minor reformatting.
8151 * gcc-interface/Make-lang.in: Update dependencies.
8152 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8154 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8156 * gnat_rm.texi: Fix definition of Long_Integer.
8158 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8160 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8161 to prevent storage exhaustion.
8162 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8163 finalized is a function body, insert the cleanup code before the final
8164 return statement, to prevent spurious warnings.
8165 * s-pooglo.ads: add overriding indicator.
8167 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8169 * sem_ch4.adb (Operator_Check): improve error message when both a
8170 with_clause and a use_clause are needed to make operator usage legal.
8171 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8172 determine whether a compilation unit is visible within an other,
8173 either through a with_clause in the current unit, or a with_clause in
8174 its library unit or one one of its parents.
8176 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8178 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8179 over an arbitrary expression of an array or container type.
8180 * lib-xref.adb: clarify comment.
8182 2011-08-01 Bob Duff <duff@adacore.com>
8184 * einfo.ads: Minor reformatting.
8185 * debug.adb: Minor comment improvement.
8187 2011-08-01 Javier Miranda <miranda@adacore.com>
8189 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8190 consider hidden subprograms as valid candidates.
8192 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8194 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8196 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8198 * gnat_ugn.texi: Fix typo.
8200 2011-08-01 Robert Dewar <dewar@adacore.com>
8202 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8203 lib-xref.adb: Minor reformatting
8205 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8207 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8208 when to generate a call to Move_Final_List.
8209 (Has_Controlled_Parts): Remove this function.
8211 2011-08-01 Geert Bosch <bosch@adacore.com>
8213 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8216 2011-08-01 Thomas Quinot <quinot@adacore.com>
8218 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8219 explicit raise of a predefined exception as Comes_From_Source if the
8220 original N_Raise_Statement comes from source.
8222 2011-08-01 Robert Dewar <dewar@adacore.com>
8224 * sinfo.ads: Add comment.
8225 * sem_ch6.adb: Minor reformatting.
8227 2011-08-01 Robert Dewar <dewar@adacore.com>
8229 * freeze.adb (Freeze_Entity): Refine check for bad component size
8230 clause to avoid rejecting confirming clause when atomic/aliased present.
8232 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8234 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8235 better determine whether an entity reference is a write.
8236 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8238 * lib-xref.adb (Output_References): Do no suppress a read reference at
8239 the same location as an immediately preceeding modify-reference, to
8240 handle properly in-out actuals.
8242 2011-08-01 Tristan Gingold <gingold@adacore.com>
8244 * env.c (__gnat_setenv) [VMS]: Refine previous change.
8246 2011-08-01 Quentin Ochem <ochem@adacore.com>
8248 * i-cstrin.adb (New_String): Changed implementation, now uses only the
8249 heap to compute the result.
8251 2011-08-01 Robert Dewar <dewar@adacore.com>
8253 * atree.ads: Minor reformatting.
8255 2011-08-01 Emmanuel Briot <briot@adacore.com>
8257 * g-expect.adb (Get_Command_Output): Fix memory leak.
8259 2011-08-01 Geert Bosch <bosch@adacore.com>
8261 * cstand.adb (P_Float_Type): New procedure to print the definition of
8262 predefined fpt types.
8263 (P_Mixed_Name): New procedure to print a name using mixed case
8264 (Print_Standard): Use P_Float_Type for printing floating point types
8265 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
8266 precision IEEE float.
8268 2011-08-01 Thomas Quinot <quinot@adacore.com>
8270 * sem_ch3.adb: Minor reformatting.
8272 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8274 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
8275 the completion of a generic function, insert the new body rather than
8276 rewriting the original.
8278 2011-08-01 Yannick Moy <moy@adacore.com>
8280 * sinfo.ads, errout.ads: Typos in comments.
8282 2011-08-01 Robert Dewar <dewar@adacore.com>
8284 * par-endh.adb: Minor reformatting.
8286 2011-08-01 Robert Dewar <dewar@adacore.com>
8288 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
8289 (Pre_Post_Aspects): New subtype.
8290 * par-ch12.adb (P_Generic): New syntax for aspects in packages
8291 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
8292 * par-ch7.adb (P_Package): Remove Decl parameter
8293 (P_Package): Handle new syntax for aspects (before IS)
8294 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
8296 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
8297 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
8298 (P_Package): Remove Decl parameter
8299 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
8301 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
8303 * sem_util.ads, sem_util.adb (Static_Boolean): New function
8304 * sinfo.ads: Document new syntax for aspects in packages etc.
8305 * sprint.adb: Handle new syntax of aspects before IS in package
8307 2011-08-01 Thomas Quinot <quinot@adacore.com>
8309 * atree.ads: Minor reformatting.
8310 * sem_prag.adb: Minor reformatting.
8312 2011-08-01 Robert Dewar <dewar@adacore.com>
8314 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
8315 case expr alternative.
8317 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8319 * sem_ch12.adb: Fix typo.
8321 2011-08-01 Geert Bosch <bosch@adacore.com>
8323 * sem_prag.adb (Check_No_Link_Name): New procedure.
8324 (Process_Import_Or_Interface): Use Check_No_Link_Name.
8325 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
8326 instead of Standard_Long_Long_Float_Size global. Preparation for
8327 eventual removal of per type constants.
8328 * exp_util.ads (Get_Stream_Size): New function returning the stream
8329 size value of subtype E.
8330 * exp_util.adb (Get_Stream_Size): Implement new function.
8331 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
8333 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
8335 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
8337 2011-08-01 Geert Bosch <bosch@adacore.com>
8339 * cstand.adb: Fix comments.
8340 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
8343 2011-08-01 Robert Dewar <dewar@adacore.com>
8345 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
8347 2011-08-01 Geert Bosch <bosch@adacore.com>
8349 * atree.ads: Fix comment.
8351 2011-08-01 Robert Dewar <dewar@adacore.com>
8353 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
8354 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
8355 * par.adb: Add with for Namet.Sp.
8356 * par-tchk.adb: Minor reformatting.
8358 2011-08-01 Vincent Celier <celier@adacore.com>
8360 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
8361 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
8362 of the init procedure of a SAL.
8363 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
8366 2011-08-01 Thomas Quinot <quinot@adacore.com>
8368 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
8371 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8373 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
8375 2011-08-01 Thomas Quinot <quinot@adacore.com>
8377 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
8378 conformant with its spec (return True only for types that have
8379 an overriding Initialize primitive operation that prevents them from
8380 having preelaborable initialization).
8381 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
8382 initialization for controlled types in Ada 2005 or later mode.
8384 2011-08-01 Robert Dewar <dewar@adacore.com>
8386 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
8388 (Same_Aspect): New function.
8389 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
8390 Type_Invariant, Precondition, Postcondition.
8391 * snames.ads-tmpl: Add Name_Type_Invariant.
8393 2011-08-01 Robert Dewar <dewar@adacore.com>
8395 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
8397 (Freeze_All_Ent): Fix error in handling inherited aspects.
8398 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
8399 already analyzed, but don't skip entire processing of a declaration,
8400 that's wrong in some cases of declarations being rewritten.
8401 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
8402 Don't delay for integer, string literals
8403 Treat predicates in usual manner for delay, remove special case code,
8405 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
8406 (Build_Predicate_Function): Update saved expression in aspect
8407 (Build_Invariant_Procedure): Update saved expression in aspect
8408 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
8409 of replacement of discriminant references if the reference is simple.
8411 2011-08-01 Robert Dewar <dewar@adacore.com>
8413 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
8414 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
8415 Static_Predicate and Dynamic_Predicate.
8416 (Build_Predicate_Function): Add processing for Static_Predicate
8417 and Dynamic_Predicate.
8418 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
8419 (From_Static_Predicate): New flag
8420 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
8422 2011-08-01 Robert Dewar <dewar@adacore.com>
8424 * usage.adb: Documentation cleanup for Ada version modes in usage.
8425 * expander.adb: Minor reformatting.
8427 2011-08-01 Robert Dewar <dewar@adacore.com>
8429 * atree.ads: Minor comment fix.
8430 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
8431 a-witeio.ads, sem_prag.adb: Minor reformatting.
8433 2011-08-01 Doug Rupp <rupp@adacore.com>
8435 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
8436 pointers. Use descrip.h header file for convenience. Add some
8439 2011-08-01 Robert Dewar <dewar@adacore.com>
8441 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
8442 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
8443 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
8445 (Check_Aspect_At_End_Of_Declarations): New procedure
8446 (Analye_Aspect_Specification): Minor changes for above procedures
8447 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
8448 specification node as well.
8450 2011-08-01 Pascal Obry <obry@adacore.com>
8452 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
8453 Windows files. Use GetFilesAttributes() in this case to check for file
8454 existence instead of returning with an error code.
8456 2011-08-01 Vincent Celier <celier@adacore.com>
8458 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
8459 High is above Source length.
8461 2011-08-01 Robert Dewar <dewar@adacore.com>
8463 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
8465 2011-08-01 Robert Dewar <dewar@adacore.com>
8467 * aspects.ads (Boolean_Aspects): New subtype.
8468 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
8469 for derived types in cases where the parent type and derived type have
8471 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
8472 with aspects when parent type also has aspects.
8473 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
8474 boolean expression at this point).
8475 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
8476 accordance with final decision on the Ada 2012 feature.
8477 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
8479 2011-08-01 Matthew Heaney <heaney@adacore.com>
8481 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
8483 2011-08-01 Pascal Obry <obry@adacore.com>
8485 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
8486 Fix Replace_Slice when High is above current string size.
8487 (Replace_Slice): Fix DL computation when High is above current
8490 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8492 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
8494 2011-08-01 Matthew Heaney <heaney@adacore.com>
8496 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
8499 2011-08-01 Pascal Obry <obry@adacore.com>
8501 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
8504 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8506 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
8507 access to protected subprograms in generic bodies.
8508 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
8509 protected type, indicate that the convention of the subprogram is
8510 Convention_Protected, because it may be used in subsequent declarations
8511 within the protected declaration.
8513 2011-08-01 Vincent Celier <celier@adacore.com>
8515 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
8516 and "final" procedures when the name of the library is "ada", to avoid
8517 duplicate symbols "adainit" and "adafinal" in executables.
8519 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8521 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
8522 quantified expression that appears within a postcondition and uses the
8523 Ada2012 'Result attribute.
8525 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8527 * init.c (__gnat_error_handler): Cast reason to int.
8528 (__gnat_install_handler): Explain sa_sigaction use.
8530 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
8533 subprogram has copy-in copy-out parameters, try to promote the mode of
8534 the return type if it is passed in registers.
8536 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8538 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
8539 left operand as addressable.
8541 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
8543 * gcc-interface/gigi.h (build_function_stub): Remove.
8544 (build_return_expr): Likewise.
8545 (convert_vms_descriptor): Declare.
8546 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
8547 (build_function_stub): Move to...
8548 * gcc-interface/utils2.c (build_return_expr): Move to...
8549 * gcc-interface/trans.c (build_function_stub): ...here.
8550 (build_return_expr): ...here.
8551 (Subprogram_Body_to_gnu): Add local variable for language_function.
8552 Disconnect the parameter attributes cache, if any, once done with it.
8553 Call end_subprog_body only after setting the end_locus.
8554 Build the stub associated with the function, if any, at the very end.
8555 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
8556 variables and streamline control flow.
8558 2011-07-23 Arnaud Charlet <charlet@adacore.com>
8561 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
8564 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8567 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
8568 Assign to act.sa_sigaction.
8569 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
8570 current->return_address to char * before arithmetic.
8572 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8574 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
8575 Correct argument types.
8576 Extract code from reason.
8577 (__gnat_install_handler): Assign to act.sa_sigaction.
8579 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
8581 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
8582 (GNAT1_OBJS): ...here.
8584 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
8587 * g-socthi-mingw.adb (Fill): Fix formatting.
8589 * gcc-interface/gigi.h: Move around comment.
8591 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8594 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
8596 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
8599 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
8601 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
8603 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
8604 range comparison if Pmode is SImode.
8606 2011-07-12 Laurent GUERBY <laurent@guerby.net>
8607 Eric Botcazou <ebotcazou@adacore.com>
8609 * adadecode.c: Wrap up in extern "C" block.
8610 * adadecode.h: Likewise.
8611 * adaint.c: Likewise. Remove 'const' keyword.
8612 * adaint.h: Likewise.
8614 * atree.h: Likewise.
8616 * cstreams.c: Likewise.
8620 * final.c: Likewise.
8622 * initialize.c: Likewise.
8624 * namet.h: Likewise.
8625 * nlists.h: Likewise.
8626 * raise.c: Likewise.
8627 * raise.h: Likewise.
8628 * repinfo.h: Likewise.
8629 * seh_init.c: Likewise.
8630 * targext.c: Likewise.
8631 * tracebak.c: Likewise.
8632 * uintp.h: Likewise.
8633 * urealp.h: Likewise.
8634 * xeinfo.adb: Wrap up generated C code in extern "C" block.
8635 * xsinfo.adb: Likewise.
8636 * xsnamest.adb: Likewise.
8637 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
8638 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
8639 * gcc-interface/misc.c: Likewise.
8640 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
8641 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
8642 ada/targext.o here...
8643 (GNAT_ADA_OBJS): ...and not here.
8644 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
8645 (GNATBIND_OBJS): Reorder.
8647 2011-07-07 Richard Henderson <rth@redhat.com>
8649 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
8650 dwarf2out_frame_init.
8652 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
8654 * gcc-interface/misc.c (gnat_init): Tweak previous change.
8656 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8659 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
8661 2011-07-06 Richard Guenther <rguenther@suse.de>
8663 * gcc-interface/misc.c (gnat_init): Merge calls to
8664 build_common_tree_nodes and build_common_tree_nodes_2.
8665 Re-initialize boolean_false_node.
8667 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
8668 Olivier Hainque <hainque@adacore.com>
8669 Nicolas Setton <setton@adacore.com>
8671 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
8672 the type according to the ARTIFICIAL_P parameter.
8673 (create_type_decl): Likewise.
8674 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
8676 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
8678 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
8679 (gnatbind): Likewise.
8681 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8683 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
8685 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8687 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
8688 local variable throughout. Remove useless call to Base_Type.
8689 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
8690 Take it also into account for the volatileness of the field. Set the
8691 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
8693 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8695 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
8696 on a dereference built for a by-ref object if it has an address clause.
8698 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
8700 * einfo.ads (Address_Taken): Document use for the second argument of
8701 Asm_Input and Asm_Output attributes.
8702 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
8703 argument is an entity name, then set Address_Taken on it.
8704 <Attribute_Asm_Output>: Likewise.
8705 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
8706 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
8707 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
8708 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
8710 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
8713 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
8715 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8717 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
8718 (ada/utils.o): Update dependencies.
8719 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
8720 ../../../libcpp/libcpp.a.
8721 * gcc-interface/utils.c: Include common/common-target.h.
8722 (process_attributes): Use targetm_common.have_named_sections.
8724 2011-06-07 Richard Guenther <rguenther@suse.de>
8726 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
8729 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8731 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
8732 TREE_THIS_NOTRAP flag.
8734 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8736 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
8739 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8741 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
8742 constants whose full view has discriminants specially.
8744 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
8746 * gcc-interface/utils.c: Include diagnostic.h.
8747 (gnat_write_global_declarations): Output debug information for all
8748 global type declarations before finalizing the compilation unit.
8749 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
8751 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8753 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
8755 2011-05-25 Kai Tietz <ktietz@redhat.com>
8757 * adaint.c (__gnat_to_canonical_file_list_next): Use array
8758 initialization instead of const/none-const pointer assignment.
8760 2011-05-24 Joseph Myers <joseph@codesourcery.com>
8762 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
8763 $(EXTRA_GNAT1_OBJS).
8764 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
8765 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
8766 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
8767 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
8768 libcommon-target.a instead of prefix.o.
8770 2011-05-21 Joseph Myers <joseph@codesourcery.com>
8773 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
8775 2011-05-20 Joseph Myers <joseph@codesourcery.com>
8777 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
8778 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
8779 instead of version.o.
8781 2011-05-18 Kai Tietz <ktietz@redhat.com>
8783 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
8784 boolean_false_node instead of integer_zero_node.
8785 (convert_with_check): Likewise.
8786 * gcc-interface/decl.c (choices_to_gnu): Likewise.
8788 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
8790 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
8791 type of the parameter is an unconstrained array, convert the actual to
8792 the type of the formal in the In Out and Out cases as well.
8794 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8796 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
8797 call build_function_type_array or build_varargs_function_type_array
8799 (create_subprog_type): Don't call build_function_type; call
8800 build_function_type_vec instead.
8802 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
8804 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
8805 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
8806 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
8808 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
8810 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
8812 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
8813 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
8815 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8817 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
8819 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8821 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
8822 instead of accessing TYPE_ARG_TYPES directly.
8823 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
8825 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8828 * gcc-interface/gigi.h (get_variant_part): Declare.
8829 * gcc-interface/decl.c (get_variant_part): Make global.
8830 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
8831 types have the same constant size, are record types and T1 has a
8832 variant part while T2 doesn't.
8834 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
8836 * gcc-interface/utils.c (begin_subprog_body): Do not call
8838 (end_subprog_body): Likewise.
8840 2011-05-04 Richard Guenther <rguenther@suse.de>
8842 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
8844 (pos_to_constructor): Likewise.
8846 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
8847 Eric Botcazou <ebotcazou@adacore.com>
8849 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
8850 of build_function_type. Adjust calls to...
8851 (build_raise_check): ...this. Do not take a void_tree parameter.
8852 Call build_function_type_list instead of build_function_type.
8853 Fix head comment and swap couple of conditional blocks.
8855 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
8857 * gnatvsn.ads (Library_Version): Bump to 4.7.
8858 (Current_Year): Bump to 2011.
8860 2011-04-29 Michael Matz <matz@suse.de>
8862 * gcc-interface/misc.c (gnat_handle_option): Set
8863 warn_maybe_uninitialized.
8865 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
8867 * gnat_ugn.texi (Complexity Metrics Control): Update link to
8868 the Watson/McCabe paper.
8870 2011-04-23 Jim Meyering <meyering@redhat.com>
8872 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
8874 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8876 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
8879 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
8881 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
8883 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
8884 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
8885 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
8886 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
8887 <all>: Do not set flags on the reused DECL node coming from an alias.
8888 Set DECL_IGNORED_P on the DECL node built for subprograms if they
8889 don't need debug info here...
8890 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
8891 (gigi): Adjust calls to create_subprog_decl.
8892 (build_raise_check): Likewise.
8893 (establish_gnat_vms_condition_handler): Likewise.
8894 (Compilation_Unit_to_gnu): Likewise.
8895 (gnat_to_gnu): Likewise.
8897 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
8899 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
8900 (NO_REORDER_ADAFLAGS): New variable.
8901 (EXTRA_GNATTOOLS): Always define.
8902 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
8903 Clean up and adjust list of files compiled with special options.
8904 * gcc-interface/Make-lang.in: Likewise.
8905 (ada/decl.o): Cosmetical change.
8906 (ada/misc.o): Remove dependency on $(PLUGIN_H).
8908 2011-04-20 Jim Meyering <meyering@redhat.com>
8910 * initialize.c (__gnat_initialize): Remove useless if-before-free.
8912 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8914 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
8915 $(CFLAGS) on the link line.
8917 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
8919 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
8920 padded type built for the return type if it is unconstrained.
8922 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
8924 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
8926 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8928 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
8929 before calling TREE_CHAIN.
8930 * gcc-interface/misc.c (gnat_init_ts): New function.
8931 (LANG_HOOKS_INIT_TS): Define.
8933 2011-04-12 Martin Jambor <mjambor@suse.cz>
8935 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
8936 instead of cgraph_node.
8938 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8940 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
8941 alignment on fields of the RETURN type built for the Copy-In Copy-Out
8944 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
8946 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
8947 of aggregate types that contain a placeholder.
8949 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8951 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
8953 (handle_type_generic_attribute): Likewise.
8955 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
8958 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
8960 2011-04-04 Kai Tietz <ktietz@redhat.com>
8963 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
8966 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8968 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
8969 type case, do not strip a padding type around the array type.
8971 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8973 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
8976 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8978 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
8979 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
8980 code for -feliminate-unused-debug-types.
8981 (gnat_post_options): Likewise.
8983 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8985 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
8986 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
8989 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8991 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
8992 DECL_ARTIFICIAL flag on enumeration types.
8994 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
8996 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
8997 fat pointer types artificial unconditionally.
8998 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9001 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9003 * gcc-interface/gigi.h (get_dummy_type): Declare.
9004 (build_dummy_unc_pointer_types): Likewise.
9005 (finish_fat_pointer_type): Likewise.
9006 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9007 fat pointer type has been built, complete it in place.
9008 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9009 and thin pointers. Remove useless variable.
9010 (finish_fat_pointer_type): Make global and move to...
9011 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9012 (get_dummy_type): New function.
9013 (build_dummy_unc_pointer_types): Likewise.
9014 (gnat_pushdecl): Propage the name to the anonymous variants only.
9015 (update_pointer_to): Only adjust the pointer types in the unconstrained
9018 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9020 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9021 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9022 if this is a Taft amendment type and the full declaration is available.
9023 * gcc-interface/trans.c (process_type): Likewise.
9024 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9025 (process_freeze_entity): Likewise.
9026 * gcc-interface/utils.c (dummy_global): New static variable.
9027 (gnat_write_global_declarations): If there are types declared as used
9028 at the global level, insert them in the global hash table.
9030 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9032 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9033 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9034 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9036 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9037 flag of the type accordingly.
9038 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9040 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9042 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9043 finalizing types when updating the pointers to the designated type.
9044 <all>: Finalize the deferred types even if we didn't defer processing
9045 of incomplete types in this invocation.
9047 2011-04-01 Olivier Hainque <hainque@adacore.com>
9048 Nicolas Setton <setton@adacore.com>
9049 Eric Botcazou <ebotcazou@adacore.com>
9051 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9052 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9054 2011-03-28 Kai Tietz <ktietz@redhat.com>
9056 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9058 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9059 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9061 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9063 2011-03-28 Tristan Gingold <gingold@adacore.com>
9066 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9067 Use ada output of gnatbind.
9068 (ada/b_gnatb.adb): Ditto.
9069 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9070 (ada.mostlyclean, ada.stage1)
9071 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9072 (ada.stagefeedback): Adjust.
9073 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9074 Use ada output of gnatbind.
9075 (b_gnatm.adb): Ditto.
9076 (b_gnatl.o, b_gnatm.o): New rules.
9078 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9080 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9081 for the padded type built to support a specified size or alignment.
9083 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9085 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9086 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9087 unconditionally to the end of the unit when the designated type is
9089 <all>: Rename local variable. Attempt to un-defer types only and do it
9090 for limited_with'ed types as well.
9091 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9092 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9093 consistently and remove redundant call to finalize_from_with_types.
9095 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9097 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9098 subprograms without a previous spec declared in the same unit.
9099 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9100 subprograms at the end of the unit instead of at the beginning.
9101 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9102 isn't public for the special handling of non-inline functions nested
9103 inside inline external functions.
9105 2011-03-25 Jeff Law <law@redhat.com>
9107 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9109 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9111 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9112 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9113 to compute Set_Size_Depends_On_Discriminant.
9114 (Layout_Type): Call it on array types in back-end layout mode.
9115 * sem_util.adb (Requires_Transient_Scope): Return true for array
9116 types only if the size depends on the value of discriminants.
9117 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9118 type if the RHS is a call to a function that returns an unconstrained
9119 type with default discriminant.
9121 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9123 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9124 non-conversion to the nominal result type at the end.
9126 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9128 * gcc-interface/trans.c (create_temporary): New function taken from...
9129 (create_init_temporary): ...here. Call it.
9130 (call_to_gnu): Create the temporary for the return value early, if any.
9131 Create it for a function with copy-in/copy-out parameters if there is
9132 no target; in other cases of copy-in/copy-out, use another temporary.
9133 Push the new binding level lazily. Add and rename local variables.
9135 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9137 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9139 (set_rm_size): Likewise.
9141 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9143 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9144 for the padded type built in order to support a specified alignment.
9145 Fix incorrect formatting.
9147 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9150 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9152 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9154 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9155 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9156 to the end of the list. Adjust recursive call. Rename local variable.
9157 If REORDER is true, reorder components of the record type.
9158 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9159 components_to_record and adjust the parameter list.
9161 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9163 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9164 disabled, use the variable for bounds of loop iteration scheme.
9166 2011-03-21 Kai Tietz <ktietz@redhat.com>
9169 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9171 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9173 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9174 out whether the expression is read-only. Short-circuit placeholder
9175 case and rename a couple of local variables.
9177 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9179 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9180 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9181 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9182 (convert): Deal with conversions from a smaller form type specially.
9184 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9186 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9187 its argument, except for the special -I- switch.
9189 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9191 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9194 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9196 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9198 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9200 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9202 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9203 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9204 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9205 Do not generate the check directly, instead instantiate the template
9206 check present in the descriptor.
9207 (make_descriptor_field): Move around.
9208 (build_vms_descriptor32): Build a template check in the POINTER field.
9209 (build_vms_descriptor): Remove useless suffixes.
9210 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9212 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9215 * targext.c: Include target files if IN_RTS is defined.
9217 2011-01-26 Richard Guenther <rguenther@suse.de>
9220 * targext.c: Include config.h.
9221 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9224 2011-01-04 Pascal Obry <obry@adacore.com>
9225 Eric Botcazou <ebotcazou@adacore.com>
9227 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9229 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9231 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9232 end-of-case on the end label and its associated gotos, if any.
9234 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9236 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9237 expressions of the parameter cache within the statement group of
9240 2011-01-04 Olivier Hainque <hainque@adacore.com>
9241 Eric Botcazou <ebotcazou@adacore.com>
9243 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9244 (set_end_locus_from_node): New function.
9245 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
9246 make and the function end_locus.
9247 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
9248 for the elaboration subprogram.
9249 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
9250 set the end_locus of the expression as well.
9252 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9255 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
9256 variables that are referenced in exception handlers volatile.
9260 Copyright (C) 2011 Free Software Foundation, Inc.
9262 Copying and distribution of this file, with or without modification,
9263 are permitted in any medium without royalty provided the copyright
9264 notice and this notice are preserved.
9266 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9267 - fix bugs in the description of Source_Trace;
9268 - get rid of UNIT_NAME;
9270 2011-08-02 Javier Miranda <miranda@adacore.com>
9273 (Build_Dispatching_Requeue): Adding support for VM targets
9274 since we cannot directly reference the Tag entity.
9275 * exp_sel.adb (Build_K): Adding support for VM targets.
9276 (Build_S_Assignment): Adding support for VM targets.
9278 (Default_Prim_Op_Position): In VM targets do not restrict availability
9279 of predefined interface primitives to compiling in Ada 2005 mode.
9280 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9281 restricted to compiling in Ada 2005 mode.
9282 (Make_VM_TSD): Generate code that declares and initializes the OSD
9283 record. Needed to support dispatching calls through synchronized
9286 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9287 primitives associated with synchronized interfaces.
9288 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9289 primitives associated with synchronized interfaces.
9291 2011-08-02 Yannick Moy <moy@adacore.com>
9293 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9294 statements hidden in SPARK if preceded by the HIDE directive
9295 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9296 exception handlers as hidden in SPARK if preceded by the HIDE directive
9297 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9298 if starting with the HIDE directive
9299 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9300 starting with the HIDE directive; mark the declarations in a private
9301 part as hidden in SPARK if the private part starts with the HIDE
9303 * restrict.adb, restrict.ads
9304 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9305 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9306 argument node belongs to a part which is hidden in SPARK
9307 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9308 parts in SPARK; protect the possibly costly call to
9309 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9310 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9311 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9312 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9314 (Scan): recognize special comment starting with '#' and followed by
9315 SPARK keyword "hide" as a HIDE directive.
9317 2011-08-02 Yannick Moy <moy@adacore.com>
9319 * types.ads, erroutc.ads: Minor reformatting.
9321 2011-08-02 Vincent Celier <celier@adacore.com>
9323 * link.c: Add response file support for cross platforms.
9325 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9327 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9328 in an association, set parent field of copy before partial analysis.
9329 * sem_res.adb (Resolve_Slice): create reference to itype only when
9330 expansion is enabled.
9332 2011-08-02 Yannick Moy <moy@adacore.com>
9334 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9335 for new flag denoting which subprogram bodies are in ALFA
9336 * restrict.adb, sem_ch7.adb: Update comment
9337 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9338 sem_ch9.adb, sem_res.adb: Add calls to
9339 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9340 * sem_ch6.adb (Analyze_Function_Return): add calls to
9341 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9342 middle of the body, and extended return.
9343 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9344 False when missing return.
9345 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9346 to True for subprograms whose spec is in ALFA. Remove later on the flag
9347 on the entity used for a subprogram body when there exists a separate
9349 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9350 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9351 False, otherwise do nothing.
9353 2011-08-02 Robert Dewar <dewar@adacore.com>
9355 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9357 2011-08-02 Yannick Moy <moy@adacore.com>
9359 * sem_ch4.ads: minor formatting.
9361 2011-08-02 Yannick Moy <moy@adacore.com>
9363 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9364 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9365 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9366 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9367 opt.ads: cleanup of SPARK mode
9369 2011-08-02 Yannick Moy <moy@adacore.com>
9371 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9373 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9374 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9376 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9377 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9378 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9379 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9381 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9383 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9384 functions whose return type is not in ALFA.
9385 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9387 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9388 parameter's type is not in ALFA.
9389 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9394 * sem_ch6 (Analyze_Expression_Function): treat the function as
9395 Inline_Always, and introduce a subprogram declaration for it when it is
9397 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9398 expression functions, so that the back-end can determine whether they
9399 can in fact be inlined.
9400 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9401 a function body comes from an expression function.
9403 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9405 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9406 null exclusions to test Can_Never_Be_Null on the anonymous access types
9407 of the formals rather than testing the formals themselves. Exclude this
9408 check in cases where the Old_Formal is marked as a controlling formal,
9409 to avoid issuing spurious errors for bodies completing dispatching
9410 operations (due to the flag not getting set on controlling access
9411 formals in body specs).
9412 (Find_Corresponding_Spec): When checking full and subtype conformance of
9413 subprogram bodies in instances, pass Designated and E in that order, for
9414 consistency with the expected order of the formals (New_Id followed by
9417 2011-08-02 Robert Dewar <dewar@adacore.com>
9419 * sem_ch8.adb: Minor reformatting.
9421 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9423 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9424 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9425 primitive operations of class-wide actuals.
9427 2011-08-02 Javier Miranda <miranda@adacore.com>
9429 * exp_atag.ads, exp_atag.adb
9430 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9431 since its value is implicitly passed in argument Typ.
9432 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9433 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9434 Build_Common_Dispatching_Select_Statements.
9436 2011-08-02 Robert Dewar <dewar@adacore.com>
9438 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9439 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9442 2011-08-02 Robert Dewar <dewar@adacore.com>
9444 * sem_res.adb: Minor reformatting.
9445 * sem_prag.adb: Minor reformatting.
9447 2011-08-02 Javier Miranda <miranda@adacore.com>
9449 * exp_atag.adb, exp_atags.ads
9450 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9451 by the tagged type Entity. Required to use this routine in the VM
9452 targets since we do not have available the Tag entity in the VM
9455 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9456 Ada.Tags has not been previously loaded.
9458 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9459 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9461 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9462 view of enclosing scopes. Required to handle enclosing scopes that
9463 are synchronized types whose full view is a task type.
9465 (Build_VM_TSDs): Minor code improvement to avoid generating and
9466 analyzing lists with empty nodes.
9467 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9468 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9469 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9470 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9471 (Make_Select_Specific_Data_Table): Add support for VM targets.
9472 (Make_VM_TSD): Generate code to initialize the SSD structure of
9475 2011-08-02 Yannick Moy <moy@adacore.com>
9477 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9478 cross-references section in ALI.
9479 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9480 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9482 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9483 subprogram or package entity of a node
9484 (Is_Local_Reference_Type): new function returns True for references
9485 selected in local cross-references.
9486 (Lt): function extracted from Lt in Output_References
9487 (Write_Entity_Name): function extracted from Output_References
9488 (Generate_Definition): generate reference with type 'D' for definition
9489 of objects (object declaration and parameter specification), with
9490 appropriate locations and units, for use in local cross-references.
9491 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9492 references of type 'I' for initialization in object definition.
9493 (Output_References): move part of function Lt and procedure
9494 Write_Entity_Name outside of the body. Ignore references of types 'D'
9495 and 'I' introduced for local cross-references.
9496 (Output_Local_References): new procedure to output the local
9497 cross-references sections.
9498 (Lref_Entity_Status): new array defining whether an entity is a local
9499 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9500 with 'I' type when initialization expression is present.
9501 * get_scos.adb, get_scos.ads: Correct comments and typos
9503 2011-08-02 Javier Miranda <miranda@adacore.com>
9505 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9507 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9509 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9512 2011-08-02 Vincent Celier <celier@adacore.com>
9514 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9515 (No_Space_Img): New function
9516 (Find_Excluded_Sources): When reading from a file, record the file name
9517 and the line number for each excluded source.
9518 (Mark_Excluded_Sources): When reporting an error, if the excluded
9519 sources were read from a file, include file name and line number in
9522 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9524 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9526 2011-08-02 Robert Dewar <dewar@adacore.com>
9528 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9530 2011-08-02 Javier Miranda <miranda@adacore.com>
9532 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9533 generation of TSDs to the DOTNET compiler.
9534 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9535 generation of TSDs to the DOTNET compiler.
9537 2011-08-02 Javier Miranda <miranda@adacore.com>
9539 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9540 record of all the tagged types declared inside library level package
9541 declarations, library level package bodies or library level subprograms.
9542 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9543 associated with a given tagged type.
9544 (Build_VM_TSDs): New subprogram.
9545 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9546 compilation units that are subprograms.
9547 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9548 compilation units that are package bodies.
9549 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9550 units that are a package declaration or a package instantiation.
9551 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9552 reorganization to improve the error generated by the frontend when the
9553 function Ada.Tags.Secondary_Tag is not available.
9554 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9555 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9557 2011-08-02 Javier Miranda <miranda@adacore.com>
9559 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9561 2011-08-02 Robert Dewar <dewar@adacore.com>
9563 * s-imenne.ads: Minor reformatting.
9565 2011-08-02 Robert Dewar <dewar@adacore.com>
9567 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9568 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9569 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9571 2011-08-02 Robert Dewar <dewar@adacore.com>
9573 * einfo.ads (Materialize_Entity): Document this is only for renamings
9574 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9575 required debug information in the case where we transform the object
9576 declaration into a renaming declaration.
9577 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9579 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9582 2011-08-02 Robert Dewar <dewar@adacore.com>
9584 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9585 Suppress_Init_Procs.
9586 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9587 Suppress_Initialization/Initialization_Suppressed.
9588 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9589 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9590 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9591 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9593 2011-08-02 Robert Dewar <dewar@adacore.com>
9595 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9598 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9600 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9601 only have inheritable classwide pre/postconditions.
9603 2011-08-02 Javier Miranda <miranda@adacore.com>
9605 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9606 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9607 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9608 checks if the external tag of a type is the same as the external tag
9609 of some other declaration.
9611 2011-08-02 Thomas Quinot <quinot@adacore.com>
9613 * s-taskin.ads: Minor reformatting.
9615 2011-08-02 Emmanuel Briot <briot@adacore.com>
9617 * g-comlin.adb (Display_Help): swap the order in which it prints the
9618 short help and the general usage.
9620 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9622 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9623 the aspect declarations and attach them to the generic copy for
9624 subsequent analysis.
9625 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9626 declarations of the generic tree to the new subprogram declarations.
9627 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9628 conditions that apply to a subprogram instance.
9630 2011-08-02 Robert Dewar <dewar@adacore.com>
9632 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9634 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9636 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9637 private type with a tagged full view is not derived in the immediate
9638 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9640 2011-08-02 Robert Dewar <dewar@adacore.com>
9642 * exp_ch4.adb: Minor reformatting.
9644 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9646 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9647 Ada2012 iterator, the loop will be rewritten during expansion into a
9648 while loop with a cursor and an element declaration. Do not analyze the
9649 body in this case, because if the container is for indefinite types the
9650 actual subtype of the elements will only be determined when the cursor
9651 declaration is analyzed.
9653 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9655 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9656 size/alignment related attributes in CodePeer_Mode.
9658 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9660 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9661 Prepend_Element, since this can result in the operation getting the
9662 wrong slot in the full type's dispatch table if the full type has
9663 inherited operations. The incomplete type's operation will get added
9664 to the proper position in the full type's primitives
9665 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9666 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9667 dispatching operations, since there are cases where nonprimitive
9668 subprograms can get added to the list of incomplete dependents (such
9669 as subprograms in nested packages).
9670 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9671 private part when determining whether to add a primitive with a
9672 parameter of a tagged incomplete type to the Private_Dependents list.
9673 Such primitives can also occur in the visible part, and should not have
9674 been excluded from being private dependents.
9675 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9676 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9677 list of a Taft-amendment incomplete type is a primitive before issuing
9678 an error that the full type must appear in the same unit. There are
9679 cases where nonprimitives can be in the list (such as subprograms in
9681 * sem_disp.adb (Derives_From): Use correct condition for checking that
9682 a formal's type is derived from the type of the corresponding formal in
9683 the parent subprogram (the condition was completely wrong). Add
9684 checking that was missing for controlling result types being derived
9685 from the result type of the parent operation.
9687 2011-08-02 Yannick Moy <moy@adacore.com>
9689 * errout.adb (First_Node): minor renaming
9690 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9693 2011-08-02 Yannick Moy <moy@adacore.com>
9695 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9696 before accessing operands.
9697 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9698 decide whether an initialization expression respects SPARK rules, as
9699 the plain node is the expanded one. This allows for more valid warnings
9701 * gnat_rm.texi: Minor update.
9703 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9705 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9708 2011-08-02 Robert Dewar <dewar@adacore.com>
9710 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9712 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9714 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9715 loop statements and the element renaming declaration with a block when
9716 the element type is controlled.
9718 2011-08-02 Yannick Moy <moy@adacore.com>
9720 * sinfo.ads: Minor formatting.
9722 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9724 * sem_aggr.adb (Add_Association): if the association has a box and no
9725 expression, use the Sloc of the aggregate itself for the new
9727 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9730 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9732 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9733 When a container is provided via a function call, generate a renaming
9734 of the function result. This avoids the creation of a transient scope
9735 and the premature finalization of the container.
9736 * exp_ch7.adb (Is_Container_Cursor): Removed.
9737 (Wrap_Transient_Declaration): Remove the supression of the finalization
9738 of the list controller when the declaration denotes a container cursor,
9741 2011-08-02 Yannick Moy <moy@adacore.com>
9743 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9744 node is from source, instead of the original node being from source.
9746 (Resolve_Array_Aggregate): refine the check for a static expression, to
9747 recognize also static ranges
9748 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9749 Array_Type_Declaration): postpone the test for the type being a subtype
9750 mark after the type has been resolved, so that component-selection and
9751 expanded-name are discriminated.
9752 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9753 to distinguish the case of an iteration scheme, so that an error is
9754 issed on a non-static range in SPARK except in an iteration scheme.
9755 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9756 In_Iter_Schm = True.
9757 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9758 user-defined operators so that they are allowed in renaming
9760 (Find_Selected_Component): refine the check for prefixing of operators
9761 so that they are allowed in renaming. Move the checks for restrictions
9762 on selector name after analysis discriminated between
9763 component-selection and expanded-name.
9764 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9765 concatenation argument of string type if it is static.
9766 * sem_util.adb, sem_util.ads
9767 (Check_Later_Vs_Basic_Declarations): add a new function
9768 Is_Later_Declarative_Item to decice which declarations are allowed as
9769 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9770 mode, add that renamings are considered as later items.
9771 (Enclosing_Package): new function to return the enclosing package
9772 (Enter_Name): correct the rule for homonyms in SPARK
9773 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9774 from source (result of expansion) to avoid issuing wrong warnings.
9776 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9778 * errout.adb: On anything but an expression First_Node returns its
9781 2011-08-02 Pascal Obry <obry@adacore.com>
9783 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9785 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9787 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9788 Set the associated loop as the related expression of internally
9790 * exp_ch7.adb (Is_Container_Cursor): New routine.
9791 (Wrap_Transient_Declaration): Supress the finalization of the list
9792 controller when the declaration denotes a container cursor.
9794 2011-08-02 Yannick Moy <moy@adacore.com>
9796 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9798 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9799 expression is a simple expression. This check cannot be performed in
9800 the semantics, so just drop it.
9801 (P_Index_Or_Discriminant_Constraint): move check that the index or
9802 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9803 semantics. Other cases were previously checked in the semantics.
9804 * par-ch4.adb (P_Name): move checks that a selector name is not
9805 character literal or an operator symbol to Find_Selected_Component in
9807 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9808 declarations are not placed after later declarations in a separate
9809 procedure in Sem_Util (possibly not the best choice?), to be used both
9810 during parsing, for Ada 83 mode, and during semantic analysis, for
9812 * par-endh.adb (Check_End): move check that end label is not missing
9813 to Process_End_Label in the semantics
9814 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9815 the special case for SPARK restriction
9816 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9817 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9818 parameter Force to issue the error message even on internal node (used
9819 for generated end label). Call Check_Restriction to check when an error
9820 must be issued. In SPARK mode, issue an error message even if the
9821 restriction is not set.
9822 (Check_Restriction): new procedure with an additional out parameter to
9823 inform the caller that a message has been issued
9824 * sem_aggr.adb: Minor modification of message
9825 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9826 instead of issuing an error message directly
9827 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9828 declarations are not placed after later declarations, by calling
9829 Check_Later_Vs_Basic_Declarations
9830 (Analyze_Subtype_Declaration): move here the check that an index or
9831 discriminant constraint must be a subtype mark. Change the check that
9832 a subtype of String must start at one so that it works on subtype marks.
9833 * sem_ch4.adb (Analyze_Call): move here the check that a named
9834 association cannot follow a positional one in a call
9835 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9836 instead of issuing an error message directly
9837 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9838 selector name is not a character literal or an operator symbol. Move
9839 here the check that the prefix of an expanded name cannot be a
9840 subprogram or a loop statement.
9841 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9842 procedure called from parsing and semantics to check that basic
9843 declarations are not placed after later declarations
9844 (Process_End_Label): move here the check that end label is not missing
9846 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9848 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9849 representation clause in codepeer mode, since it confuses CodePeer and
9850 does not bring useful info.
9852 2011-08-02 Ed Falis <falis@adacore.com>
9854 * init.c: initialize fp hw on MILS.
9856 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9858 * errout.adb (First_Node): for bodies, return the node itself (small
9859 optimization). For other nodes, do not check source_unit if the node
9860 comes from Standard.
9862 2011-08-02 Robert Dewar <dewar@adacore.com>
9864 * exp_ch3.adb: Minor comment additions.
9865 * sem_ch13.adb: Minor reformatting.
9867 2011-08-02 Pascal Obry <obry@adacore.com>
9869 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9871 2011-08-02 Robert Dewar <dewar@adacore.com>
9873 * sem_attr.adb: Minor reformatting.
9875 2011-08-02 Robert Dewar <dewar@adacore.com>
9877 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9878 (Has_Default_Component_Value): Removed
9879 * einfo.ads Comment updates
9880 (Has_Default_Aspect): Replaces Has_Default_Value
9881 (Has_Default_Component_Value): Removed
9883 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9885 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9886 (Get_Simple_Init_Val): Handle Default_Value aspect
9887 (Needs_Simple_Initialization): Handle Default_Value aspect
9888 * exp_ch3.ads: Needs_Simple_Initialization
9889 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9890 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9892 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9893 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9894 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9896 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9898 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9899 package containing iteration primitives.
9900 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9902 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9904 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9905 "of", pre-analyze expression in case it is a function call with
9906 finalization actions that must be placed ahead of the loop.
9907 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9908 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9910 2011-08-02 Geert Bosch <bosch@adacore.com>
9912 * cstand.adb (Create_Float_Types): Only consider C's long double for
9913 Long_Long_Float, in addition to double.
9915 2011-08-02 Robert Dewar <dewar@adacore.com>
9917 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9918 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9919 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9922 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9924 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9927 2011-08-02 Javier Miranda <miranda@adacore.com>
9929 * einfo.ads, einfo.adb
9930 (Original_Access_Type): Move this attribute to Node26 since there was
9931 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9932 which causes conflicts and breaks the generation of the .NET compiler.
9933 (Interface_Name): Add missing documentation on JGNAT only uses of
9936 2011-08-02 Geert Bosch <bosch@adacore.com>
9938 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9939 (Find_Back_End_Float_Type): Likewise
9940 (Create_Back_End_Float_Types): Likewise
9941 (Create_Float_Types): Likewise
9942 (Register_Float_Type): Likewise
9943 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9944 Nlist and split out type selection in new local Find_Base_Type function.
9945 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9947 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9949 2011-08-02 Robert Dewar <dewar@adacore.com>
9951 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9953 * opt.ads: Minor comment change.
9954 * sem_ch12.adb: Minor code reorganization.
9956 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9958 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9959 subtype's list of rep items to the list on the full subtype in the case
9960 where the lists are the same.
9962 2011-08-02 Geert Bosch <bosch@adacore.com>
9964 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9965 using the one from System.Strings, which also deallocates all strings.
9967 2011-08-02 Geert Bosch <bosch@adacore.com>
9969 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9971 * gcc-interface/Make-lang.in: Update dependencies.
9973 2011-08-02 Olivier Hainque <hainque@adacore.com>
9975 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9978 2011-08-02 Javier Miranda <miranda@adacore.com>
9980 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9981 associated with anonymous access to subprograms.
9983 2011-08-02 Geert Bosch <bosch@adacore.com>
9986 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9987 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9988 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9989 (Add_Symbol_Definition): Move to switch-c.adb
9990 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9991 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9992 (Add_Symbol_Definition): Move to switch-c.adb.
9993 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9995 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9997 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9998 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10000 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10001 (Add_Symbol_Definition): Moved from Prepcomp.
10002 * switch-c.ads: Update copyright notice. Use String_List instead of
10003 Argument_List, removing dependency on System.OS_Lib.
10005 2011-08-02 Yannick Moy <moy@adacore.com>
10007 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10008 mode on initialization expression which does not respect SPARK
10010 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10011 if the tree referenced by its argument represents an initialization
10012 expression in SPARK, suitable for initializing an object in an object
10015 2011-08-02 Javier Miranda <miranda@adacore.com>
10017 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10018 internally generated access to subprogram with its associated protected
10020 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10022 2011-08-02 Geert Bosch <bosch@adacore.com>
10024 * cstand.adb (Register_Float_Type): Print information about type to
10025 register, if the Debug_Flag_Dot_B is set.
10026 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10027 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10028 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10029 with a requested precision of more than Max_Digits digits and no more
10030 than Max_Base_Digits digits, if a range specification is present and the
10031 Predefined_Float_Types list has a suitable type to derive from.
10032 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10033 case of type completion with pragma Import
10035 (Process_Import_Predefined_Type): Processing to complete a type
10036 with pragma Import. Currently supports floating point types only.
10037 (Set_Convention_From_Pragma): Do nothing without underlying type.
10038 (Process_Convention): Guard against absence of underlying type,
10039 which may happen when importing incomplete types.
10040 (Process_Import_Or_Interface): Handle case of importing predefined
10041 types. Tweak error message.
10043 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10045 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10046 functions to previous change. Reorganize code slightly.
10048 2011-08-02 Geert Bosch <bosch@adacore.com>
10050 * back_end.ads (Register_Type_Proc): New call back procedure type for
10051 allowing the back end to provide information about available types.
10052 (Register_Back_End_Types): New procedure to register back end types.
10053 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10055 * cstand.adb (Back_End_Float_Types): New list for floating point types
10056 supported by the back end.
10057 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10058 (Copy_Float_Type): New procedure to make new copies of predefined types.
10059 (Register_Float_Type): New call back procedure to populate the BEFT list
10060 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10061 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10062 (Create_Float_Types): New procedure to create entities for floating
10063 point types predefined in Standard, and put these and any remaining
10064 BEFTs on the Predefined_Float_Types list.
10065 * stand.ads (Predefined_Float_Types): New list for predefined floating
10066 point types that do not have declarations in package Standard.
10068 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10070 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10071 entity node for the unit containing the parameter.
10072 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10073 (Add_Inlined_Subprogram): Likewise.
10074 * gcc-interface/Make-lang.in: Update dependencies.
10076 2011-08-02 Thomas Quinot <quinot@adacore.com>
10078 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10081 2011-08-02 Geert Bosch <bosch@adacore.com>
10083 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10085 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10087 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10088 computed value of Base_Type.
10090 2011-08-02 Yannick Moy <moy@adacore.com>
10092 * restrict.adb (Check_Restriction): issue an error for any use of
10093 class-wide, even if the No_Dispatch restriction is not set.
10094 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10095 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10096 when completing a private extension, the type named in the private part
10097 is not the same as that named in the visible part.
10098 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10099 of an inherited primitive operations of a tagged type or type extension
10100 that returns the tagged type.
10101 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10102 function which returns True for an implicit operation inherited by the
10103 derived type declaration for the argument type.
10104 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10107 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10109 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10110 Process_Bounds, to perform analysis with expansion of a range or an
10111 expression that is the iteration scheme for a loop.
10112 (Analyze_Iterator_Specification): If domain of iteration is given by a
10113 function call with a controlled result, as is the case if call returns
10114 a predefined container, ensure that finalization actions are properly
10116 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10118 2011-08-02 Javier Miranda <miranda@adacore.com>
10120 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10121 * gcc-interface/Make-lang.in: Update dependencies.
10123 2011-08-02 Javier Miranda <miranda@adacore.com>
10125 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10126 determine if the analysis is performed using N or Original_Node (N).
10127 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10128 functionality of routine Is_Variable avoids code duplication.
10129 * checks.adb (Determine_Range): Handle temporaries generated by
10130 Remove_Side_Effects.
10132 2011-08-02 Javier Miranda <miranda@adacore.com>
10134 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10135 expansion of the condition. Required since the previous analysis was
10136 done with expansion disabled (see Resolve_Quantified_Expression) and
10137 hence checks were not inserted and record comparisons have not been
10140 2011-08-02 Ed Falis <falis@adacore.com>
10142 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10145 2011-08-02 Bob Duff <duff@adacore.com>
10147 * opt.ads: Minor comment fix.
10149 2011-08-02 Bob Duff <duff@adacore.com>
10151 * sem_ch12.adb (Analyze_Package_Instantiation,
10152 Analyze_Subprogram_Instantiation): Turn off style checking while
10153 analyzing an instance. Whatever style checks that apply to the generic
10154 unit should apply, so it makes no sense to apply them in an instance.
10155 This was causing trouble when compiling an instance of a runtime
10156 unit that violates the -gnatyO switch.
10157 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10158 one of the two case statements, causing spurious errors.
10160 2011-08-02 Robert Dewar <dewar@adacore.com>
10162 * uname.adb: Minor reformatting.
10163 * gnatcmd.adb: Minor reformatting.
10164 * exp_attr.adb: Minor reformatting.
10166 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10168 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10169 No_Dispatching_Calls, do not look for the Assign primitive, because
10170 predefined primitives are not created in this case.
10172 2011-08-02 Bob Duff <duff@adacore.com>
10174 * stylesw.ads: Minor comment fixes.
10176 2011-08-02 Robert Dewar <dewar@adacore.com>
10178 * freeze.adb (Add_To_Result): New procedure.
10180 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10182 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10183 time, if the specific run-time routines for handling streams of strings
10184 are not available, use the default mechanism.
10186 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10188 * s-regpat.ads: Fix typo.
10190 2011-08-02 Vincent Celier <celier@adacore.com>
10192 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10193 not null, call it to create the in memory config project file without
10194 parsing an existing default config project file.
10196 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10198 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10202 * sem_elim.adb: an abstract subprogram does not need an eliminate
10203 pragma for its descendant to be eliminable.
10205 2011-08-02 Ed Falis <falis@adacore.com>
10207 * init.c: revert to handling before previous checkin for VxWorks
10208 * s-intman-vxworks.adb: delete unnecessary declarations related to
10209 using Ada interrupt facilities for handling signals.
10210 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10211 * s-intman-vxworks.ads: Import __gnat_install_handler as
10212 Initialize_Interrupts.
10213 * s-taprop-vxworks.adb: Delete Signal_Mask.
10214 (Abort_Handler): change construction of mask to unblock exception
10217 2011-08-02 Jerome Guitton <guitton@adacore.com>
10219 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10220 Debug_Raise_Exception before propagation starts.
10222 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10224 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10225 to Restriction_Check_Required.
10226 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10227 * sem_res.adb (Resolve_Call): Likewise.
10228 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10230 2011-08-02 Bob Duff <duff@adacore.com>
10232 * stylesw.ads: Update comment.
10233 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10234 * errout.ads: Remove obsolete comment.
10236 2011-08-02 Javier Miranda <miranda@adacore.com>
10238 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10239 (Set_Is_Safe_To_Reevaluate): new procedure.
10240 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10241 assignment is allowed on safe-to-reevaluate variables.
10242 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10243 temporary created to remove side effects in expressions that use
10244 the secondary stack as safe-to-reevaluate.
10245 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10246 variables that are not true constants.
10248 2011-08-02 Robert Dewar <dewar@adacore.com>
10250 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10251 sem_res.adb, sem_ch6.adb: Minor reformatting.
10253 2011-08-02 Jerome Guitton <guitton@adacore.com>
10255 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10259 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10260 not set Overridden_Operation if subprogram is an initialization
10263 2011-08-02 Yannick Moy <moy@adacore.com>
10265 * par-ch6.adb: Correct obsolete name in comments
10266 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10267 which takes two message arguments (existing function takes one), with
10268 second message used for continuation.
10269 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10270 block statements that originate from a source block statement, not
10271 generated block statements
10272 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10273 symmetry with procedure case
10274 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10275 function to issue an error in formal mode if a package specification
10276 contains more than one tagged type or type extension.
10277 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10278 parameters matching formals of tagged types are objects (or ancestor
10279 type conversions of objects), not general expressions. Issue an error
10280 on view conversions that are not involving ancestor conversion of an
10282 (Resolve_Type_Conversion): in formal mode, issue an error on the
10283 operand of an ancestor type conversion which is not an object
10284 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10285 procedure so that it works also for actuals of function calls
10286 (Is_Actual_Tagged_Parameter): new function which determines if its
10287 argument is an actual parameter of a formal of tagged type in a
10289 (Is_SPARK_Object_Reference): new function which determines if the tree
10290 referenced by its argument represents an object in SPARK
10292 2011-08-02 Robert Dewar <dewar@adacore.com>
10294 * sem_ch3.adb: Minor reformatting
10295 Minor comment addition
10296 Minor error msg text change
10298 2011-08-02 Javier Miranda <miranda@adacore.com>
10300 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10301 function. Used to be more precise when we generate a variable plus one
10302 assignment to remove side effects in the evaluation of the Bound
10304 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10305 of the bound expression to force its re-analysis and thus expand the
10306 associated transient scope (if required). Code cleanup replacing the
10307 previous code that declared the constant entity by an invocation to
10308 routine Force_Evaluation which centralizes this work in the frontend.
10310 2011-08-02 Robert Dewar <dewar@adacore.com>
10312 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10313 (Base_Type): Now uses improved Is_Base_Type function
10314 * einfo.ads (Base_Type): Inline this function
10316 2011-08-02 Robert Dewar <dewar@adacore.com>
10318 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10319 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10321 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10323 * gcc-interface/Make-lang.in: Update dependencies.
10324 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10327 2011-08-02 Yannick Moy <moy@adacore.com>
10329 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10330 non-simple expression used in delta constraint
10331 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10332 index constraint which is not a subtype mark
10333 * par.adb: With and use Restrict
10334 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10335 mode on component type which is not a subtype mark and default
10336 expression on component
10337 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10338 of string which does not have a lower index bound equal to 1
10339 (Array_Type_Declaration): issue an error in formal mode on index or
10340 component type which is not a subtype mark, and on aliased keyword on
10342 (Derived_Type_Declaration): issue an error in formal mode on interface,
10343 limited or abstract type
10344 (Record_Type_Declaration): issue an error in formal mode on interface
10345 (Record_Type_Definition): issue an error in formal mode on tagged types
10346 and type extensions not declared in the specification of a library unit
10347 package; on null non-tagged record; on variant part
10349 2011-08-02 Vincent Celier <celier@adacore.com>
10351 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10352 not declared for qualified library project when Library_Name is not
10353 declared, but Library_Dir is.
10355 2011-08-02 Robert Dewar <dewar@adacore.com>
10357 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10358 pragmas (affects aspects [Component_]Default_Value
10359 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10360 component type for the resolution
10362 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10364 * einfo.adb (Base_Type): Tune implementation for speed.
10366 2011-08-02 Robert Dewar <dewar@adacore.com>
10368 * freeze.adb: Minor reformatting.
10370 2011-08-02 Thomas Quinot <quinot@adacore.com>
10372 * scos.ads: Update comments.
10374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10376 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10377 base type, because the parent may be a subtype of a private type whose
10378 convention is established in a private part.
10380 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10382 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10383 statement in a block when the expansion of the return expression has
10384 created a finalization chain.
10385 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10386 with the parent node.
10387 Add N_Extended_Return_Statement to handle the case where a transient
10388 object declaration appears in the Return_Object_Declarations list of
10389 an extended return statement.
10391 2011-08-02 Matthew Gingell <gingell@adacore.com>
10393 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10394 unused parameter 'name'.
10396 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10398 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10399 inherited operation, check whether its alias, which is the source
10400 operastion that it renames, has been marked eliminated.
10402 2011-08-02 Javier Miranda <miranda@adacore.com>
10404 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10405 in-mode parameter whose type is an access type since it can be used to
10406 modify its designated object. Enforce code that handles as safe an
10407 access type that is not access-to-constant but it is the result of a
10408 previous removal of side-effects.
10409 (Remove_Side_Effects): Minor code reorganization of cases which require
10410 no action. Done to incorporate documentation on new cases uncovered
10411 working in this ticket: no action needed if this routine was invoked
10412 too early and the nodes are not yet decorated.
10413 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10414 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10415 were issued with actuals that are implicitly provided by
10418 2011-08-02 Robert Dewar <dewar@adacore.com>
10420 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10422 2011-08-02 Yannick Moy <moy@adacore.com>
10424 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10425 to issue an error in formal mode on attribute not supported in this mode
10426 (Analyze_Attribute): issue errors on standard attributes not supported
10428 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10429 comment, and issue error in formal mode on modulus which is not a power
10431 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10433 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10435 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10436 operator on modular type (except 'not').
10438 2011-08-02 Robert Dewar <dewar@adacore.com>
10440 * gnat_rm.texi: Minor reformatting.
10442 2011-08-02 Arnaud Charlet <charlet@adacore.com>
10444 * s-osinte-linux.ads: Minor comment update and reformatting.
10445 * i-cexten.ads: Make this unit pure, as for its parent.
10446 Will allow its usage in more contexts if needed.
10448 2011-08-02 Robert Dewar <dewar@adacore.com>
10450 * s-utf_32.ads: Minor comment fix.
10452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10454 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10455 operation of a tagged synchronized type, handle the case where the
10456 controlling argument is overloaded.
10458 2011-08-02 Yannick Moy <moy@adacore.com>
10460 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10461 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10462 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10463 SPARK mode and formal verification mode on processing SPARK restriction
10464 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10465 requiring consistency checking.
10467 2011-08-02 Robert Dewar <dewar@adacore.com>
10469 * sem_res.adb: Minor reformatting.
10471 2011-08-02 Robert Dewar <dewar@adacore.com>
10473 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10474 a-cforse.ads: Remove unneeded with of Ada.Containers
10475 Remove commented out pragma Inline's
10476 Move specifications of new subprograms to the actual specs
10478 2011-08-02 Yannick Moy <moy@adacore.com>
10480 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10481 a-cforse.ads: Update comments.
10483 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10485 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10487 2011-08-02 Robert Dewar <dewar@adacore.com>
10489 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10490 a-cforse.ads, a-cofove.ads: Minor reformatting.
10492 2011-08-02 Claire Dross <dross@adacore.com>
10494 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10495 a-cofove.ads: Add comments.
10497 2011-08-02 Yannick Moy <moy@adacore.com>
10499 * gnat_rm.texi: Document formal containers.
10501 2011-08-02 Emmanuel Briot <briot@adacore.com>
10503 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10504 are empty sections.
10506 2011-08-02 Robert Dewar <dewar@adacore.com>
10508 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10511 2011-08-02 Robert Dewar <dewar@adacore.com>
10513 * aspects.adb: New aspects Default_Value and Default_Component_Value
10514 New format of Aspect_Names table checks for omitted entries
10515 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10516 handling of boolean aspects for derived types.
10517 New aspects Default_Value and Default_Component_Value
10518 New format of Aspect_Names table checks for omitted entries
10519 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10520 (Has_Default_Value): New flag
10521 (Has_Default_Component_Value): New flag
10522 (Has_Default_Value): New flag
10523 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10525 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10526 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10527 Default_Value and Default_Component_Value
10528 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10529 New aspects Default_Value and Default_Component_Value
10530 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10531 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10533 2011-08-02 Vincent Celier <celier@adacore.com>
10535 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10536 inherit library kind.
10538 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10540 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10541 Minor reformatting.
10543 2011-08-02 Robert Dewar <dewar@adacore.com>
10545 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10547 2011-08-02 Yannick Moy <moy@adacore.com>
10549 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10551 2011-08-02 Robert Dewar <dewar@adacore.com>
10553 * impunit.adb: Add comment.
10555 2011-08-02 Yannick Moy <moy@adacore.com>
10557 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10558 qualification of aggregates in formal mode
10559 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10561 (Resolve_Aggregate): complete the test that an aggregate is adequately
10562 qualified in formal mode
10564 2011-08-02 Pascal Obry <obry@adacore.com>
10566 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10567 * mlib-prj.adb: Supress warning when compiling binder generated file.
10568 (Build_Library): Supress all warnings when compiling the binder
10571 2011-08-02 Yannick Moy <moy@adacore.com>
10573 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10575 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10576 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10577 Add with/use clauses to make Check_Formal_Restriction visible
10579 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10581 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10582 in-parameters when type of the generic formal is private in the generic
10583 spec and non-private in the body.
10585 2011-08-02 Claire Dross <dross@adacore.com>
10587 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10588 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10589 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10590 * impunit.adb, Makefile.rtl: Take new files into account.
10592 2011-08-02 Robert Dewar <dewar@adacore.com>
10594 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10595 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10597 2011-08-02 Yannick Moy <moy@adacore.com>
10599 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10601 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10602 matching static array bounds, taking into account the special case of
10604 * sem_ch3.adb: Typo in comment.
10606 2011-08-02 Yannick Moy <moy@adacore.com>
10608 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10609 which issues an error in formal mode if its argument node is originally
10611 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10612 has a discriminant specification so that it does not include the case
10614 (Derived_Type_Declaration): move here the test that a derived type has a
10615 discriminant specification
10616 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10617 first element of a component association before accessing its choices
10618 (presence of component association is not enough)
10619 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10620 declaration is a library item before accessing the next element in a
10621 list, as library items are not member of lists
10622 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10623 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10624 Check_Formal_Restriction whenever possible.
10626 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10628 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10629 reference when needed.
10631 2011-08-02 Bob Duff <duff@adacore.com>
10633 * gnat_ugn.texi: Fix typo.
10635 2011-08-02 Vincent Celier <celier@adacore.com>
10637 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10638 archive file name. Do not use the full path name of archives for Open
10641 2011-08-02 Robert Dewar <dewar@adacore.com>
10643 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10644 Analyze_Aspect_Specifications
10646 (Analyze_Aspect_Specifications): New handling for boolean aspects
10647 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10648 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10649 sequence for Analyze_Aspect_Specifications
10650 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10651 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10653 2011-08-02 Robert Dewar <dewar@adacore.com>
10655 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10656 aspects, since these no longer exist.
10658 2011-08-02 Robert Dewar <dewar@adacore.com>
10660 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10661 semicolon, do not try to see if there are aspects following it.
10662 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10665 2011-08-02 Robert Dewar <dewar@adacore.com>
10667 * sem_ch8.adb, aspects.ads: Minor reformatting.
10669 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10671 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10672 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10674 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10676 2011-08-02 Yannick Moy <moy@adacore.com>
10678 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10679 mode on subprogram declaration outside of package specification, unless
10680 it is followed by a pragma Import
10681 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10682 Access_Type_Declaration): issue error in formal mode on access type
10683 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10685 (Analyze_Object_Declaration): issue error in formal mode on object
10686 declaration which does not respect SPARK restrictions
10687 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10688 declaration which does not respect SPARK restrictions
10689 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10690 error in formal mode on digits or delta constraint
10691 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10692 decimal fixed point type
10693 (Derived_Type_Declaration): issue error in formal mode on derived type
10694 other than type extensions of tagged record types
10695 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10696 with check on access definition
10697 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10698 mode on protected definition.
10699 (Analyze_Task_Definition): issue error in formal mode on task definition
10701 2011-08-02 Robert Dewar <dewar@adacore.com>
10703 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10705 2011-08-02 Javier Miranda <miranda@adacore.com>
10707 * sem_ch6.adb (Can_Override_Operator): New function.
10708 (Verify_Overriding_Indicator): Add missing code to check overriding
10709 indicator in operators. Fixes regression.
10710 (Check_Overriding_Indicator): Minor reformating after replacing the
10711 code that evaluates if the subprogram can override an operator by
10712 invocations to the above new function.
10714 (Write_Field26_Name): Add missing code to ensure that, following
10715 the documentation in einfo.ads, this field is not shown as attribute
10716 "Static_Initialization" on non-dispatching functions.
10718 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10720 * sem_res.adb (Resolve_Call): A call to
10721 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10722 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10723 i.e., when the second parameter is of type Time_Span.
10725 2011-08-02 Vincent Celier <celier@adacore.com>
10727 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10728 with an archive instead of -L<library dir> -l<library name>.
10730 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10732 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10733 mark the base types In_Use in addition to making the operations
10736 2011-08-02 Ed Falis <falis@adacore.com>
10738 * init.c: add and setup __gnat_signal_mask for the exception signals
10739 * s-inmaop-vxworks.adb: new file.
10740 * s-intman-vxworks.adb: remove unnecessary initializations and
10742 * s-intman-vxworks.ads: remove unnecessary variable
10743 * s-taprop-vxworks.adb: simplify signal initialization
10745 2011-08-02 Robert Dewar <dewar@adacore.com>
10747 * sem_ch8.adb: Minor code reorganization, comment updates.
10749 2011-08-02 Robert Dewar <dewar@adacore.com>
10751 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10752 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10754 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10755 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10757 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10759 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10760 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10761 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10762 use_type_clauses, to handle more efficiently use_type and use_all_type
10764 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10765 Ada2012 Use_All_Type clause.
10766 (Use_Class_Wide_Operations): new procedure.
10768 2011-08-02 Robert Dewar <dewar@adacore.com>
10770 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10771 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10772 expression to expression function.
10774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10776 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10777 if types are compatible.
10779 2011-08-02 Yannick Moy <moy@adacore.com>
10781 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10782 returns True if its argument array types have same dimension and same
10783 static bounds at each index.
10784 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10785 OUT or IN OUT paramaters which are not view conversions in SPARK.
10786 (Resolve_Arithmetic_Op): issue an error in formal mode on
10787 multiplication or division with operands of fixed point types which are
10788 not qualified or explicitly converted.
10789 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10790 Boolean or array type (except String) operands.
10791 (Resolve_Equality_Op): issue an error in formal mode on equality
10792 operators for array types other than String with non-matching static
10794 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10795 for array types with non-matching static bounds. Factorize the code in
10796 Matching_Static_Array_Bounds.
10797 (Resolve_Qualified_Expression): issue an error in formal mode on
10798 qualified expressions for array types with non-matching static bounds.
10799 (Resolve_Type_Conversion): issue an error in formal mode on type
10800 conversion for array types with non-matching static bounds
10802 2011-08-02 Robert Dewar <dewar@adacore.com>
10804 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10806 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10808 * par-ch9.adb: save location of entry for proper error message.
10810 2011-08-02 Javier Miranda <miranda@adacore.com>
10812 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10813 (Use_Full_View) which permits this routine to climb through the
10814 ancestors using the full-view of private parents.
10815 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10816 Use_Full_View to true in calls to Is_Ancestor.
10817 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10818 true in call to Is_Ancestor.
10819 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10820 Use_Full_View to true in call to Is_Ancestor.
10821 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10822 call to Is_Ancestor.
10823 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10824 Use_Full_View to true in calls to Is_Ancestor.
10825 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10826 Make_Select_Specific_Data_Table, Register_Primitive,
10827 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10828 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10829 to true in call to Is_Ancestor.
10830 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10831 Use_Full_View to true in calls to Is_Ancestor.
10833 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10834 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10836 2011-08-02 Robert Dewar <dewar@adacore.com>
10838 * gnat_rm.texi: Minor reformatting.
10839 * sem_prag.adb: Minor reformatting.
10841 2011-08-02 Tristan Gingold <gingold@adacore.com>
10843 * vms_data.ads: Add VMS qualifier for -gnateP.
10845 2011-08-02 Robert Dewar <dewar@adacore.com>
10847 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10848 * par-ch7.adb (P_Package): Proper placement of aspects for package
10849 decl/instantiation.
10850 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10851 (End_Statements): Add Is_Sloc parameterr
10852 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10853 (Check_End): Ad Is_Sloc parameter
10854 (End_Statements): Add Is_Sloc parameterr
10856 2011-08-02 Vincent Celier <celier@adacore.com>
10858 * ug_words: Add VMS qualifier equivalent to -gnateP:
10859 /SYMBOL_PREPROCESSING.
10861 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10863 * gnat-style.texi: For hexadecimal numeric literals the typical
10864 grouping of digits is 4 to represent 2 bytes.
10865 A procedure spec which is split into several lines is indented two
10868 2011-08-02 Yannick Moy <moy@adacore.com>
10870 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10871 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10872 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10874 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10875 choice in array aggregate
10876 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10878 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10879 positional and named aggregate for record, or others in record
10880 aggregate, or multiple choice in record aggregate
10881 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10882 array operands to logical operations AND, OR and XOR do not have the
10883 same static lower and higher bounds
10884 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10886 2011-08-01 Robert Dewar <dewar@adacore.com>
10888 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10889 Replaces Last_Source_Node_In_Sequence.
10890 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10891 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10892 parens and blank in string (this was inconsistently implemented).
10894 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10895 blank in string (this was inconsistently implemented).
10897 (Set_Global_Switches): Set formal mode switches appropriately
10898 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10900 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10901 call Set_Error_Msg_Lang to set "spark" as language name.
10902 * par.adb: Remove unnecessary call to set formal language for errout
10903 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10904 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10906 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10907 calls to it, moved after resolution so that types are known
10908 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10909 result of concatenation is not of type String
10910 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10911 concatenation is not properly restricted
10912 * gnat_rm.texi: Add doc on pragma Spark_95.
10913 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10914 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10915 * gcc-interface/Make-lang.in: Update dependencies.
10917 2011-08-01 Javier Miranda <miranda@adacore.com>
10919 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10920 condition that detects if the overridden operation must replace an
10923 2011-08-01 Javier Miranda <miranda@adacore.com>
10925 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10926 code declarations inserted by Insert_Actions in each alternative of the
10927 N_Case_Expression node.
10929 2011-08-01 Robert Dewar <dewar@adacore.com>
10931 * sem_ch6.adb: Minor code reorganization.
10932 * sem_util.adb: Minor reformatting.
10934 2011-08-01 Pascal Obry <obry@adacore.com>
10936 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10937 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10939 2011-08-01 Yannick Moy <moy@adacore.com>
10941 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10942 literal or operator symbol which is prefixed
10943 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10944 mode on access attributes.
10945 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10946 that concatenation operands are properly restricted in formal mode
10947 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10948 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10949 result of the concatenation has a type different from String.
10950 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10951 Analyze_Quantified_Expression, Analyze_Slice,
10952 Analyze_Null): issue an error in formal mode on unsupported constructs
10954 (Analyze_Block_Statement): only issue error on source block statement
10955 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10956 function which returns the last node in a list of nodes for which
10957 Comes_From_Source returns True, if any
10958 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10959 Last_Source_Node_In_Sequence
10960 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10961 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10962 mode on unsupported constructs
10963 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10964 rest of the actions may be needed later on since the error is marked as
10966 * sinfo.ads: Typos in comments.
10968 2011-08-01 Pascal Obry <obry@adacore.com>
10970 * projects.texi: Minor editing.
10972 2011-08-01 Yannick Moy <moy@adacore.com>
10974 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10975 insertion character ~~
10976 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10977 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10978 with insertion character ~~
10979 (Set_Msg_Text): treat insertion character ~~
10980 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10981 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10982 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10983 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10984 errors related to the formal language restriction not serious
10985 (insertion character |).
10986 * par.adb (Par): set formal language for error messages if needed
10987 * sem_ch6.adb (Check_Missing_Return): take into account possible
10988 generated statements at the end of the function
10989 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10990 enumeration value to define a new pragma SPARK_95
10991 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10992 SPARK_Version): new type and variables to store the SPARK version
10994 (SPARK_Mode): return True when SPARK_Version is set
10995 * par-prag.adb: Correct indentation
10996 (Prag): take Pragma_SPARK_95 into account
10997 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11000 2011-08-01 Robert Dewar <dewar@adacore.com>
11002 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11003 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11004 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11006 2011-08-01 Pascal Obry <obry@adacore.com>
11008 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11009 Target_Name to Get_Path call.
11010 (Parse_Single_Project): Likewise.
11011 (Post_Parse_Context_Clause): Likewise.
11012 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11013 Call Initialise_Project_Path with the proper Target_Name.
11014 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11016 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11017 with the proper Target_Name.
11018 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11019 Part.Parse routine.
11020 (Parse_Project_And_Apply_Config): Likewise.
11021 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11022 This is fine as this part of the code is supporting only native
11024 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11025 is fine as this part of the code is supporting only native compilation.
11027 2011-08-01 Yannick Moy <moy@adacore.com>
11029 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11030 of homonym, unless the homonym is one of the cases allowed in SPARK
11031 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11032 package declaration occurring after a body.
11034 2011-08-01 Robert Dewar <dewar@adacore.com>
11036 * checks.adb, exp_ch4.adb: Minor reformatting.
11038 2011-08-01 Javier Miranda <miranda@adacore.com>
11040 * einfo.ads (Access_Disp_Table): Fix documentation.
11041 (Dispatch_Table_Wrappers): Fix documentation.
11043 2011-08-01 Pascal Obry <obry@adacore.com>
11045 * prj-env.adb, prj-env.ads: Minor reformatting.
11047 2011-08-01 Yannick Moy <moy@adacore.com>
11049 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11050 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11051 procedures out of these packages.
11052 * errout.ads, errout.adb
11053 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11054 procedures in of this package
11055 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11056 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11057 on misplaced later vs initial declarations, like in Ada 83
11058 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11059 formal mode on attribute of private type whose full type declaration
11061 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11062 package declaration inside a package specification
11063 (Analyze_Full_Type_Declaration): issue error in formal mode on
11064 controlled type or discriminant type
11065 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11066 user-defined operator means that it should come from the source
11067 (New_Overloaded_Entity): issue error in formal mode on overloaded
11069 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11071 2011-08-01 Thomas Quinot <quinot@adacore.com>
11073 * atree.adb: Minor reformatting.
11074 * checks.adb: Minor reformatting.
11076 2011-08-01 Vincent Celier <celier@adacore.com>
11078 * s-parame-vms-ia64.ads: Fix typo in comment
11080 * s-parame-vms-restrict.ads: Removed, unused.
11082 2011-08-01 Javier Miranda <miranda@adacore.com>
11085 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11087 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11088 * sem_ch3.ads, sem_ch3.adb
11089 (Is_Constant_Bound): New extended version of the subprogram that was
11090 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11091 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11092 * sem_aux.ads (Constant_Value): Fix typo in comment.
11093 * checks.adb (Generate_Index_Checks): New implementation which, for
11094 array objects with constant bounds, generates the runtime check
11095 referencing the bounds of the array type. For other cases this routine
11096 provides its previous behavior obtaining such values from the array
11098 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11100 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11101 we cannot have semantic interpretations of the new node.
11103 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11105 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11108 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11110 * sem_ch8.adb: Minor code editing.
11111 * s-vxwext.adb: Remove trailing space.
11112 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11113 consistency with other files.
11115 2011-08-01 Thomas Quinot <quinot@adacore.com>
11117 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11119 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11121 * par-ch10.adb: reject parameterized expressions as compilation unit.
11122 * sem_ch4.adb: handle properly conditional expression with overloaded
11123 then_clause and no else_clause.
11125 2011-08-01 Tristan Gingold <gingold@adacore.com>
11127 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11128 like done by System.Aux_DEC.
11129 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11131 2011-08-01 Yannick Moy <moy@adacore.com>
11133 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11134 missing label at end of declaration (subprogram or package)
11135 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11136 of positional and named parameter association
11137 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11138 Error_Msg_SP which adds a prefix to the error message giving the name
11139 of the formal language analyzed
11140 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11141 access result type in subprogram, unconstrained array as result type,.
11142 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11144 * sem_ch8.adb: Code clean up.
11146 2011-08-01 Javier Miranda <miranda@adacore.com>
11148 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11149 * einfo.ads (Access_Disp_Table): Fix documentation.
11150 (Dispatch_Table_Wrappers): Fix documentation.
11151 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11152 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11153 to enforce the documentation of this attribute.
11154 (Set_Is_Interface): Cleanup the assertion.
11155 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11156 the Underlying_Type entity before reading attribute Access_Disp_Table.
11157 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11158 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11159 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11160 the Underlying_Type entity before reading attribute Access_Disp_Table.
11161 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11162 Locate the Underlying_Type entity before reading attribute
11165 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11167 * s-poosiz.ads: Additional overriding indicators.
11169 2011-08-01 Yannick Moy <moy@adacore.com>
11171 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11173 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11174 parameter specification does not include a subtype mark.
11175 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11176 formal mode on abstract subprogram.
11177 (Analyze_Subprogram_Specification): issue error in formal mode on
11178 user-defined operator.
11179 (Process_Formals): issue error in formal mode on access parameter and
11180 default expression.
11181 * sem_ch9.adb (Analyze_Abort_Statement,
11182 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11183 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11184 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11185 Analyze_Requeue, Analyze_Selective_Accept,
11186 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11187 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11188 issue error in formal mode on user-defined raise statement.
11190 2011-08-01 Thomas Quinot <quinot@adacore.com>
11192 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11193 declaration being hidden when overriding an implicit inherited
11195 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11196 (-gnats), do not complain about a source file that contains only a
11199 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11201 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11202 variable if already set.
11204 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11206 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11207 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11208 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11209 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11210 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11211 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11212 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11213 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11214 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11215 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11216 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11217 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11218 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11219 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11220 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11221 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11222 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11223 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11224 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11225 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11226 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11227 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11228 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11229 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11230 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11231 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11232 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11233 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11234 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11235 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11236 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11237 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11238 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11239 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11240 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11241 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11242 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11243 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11244 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11245 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11246 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11247 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11248 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11249 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11250 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11251 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11252 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11253 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11254 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11255 Use GNAT instead of GNARL.
11257 2011-08-01 Bob Duff <duff@adacore.com>
11259 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11260 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11261 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11264 2011-08-01 Yannick Moy <moy@adacore.com>
11266 * debug.adb (d.D) reverve flag for the SPARK mode
11267 (d.E) reverve flag for SPARK generation mode
11268 (d.F) reverve flag for Why generation mode
11269 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
11270 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11271 functions which return True when the corresponding modes are set
11272 (Formal_Language): return "spark" or "alfa" when in formal verification
11274 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11275 Error_Msg to prefix the error message with a tag giving the formal
11277 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11278 message with a tag giving the formal language
11279 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11281 (Analyze_Case_Statement): issue error in formal mode on case statement
11282 with a single "others" case alternative
11283 (Analyze_Exit_Statement): issue errors in formal mode on exit
11284 statements which do not respect SPARK restrictions
11285 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11286 (Check_Unreachable_Code): always issue an error (not a warning) in
11287 formal mode on unreachable code (concerns both code after an infinite
11288 loop and after an unconditional jump, both not allowed in SPARK)
11289 * sem_ch6.adb (Analyze_Return_Statement): add call to
11290 Set_Return_Present for a procedure containing a return statement
11291 (already done for functions in Analyze_Function_Return)
11292 (Analyze_Function_Return): issue error in formal mode on extended
11293 return or if return is not last statement in function
11294 (Check_Missing_Return): issue error in formal mode if function does
11295 not end with return or if procedure contains a return
11296 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11297 function to detect if there is an inner scope of its parameter S which
11300 2011-08-01 Thomas Quinot <quinot@adacore.com>
11302 * sem_ch6.ads: Minor reformatting.
11304 2011-08-01 Javier Miranda <miranda@adacore.com>
11306 * sem_util.adb (Abstract_Interface_List): Complete condition when
11307 processing private type declarations to avoid reading unavailable
11309 (Is_Synchronized_Tagged_Type): Complete condition when processing
11310 private extension declaration nodes to avoid reading unavailable
11313 2011-08-01 Thomas Quinot <quinot@adacore.com>
11315 * sem_ch3.adb: Minor reformatting.
11317 2011-08-01 Thomas Quinot <quinot@adacore.com>
11319 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11320 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11321 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11322 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11323 for VMS, instead parametrize the common implementation with
11324 System.Parameters declarations.
11326 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11328 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11330 2011-08-01 Tristan Gingold <gingold@adacore.com>
11332 * seh_init.c: Fix SEH handler installation on win64.
11334 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11336 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11337 double analysis of an anonymous access to subprogram, because it can
11338 lead to improper sharing of profiles and a back-end crash.
11340 2011-08-01 Robert Dewar <dewar@adacore.com>
11342 * make.adb, sem_ch4.adb: Minor reformatting.
11343 * gcc-interface/Make-lang.in: Update dependencies.
11344 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11346 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11348 * gnat_rm.texi: Fix definition of Long_Integer.
11350 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11352 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11353 to prevent storage exhaustion.
11354 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11355 finalized is a function body, insert the cleanup code before the final
11356 return statement, to prevent spurious warnings.
11357 * s-pooglo.ads: add overriding indicator.
11359 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11361 * sem_ch4.adb (Operator_Check): improve error message when both a
11362 with_clause and a use_clause are needed to make operator usage legal.
11363 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11364 determine whether a compilation unit is visible within an other,
11365 either through a with_clause in the current unit, or a with_clause in
11366 its library unit or one one of its parents.
11368 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11370 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11371 over an arbitrary expression of an array or container type.
11372 * lib-xref.adb: clarify comment.
11374 2011-08-01 Bob Duff <duff@adacore.com>
11376 * einfo.ads: Minor reformatting.
11377 * debug.adb: Minor comment improvement.
11379 2011-08-01 Javier Miranda <miranda@adacore.com>
11381 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11382 consider hidden subprograms as valid candidates.
11384 2011-08-01 Arnaud Charlet <charlet@adacore.com>
11386 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11388 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11390 * gnat_ugn.texi: Fix typo.
11392 2011-08-01 Robert Dewar <dewar@adacore.com>
11394 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11395 lib-xref.adb: Minor reformatting
11397 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11399 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11400 when to generate a call to Move_Final_List.
11401 (Has_Controlled_Parts): Remove this function.
11403 2011-08-01 Geert Bosch <bosch@adacore.com>
11405 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11406 "," in choice list.
11408 2011-08-01 Thomas Quinot <quinot@adacore.com>
11410 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11411 explicit raise of a predefined exception as Comes_From_Source if the
11412 original N_Raise_Statement comes from source.
11414 2011-08-01 Robert Dewar <dewar@adacore.com>
11416 * sinfo.ads: Add comment.
11417 * sem_ch6.adb: Minor reformatting.
11419 2011-08-01 Robert Dewar <dewar@adacore.com>
11421 * freeze.adb (Freeze_Entity): Refine check for bad component size
11422 clause to avoid rejecting confirming clause when atomic/aliased present.
11424 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11426 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11427 better determine whether an entity reference is a write.
11428 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11430 * lib-xref.adb (Output_References): Do no suppress a read reference at
11431 the same location as an immediately preceeding modify-reference, to
11432 handle properly in-out actuals.
11434 2011-08-01 Tristan Gingold <gingold@adacore.com>
11436 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11438 2011-08-01 Quentin Ochem <ochem@adacore.com>
11440 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11441 heap to compute the result.
11443 2011-08-01 Robert Dewar <dewar@adacore.com>
11445 * atree.ads: Minor reformatting.
11447 2011-08-01 Emmanuel Briot <briot@adacore.com>
11449 * g-expect.adb (Get_Command_Output): Fix memory leak.
11451 2011-08-01 Geert Bosch <bosch@adacore.com>
11453 * cstand.adb (P_Float_Type): New procedure to print the definition of
11454 predefined fpt types.
11455 (P_Mixed_Name): New procedure to print a name using mixed case
11456 (Print_Standard): Use P_Float_Type for printing floating point types
11457 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11458 precision IEEE float.
11460 2011-08-01 Thomas Quinot <quinot@adacore.com>
11462 * sem_ch3.adb: Minor reformatting.
11464 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11466 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11467 the completion of a generic function, insert the new body rather than
11468 rewriting the original.
11470 2011-08-01 Yannick Moy <moy@adacore.com>
11472 * sinfo.ads, errout.ads: Typos in comments.
11474 2011-08-01 Robert Dewar <dewar@adacore.com>
11476 * par-endh.adb: Minor reformatting.
11478 2011-08-01 Robert Dewar <dewar@adacore.com>
11480 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11481 (Pre_Post_Aspects): New subtype.
11482 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11483 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11484 * par-ch7.adb (P_Package): Remove Decl parameter
11485 (P_Package): Handle new syntax for aspects (before IS)
11486 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11488 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11489 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11490 (P_Package): Remove Decl parameter
11491 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11493 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11495 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11496 * sinfo.ads: Document new syntax for aspects in packages etc.
11497 * sprint.adb: Handle new syntax of aspects before IS in package
11499 2011-08-01 Thomas Quinot <quinot@adacore.com>
11501 * atree.ads: Minor reformatting.
11502 * sem_prag.adb: Minor reformatting.
11504 2011-08-01 Robert Dewar <dewar@adacore.com>
11506 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11507 case expr alternative.
11509 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11511 * sem_ch12.adb: Fix typo.
11513 2011-08-01 Geert Bosch <bosch@adacore.com>
11515 * sem_prag.adb (Check_No_Link_Name): New procedure.
11516 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11517 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11518 instead of Standard_Long_Long_Float_Size global. Preparation for
11519 eventual removal of per type constants.
11520 * exp_util.ads (Get_Stream_Size): New function returning the stream
11521 size value of subtype E.
11522 * exp_util.adb (Get_Stream_Size): Implement new function.
11523 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11525 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11527 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11529 2011-08-01 Geert Bosch <bosch@adacore.com>
11531 * cstand.adb: Fix comments.
11532 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11533 count of arguments.
11535 2011-08-01 Robert Dewar <dewar@adacore.com>
11537 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11539 2011-08-01 Geert Bosch <bosch@adacore.com>
11541 * atree.ads: Fix comment.
11543 2011-08-01 Robert Dewar <dewar@adacore.com>
11545 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11546 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11547 * par.adb: Add with for Namet.Sp.
11548 * par-tchk.adb: Minor reformatting.
11550 2011-08-01 Vincent Celier <celier@adacore.com>
11552 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11553 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11554 of the init procedure of a SAL.
11555 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11558 2011-08-01 Thomas Quinot <quinot@adacore.com>
11560 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11563 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11565 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11567 2011-08-01 Thomas Quinot <quinot@adacore.com>
11569 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11570 conformant with its spec (return True only for types that have
11571 an overriding Initialize primitive operation that prevents them from
11572 having preelaborable initialization).
11573 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11574 initialization for controlled types in Ada 2005 or later mode.
11576 2011-08-01 Robert Dewar <dewar@adacore.com>
11578 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11580 (Same_Aspect): New function.
11581 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11582 Type_Invariant, Precondition, Postcondition.
11583 * snames.ads-tmpl: Add Name_Type_Invariant.
11585 2011-08-01 Robert Dewar <dewar@adacore.com>
11587 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11589 (Freeze_All_Ent): Fix error in handling inherited aspects.
11590 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11591 already analyzed, but don't skip entire processing of a declaration,
11592 that's wrong in some cases of declarations being rewritten.
11593 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11594 Don't delay for integer, string literals
11595 Treat predicates in usual manner for delay, remove special case code,
11597 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11598 (Build_Predicate_Function): Update saved expression in aspect
11599 (Build_Invariant_Procedure): Update saved expression in aspect
11600 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11601 of replacement of discriminant references if the reference is simple.
11603 2011-08-01 Robert Dewar <dewar@adacore.com>
11605 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11606 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11607 Static_Predicate and Dynamic_Predicate.
11608 (Build_Predicate_Function): Add processing for Static_Predicate
11609 and Dynamic_Predicate.
11610 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11611 (From_Static_Predicate): New flag
11612 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11614 2011-08-01 Robert Dewar <dewar@adacore.com>
11616 * usage.adb: Documentation cleanup for Ada version modes in usage.
11617 * expander.adb: Minor reformatting.
11619 2011-08-01 Robert Dewar <dewar@adacore.com>
11621 * atree.ads: Minor comment fix.
11622 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11623 a-witeio.ads, sem_prag.adb: Minor reformatting.
11625 2011-08-01 Doug Rupp <rupp@adacore.com>
11627 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11628 pointers. Use descrip.h header file for convenience. Add some
11631 2011-08-01 Robert Dewar <dewar@adacore.com>
11633 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11634 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11635 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11637 (Check_Aspect_At_End_Of_Declarations): New procedure
11638 (Analye_Aspect_Specification): Minor changes for above procedures
11639 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11640 specification node as well.
11642 2011-08-01 Pascal Obry <obry@adacore.com>
11644 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11645 Windows files. Use GetFilesAttributes() in this case to check for file
11646 existence instead of returning with an error code.
11648 2011-08-01 Vincent Celier <celier@adacore.com>
11650 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11651 High is above Source length.
11653 2011-08-01 Robert Dewar <dewar@adacore.com>
11655 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11657 2011-08-01 Robert Dewar <dewar@adacore.com>
11659 * aspects.ads (Boolean_Aspects): New subtype.
11660 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11661 for derived types in cases where the parent type and derived type have
11663 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11664 with aspects when parent type also has aspects.
11665 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11666 boolean expression at this point).
11667 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11668 accordance with final decision on the Ada 2012 feature.
11669 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11671 2011-08-01 Matthew Heaney <heaney@adacore.com>
11673 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11675 2011-08-01 Pascal Obry <obry@adacore.com>
11677 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11678 Fix Replace_Slice when High is above current string size.
11679 (Replace_Slice): Fix DL computation when High is above current
11682 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11684 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11686 2011-08-01 Matthew Heaney <heaney@adacore.com>
11688 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11691 2011-08-01 Pascal Obry <obry@adacore.com>
11693 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11696 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11698 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11699 access to protected subprograms in generic bodies.
11700 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11701 protected type, indicate that the convention of the subprogram is
11702 Convention_Protected, because it may be used in subsequent declarations
11703 within the protected declaration.
11705 2011-08-01 Vincent Celier <celier@adacore.com>
11707 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11708 and "final" procedures when the name of the library is "ada", to avoid
11709 duplicate symbols "adainit" and "adafinal" in executables.
11711 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11713 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11714 quantified expression that appears within a postcondition and uses the
11715 Ada2012 'Result attribute.
11717 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11719 * init.c (__gnat_error_handler): Cast reason to int.
11720 (__gnat_install_handler): Explain sa_sigaction use.
11722 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11725 subprogram has copy-in copy-out parameters, try to promote the mode of
11726 the return type if it is passed in registers.
11728 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11730 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11731 left operand as addressable.
11733 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11735 * gcc-interface/gigi.h (build_function_stub): Remove.
11736 (build_return_expr): Likewise.
11737 (convert_vms_descriptor): Declare.
11738 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11739 (build_function_stub): Move to...
11740 * gcc-interface/utils2.c (build_return_expr): Move to...
11741 * gcc-interface/trans.c (build_function_stub): ...here.
11742 (build_return_expr): ...here.
11743 (Subprogram_Body_to_gnu): Add local variable for language_function.
11744 Disconnect the parameter attributes cache, if any, once done with it.
11745 Call end_subprog_body only after setting the end_locus.
11746 Build the stub associated with the function, if any, at the very end.
11747 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11748 variables and streamline control flow.
11750 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11753 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11754 g-trasym-dwarf.adb.
11756 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11759 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11760 Assign to act.sa_sigaction.
11761 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11762 current->return_address to char * before arithmetic.
11764 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11766 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11767 Correct argument types.
11768 Extract code from reason.
11769 (__gnat_install_handler): Assign to act.sa_sigaction.
11771 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11773 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11774 (GNAT1_OBJS): ...here.
11776 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11779 * g-socthi-mingw.adb (Fill): Fix formatting.
11781 * gcc-interface/gigi.h: Move around comment.
11783 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11786 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11788 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11791 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11793 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11795 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11796 range comparison if Pmode is SImode.
11798 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11799 Eric Botcazou <ebotcazou@adacore.com>
11801 * adadecode.c: Wrap up in extern "C" block.
11802 * adadecode.h: Likewise.
11803 * adaint.c: Likewise. Remove 'const' keyword.
11804 * adaint.h: Likewise.
11805 * argv.c: Likewise.
11806 * atree.h: Likewise.
11808 * cstreams.c: Likewise.
11810 * exit.c: Likewise.
11812 * final.c: Likewise.
11813 * init.c: Likewise.
11814 * initialize.c: Likewise.
11815 * link.c: Likewise.
11816 * namet.h: Likewise.
11817 * nlists.h: Likewise.
11818 * raise.c: Likewise.
11819 * raise.h: Likewise.
11820 * repinfo.h: Likewise.
11821 * seh_init.c: Likewise.
11822 * targext.c: Likewise.
11823 * tracebak.c: Likewise.
11824 * uintp.h: Likewise.
11825 * urealp.h: Likewise.
11826 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11827 * xsinfo.adb: Likewise.
11828 * xsnamest.adb: Likewise.
11829 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11830 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11831 * gcc-interface/misc.c: Likewise.
11832 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11833 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11834 ada/targext.o here...
11835 (GNAT_ADA_OBJS): ...and not here.
11836 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11837 (GNATBIND_OBJS): Reorder.
11839 2011-07-07 Richard Henderson <rth@redhat.com>
11841 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11842 dwarf2out_frame_init.
11844 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11846 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11848 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11851 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11853 2011-07-06 Richard Guenther <rguenther@suse.de>
11855 * gcc-interface/misc.c (gnat_init): Merge calls to
11856 build_common_tree_nodes and build_common_tree_nodes_2.
11857 Re-initialize boolean_false_node.
11859 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11860 Olivier Hainque <hainque@adacore.com>
11861 Nicolas Setton <setton@adacore.com>
11863 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11864 the type according to the ARTIFICIAL_P parameter.
11865 (create_type_decl): Likewise.
11866 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11868 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11870 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11871 (gnatbind): Likewise.
11873 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11875 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11877 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11879 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11880 local variable throughout. Remove useless call to Base_Type.
11881 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11882 Take it also into account for the volatileness of the field. Set the
11883 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11885 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11887 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11888 on a dereference built for a by-ref object if it has an address clause.
11890 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11892 * einfo.ads (Address_Taken): Document use for the second argument of
11893 Asm_Input and Asm_Output attributes.
11894 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11895 argument is an entity name, then set Address_Taken on it.
11896 <Attribute_Asm_Output>: Likewise.
11897 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11898 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11899 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11900 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11902 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11904 PR middle-end/46500
11905 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11907 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11909 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11910 (ada/utils.o): Update dependencies.
11911 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11912 ../../../libcpp/libcpp.a.
11913 * gcc-interface/utils.c: Include common/common-target.h.
11914 (process_attributes): Use targetm_common.have_named_sections.
11916 2011-06-07 Richard Guenther <rguenther@suse.de>
11918 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11921 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11923 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11924 TREE_THIS_NOTRAP flag.
11926 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11928 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11931 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11933 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11934 constants whose full view has discriminants specially.
11936 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11938 * gcc-interface/utils.c: Include diagnostic.h.
11939 (gnat_write_global_declarations): Output debug information for all
11940 global type declarations before finalizing the compilation unit.
11941 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11943 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11945 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11947 2011-05-25 Kai Tietz <ktietz@redhat.com>
11949 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11950 initialization instead of const/none-const pointer assignment.
11952 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11954 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11955 $(EXTRA_GNAT1_OBJS).
11956 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11957 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11958 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11959 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11960 libcommon-target.a instead of prefix.o.
11962 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11965 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11967 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11969 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11970 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11971 instead of version.o.
11973 2011-05-18 Kai Tietz <ktietz@redhat.com>
11975 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11976 boolean_false_node instead of integer_zero_node.
11977 (convert_with_check): Likewise.
11978 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11980 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11982 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11983 type of the parameter is an unconstrained array, convert the actual to
11984 the type of the formal in the In Out and Out cases as well.
11986 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11988 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11989 call build_function_type_array or build_varargs_function_type_array
11991 (create_subprog_type): Don't call build_function_type; call
11992 build_function_type_vec instead.
11994 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11996 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11997 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11998 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12000 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12002 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12004 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12005 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12007 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12009 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12011 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12013 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12014 instead of accessing TYPE_ARG_TYPES directly.
12015 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12017 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12020 * gcc-interface/gigi.h (get_variant_part): Declare.
12021 * gcc-interface/decl.c (get_variant_part): Make global.
12022 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12023 types have the same constant size, are record types and T1 has a
12024 variant part while T2 doesn't.
12026 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12028 * gcc-interface/utils.c (begin_subprog_body): Do not call
12030 (end_subprog_body): Likewise.
12032 2011-05-04 Richard Guenther <rguenther@suse.de>
12034 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12036 (pos_to_constructor): Likewise.
12038 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
12039 Eric Botcazou <ebotcazou@adacore.com>
12041 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12042 of build_function_type. Adjust calls to...
12043 (build_raise_check): ...this. Do not take a void_tree parameter.
12044 Call build_function_type_list instead of build_function_type.
12045 Fix head comment and swap couple of conditional blocks.
12047 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12049 * gnatvsn.ads (Library_Version): Bump to 4.7.
12050 (Current_Year): Bump to 2011.
12052 2011-04-29 Michael Matz <matz@suse.de>
12054 * gcc-interface/misc.c (gnat_handle_option): Set
12055 warn_maybe_uninitialized.
12057 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12059 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12060 the Watson/McCabe paper.
12062 2011-04-23 Jim Meyering <meyering@redhat.com>
12064 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12066 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12068 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12071 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12073 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12075 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12076 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12077 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12078 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12079 <all>: Do not set flags on the reused DECL node coming from an alias.
12080 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12081 don't need debug info here...
12082 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12083 (gigi): Adjust calls to create_subprog_decl.
12084 (build_raise_check): Likewise.
12085 (establish_gnat_vms_condition_handler): Likewise.
12086 (Compilation_Unit_to_gnu): Likewise.
12087 (gnat_to_gnu): Likewise.
12089 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12091 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12092 (NO_REORDER_ADAFLAGS): New variable.
12093 (EXTRA_GNATTOOLS): Always define.
12094 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12095 Clean up and adjust list of files compiled with special options.
12096 * gcc-interface/Make-lang.in: Likewise.
12097 (ada/decl.o): Cosmetical change.
12098 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12100 2011-04-20 Jim Meyering <meyering@redhat.com>
12102 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12104 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12106 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12107 $(CFLAGS) on the link line.
12109 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12111 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12112 padded type built for the return type if it is unconstrained.
12114 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12116 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12118 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12120 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12121 before calling TREE_CHAIN.
12122 * gcc-interface/misc.c (gnat_init_ts): New function.
12123 (LANG_HOOKS_INIT_TS): Define.
12125 2011-04-12 Martin Jambor <mjambor@suse.cz>
12127 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12128 instead of cgraph_node.
12130 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12132 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12133 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12136 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12138 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12139 of aggregate types that contain a placeholder.
12141 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12143 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12145 (handle_type_generic_attribute): Likewise.
12147 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12150 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12152 2011-04-04 Kai Tietz <ktietz@redhat.com>
12155 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12158 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12160 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12161 type case, do not strip a padding type around the array type.
12163 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12165 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12168 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12170 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12171 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12172 code for -feliminate-unused-debug-types.
12173 (gnat_post_options): Likewise.
12175 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12177 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12178 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12181 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12183 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12184 DECL_ARTIFICIAL flag on enumeration types.
12186 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12188 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12189 fat pointer types artificial unconditionally.
12190 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12193 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12195 * gcc-interface/gigi.h (get_dummy_type): Declare.
12196 (build_dummy_unc_pointer_types): Likewise.
12197 (finish_fat_pointer_type): Likewise.
12198 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12199 fat pointer type has been built, complete it in place.
12200 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12201 and thin pointers. Remove useless variable.
12202 (finish_fat_pointer_type): Make global and move to...
12203 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12204 (get_dummy_type): New function.
12205 (build_dummy_unc_pointer_types): Likewise.
12206 (gnat_pushdecl): Propage the name to the anonymous variants only.
12207 (update_pointer_to): Only adjust the pointer types in the unconstrained
12210 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12212 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12213 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12214 if this is a Taft amendment type and the full declaration is available.
12215 * gcc-interface/trans.c (process_type): Likewise.
12216 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12217 (process_freeze_entity): Likewise.
12218 * gcc-interface/utils.c (dummy_global): New static variable.
12219 (gnat_write_global_declarations): If there are types declared as used
12220 at the global level, insert them in the global hash table.
12222 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12224 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12225 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12226 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12228 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12229 flag of the type accordingly.
12230 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12232 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12234 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12235 finalizing types when updating the pointers to the designated type.
12236 <all>: Finalize the deferred types even if we didn't defer processing
12237 of incomplete types in this invocation.
12239 2011-04-01 Olivier Hainque <hainque@adacore.com>
12240 Nicolas Setton <setton@adacore.com>
12241 Eric Botcazou <ebotcazou@adacore.com>
12243 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12244 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12246 2011-03-28 Kai Tietz <ktietz@redhat.com>
12248 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12250 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12251 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12253 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12255 2011-03-28 Tristan Gingold <gingold@adacore.com>
12258 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12259 Use ada output of gnatbind.
12260 (ada/b_gnatb.adb): Ditto.
12261 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12262 (ada.mostlyclean, ada.stage1)
12263 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12264 (ada.stagefeedback): Adjust.
12265 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12266 Use ada output of gnatbind.
12267 (b_gnatm.adb): Ditto.
12268 (b_gnatl.o, b_gnatm.o): New rules.
12270 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12272 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12273 for the padded type built to support a specified size or alignment.
12275 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12277 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12278 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12279 unconditionally to the end of the unit when the designated type is
12281 <all>: Rename local variable. Attempt to un-defer types only and do it
12282 for limited_with'ed types as well.
12283 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12284 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12285 consistently and remove redundant call to finalize_from_with_types.
12287 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12289 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12290 subprograms without a previous spec declared in the same unit.
12291 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12292 subprograms at the end of the unit instead of at the beginning.
12293 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12294 isn't public for the special handling of non-inline functions nested
12295 inside inline external functions.
12297 2011-03-25 Jeff Law <law@redhat.com>
12299 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12301 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12303 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12304 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12305 to compute Set_Size_Depends_On_Discriminant.
12306 (Layout_Type): Call it on array types in back-end layout mode.
12307 * sem_util.adb (Requires_Transient_Scope): Return true for array
12308 types only if the size depends on the value of discriminants.
12309 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12310 type if the RHS is a call to a function that returns an unconstrained
12311 type with default discriminant.
12313 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12315 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12316 non-conversion to the nominal result type at the end.
12318 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12320 * gcc-interface/trans.c (create_temporary): New function taken from...
12321 (create_init_temporary): ...here. Call it.
12322 (call_to_gnu): Create the temporary for the return value early, if any.
12323 Create it for a function with copy-in/copy-out parameters if there is
12324 no target; in other cases of copy-in/copy-out, use another temporary.
12325 Push the new binding level lazily. Add and rename local variables.
12327 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12329 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12331 (set_rm_size): Likewise.
12333 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12335 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12336 for the padded type built in order to support a specified alignment.
12337 Fix incorrect formatting.
12339 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12342 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12344 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12346 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12347 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12348 to the end of the list. Adjust recursive call. Rename local variable.
12349 If REORDER is true, reorder components of the record type.
12350 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12351 components_to_record and adjust the parameter list.
12353 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12355 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12356 disabled, use the variable for bounds of loop iteration scheme.
12358 2011-03-21 Kai Tietz <ktietz@redhat.com>
12361 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12363 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12365 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12366 out whether the expression is read-only. Short-circuit placeholder
12367 case and rename a couple of local variables.
12369 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12371 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12372 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12373 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12374 (convert): Deal with conversions from a smaller form type specially.
12376 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12378 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12379 its argument, except for the special -I- switch.
12381 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12383 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12386 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12388 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12390 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12392 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12394 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12395 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12396 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12397 Do not generate the check directly, instead instantiate the template
12398 check present in the descriptor.
12399 (make_descriptor_field): Move around.
12400 (build_vms_descriptor32): Build a template check in the POINTER field.
12401 (build_vms_descriptor): Remove useless suffixes.
12402 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12404 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12407 * targext.c: Include target files if IN_RTS is defined.
12409 2011-01-26 Richard Guenther <rguenther@suse.de>
12412 * targext.c: Include config.h.
12413 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12416 2011-01-04 Pascal Obry <obry@adacore.com>
12417 Eric Botcazou <ebotcazou@adacore.com>
12419 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12421 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12423 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12424 end-of-case on the end label and its associated gotos, if any.
12426 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12428 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12429 expressions of the parameter cache within the statement group of
12430 the CICO mechanism.
12432 2011-01-04 Olivier Hainque <hainque@adacore.com>
12433 Eric Botcazou <ebotcazou@adacore.com>
12435 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12436 (set_end_locus_from_node): New function.
12437 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12438 make and the function end_locus.
12439 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12440 for the elaboration subprogram.
12441 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12442 set the end_locus of the expression as well.
12444 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12447 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12448 variables that are referenced in exception handlers volatile.
12452 Copyright (C) 2011 Free Software Foundation, Inc.
12454 Copying and distribution of this file, with or without modification,
12455 are permitted in any medium without royalty provided the copyright
12456 notice and this notice are preserved.