1 2011-08-29 Robert Dewar <dewar@adacore.com>
3 * a-convec.adb, exp_disp.adb: Minor reformatting.
5 2011-08-29 Tristan Gingold <gingold@adacore.com>
7 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
9 2011-08-29 Gary Dismukes <dismukes@adacore.com>
11 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
12 Exception_Handlers to No_List instead of Empty_List in the case where
13 there are no handlers.
15 2011-08-29 Tristan Gingold <gingold@adacore.com>
17 * gcc-interface/gigi.h (enum standard_datatypes): Add
19 (reraise_zcx_decl): New macro.
20 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
21 (gigi): Set reraise_zcx_decl.
22 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
23 (gnat_to_gnu): Handle N_Raise_Statement.
25 2011-08-29 Robert Dewar <dewar@adacore.com>
27 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
28 a-undesu.adb: Minor reformatting.
30 2011-08-29 Ed Schonberg <schonberg@adacore.com>
32 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
33 table, accept an unfrozen untagged component if it is an actual for a
34 formal incomplete type.
35 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
36 provide new iterator forms over vectors.
37 Introduce type Iterator in package body to implement operations of
38 Reversible_Iterator interface.
39 * a-iteint.ads: Make package pure so it is usable with new container
40 packages, that are categorized Remote_Types.
42 2011-08-29 Robert Dewar <dewar@adacore.com>
44 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
46 2011-08-29 Bob Duff <duff@adacore.com>
48 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
49 of <>, because this is the routine that checks for dimensionality
50 errors (for example, for a two-dimensional array, (others => <>) should
51 be (others => (others => <>)).
53 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
55 * impunit.adb: Add new run-time units.
56 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
57 s-stposu.ads, s-stposu.adb: Code clean up.
58 Handle protected class-wide or task class-wide types
59 Handle C/C++/CIL/Java types.
60 * s-spsufi.adb, s-spsufi.ads: New files.
62 2011-08-29 Yannick Moy <moy@adacore.com>
64 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
65 library-level subprogram.
66 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
68 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
70 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
72 * gnat_rm.texi: Update doc for Test_Case pragma.
74 2011-08-29 Tristan Gingold <gingold@adacore.com>
76 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
78 (GCC_Exception_Access): New type.
79 (Unwind_DeleteException): New imported procedure
80 (Foreign_Exception): Import it.
81 (GNAT_GCC_Exception): Simply have the occurrence inside.
82 (To_GCC_Exception): New function.
83 (To_GNAT_GCC_Exception): New function.
84 (GNAT_GCC_Exception_Cleanup): New procedure..
85 (Propagate_GCC_Exception): New procedure.
86 (Reraise_GCC_Exception): New procedure.
87 (Setup_Current_Excep): New procedure.
88 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
89 (Unwind_RaiseException): Ditto.
90 (Unwind_ForcedUnwind): Ditto.
92 (Begin_Handler): Change type of parameter.
93 (End_Handler): Ditto. Now delete the exception if still present.
95 (Is_Setup_And_Not_Propagated): Removed.
96 (Set_Setup_And_Not_Propagated): Ditto.
97 (Clear_Setup_And_Not_Propagated): Ditto.
98 (Save_Occurrence_And_Private): Ditto.
99 (EID_For): Add 'not null' constraint on parameter.
100 (Setup_Exception): Does nothing.
101 (Propagate_Exception): Simplified.
102 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
103 re-raise is not expanded anymore.
104 * s-except.ads (Foreign_Exception): New exception - placeholder for
106 * raise-gcc.c (__gnat_setup_current_excep): Declare
107 (CXX_EXCEPTION_CLASS): Define (not yet used)
108 (GNAT_EXCEPTION_CLASS): Define.
109 (is_handled_by): Handle foreign exceptions.
110 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
112 2011-08-29 Jose Ruiz <ruiz@adacore.com>
114 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
116 2011-08-29 Thomas Quinot <quinot@adacore.com>
118 * a-synbar-posix.adb: Minor reformatting.
120 2011-08-29 Jose Ruiz <ruiz@adacore.com>
122 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
123 a-exetim-default.ads (Interrupt_Clocks_Supported,
124 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
125 definitions to be compliant with AI-0171. The target systems do not
126 support separate account for the execution time of interrupt handlers.
128 2011-08-29 Jose Ruiz <ruiz@adacore.com>
130 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
131 in the barrier to put first the easiest to evaluate (and the one which
132 will be True more often). More efficient.
134 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
136 * s-atocou-x86.adb: Fix constraint in machine code insertion.
138 2011-08-29 Bob Duff <duff@adacore.com>
140 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
141 attributes that are now aspects, as specified by AI05-0229-1.
142 * sem_ch13.adb (Analyze_Aspect_Specifications,
143 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
144 pragmas or attribute references, as appropriate.
146 2011-08-29 Robert Dewar <dewar@adacore.com>
148 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
149 a-synbar-posix.ads: Minor reformatting.
151 2011-08-29 Yannick Moy <moy@adacore.com>
153 * snames.ads-tmpl: Add name Force.
155 2011-08-29 Pascal Obry <obry@adacore.com>
157 * prj-nmsc.adb: Minor reformatting.
159 2011-08-29 Jose Ruiz <ruiz@adacore.com>
161 * a-exetim.ads (Interrupt_Clocks_Supported,
162 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
163 definitions to be compliant with AI-0171.
165 2011-08-29 Robert Dewar <dewar@adacore.com>
167 * a-ngelfu.adb: Add comments.
169 2011-08-29 Geert Bosch <bosch@adacore.com>
171 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
172 the closest machine number to Pi / 2.0.
174 2011-08-29 Jose Ruiz <ruiz@adacore.com>
176 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
177 package Ada.Synchronous_Barriers.
178 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
179 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
180 default implementation using protected objects and another one
181 a-synbar-posix using POSIX barriers as the underlying support.
182 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
183 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
184 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
185 Clean up dependencies.
186 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
188 2011-08-29 Robert Dewar <dewar@adacore.com>
190 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
191 exp_dist.adb: Minor code reorganization.
194 2011-08-29 Thomas Quinot <quinot@adacore.com>
196 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
197 primitive operation must support external streaming if it is not a
198 controlling access result.
200 2011-08-29 Thomas Quinot <quinot@adacore.com>
202 * sinfo.ads, sem_ch7.adb: Minor reformatting.
204 2011-08-29 Bob Duff <duff@adacore.com>
206 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
207 restriction on allocators, as required by AI05-0013-1.
208 * restrict.ads: Minor comment fix.
210 2011-08-29 Tristan Gingold <gingold@adacore.com>
212 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
213 (To_Jmpbuf_Address): Ditto
214 (builtin_longjmp): Ditto
216 2011-08-29 Thomas Quinot <quinot@adacore.com>
218 * sem_res.adb: Minor reformatting.
220 2011-08-29 Vincent Celier <celier@adacore.com>
222 * make.adb (Gnatmake): Move special processing for VM targets after the
223 call to Get_Target_Parameters.
225 2011-08-29 Thomas Quinot <quinot@adacore.com>
227 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
229 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
231 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
232 where an anonymous access discriminant of a limited designated type
233 appears in a non-immutably limited discriminated type and issue an
234 error message. Add local variable Desig_T and replace all occurrences
237 2011-08-29 Jose Ruiz <ruiz@adacore.com>
239 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
240 implementation is compliant to RM D.15(15/2) after the modification
241 imposed by AI05-0094-1 (binding interpretation).
243 2011-08-29 Robert Dewar <dewar@adacore.com>
245 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
246 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
248 2011-08-29 Thomas Quinot <quinot@adacore.com>
250 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
251 the scope name, do not report a missing label as a style violation (it
252 will be diagnosed as an illegality).
253 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
254 variant records: Get_Enum_Lit_From_Pos already returns a usage
255 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
256 on Expr in Integer_Literal case so that it can be used by
259 2011-08-29 Tristan Gingold <gingold@adacore.com>
261 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
263 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
264 (Build_Abort_Block_Handler): New function to build an Abort_Signal
266 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
267 Build_Abort_Block_Handler to build the exception handler. Do not
268 undefer aborts for the Abort_Signal exception handler if back-end
270 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
271 back_end exceptions for all others and abort_signal.
272 * s-except.ads (ZCX_By_Default): New constant.
273 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
274 (Raise_Exception_Always): Ditto.
275 (Raise_From_Signal_Handler): Ditto.
276 (Raise_With_Location_And_Msg): Ditto.
277 (Raise_With_Msg): Ditto.
279 (Reraise_Occurence): Ditto.
280 (Reraise_Occurrence_Always): Ditto.
281 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
282 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
284 2011-08-29 Thomas Quinot <quinot@adacore.com>
286 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
288 2011-08-29 Robert Dewar <dewar@adacore.com>
290 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
291 Minor code reorganization.
293 2011-08-29 Bob Duff <duff@adacore.com>
295 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
296 2012, not just Ada 2005.
298 2011-08-29 Vincent Celier <celier@adacore.com>
300 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
301 with a project file or with gprbuid, if -gnatep= is specified, the
302 builder may need to be invoked with -x.
304 2011-08-29 Tristan Gingold <gingold@adacore.com>
306 * a-exexpr-gcc.adb: Minor comment fix.
308 2011-08-29 Robert Dewar <dewar@adacore.com>
310 * sem_ch8.adb: Minor reformatting.
312 2011-08-29 Bob Duff <duff@adacore.com>
314 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
315 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
316 treating "some" as unreserved in earlier Ada versions. This is now
317 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
318 rather than Name_Some, since Tok_Some is now recognized as reserved.
319 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
321 * scans.ads: Minor comment fixes.
322 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
323 for other language versions.
324 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
325 treating "some" as unreserved in earlier Ada versions. This is now
326 handled in Snames.Is_Keyword_Name.
327 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
329 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
330 unreserved in earlier Ada versions. This is now handled in
331 Snames.Is_Keyword_Name.
332 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
333 words as for other language versions.
334 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
335 Ada 2012, not just Ada 2005.
337 2011-08-29 Ed Schonberg <schonberg@adacore.com>
339 * sem_ch13.adb: Additional semantic checks for aspects involved in
342 2011-08-29 Matthew Heaney <heaney@adacore.com>
344 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
345 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
347 (Ancestor_Find): ditto.
349 2011-08-29 Thomas Quinot <quinot@adacore.com>
351 * par-endh.adb: Minor reformatting.
353 2011-08-29 Tristan Gingold <gingold@adacore.com>
355 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
356 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
357 (Adjust_N_CLeanups_For): Remove.
358 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
360 (Propgate_Exception): Adjust.
361 * raise-gcc.c: Add a few static/const.
362 (Adjust_N_Cleanups_For): Remove declaration.
363 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
365 2011-08-29 Ed Schonberg <schonberg@adacore.com>
367 * sem_ch8.adb: Use type of function return when rewriting as object
370 2011-08-29 Gary Dismukes <dismukes@adacore.com>
372 * sem_type.adb: Minor reformatting.
374 2011-08-29 Robert Dewar <dewar@adacore.com>
376 * makeutl.adb: Minor reformatting.
378 2011-08-29 Ed Schonberg <schonberg@adacore.com>
380 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
381 function call of a limited type, the expansion of the renaming is
382 complicated by the presence of various temporaries and subtypes that
383 capture constraints of the renamed object.
384 Rewrite node as an object declaration, whose expansion is simpler.
385 Given that the object is limited there is no copy involved and no
388 2011-08-29 Robert Dewar <dewar@adacore.com>
390 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
391 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
393 2011-08-29 Tristan Gingold <gingold@adacore.com>
395 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
396 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
397 system-linux-hppa.ads, system-linux-s390.ads,
398 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
399 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
400 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
401 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
402 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
403 system-solaris-sparc.ads, system-lynxos-x86.ads,
404 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
405 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
406 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
407 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
408 system-vxworks-x86.ads: Remove GCC_ZCX_Support
409 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
410 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
411 * opt.ads: Adjust comment.
412 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
413 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
414 * system.ads: Move GCC_ZCX_Support to obsolete entries.
416 2011-08-29 Emmanuel Briot <briot@adacore.com>
418 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
419 file name is specified on the gnatmake or gprbuild command line, and
420 before we search for that file in the project.
422 2011-08-29 Ed Schonberg <schonberg@adacore.com>
424 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
425 used to determine whether a possible interpretation for an overloadable
426 entity is declared within the current instantiation and should be
427 included in the candidate set.
429 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
431 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
433 2011-08-29 Ed Schonberg <schonberg@adacore.com>
435 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
436 access subtype is access_to_subprogram, when applying checks for
439 2011-08-29 Matthew Heaney <heaney@adacore.com>
441 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
442 for sibling when common parent.
444 2011-08-29 Thomas Quinot <quinot@adacore.com>
446 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
449 2011-08-29 Ed Schonberg <schonberg@adacore.com>
451 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
452 for the return type when in ASIS mode.
454 2011-08-29 Vincent Celier <celier@adacore.com>
456 * make.adb (Gnatmake): Get the default search dirs, then the target
457 parameters after getting the Builder switches, as the Builder switches
458 may include --RTS= and that could change the default search dirs.
460 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
462 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
463 Make_Final_Call. Move the processing for class-wide types before the
464 processing for derivations from [Limited_]Controlled.
465 (Make_Final_Call): Move the processing for class-wide types before the
466 processing for derivations from [Limited_]Controlled.
467 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
468 Add code to account for alignments larger than the list header. Add a
469 comment illustrating the structure of the allocated object + padding +
471 (Deallocate_Any_Controlled): Add code to account for alignments larger
472 than the list header.
474 2011-08-29 Ed Schonberg <schonberg@adacore.com>
476 * sinfo.ads, sinfo.adb: New node kind
477 N_Formal_Incomplete_Type_Definition, related flags.
478 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
479 Parse formal incomplete types.
480 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
482 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
483 Formal incomplete types do not need completion.
484 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
485 Validate_Incomplete_Type_Instance): New procedures to handle formal
487 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
488 that corresponds to a formal incomplete type.
489 * sprint.adb: Handle formal incomplete type declarations.
490 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
493 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
495 * a-fihema.ads, a-fihema.adb: Unit removed.
496 * a-undesu.ads, a-undesu.adb: New unit implementing
497 Ada.Unchecked_Deallocate_Subpool.
498 * einfo.adb: Remove Associated_Collection from the node usage.
499 Add Finalization_Master to the node usage.
500 (Associated_Collection): Removed.
501 (Finalization_Master): New routine.
502 (Set_Associated_Collection): Removed.
503 (Set_Finalization_Master): New routine.
504 (Write_Field23_Name): Remove Associated_Collection from the output. Add
505 Finalization_Master to the output.
506 * einfo.ads: Remove attribute Associated_Collection and its uses in
508 Add new attribute Finalization_Master along with its uses in entitites.
509 (Associated_Collection): Removed along with its pragma import.
510 (Finalization_Master): New routine along with a pragma import.
511 (Set_Associated_Collection): Removed along with its pragma import.
512 (Set_Finalization_Master): New routine along with a pragma import.
513 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
514 Build_Finalization_Collection with Build_Finalization_Master.
515 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
516 before the bodies of the predefined routines. Add comment explaining
517 this. Replace call to Build_Finalization_Collection with
518 Build_Finalization_Master.
519 (Freeze_Type): Replace call to Build_Finalization_Collection with
520 Build_Finalization_Master.
521 (Make_Finalize_Address_Body): Comment reformatting.
522 (Make_Predefined_Primitive_Specs): Code reformatting.
523 (Stream_Operation_OK): Update comment mentioning finalization
524 collections. Replace RE_Finalization_Collection with
525 RE_Finalization_Master.
526 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
527 Associated_Collection with Finalization_Master. Replace call to
528 Build_Finalization_Collection with Build_Finalization_Master.
529 (Expand_Allocator_Expression): Replace call to Associated_Collection
530 with Finalization_Master. Replace call to Set_Associated_Collection with
531 Set_Finalization_Master. Remove the generation of
532 Set_Finalize_Address_Ptr.
533 (Expand_N_Allocator): Replace call to Associated_Collection with
534 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
535 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
536 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
537 comment on usage. Replace call to Needs_BIP_Collection with
538 Needs_BIP_Finalization_Master Remplace BIP_Collection with
539 BIP_Finalization_Master. Update all comments which mention finalization
540 collections. Replace Associated_Collection with
541 Finalization_Master. Replace Build_Finalization_Collection with
542 Build_Finalization_Master.
543 (BIP_Formal_Suffix): Update BIP_Collection's case.
544 (Build_Heap_Allocator): Update the related comment. Rename local
545 variable Collect to Fin_Mas_Id and update its occurrences. Update
546 comments which mention finalization collections. Replace
547 Set_Associated_Collection with Set_Finalization_Master.
548 (Expand_Call): Update the code which detects a special piece of library
550 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
551 Add_Collection_Actual_To_Build_In_Place_Call with
552 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
553 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
554 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
555 Add_Collection_Actual_To_Build_In_Place_Call with
556 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
557 (Make_Build_In_Place_Call_In_Assignment): Replace call to
558 Add_Collection_Actual_To_Build_In_Place_Call with
559 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
560 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
561 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
562 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
563 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
564 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
565 Replace call to Set_Associated_Collection with Set_Finalization_Master.
566 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
567 Replace the call to Associated_Collection with Finalization_Master.
568 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
569 Update the way finalization master names are generated. Update the
570 retrieval of the correct access type which will carry the pool and
572 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
573 (Make_Finalize_Address_Body): Abstract types do not need
574 Finalize_Address. Code reformatting.
575 (Make_Finalize_Address_Stmts): Update comment on usage.
576 (Make_Set_Finalize_Address_Ptr_Call): Removed.
577 (Process_Declarations): Update comments.
578 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
579 Build_Finalization_Master. Update associated comment.
580 (Make_Set_Finalize_Address_Ptr_Call): Removed.
581 * exp_ch13.adb: Update comments which mention finalization collections.
582 (Expand_N_Free_Statement): Replace the call to Associated_Collection
583 with Finalization_Master.
584 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
585 create calls to routines Allocate_Any_Controlled and
586 Deallocate_Any_Controlled.
587 (Find_Finalize_Address): New routine.
588 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
590 (Requires_Cleanup_Actions): Update the comment on freeze node
592 * exp_util.ads: Remove comment on generated code for
593 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
594 is better to simply look in the body.
595 * freeze.adb (Freeze_All): Update the comment of finalization
596 collections. Replace the call to Associated_Collection with
597 Finalization_Master. Replace the call to Build_Finalization_Collection
598 with Build_Finalization_Master.
599 * impunit.adb: Add a-undesu and s-stposu to the list of units.
600 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
602 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
603 Ada.Finalization. Add processing for children of System.Storage_Pools.
604 * rtsfind.ads: Remove the naming of second level children of
606 Remove Ada_Finalization_Heap_Management from the list of units.
607 Remove subtype Ada_Finalization_Child.
608 Remove the following subprogram entities:
612 RE_Finalization_Collection
613 RE_Finalization_Collection_Ptr
614 RE_Set_Finalize_Address_Ptr
616 Add the naming of second level children of System.Storage_Pools.
617 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
619 Add subtype System_Storage_Pools_Child.
620 Add the following subprogram entities to System.Finalization_Masters:
622 RE_Finalization_Master
623 RE_Finalization_Master_Ptr
625 Add the following subprogram entities to System.Storage_Pools.Subpools:
627 RE_Allocate_Any_Controlled
628 RE_Deallocate_Any_Controlled
629 RE_Root_Storage_Pool_With_Subpools
633 Move the following subprogram entities from
634 Ada.Finalization.Heap_Management to System.Finalization_Masters:
636 RE_Add_Offset_To_Address
641 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
642 Set_Associated_Collection with Set_Finalization_Master.
643 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
644 BIP_Finalization_Master is created.
645 * s-finmas.adb: New unit System.Finalization_Masters.
646 * s-finmas.ads: New unit System.Finalization_Masters.
647 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
648 * s-stposu.ads, s-stposu.adb: New unit implementing
649 System.Storage_Pools.Subpools.
651 2011-08-29 Bob Duff <duff@adacore.com>
653 * tbuild.adb: Add assertion.
655 2011-08-29 Thomas Quinot <quinot@adacore.com>
657 * s-pooglo.adb: Minor reformatting.
659 2011-08-29 Ed Schonberg <schonberg@adacore.com>
661 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
662 an indexed component of a packed array whose element type is a record
663 with a representation clause different from that of the right-hand
664 side, generate a temporary to minimuze the number of bit-field
665 operations generated.
667 2011-08-29 Ed Schonberg <schonberg@adacore.com>
669 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
670 declarations, and thus are likely insertion points for actions.
672 2011-08-29 Bob Duff <duff@adacore.com>
674 * einfo.ads: Minor comment fix.
676 2011-08-29 Robert Dewar <dewar@adacore.com>
678 * frontend.adb, gnat1drv.adb: Minor reformatting.
680 2011-08-29 Tristan Gingold <gingold@adacore.com>
682 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
683 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
684 space in front of the header.
686 2011-08-29 Johannes Kanig <kanig@adacore.com>
688 * frontend.adb (Frontend): Exit after creating Standard package when
690 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
693 2011-08-29 Robert Dewar <dewar@adacore.com>
695 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
696 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
697 snames.ads-tmpl: Minor reformatting.
699 2011-08-29 Philippe Gil <gil@adacore.com>
701 * prj.adb (Reset_Units_In_Table): New procedure.
702 Reset units to avoid access to freed memory.
704 2011-08-29 Thomas Quinot <quinot@adacore.com>
706 * get_scos.adb: When reading a P statement SCO without a pragma name
707 (from an older ALI file), ensure that the Pragma_Name component is set
708 to Unknown_Pragma (not left uninitialized).
710 2011-08-29 Vincent Celier <celier@adacore.com>
712 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
713 modified to compute correctly the object path of a SAL project that is
714 extending another library project.
715 (Write_Path_File): New procedure.
716 * makeutl.ads (Directories): New table moved from Buildgpr
717 (Get_Directories): New procedure moved from Buildgpr
718 (Write_Path_File): New procedure
719 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
720 paths before binding SALs, instead of Set_Ada_Paths.
721 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
723 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
724 (Current_Source_Path_File_Of): New function
725 (Set_Current_Object_Path_File_Of): New procedure
726 (Current_Source_Object_File_Of): New function
727 (Set_Current_Object_Path_File_Of): New procedure
728 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
729 (Current_Source_Path_File_Of): New function
730 (Set_Current_Object_Path_File_Of): New procedure
731 (Current_Source_Object_File_Of): New function
732 (Set_Current_Object_Path_File_Of): New procedure
734 2011-08-29 Ed Schonberg <schonberg@adacore.com>
736 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
737 packed entity, use a bit-field assignment only if there is no change of
740 2011-08-29 Thomas Quinot <quinot@adacore.com>
742 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
743 Is_RTU instead of using Chars comparisons.
745 2011-08-29 Thomas Quinot <quinot@adacore.com>
747 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
748 temporary object if the actual is constrained, and the discriminants
749 read from the stream don't match.
751 2011-08-29 Tristan Gingold <gingold@adacore.com>
753 * sem_attr.adb, exp_attr.adb: Add handling of
754 Attribute_System_Allocator_Alignment
755 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
756 Attribute_System_Allocator_Alignment.
757 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
758 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
759 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
760 get_target_system_allocator_alignment.
762 2011-08-29 Arnaud Charlet <charlet@adacore.com>
764 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
767 2011-08-29 Arnaud Charlet <charlet@adacore.com>
769 * exp_ch3.adb (In_Runtime): Fix typo.
771 2011-08-29 Bob Duff <duff@adacore.com>
773 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
775 2011-08-29 Ed Schonberg <schonberg@adacore.com>
777 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
778 and a separate tag assignment is generated, ensure that the tag
779 assignment is analyzed.
781 2011-08-29 Ed Schonberg <schonberg@adacore.com>
783 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
784 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
785 of statement lists that may contain local declarations.
786 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
787 duplicate the triggering statements needed for the expansion of this
788 construct, when the trigger is a dispatching call to a synchronized
791 2011-08-29 Arnaud Charlet <charlet@adacore.com>
793 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
794 * bindgen.adb: Add comments.
795 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
798 2011-08-29 Robert Dewar <dewar@adacore.com>
800 * exp_attr.adb: Minor reformatting.
801 Minor code reorganization and commenting.
802 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
805 2011-08-29 Thomas Quinot <quinot@adacore.com>
807 * get_scos.adb: Ignore chaining indicators not currently supported
810 2011-08-29 Arnaud Charlet <charlet@adacore.com>
812 * system.ads: Minor editing.
814 2011-08-29 Arnaud Charlet <charlet@adacore.com>
816 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
818 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
819 Attribute_Elab_Subp_Body.
820 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
821 * sem_util.adb: Update comments.
823 2011-08-29 Thomas Quinot <quinot@adacore.com>
825 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
826 pragma name for each SCO statement corresponding to a pragma.
828 2011-08-29 Arnaud Charlet <charlet@adacore.com>
830 * opt.ads: Minor editing.
832 2011-08-29 Yannick Moy <moy@adacore.com>
834 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
835 that only made sense for CodePeer mode.
837 2011-08-29 Jose Ruiz <ruiz@adacore.com>
839 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
840 which is no longer used.
841 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
842 handling of the 64-bit division check.
843 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
845 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
848 2011-08-29 Thomas Quinot <quinot@adacore.com>
850 * get_scos.adb: Minor reformatting.
852 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
854 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
855 statement list is wrapped in a block, the block is explicitly analyzed
856 in order to properly redecorate the entities and create a servicing
859 2011-08-29 Tristan Gingold <gingold@adacore.com>
861 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
862 (Set_Zero_Cost_Handling): Remove.
864 2011-08-29 Thomas Quinot <quinot@adacore.com>
866 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
868 2011-08-29 Geert Bosch <bosch@adacore.com>
870 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
871 instruction, as the latter may produce -0.0, which is not a valid VAX
873 (Neg_G): Likewise for VAX F float.
875 2011-08-29 Robert Dewar <dewar@adacore.com>
877 * exp_util.adb: Minor reformatting.
879 2011-08-29 Yannick Moy <moy@adacore.com>
881 * sem_ch3.adb: Minor comment update.
883 2011-08-29 Thomas Quinot <quinot@adacore.com>
885 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
888 2011-08-29 Thomas Quinot <quinot@adacore.com>
890 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
891 current statement sequence on a generic instantiation or a subprogram
894 2011-08-29 Robert Dewar <dewar@adacore.com>
896 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
899 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
901 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
902 Correct the check which involves the freeze node of a controlled or
903 access-to-controlled type.
905 2011-08-29 Geert Bosch <bosch@adacore.com>
907 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
909 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
912 2011-08-29 Yannick Moy <moy@adacore.com>
914 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
915 for every index type and component type that is not a subtype_mark.
916 (Process_Subtype): Set Etype of subtype.
918 2011-08-29 Robert Dewar <dewar@adacore.com>
920 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
921 reorganization. Minor reformatting.
923 2011-08-29 Steve Baird <baird@adacore.com>
925 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
926 for CodePeer and ALFA modes.
928 2011-08-29 Ed Schonberg <schonberg@adacore.com>
930 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
931 that comes from an enclosing scope if it is not the renaming of an
932 actual, to handle properly a spurious ambiguity in an instance.
934 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
936 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
937 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
938 use it instead of the Esize of the first parameter.
939 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
941 <Size>: Likewise. Call it for composite types on the RM size.
943 2011-08-29 Yannick Moy <moy@adacore.com>
945 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
946 * sem_util.adb (Unique_Name): Correct behaviour for names of
949 2011-08-29 Yannick Moy <moy@adacore.com>
951 * sem_prag.adb (Check_Precondition_Postcondition): In formal
952 verification mode, analyze pragma expression for correctness, for
953 pre/post on library-level subprogram, as it is not expanded later.
955 2011-08-29 Yannick Moy <moy@adacore.com>
957 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
958 in formal verification.
960 2011-08-29 Thomas Quinot <quinot@adacore.com>
962 * sem_util.adb: Minor reformatting.
963 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
965 * par_sco.ads, par_sco.adb: Update comments.
967 2011-08-29 Yannick Moy <moy@adacore.com>
969 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
970 associated getter/setter.
971 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
973 2011-08-29 Vincent Celier <celier@adacore.com>
975 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
976 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
977 with declarations for Language_Kind and Dependency_Kind for Ada.
978 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
979 (Process_Compiler): Take into account the new attributes Dependency_Kind
981 (Check_Configuration): Check if language kind is unit based, not if the
982 language name is Ada.
983 (Process_Exceptions_Unit_Based): Ditto
984 (Add_Language): Remove default additions of language and dependency kind
985 * prj.ads: Minor comment change
986 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
988 2011-08-29 Johannes Kanig <kanig@adacore.com>
990 * debug.adb: Update comments.
992 2011-08-24 Joseph Myers <joseph@codesourcery.com>
994 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
995 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
996 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
997 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
998 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
1000 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1002 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
1003 (GNATLIBCFLAGS_FOR_C): Replace
1004 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
1005 (gnatlib-shared-default, gnatlib-shared-dual-win32)
1006 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
1007 (gnatlib-sjlj, gnatlib-zcx): Likewise.
1009 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
1011 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
1013 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
1015 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
1017 2011-08-05 Nicolas Roche <roche@adacore.com>
1019 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
1020 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
1022 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
1024 2011-08-05 Matthew Heaney <heaney@adacore.com>
1026 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
1027 subprogram bodies declared out-of-order.
1029 2011-08-05 Yannick Moy <moy@adacore.com>
1031 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
1032 entities directly in package Standard, otherwise skip the standard
1035 2011-08-05 Robert Dewar <dewar@adacore.com>
1037 * a-cbmutr.adb: Minor reformatting
1038 (Allocate_Node): refactor node allocation algorithm
1040 2011-08-05 Robert Dewar <dewar@adacore.com>
1042 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
1043 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
1045 (Analyze_Pragma, case Check_Policy): Ditto.
1046 * sem_prag.ads (Check_Disabled): New function
1047 * snames.ads-tmpl: Add Name_Disable.
1049 2011-08-05 Robert Dewar <dewar@adacore.com>
1051 * gnat_rm.texi: Document implementation-defined policy DISABLE for
1052 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
1054 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1056 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
1057 that appears in a generic formal part and applies to a formal
1060 2011-08-05 Robert Dewar <dewar@adacore.com>
1062 * a-cbmutr.ads: Minor reformatting.
1064 2011-08-05 Matthew Heaney <heaney@adacore.com>
1066 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
1067 to check count, check sign of value instead.
1068 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
1069 (Copy_Subtree): allocate copy of source element
1070 (Equal_Subtree): compare elements, not access objects
1072 2011-08-05 Vincent Celier <celier@adacore.com>
1074 * gnat_ugn.texi: Fix VMS alternative.
1076 2011-08-05 Thomas Quinot <quinot@adacore.com>
1078 * sem_ch11.adb: Add comment.
1080 2011-08-05 Robert Dewar <dewar@adacore.com>
1082 * exp_util.adb: Minor comment fix.
1084 2011-08-05 Robert Dewar <dewar@adacore.com>
1086 * scng.adb (Error_Unterminated_String): Improve flag position when
1089 2011-08-05 Matthew Heaney <heaney@adacore.com>
1091 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
1093 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
1094 multiway tree containers.
1096 2011-08-05 Robert Dewar <dewar@adacore.com>
1098 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
1099 * stylesw.adb: Implement -gnatyC to control comment spacing
1100 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
1102 * usage.adb: Add line for -gnatyC.
1104 2011-08-05 Robert Dewar <dewar@adacore.com>
1106 * gnat_ugn.texi: Document -gnatyC.
1107 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
1108 synonym for COMMENTS2).
1110 2011-08-05 Robert Dewar <dewar@adacore.com>
1112 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
1113 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
1114 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
1115 a-comutr.ads, lib-xref.adb: Minor reformatting.
1117 2011-08-05 Robert Dewar <dewar@adacore.com>
1119 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
1120 warning if there is an exception handler present.
1122 2011-08-05 Pascal Obry <obry@adacore.com>
1124 * a-iteint.ads: Fix copyright year.
1126 2011-08-05 Thomas Quinot <quinot@adacore.com>
1128 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
1129 statement SCO for a USE clause or a representation clause.
1131 2011-08-05 Yannick Moy <moy@adacore.com>
1133 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
1134 between body and spec for stub.
1135 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
1136 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
1137 pragma precondition or postcondition, for which the enclosing
1138 subprogram or package in the AST is not the desired one, return empty.
1140 2011-08-05 Thomas Quinot <quinot@adacore.com>
1142 * g-expect.adb: Minor reformatting.
1144 2011-08-05 Bob Duff <duff@adacore.com>
1146 * a-fihema.adb: Comment out OS_Lib.
1148 2011-08-05 Matthew Heaney <heaney@adacore.com>
1150 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1151 (unbounded multiway tree containers) and a-iteint.ads.
1152 * a-comutr.ads, a-comutr.adb:
1153 This is the new Ada 2012 unit for unbounded multiway tree containers
1154 * a-cimutr.ads, a-cimutr.adb
1155 This is the new Ada 2012 unit for indefinite multiway tree containers
1156 * a-iteint.ads: New file.
1158 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1160 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1162 2011-08-05 Bob Duff <duff@adacore.com>
1164 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1166 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1168 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1170 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1171 general indexing aspects of Ada2012. Called when analyzing indexed
1172 components when other interpretations fail.
1173 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1174 in an expression context where overloading is meaningful. This excludes
1175 the occurrence in an aspect specification (efficiency only).
1176 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1177 related to iterators can be set by an attribute specification, but
1179 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1180 Constant_Indexing and Variable_Indexing.
1181 (Check_Indexing_Functions): New procedure to perform legality checks.
1182 Additional semantic checks at end of declarations.
1184 2011-08-05 Sergey Rybin <rybin@adacore.com>
1186 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1187 order of calling Tree_Write/Tree_Read routines made for aspects.
1189 2011-08-05 Bob Duff <duff@adacore.com>
1191 * a-fihema.adb (Finalize): Fix race condition.
1193 2011-08-05 Yannick Moy <moy@adacore.com>
1195 * sem_ch12.adb (Analyze_Package_Instantiation,
1196 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1199 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1201 * sem_type.adb (Specific_Type): in an instance, the type-specific
1202 operand of an equality check that involves null may have a private
1203 type. Use full view to determine legality of construct.
1205 2011-08-05 Vincent Celier <celier@adacore.com>
1207 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1208 delete or close the file when the call to gnatmake was successful.
1210 2011-08-05 Yannick Moy <moy@adacore.com>
1212 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1213 Global_Discard_Names.
1215 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1217 * sinfo.ads: comments on use of entity field for aspect specifications.
1219 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1221 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1222 node is not itself an entity but a selected component, it is a
1223 rewritten parameterless call to an en enclosing synchronized operation,
1224 and this expansion will be performed again in the instance, so there is
1225 no global information to preserve.
1227 2011-08-05 Javier Miranda <miranda@adacore.com>
1229 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1230 for renamings of predefined primitives.
1231 (In_Predef_Prims_DT): New subprogram.
1233 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1235 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1236 possible interpretation of name is a reference type, add an
1237 interpretation that is the designated type of the reference
1238 discriminant of that type.
1239 * sem_res.adb (resolve): If the interpretation imposed by context is an
1240 implicit dereference, rewrite the node as the deference of the
1241 reference discriminant.
1242 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1243 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1244 parent type or base type.
1245 * sem_ch4.adb (Process_Indexed_Component,
1246 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1247 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1248 Check for implicit dereference.
1249 (List_Operand_Interps): Indicate when an implicit dereference is
1251 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1253 2011-08-05 Thomas Quinot <quinot@adacore.com>
1255 * scos.ads: Update documentation of SCO table. Pragma statements can now
1256 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1257 * par_sco.ads, par_sco.adb: Implement the above change.
1258 (Process_Decisions_Defer): Generate a P decision for the first parameter
1259 of a dyadic pragma Debug.
1260 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1262 * put_scos.adb: Code simplification based on above change.
1264 2011-08-05 Robert Dewar <dewar@adacore.com>
1266 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1267 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1268 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1269 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1271 2011-08-05 Bob Duff <duff@adacore.com>
1273 * a-stunau.ads, g-spipat.adb: Update comments.
1275 2011-08-05 Bob Duff <duff@adacore.com>
1277 * a-fihema.ads: Minor comment fix.
1278 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1280 (Attach, Detach): Remove some unnecessary code.
1281 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1283 2011-08-05 Bob Duff <duff@adacore.com>
1285 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1286 allocation for Objects component. This simplifies the code somewhat. It
1287 is also a little more efficient in the not-so-unusual case where there
1288 are no controlled objects allocated.
1289 Make Finalization_Started flag atomic.
1290 (Finalize): Avoid unnecessary detachment of items from the list.
1291 (pcol): Minor cleanup.
1293 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1295 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1296 package whose name is the same as that of the generic unit, or its
1299 2011-08-05 Bob Duff <duff@adacore.com>
1301 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1302 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1303 Minor comment fixes.
1305 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1307 * make.adb (Linking_Phase): No longer need to set source search path
1308 before calling gnatlink in CodePeer mode.
1309 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1310 gcc in CodePeer mode, since the binder generated file no longer has a
1312 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1313 * switch-c.adb: Update comment.
1315 2011-08-05 Thomas Quinot <quinot@adacore.com>
1317 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1319 2011-08-05 Nicolas Roche <roche@adacore.com>
1321 * gnat_ugn.texi: Fix minor syntax error issue.
1323 2011-08-05 Vincent Celier <celier@adacore.com>
1325 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1326 delete or close the file when the call to gnatmake returns a non
1327 successful return code.
1329 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1331 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1332 check, indicate that the copy of the original node does not come from
1333 source, to prevent an infinite recursion of the expansion.
1335 2011-08-05 Johannes Kanig <kanig@adacore.com>
1337 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1338 VC generation for subprogram bodies.
1340 2011-08-05 Yannick Moy <moy@adacore.com>
1343 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1344 the base type with the smallest allowed base type.
1346 2011-08-05 Sergey Rybin <rybin@adacore.com>
1348 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1351 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1353 * sem_ch12.ads: minor comment updates.
1355 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1357 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1358 instantiation and a formal package the compiler generates a package
1359 renaming declaration so that the generic name within the declaration
1360 is interpreted as a renaming of the instance. At the end of a formal
1361 package declaration, this renaming must become invisible.
1363 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1365 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1366 comparison and rely on concrete entities instead.
1368 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1370 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1371 and discriminants, to indicate that the type has an access discriminant
1372 that supports implicit dereference.
1373 * snames.ads-tmpl: Add names of aspects and attributes related to
1374 Ada2012 iterators: constant_indexing, default_iterator,
1375 iterator_element, implicit_dereference, variable_indexing.
1376 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1377 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1378 iterator-related aspects.
1379 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1381 2011-08-05 Sergey Rybin <rybin@adacore.com>
1383 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1384 metrics in gnatmetric to cover new kinds of coupling mentrics.
1386 2011-08-05 Steve Baird <baird@adacore.com>
1388 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1389 of calling the user-defined main subprogram.
1390 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1391 is set) Call_Main_Subprogram ahead of, as opposed to
1393 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1394 generation of a "with" of the user-defined main subprogram.
1395 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1396 (which is now called from Gen_Main instead).
1398 2011-08-05 Emmanuel Briot <briot@adacore.com>
1400 * projects.texi: Added reference to the Makefile package.
1402 2011-08-05 Thomas Quinot <quinot@adacore.com>
1404 * exp_ch7.adb: Minor comment rewording.
1406 2011-08-05 Ed Falis <falis@adacore.com>
1408 * env.c: Fix comment.
1410 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1412 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1413 character comparison and rely on concrete entities instead.
1415 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1417 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1418 suggested by AI95-0068.
1420 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1422 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1423 the two potential initialization calls. This accounts for any
1424 access-before-elaboration checks which may precede the initialization
1426 (Next_Suitable_Statement): New routine. Returns the next real statement
1427 after the input node while skipping generated checks.
1428 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1429 with comment on usage.
1430 Do not generate Elaborate_All when the trigger is a finalization call
1431 coming from a type init proc.
1432 (Check_Elab_Call): Propagate the initialization procedure context to
1433 subsequent calls to Check_A_Call.
1434 (Check_Internal_Call_Continue): Propagate the initialization procedure
1435 context to subsequent calls to Check_Elab_Call.
1436 (Is_Finalization_Procedure): New routine. Returns True if the input
1437 entity denotes a [Deep_]Finalize routine.
1438 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1439 along with comment on usage.
1441 2011-08-05 Vadim Godunko <godunko@adacore.com>
1443 * s-atocou.ads: Add list of supported platforms.
1445 2011-08-05 Yannick Moy <moy@adacore.com>
1447 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1449 * opt.ads (Disable_ALI_File): new Boolean flag
1450 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1452 2011-08-05 Ed Falis <falis@adacore.com>
1454 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1455 environ is properly defined.
1457 2011-08-05 Vincent Celier <celier@adacore.com>
1459 * make.adb (Compilation_Phase): Exit immediately when all objects have
1460 been found up to date, to avoid multiple exit messages.
1461 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1462 same project for languages with no compiler.
1463 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1465 2011-08-05 Robert Dewar <dewar@adacore.com>
1467 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1468 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1469 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1470 s-atocou-builtin.adb: Minor reformatting.
1472 2011-08-05 Yannick Moy <moy@adacore.com>
1474 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1475 if the node to wrap is a pragma check, this node and enclosed
1476 expression are not expanded, so do not apply any transformations here.
1477 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1478 introducing transient scopes.
1480 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1482 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1483 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1484 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1485 routine is available, so we use the default implementation of these
1487 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1488 support for copying attributes on VxWorks 6.
1490 2011-08-05 Yannick Moy <moy@adacore.com>
1492 * debug.adb: Remove use of -gnatd.D.
1493 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1494 * opt.ads: Simplify variables for ALFA mode, to keep one only
1495 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1498 2011-08-05 Vincent Celier <celier@adacore.com>
1500 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1501 Builder'Default_Switches.
1503 2011-08-05 Vincent Celier <celier@adacore.com>
1505 * makeusg.adb: Add lines for --create-map-file switches.
1507 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1509 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1510 profile is incomplete and the full view is available, replace it with
1512 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1513 incomplete, freezing the subprogram is delayed until the full view is
1515 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1516 fixed-point multiplication operator and the predefined operator is
1517 resolved in favor of the user-defined one.
1519 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1521 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1524 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1526 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1527 whether a type lacks user-defined Read or Write operations, or has a
1528 component that lacks them.
1529 * sem_attr.adb (Check_Stream_Attribute): if restriction
1530 No_Default_Stream_Attributes is active, verify that all subcomponent
1531 types of the target have user-defined stream operations, and report
1533 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1534 * exp_strm.adb: Build_Elementary_Input_Call,
1535 Build_Elementary_Write_Call): remove checks for restriction
1536 No_Default_Stream_Attributes, now checked in semantics.
1538 2011-08-04 Vincent Celier <celier@adacore.com>
1540 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1541 switches on the command line, look for all valid --RTS switches in the
1542 Builder switches and for each language use the first runtime name found
1543 to invoke gprconfig.
1544 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1545 command line and there is no auto-configuration.
1546 (Runtime_Name_Set_For): New function.
1548 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1550 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1551 elaborate initialization expression for variable Abort when processing
1552 a package body or a declaration.
1553 (Create_Finalizer): Propagate the package context when creating the
1554 exception-related variables.
1555 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1556 For_Package along with usage comment.
1558 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1560 * gcc-interface/Makefile.in: Clean up targets.
1561 Enable new package for atomic counters and copy-on-write implementation
1562 of unbounded strings on x86 platforms.
1563 * gcc-interface/Make-lang.in: Update dependencies.
1565 2011-08-04 Robert Dewar <dewar@adacore.com>
1567 * exp_ch7.adb: Minor reformatting.
1569 2011-08-04 Robert Dewar <dewar@adacore.com>
1571 * exp_strm.adb: Minor reformatting.
1573 2011-08-04 Vadim Godunko <godunko@adacore.com>
1575 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1576 operations are not supported.
1577 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1578 * s-atocou-x86.adb: New file.
1579 * Makefile.rtl: Add s-atocou.o file
1581 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1583 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1584 (Compilation_Phase): ... here.
1585 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1587 2011-08-04 Thomas Quinot <quinot@adacore.com>
1589 * Make-generated.in: Fix minor typo in comment.
1591 2011-08-04 Thomas Quinot <quinot@adacore.com>
1593 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1596 2011-08-04 Robert Dewar <dewar@adacore.com>
1598 * a-coinho.adb: Minor reformatting.
1600 2011-08-04 Robert Dewar <dewar@adacore.com>
1602 * a-coinho.ads: Minor reformatting.
1604 2011-08-04 Vadim Godunko <godunko@adacore.com>
1606 * s-atocou.ads, s-atocou.adb: New files.
1607 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1608 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1609 direct use of GCC's atomic builtins and replace them by use of new
1610 atomic counter package.
1612 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1614 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1616 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1618 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1619 with a call to Get_External_Tag.
1620 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1621 subprogram usage. Remove the guard against package declarations and
1622 bodies since Build_Cleanup_Statements is no longer invoked in that
1624 (Build_Components): Initialize Tagged_Type_Stmts when the context
1625 contains at least one library-level tagged type.
1626 (Build_Finalizer): New local variables Has_Tagged_Types and
1627 Tagged_Type_Stmts along with associated comments on usage. Update the
1628 logic to include tagged type processing.
1629 (Create_Finalizer): Insert all library-level tagged type unregistration
1630 code before the jump block circuitry.
1631 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1632 (Expand_N_Package_Declaration): Remove the call to
1633 Build_Cleanup_Statements.
1634 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1635 unregister the external tag of a tagged type.
1636 (Processing_Actions): Reimplemented to handle tagged types.
1637 (Process_Declarations): Detect the declaration of a library-level
1638 tagged type and carry out the appropriate actions.
1639 (Unregister_Tagged_Types): Removed. The machinery has been directly
1640 merged with Build_Finalizer.
1642 2011-08-04 Robert Dewar <dewar@adacore.com>
1644 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1645 gnatls.adb, exp_ch3.adb: Minor reformatting.
1647 2011-08-04 Marc Sango <sango@adacore.com>
1649 * sem_attr.adb (Analyze_Attribute): Replace the message
1650 "invisible attribute of}" of the spark restriction violation in
1651 attribute reference by the simple message "invisible attribute of type".
1652 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1653 two insertion characters: '&' and '}'.
1655 2011-08-04 Vadim Godunko <godunko@adacore.com>
1657 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1658 * a-coinho.ads, a-coinho.adb: New file.
1659 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1661 2011-08-04 Nicolas Roche <roche@adacore.com>
1663 * alfa_test.adb: Not all ali files are containing alfa information even
1664 if compiled with -gnatd.F. So suppress warning about missing ALFA
1667 2011-08-04 Yannick Moy <moy@adacore.com>
1669 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1671 * put_alfa.adb: Check that scope name is not empty.
1673 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1675 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1676 Needs_Elementary_Stream_Operation, to determine whether user-defined
1677 Read and Write attributes are available for the elementary components
1678 of the given type. If only the predefined attributes are available,
1679 then when restriction No_Default_Stream_Attributes is active the
1680 predefined stream attributes for the composite type cannot be created.
1682 2011-08-04 Robert Dewar <dewar@adacore.com>
1684 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1685 Put routines in alpha order
1687 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1689 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1690 * gcc-interface/Make-lang.in: Update dependencies.
1692 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1694 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1695 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1698 2011-08-04 Robert Dewar <dewar@adacore.com>
1700 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1701 lib-xref-alfa.adb: Minor reformatting.
1703 2011-08-04 Marc Sango <sango@adacore.com>
1705 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1706 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1707 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1710 2011-08-04 Tristan Gingold <gingold@adacore.com>
1712 * bindgen.adb (Gen_Adainit_C): Remove.
1713 (Gen_Adafinal_C): Ditto.
1714 (Gen_Elab_Externals_C): Ditto.
1715 (Gen_Elab_Calls_C): Ditto.
1716 (Gen_Elab_Order_C): Ditto.
1717 (Gen_Elab_Defs_C): Ditto.
1718 (Gen_Finalize_Library_C): Ditto.
1719 (Gen_Finalize_Library_Defs_C): Ditto.
1720 (Gen_Main_C): Ditto.
1721 (Gen_Output_File_C): Ditto.
1722 (Gen_Restrictions_C): Ditto.
1723 (Gen_Versions_C): Ditto.
1724 (Write_Info_Ada_C): Ditto.
1725 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1726 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1727 Always call Gen_Output_File_Ada.
1728 * gnatlink.adb (Begin_Info): Now a constant.
1730 (Ada_Bind_File): Remove
1731 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1732 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1733 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1734 * opt.ads (Ada_Bind_File): Remove.
1736 2011-08-04 Thomas Quinot <quinot@adacore.com>
1738 * projects.texi: Document target-specific directory in default project
1741 2011-08-04 Thomas Quinot <quinot@adacore.com>
1743 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1746 2011-08-04 Yannick Moy <moy@adacore.com>
1748 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1749 opt.ads, lib-xref.ads: Code clean up.
1751 2011-08-04 Yannick Moy <moy@adacore.com>
1753 * gnat_rm.texi: Update description of Test_Case
1754 * gnat_ugn.texi: Typo.
1756 2011-08-04 Ed Falis <falis@adacore.com>
1758 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1760 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1762 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1763 it is of type Root_Controlled. This action eliminates fields Prev and
1764 Next from type equality.
1766 2011-08-04 Yannick Moy <moy@adacore.com>
1768 * lib-xref-alfa.adb: Correct typo.
1770 2011-08-04 Matthew Heaney <heaney@adacore.com>
1772 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1775 2011-08-04 Yannick Moy <moy@adacore.com>
1777 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1778 (Analyze_Pragma): allow static string expression for name of Test_Case,
1779 instead of simply string literals.
1780 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1783 2011-08-04 Vincent Celier <celier@adacore.com>
1785 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1786 case suffixes to find truncated main sources.
1788 2011-08-04 Tristan Gingold <gingold@adacore.com>
1790 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1791 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1792 (Compute_Current_Task): Ditto.
1794 2011-08-04 Tristan Gingold <gingold@adacore.com>
1796 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1798 2011-08-04 Yannick Moy <moy@adacore.com>
1800 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1801 library-level constant.
1802 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1803 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1804 used as selector of parameter association, in ALFA mode.
1806 2011-08-04 Robert Dewar <dewar@adacore.com>
1808 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1809 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1812 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1814 * make.adb (Linking_Phase): Set source search path before calling
1815 gnatlink in CodePeer mode.
1817 2011-08-04 Javier Miranda <miranda@adacore.com>
1819 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1820 Remove code which takes care of building TSDs.
1821 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1822 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1823 the accessibility check in VM targets.
1824 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1825 (Building_Static_DT): Now returns false for VM targets.
1826 (Build_VM_TSDs): Removed.
1827 (Expand_Interface_Conversion): Generate missing runtime check for
1828 conversions to interface types whose target type is unknown at compile
1830 (Make_VM_TSD): Add missing code to disable the generation of calls to
1831 Check_TSD if the tagged type is not defined at library level, or not
1832 has a representation clause specifying its external tag, or -gnatdQ is
1834 * exp_disp.ads (Build_VM_TSDs): Removed.
1835 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1836 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1837 register primitives in the dispatch tables in VM targets.
1838 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1839 initialization of class-wide interface objects in VM targets.
1840 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1843 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1845 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1846 when dotnet-ld cannot be found.
1848 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1850 * bindgen.adb: Simplify significantly generation of binder body file in
1852 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1853 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1856 2011-08-04 Yannick Moy <moy@adacore.com>
1858 * sem_prag.adb, sem.ads: Code cleanup.
1860 2011-08-04 Tristan Gingold <gingold@adacore.com>
1862 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1863 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1864 results if possible.
1865 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1866 * gnat_ugn.texi: Update dynamic stack usage section.
1868 2011-08-04 Steve Baird <baird@adacore.com>
1870 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1871 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1872 contains only a call to the user-defined main subprogram.
1873 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1874 call the "wrapper" subprogram instead of directly
1875 calling the user-defined main subprogram.
1877 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1879 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1880 alternatives of a case statement for controlled objects. Rename local
1881 variable A to Dead_Alt.
1882 (Expand_N_If_Statement): Check the then and else statements of an if
1883 statement for controlled objects. Check the then statements of all
1884 elsif parts of an if statement for controlled objects.
1885 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1887 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1888 detects a loop associated with the expansion of an array object.
1889 Augment the processing of the loop statements to account for a possible
1890 wrap done by Process_Statements_For_Controlled_Objects.
1891 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1892 statements and abortable part of an asynchronous select for controlled
1894 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1895 conditional entry call for controlled objects.
1896 (Expand_N_Selective_Accept): Check the alternatives of a selective
1897 accept for controlled objects.
1898 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1899 alternatives of a timed entry call for controlled objects.
1900 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1901 exception handler for controlled objects.
1902 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1903 Add formal parameter Nested_Constructs along with its associated
1905 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1906 Requires_Cleanup_Actions.
1907 (Process_Statements_For_Controlled_Objects): New routine.
1908 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1909 routine. Inspect a node which contains a non-handled sequence of
1910 statements for controlled objects. If such an object is found, the
1911 statements are wrapped in a block.
1913 2011-08-04 Bob Duff <duff@adacore.com>
1915 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1916 need to compare with Class_Wide_Type (T2), in order to get at the
1917 original class-wide type node.
1918 * sem_type.ads (Covers): Improve the comment.
1919 * einfo.ads (Class_Wide_Type): Improve the comment.
1920 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1921 the type of the Deref.
1923 2011-08-04 Yannick Moy <moy@adacore.com>
1925 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1926 separate declarations.
1927 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1928 check identifier of pragma argument.
1929 (Chain_TC): check that no other test case associated to the same entity
1930 share the same name.
1931 (Check_Test_Case): disallow test case inside subprogram body
1932 (Analyze_Pragma): correct call to check identifier and not argument
1933 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1934 function gets name from test case pragma.
1936 2011-08-04 Yannick Moy <moy@adacore.com>
1938 * gnat_rm.texi: Document new pragma and aspect.
1939 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1940 (No_Duplicates_Allowed): new constant array defining whether duplicates
1941 aspects of each kind can appear on the same declaration.
1942 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1943 field, which points to a node holding the previous Spec_PPC_List.
1944 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1945 through the indirection with Contract.
1946 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1947 * par-prag.adb (Prag): do nothing on Test_Case pragma
1948 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1950 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1951 component Ensures of Test_Case.
1952 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1953 (Analyze_Generic_Subprogram_Declaration,
1954 Analyze_Subprogram_Instantiation,
1955 Analyze_Abstract_Subprogram_Declaration,
1956 Analyze_Subprogram_Body_Helper,
1957 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1958 insert contract in subprogram node at point of definition
1960 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1961 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1962 corresponding pragma
1963 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1964 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1965 similar to the analysis of pre/post
1966 (Derive_Subprogram): insert contract in subprogram node at point of
1968 * sem_prag.adb, sem_prag.ads
1969 (Check_Arg_Is_String_Literal, Check_Identifier):
1970 new checking procedures to be called in treatment of pragmas
1971 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1972 pragma is well-formed. This does not check currently that 'Result is
1973 used only in the Ensures component of a Test_Case.
1974 (Analyze_Pragma): add case for Test_Case
1975 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1976 components of a Test_Case.
1977 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1978 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1979 pragma, treated as spec expressions.
1980 (Sig_Flags): add value -1 for Test_Case.
1981 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1982 Get_Requires_From_Test_Case_Pragma): getters for both expression
1983 components of a Test_Case.
1984 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1985 indirection between an entry or [generic] subprogram entity and its
1986 pre/post + test-cases.
1987 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1988 get/set for fields of an N_Contract node.
1989 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1990 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1991 names and pragma for Test_Case.
1992 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1994 2011-08-04 Vincent Celier <celier@adacore.com>
1996 * gnat_ugn.texi: Improve documentation of gnatmake switch
1997 --source-info-file=.
1999 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2001 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
2002 type). Initialize Atyp to the appropriate type which is later checked
2003 for completion. Rewrite the assertion associated with private type
2006 2011-08-04 Ed Falis <falis@adacore.com>
2008 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
2009 initialize the number of CPUs.
2011 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2013 * sem_type.adb (Disambiguate): New subsidiary routine
2014 In_Same_Declaration_List, to implement AI05-0020: a user-defined
2015 equality on an anonymous access type whose designated type is private
2016 does not lead to an ambiguity with the universal access equality
2017 operator in the body or child units of the defining package. The same
2018 is true for a multiplication operator on a private type completed with
2021 2011-08-04 Javier Miranda <miranda@adacore.com>
2023 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
2024 (Normalize_Scalars_Config): Removed.
2026 (Register_Opt_Config_Switches): Remove registering config values of
2027 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
2028 (Restore_Opt_Config_Switches): Remove code which restores the values of
2029 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2030 Init_Or_Norm_Scalars.
2031 (Save_Opt_Config_Switches): Remove code which saves values of
2032 Init_Or_Norm_Scalars and Normalize_Scalars.
2033 (Set_Opt_Config_Switches): Remove code which restores config values of
2034 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
2035 Init_Or_Norm_Scalars.
2037 2011-08-04 Yannick Moy <moy@adacore.com>
2039 * frontend.adb (Frontend): remove previous patch to avoid full
2040 qualification in ALFA mode.
2041 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
2042 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
2043 unique name for an entity, which could be used to identify the entity
2044 across compilation units.
2046 2011-08-04 Thomas Quinot <quinot@adacore.com>
2049 (Initialize_Default_Project_Path): Add target specific directory
2050 ($prefix/$target/lib/gnat) in front of project path in all cases
2051 (making gnatmake's behaviour consistent with gprbuild).
2052 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
2053 Pass target name from Sdefault to project subsystem.
2054 * gnatls.adb: Show new target specific default project directory.
2056 2011-08-04 Johannes Kanig <kanig@adacore.com>
2058 * cstand.adb: Add Information to Identifier in Standard
2059 (Identifer_For): Set Entity to the corresponding entity
2061 2011-08-04 Sergey Rybin <rybin@adacore.com>
2063 * gnat_ugn.texi: Update doc on gnatcheck.
2065 2011-08-04 Yannick Moy <moy@adacore.com>
2067 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
2070 2011-08-04 Yannick Moy <moy@adacore.com>
2072 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
2073 performing expansion.
2074 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
2075 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
2076 it is not called in ALFA mode.
2078 2011-08-04 Emmanuel Briot <briot@adacore.com>
2080 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
2081 after all, so removed.
2083 2011-08-04 Sergey Rybin <rybin@adacore.com>
2085 * vms_data.ads: Add missing VMS qualifiers.
2087 2011-08-04 Emmanuel Briot <briot@adacore.com>
2089 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
2090 the list of files on the command line after processing it through
2093 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2095 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
2096 processing for .NET/JVM. These targets can now benefit from
2097 Raise_From_Controlled_Operation and they share the same processing with
2099 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
2100 These targets need transient scopes in order to properly finalize short
2101 lived controlled objects.
2102 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
2103 NET/JVM. These targets can now benefit from
2104 Raise_From_Controlled_Operation and they share the same processing with
2107 2011-08-04 Geert Bosch <bosch@adacore.com>
2109 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
2111 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2113 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
2114 Expand_Record_Aggregate, to determine whether aggregate must be
2115 expanded into assignments. This is the case if the ancestor part is
2116 private, regarless of the setting of the flag Has_Private_Ancestor.
2118 2011-08-04 Ed Falis <falis@adacore.com>
2120 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
2122 2011-08-04 Bob Duff <duff@adacore.com>
2124 * sinfo.ads: Fix comment.
2126 2011-08-04 Steve Baird <baird@adacore.com>
2128 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
2129 choose a package name in much the same way as is
2130 done for JGNAT when VM_Target /= No_VM, except that
2131 a slightly more distinctive prefix string is used.
2133 2011-08-04 Emmanuel Briot <briot@adacore.com>
2135 * makeutl.adb (Complete_Mains): no longer accept unit names on the
2136 gnatmake command line.
2137 This behavior was never documented (and was supported only because of
2138 an early bug in the code). This case might lead to ambiguous cases
2139 (between unit names and truncated base names without suffixes).
2141 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2143 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
2144 Remove the external tag of a tagged type from the internal hash table.
2145 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2146 expanded usage of the routine. Strenghten the check for Is_Master. Add
2147 processing for tagged types.
2148 (Build_Finalizer): Create all the necessary lists used in finalizer
2149 creation when the processed context is a package that may contain
2151 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2152 Requires_Cleanup_Actions.
2153 (Expand_N_Package_Body): Package bodies may need clean up code
2154 depending on whether they contain tagged types.
2155 (Expand_N_Package_Declaration): Package declarations may need clean up
2156 code depending on whether they contain tagged types.
2157 (Unregister_Tagged_Types): New routine. Search through a list of
2158 declarations or statements, looking for non-abstract Ada tagged types.
2159 For each such type, generate code to unregister the external tag.
2160 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2161 Requires_Cleanup_Actions.
2162 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2163 through a list of declarations or statements looking for non-abstract
2164 Ada tagged types or controlled objects.
2165 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2166 Requires_Cleanup_Actions.
2167 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2168 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2171 2011-08-04 Vincent Celier <celier@adacore.com>
2173 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2174 has Ada sources, not project Project, because if the root project
2175 Project has no sources of its own, all projects will be deemed without
2178 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2180 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2181 of the No_Param_Proc acc-to-subp type used for initialization of
2182 __gnat_finalize_library_objects so that it's declared at library level
2183 rather than nested inside of the adainit routine.
2185 2011-08-04 Javier Miranda <miranda@adacore.com>
2187 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2188 if the tagged type has a representation clause which specifies its
2191 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2193 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2194 Remove previous procedure with that name.
2195 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2197 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2198 subtype mark, the ancestor cannot have unknown discriminants.
2199 (Resolve_Record_Aggregate): if the type has invisible components
2200 because of a private ancestor, the aggregate is illegal.
2202 2011-08-04 Vincent Celier <celier@adacore.com>
2204 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2205 account switches -gnat2005, -gnat12 and -gnat2012.
2207 2011-08-04 Bob Duff <duff@adacore.com>
2209 * s-tasdeb.ads: Minor comment fix.
2211 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2213 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2215 * switch.ads, switch.adb (Is_Language_Switch): New function.
2217 2011-08-04 Vincent Celier <celier@adacore.com>
2219 * switch-c.adb: Minor comment addition.
2221 2011-08-04 Vincent Celier <celier@adacore.com>
2223 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2224 ending with '=' is followed by a space (missing file name).
2226 2011-08-04 Pascal Obry <obry@adacore.com>
2228 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2230 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2232 * sem_ch12.adb (Analyze_Associations): New routine
2233 Check_Overloaded_Formal_Subprogram to reject a formal package when
2234 there is a named association or a box initialisation for an overloaded
2235 formal subprogram of the corresponding generic.
2237 2011-08-04 Yannick Moy <moy@adacore.com>
2239 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2240 * get_alfa.adb, put_alfa.adb: Read and write new component of
2242 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2244 2011-08-04 Pascal Obry <obry@adacore.com>
2246 * urealp.adb: Minor reformatting.
2248 2011-08-04 Tristan Gingold <gingold@adacore.com>
2250 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2251 Handle the case when Cleanup_Protected_Object returns Empty.
2253 2011-08-04 Yannick Moy <moy@adacore.com>
2255 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2257 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2259 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2260 call, ignore functions.
2262 2011-08-04 Geert Bosch <bosch@adacore.com>
2264 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2267 2011-08-04 Emmanuel Briot <briot@adacore.com>
2269 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2270 as an index for Builder'Switches. This conforms to the documentation.
2271 * make.adb (Insert_Project_Sources): avoid duplicate code
2273 2011-08-04 Emmanuel Briot <briot@adacore.com>
2275 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2276 name on the command line (for instance "../dummy"), never assume it can
2279 2011-08-04 Tristan Gingold <gingold@adacore.com>
2281 * bindgen.adb: Remove code the reference or create the
2282 Break_Start/__gnat_break_start procedure.
2283 * s-stalib.adb (Break_Start): Removed.
2285 2011-08-04 Emmanuel Briot <briot@adacore.com>
2287 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2288 shared with gprbuild.
2290 2011-08-04 Yannick Moy <moy@adacore.com>
2292 * par-ch4.adb (P_Primary): preferentially issue an error message about
2293 a missing parenthesis arount a conditional or case expression in Ada
2294 2012 mode, if we detect that the alignment is not correct for a
2297 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2299 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2300 tag-to-class-wide conversion as needing finalization actions.
2301 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2302 a tag-to-class-wide conversion as needing finalization actions.
2303 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2304 conversion does not need finalization actions.
2305 (Is_Tag_To_CW_Conversion): New routine.
2306 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2307 whether an object is the result of a tag-to-class-wide conversion.
2309 2011-08-04 Yannick Moy <moy@adacore.com>
2311 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2312 the left-hand-side and right-hand-side of a conjunct are inserted when
2313 translating a pre- or postcondition
2314 * sem_ch6.adb: Correct typo in comment
2316 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2318 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2319 Unchecked_Conversion and Unchecked_Deallocation.
2321 2011-08-04 Thomas Quinot <quinot@adacore.com>
2323 * make.adb: Minor reformatting.
2325 2011-08-04 Emmanuel Briot <briot@adacore.com>
2327 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2328 sources in the project and its imported projects, but not in the whole
2331 2011-08-04 Emmanuel Briot <briot@adacore.com>
2333 * make.adb: Remove debug trace.
2335 2011-08-04 Vincent Celier <celier@adacore.com>
2337 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2338 path in canonical form, to be able to compare path names on platforms
2339 such as Windows or Darwin.
2341 2011-08-04 Thomas Quinot <quinot@adacore.com>
2343 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2344 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2345 * scos.ads: Update documentation accordingly.
2346 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2349 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2351 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2352 attribute only if prefix type is scalar.
2354 2011-08-04 Emmanuel Briot <briot@adacore.com>
2356 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2357 in gnatmake for specifying mains on the command line that do not belong
2358 to the main project. These mains must currently all belong to the same
2360 (Ultimate_Extension_Of): removed, since duplicated
2361 Ultimate_Extending_Project.
2363 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2365 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2367 (CodePeer_Mode_String): New.
2368 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2370 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2371 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2372 mode, since no useful elaboration subprogram is needed by CodePeer.
2373 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2374 In this mode, compile binder file with -gnatC and do stop after this
2377 2011-08-04 Vincent Celier <celier@adacore.com>
2379 * exp_ch7.adb: Minor comment fix.
2381 2011-08-04 Robert Dewar <dewar@adacore.com>
2383 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2384 exp_ch4.adb, makeutl.adb: Minor reformatting.
2386 2011-08-04 Emmanuel Briot <briot@adacore.com>
2388 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2389 Create several new subprograms to move code out of Make. This makes the
2390 code more readable, removes code duplication, and is a preparation work
2391 for adding support for aggregate projects.
2393 2011-08-04 Tristan Gingold <gingold@adacore.com>
2395 * s-po32gl.ads, s-po32gl.adb: New files.
2396 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2397 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2398 (Build_Finalization_Collection): Use it.
2399 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2400 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2402 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2403 * gcc-interface/Make-lang.in: Update dependencies.
2405 2011-08-04 Emmanuel Briot <briot@adacore.com>
2407 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2410 2011-08-04 Emmanuel Briot <briot@adacore.com>
2412 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2413 command line is not a file name, also check whether it could be a unit
2416 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2418 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2419 the header of the finalization routine.
2420 If the unit has no finalizer but is a body whose spec has one, then
2421 generate the decrement of the elaboration entity only.
2422 If the unit has a finalizer and is a spec, then do not generate the
2423 decrement of the elaboration entity.
2424 (Gen_Finalize_Library_C): Likewise.
2426 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2428 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2429 (Bounds_Size_Expression): Removed.
2430 (Double_Alignment_Of): New subsidiary routine.
2431 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2432 for a hole in the dope vector of unconstrained arrays due to different
2433 index and element alignments.
2435 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2437 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2438 raise program_error because body has not been seen yet.
2440 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2442 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2445 2011-08-04 Vincent Celier <celier@adacore.com>
2447 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2449 2011-08-04 Yannick Moy <moy@adacore.com>
2451 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2452 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2454 2011-08-04 Thomas Quinot <quinot@adacore.com>
2456 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2457 instantiation in RCI.
2459 2011-08-04 Emmanuel Briot <briot@adacore.com>
2461 * make.adb: Share more code with gprbuild
2463 2011-08-04 Emmanuel Briot <briot@adacore.com>
2465 * projects.texi: Added documentation for the IDE'Gnat project file
2468 2011-08-04 Nicolas Roche <roche@adacore.com>
2470 * gnat_rm.texi: Minor editing.
2472 2011-08-04 Javier Miranda <miranda@adacore.com>
2474 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2475 and the library case for VM targets.
2476 (Gen_Adainit_Ada): Likewise.
2478 2011-08-04 Robert Dewar <dewar@adacore.com>
2480 * g-altive.ads: Minor comment updates.
2481 * prj-nmsc.adb: Minor reformatting.
2483 2011-08-04 Javier Miranda <miranda@adacore.com>
2486 (Normalize_Scalars_Config): Value of the configuration switch set by
2487 pragma Normalize_Scalars when it appears in the gnat.adc file.
2488 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2489 to save and restore settings of this pragma.
2491 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2492 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2494 2011-08-04 Vincent Celier <celier@adacore.com>
2496 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2498 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2500 * makeutl.adb: Minor reformatting.
2502 2011-08-04 Olivier Hainque <hainque@adacore.com>
2504 * g-altive.ads: Update comments to reflect that only the soft
2505 binding is available today.
2507 2011-08-04 Robert Dewar <dewar@adacore.com>
2509 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2510 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2511 * gcc-interface/Make-lang.in: Update dependencies.
2513 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2515 * prj-env.adb: Remove local debug traces.
2517 2011-08-04 Yannick Moy <moy@adacore.com>
2519 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2520 was used instead of Hi_OK, which could cause a read of an uninitialized
2521 value later on. Detected while working on the new warning.
2522 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2524 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2525 in more cases, in order to detect more unreferenced values.
2526 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2527 object for expression, if any.
2529 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2531 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2532 the operand types instead of the Esize.
2534 2011-08-04 Steve Baird <baird@adacore.com>
2536 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2537 enable CodePeer_Mode.
2538 * bindusg.adb (Display): Add help message describing -P binder switch.
2539 * gnat_ugn.texi: Document -P binder switch.
2540 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2541 user-defined main program directly.
2542 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2543 user-defined main program in the context clause of the package body.
2545 2011-08-04 Yannick Moy <moy@adacore.com>
2547 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2548 duplicate of Defining_Entity
2549 (Get_Unique_Entity_For_Decl): rename function into
2550 Unique_Defining_Entity
2551 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2552 (Formal_Proof_On): remove synthesized flag
2553 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2554 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2555 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2556 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2557 Annotate (Formal_Proof)
2559 2011-08-04 Emmanuel Briot <briot@adacore.com>
2561 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2562 source files with non-standard naming schemes, in imported projects
2564 2011-08-04 Emmanuel Briot <briot@adacore.com>
2566 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2567 specified on the gprbuild command line, we need to compile all units
2568 within that file, not just the first one we find
2569 Fix error message for mains that are not found.
2571 2011-08-04 Thomas Quinot <quinot@adacore.com>
2573 * sem_ch6.adb: Update comment.
2574 * sem_ch12.adb: Minor reformatting.
2576 2011-08-04 Bob Duff <duff@adacore.com>
2578 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2579 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2580 race condition whose symptom is to fail to lock Parent. That, in turn,
2581 causes Parent.Awake_Count to be accessed without locking Parent, which
2582 causes another race condition whose symptom is that Parent.Awake_Count
2583 can be off by 1 (either too high or too low). The solution is to lock
2584 Parent unconditionally, and then lock Acceptor, before reading
2585 Acceptor.Terminate_Alternative.
2587 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2589 * debug.adb: Update comment.
2591 2011-08-04 Robert Dewar <dewar@adacore.com>
2593 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2594 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2595 exp_ch6.adb: Minor reformatting.
2597 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2599 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2602 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2604 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2606 2011-08-04 Thomas Quinot <quinot@adacore.com>
2608 * sinfo.ads: Minor reformatting.
2610 2011-08-04 Emmanuel Briot <briot@adacore.com>
2612 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2613 even if there is no location.
2615 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2617 * sem_res.adb, sem_ch4.adb: move check for restriction
2618 No_Task_Hierarchy to resolve_allocator.
2620 2011-08-04 Thomas Quinot <quinot@adacore.com>
2622 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2623 This flag of N_Pragma nodes is not used, remove it as well as all of
2624 the associated circuitry.
2626 2011-08-04 Javier Miranda <miranda@adacore.com>
2628 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2629 runtime check on duplicated externa tags
2630 * debug.adb Document switch -gnatdQ.
2632 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2634 * a-fihema.ads: Minor typo fix.
2636 2011-08-04 Yannick Moy <moy@adacore.com>
2638 * sem_ch10.adb: Minor comment update.
2640 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2642 * einfo.adb: Update the node field usage to reflect the renaming of
2643 Return_Flag to Return_ Flag_Or_Transient_Decl.
2644 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2645 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2646 (Write_Field15_Name): Change Return_Flag to
2647 Return_Flag_Or_Transient_Decl.
2648 * einfo.ads: Rename node field Return_Flag to
2649 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2650 occurrences in entities.
2651 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2652 associated Inline pragma.
2653 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2654 associated Inline pragma.
2655 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2657 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2658 Return_Flag and Set_Return_Flag.
2659 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2660 objects generated for controlled transients declared inside an
2661 Exception_With_Actions. Update the calls to Return_Flag.
2662 (Process_Object_Declaration): Add code to add a null guard for hook
2663 objects generated for controlled transients declared inside an
2664 Exception_With_Actions. Update related comment.
2665 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2666 objects generated for controlled transients declared inside an
2667 Exception_With_Actions. Update the calls to Return_Flag.
2668 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2670 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2672 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2673 positional aggregate.
2675 2011-08-04 Vincent Celier <celier@adacore.com>
2677 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2678 SLOC only for pragmas.
2680 2011-08-04 Emmanuel Briot <briot@adacore.com>
2682 * projects.texi: Minor typo fix.
2684 2011-08-04 Emmanuel Briot <briot@adacore.com>
2686 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2687 on case-sensitive file systems.
2689 2011-08-04 Thomas Quinot <quinot@adacore.com>
2691 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2692 nested in a disabled pragma.
2693 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2694 enclosing pragma, if any, for X decisions.
2696 2011-08-04 Thomas Quinot <quinot@adacore.com>
2698 * sem_prag.adb: Minor reformatting.
2700 2011-08-04 Vincent Celier <celier@adacore.com>
2702 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2703 allowed in no run time mode.
2705 2011-08-04 Vincent Celier <celier@adacore.com>
2707 * make.adb (Check): When -gnatc is used, check for the source file
2708 inside the ALI file with a canonical case file name.
2710 2011-08-04 Emmanuel Briot <briot@adacore.com>
2712 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2713 overriding the separator.
2715 2011-08-04 Robert Dewar <dewar@adacore.com>
2717 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2718 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2720 2011-08-04 Robert Dewar <dewar@adacore.com>
2722 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2724 2011-08-04 Yannick Moy <moy@adacore.com>
2726 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2727 'Result only appears in postcondition of function.
2729 2011-08-04 Thomas Quinot <quinot@adacore.com>
2731 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2732 external tag, include the value of the external tag in the exception
2735 2011-08-04 Yannick Moy <moy@adacore.com>
2737 * sem_attr.adb (Result): modify error message for misplaced 'Result
2739 2011-08-04 Sergey Rybin <rybin@adacore.com>
2741 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2742 clear that the second argument must be an identifier.
2744 2011-08-04 Thomas Quinot <quinot@adacore.com>
2746 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2747 -fpreserve-control-flow, insert an IF statement on the barrier
2748 condition to ensure that a conditional branch instruction is generated.
2750 2011-08-04 Emmanuel Briot <briot@adacore.com>
2752 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2753 (Processing_Flags.Ignore_Missing_With): new flag.
2755 2011-08-04 Emmanuel Briot <briot@adacore.com>
2757 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2758 Source_List_File on case-insensitive systems where the file is actually
2759 on a case-sensitive file system (NFS,...).
2761 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2763 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2764 function return contains a controlled [extension] aggregate and the
2765 return statement is not part of a handled sequence of statements, wrap
2766 the return in a block. This ensures that all controlled temporaries
2767 generated during aggregate resolution will be picked up by the
2768 finalization machinery.
2770 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2772 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2773 components, freeze type before resolution, to ensure that default
2774 initializations are present for all components.
2775 * sem_res.adb (Resolve_Actuals): the designated object of an
2776 accces-to-constant type is a legal actual in a call to an
2777 initialization procedure.
2779 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2781 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2782 N_Unchecked_Type_Conversion to the possible containers of a renamed
2785 2011-08-04 Yannick Moy <moy@adacore.com>
2787 * par-ch13.adb (Aspect_Specifications_Present): recognize
2788 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2789 is issued in Strict mode.
2790 * par.adb: Fix typos in comments.
2792 2011-08-04 Yannick Moy <moy@adacore.com>
2794 * sem_attr.adb (Result): modify error message to take into account Post
2795 aspect when compiling Ada 2012 (or newer) code.
2797 2011-08-04 Nicolas Roche <roche@adacore.com>
2799 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2800 remove need for GCC exceptions.
2802 2011-08-04 Vincent Celier <celier@adacore.com>
2804 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2805 project, not the source file name.
2806 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2807 excluded, continue looking. This excluded source will only be returned
2808 if there is no other source with the same base name that is not locally
2811 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2813 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2814 private and one of the operands is a real literal, use a qualified
2815 expression rather than a conversion which is not meaningful to the
2818 2011-08-04 Yannick Moy <moy@adacore.com>
2820 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2821 corresponding aspect X'Class are allowed, proceed with analysis of the
2822 aspect instead of skipping it.
2824 2011-08-04 Tristan Gingold <gingold@adacore.com>
2826 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2827 This will allow to have an Ada implementation for the subprogram.
2829 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2831 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2832 completion and aspects are present, apply them to the entity for the
2833 type which is currently the partial view, but which is the one that
2835 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2836 applies to a partial view, indicate that the full view has predicates
2837 and delayed aspects.
2838 (Replace_Type_Reference): Handle properly predicates that apply to the
2839 full view of a private completion.
2841 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2843 * layout.adb (Layout_Type): For composite types, do not set Esize.
2844 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2846 (Size_Known): Look at the RM size of components instead of the Esize.
2847 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2848 issue warning and activate Implicit_Packing.
2849 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2850 if the Esize is not known.
2851 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2852 for elementary types only.
2853 (Analyze_Record_Representation_Clause): Look at the RM size instead
2854 of the Esize to issue errors.
2855 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2857 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2859 Look at the RM size instead of the Esize for types if the latter is
2861 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2863 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2865 * sem_type.adb: proper handling of equality not involving anonymous
2868 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2870 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2871 Vis_Decls. When creating a library-level finalizer for a package spec,
2872 both the declaration and body of the finalizer are inserted either in
2873 the visible or private declarations of the package spec.
2875 2011-08-04 Javier Miranda <miranda@adacore.com>
2877 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2878 use of the full-view of a type when invoking Is_Ancestor.
2879 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2880 the full-view of private parents is requested, then use also the
2881 full-view of the parent of the first derivation.
2883 2011-08-04 Tristan Gingold <gingold@adacore.com>
2885 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2886 instead of the locally imported procedure.
2887 * s-taprop-mingw.adb (Enter_Task): Ditto.
2888 * s-valrea.adb (Scan_Real): Ditto.
2889 * s-imgrea.adb (Set_Image_Real): Ditto.
2890 * s-flocon.ads: Make the package pure.
2892 2011-08-04 Thomas Quinot <quinot@adacore.com>
2894 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2895 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2896 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2897 New subprogram, moved here from...
2898 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2899 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2900 rewriting of the last argument into a procedure call statement here...
2901 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2904 2011-08-04 Thomas Quinot <quinot@adacore.com>
2906 * par_sco.adb: Minor reformatting.
2908 2011-08-04 Robert Dewar <dewar@adacore.com>
2910 * erroutc.adb: Minor reformatting.
2912 2011-08-04 Thomas Quinot <quinot@adacore.com>
2914 * par_sco.adb: Comment update.
2916 2011-08-04 Tristan Gingold <gingold@adacore.com>
2918 * s-flocon.ads: New file.
2919 * g-flocon.ads: Now a renaming of s-flocon.
2920 * Makefile.rtl: Add s-flocon.o
2922 2011-08-04 Javier Miranda <miranda@adacore.com>
2924 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2925 constrained, do not attempt to build a subtype of it.
2927 2011-08-04 Yannick Moy <moy@adacore.com>
2929 * errout.ads Change comments: remove 'R'M as an example where quotes
2930 are needed; add ALFA as another case where quotes are not needed
2931 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2932 case where quotes are not needed.
2933 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2934 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2935 Remove all occurrences of 'A'L'F'A
2937 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2939 * sem_ch13.adb: check legality of invariant pragma.
2941 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2943 * bindgen.adb: Add comments.
2945 2011-08-04 Yannick Moy <moy@adacore.com>
2947 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2949 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2950 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2952 2011-08-04 Robert Dewar <dewar@adacore.com>
2954 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2955 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2956 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2958 2011-08-04 Thomas Quinot <quinot@adacore.com>
2960 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2962 2011-08-04 Thomas Quinot <quinot@adacore.com>
2965 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2968 2011-08-04 Robert Dewar <dewar@adacore.com>
2970 * einfo.ads, exp_ch4.adb: Minor reformatting.
2972 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2974 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2976 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2978 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2979 type in all cases to compute list of primitive operations, because full
2980 view may be an itype that is not attached to the list of declarations.
2982 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2984 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2985 library has already been finalized.
2986 (Gen_Adafinal_C): Likewise.
2987 (Gen_Adainit_Ada): Generate an early return if the library has
2988 already been elaborated.
2989 (Gen_Adainit_C): Likewise.
2990 (Gen_Output_File_Ada): Generate an elaboration flag.
2991 (Gen_Output_File_C): Likewise.
2993 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2995 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2996 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2997 built in the first place.
2998 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2999 for CodePeer because Finalize_Address was not built to begin with.
3000 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
3002 2011-08-04 Pascal Obry <obry@adacore.com>
3004 * adaint.c (__gnat_tmp_name): Use current process id to create temp
3005 filenames, this ensures unicity of filenames across processes.
3007 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3009 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
3010 Raise_Controlled to Raise_From_Controlled_Operation. Update the
3011 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
3012 Add False as the actual to From_Abort in the generated call to
3013 Raise_From_Controlled_Operation.
3015 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3017 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
3018 so that the ali file name can be retrieved from outside of this package.
3019 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
3020 doing nothing in the general case, but used to update the object file
3021 timestamp if directly generated by the backend.
3022 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
3023 to a later time than the ali file one.
3025 2011-08-04 Yannick Moy <moy@adacore.com>
3027 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
3028 entities whose body contains an Annotate pragma which forces formal
3030 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3031 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
3032 Mark_Non_ALFA_Subprogram to pass in a message and node.
3033 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
3034 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
3035 surrounding subprogram.
3036 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
3037 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
3038 as not in ALFA is annotated with Formal_Proof being On, then an error
3039 is issued based on the additional parameters for message and node.
3040 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
3041 * gcc-interface/Make-lang.in: Update dependencies.
3043 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3045 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
3046 Finalize_Address when CodePeer is enabled.
3048 2011-08-04 Pascal Obry <obry@adacore.com>
3050 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
3051 the latter returns a pointer to a static buffer which is deallocated
3052 at the end of the routine.
3054 2011-08-04 Yannick Moy <moy@adacore.com>
3056 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
3057 after index creation; mark unconstrained base array type generated as
3058 being in/not in ALFA as well
3059 (Make_Index): mark subtype created as in/not in ALFA
3060 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
3061 over a loop as in/not in ALFA, depending on its type and form of loop
3064 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3066 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
3067 directly to False on .NET and JVM.
3069 2011-08-04 Yannick Moy <moy@adacore.com>
3071 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
3072 constraint that subtype must come from source code to be in ALFA, so
3073 that anonymous subtypes can be in ALFA too.
3075 2011-08-04 Yannick Moy <moy@adacore.com>
3077 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
3078 reference for ALFA mode.
3079 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
3080 procedure public so as to use it from formal verification back-end.
3082 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
3084 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
3085 invalid checks of the Parameter, making Remove_Switch not working
3088 2011-08-04 Arnaud Charlet <charlet@adacore.com>
3090 * targparm.ads: Update header: no run-time exception is needed on this
3093 2011-08-04 Vincent Celier <celier@adacore.com>
3095 * a-fihema.adb: Use System.IO instead of GNAT.IO
3097 2011-08-04 Thomas Quinot <quinot@adacore.com>
3099 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
3100 are forbidden in Compiler_Unit mode.
3102 2011-08-04 Robert Dewar <dewar@adacore.com>
3104 * sem_util.adb: Minor reformatting.
3106 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3108 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
3109 library-level finalizers.
3110 (Gen_Finalize_Library_C): Update the import string for library-level
3112 (Gen_Finalize_Library_Defs_C): Update the definition name of a
3113 library-level finalizer.
3114 * exp_ch7.adb: Remove with and use clauses for Stringt.
3115 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
3116 Spec_Decl. Add local variable Body_Id. The names of library-level
3117 finalizers are now manually fully qualified and are no longer external.
3118 A single name is now capable of servicing .NET, JVM and non-VM targets.
3119 Pragma Export is no longer required to provide visibility for the name.
3120 (Create_Finalizer_String): Removed.
3121 (New_Finalizer_Name): New routine which mimics New_..._Name.
3123 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3125 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
3126 elaboration counter to Standard_Short_Integer.
3127 * sem_util.adb (Build_Elaboration_Entity): Likewise.
3128 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
3129 (Gen_Elab_Externals_C): Likewise.
3131 2011-08-04 Ed Falis <falis@adacore.com>
3133 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
3134 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
3135 system-vxworks-mips.ads, system-vxworks-x86.ads
3136 (Always_Compatible_Rep): set to False for all VxWorks targets.
3138 2011-08-04 Robert Dewar <dewar@adacore.com>
3140 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
3141 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
3142 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
3143 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
3144 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3145 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3146 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3147 Minor reformatting and code reorganization.
3149 2011-08-04 Emmanuel Briot <briot@adacore.com>
3151 * projects.texi: Added doc for aggregate projects.
3153 2011-08-04 Emmanuel Briot <briot@adacore.com>
3155 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3156 Add support for overriding the Project_Path in aggregate projects.
3158 2011-08-04 Robert Dewar <dewar@adacore.com>
3160 * a-cofove.ads: Minor reformatting.
3162 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3164 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3165 on the generated code.
3166 (Build_Finalize_Statements): Update the comment on the generated code.
3167 (Build_Initialize_Statements): Update the comment on the generated code.
3168 (Build_Object_Declarations): Add local variable Result. The object
3169 declarations are now built in sequence.
3170 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3173 2011-08-04 Robert Dewar <dewar@adacore.com>
3175 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3177 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3179 * einfo.ads (Elaboration_Entity): Document new definition and use.
3180 (Elaboration_Entity_Required): Adjust to above change.
3181 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3182 * exp_ch12.adb: And with and use for Snames.
3183 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3184 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3185 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3186 <Check_Unit_Name>: Deal with N_Expanded_Name.
3187 <Attribute_Elaborated>: Extend to all unit names.
3188 * sem_elab.adb: And with and use for Uintp.
3189 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3190 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3191 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3192 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3193 from Gen_Adainit_Ada.
3194 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3195 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3196 case, do not call System.Standard_Library.Adafinal; instead call
3197 finalize_library if needed.
3198 (Gen_Adafinal_C): Likewise.
3199 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3200 non-main program case.
3201 (Gen_Adainit_C): Generate a couple of external declarations here.
3202 In the main program case, set SSL.Finalize_Library_Objects.
3203 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3204 (Gen_Elab_Calls_C): Likewise.
3205 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3206 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3207 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3209 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3210 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3212 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3213 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3214 of external declarations. Call Gen_Finalize_Library_C.
3216 2011-08-04 Emmanuel Briot <briot@adacore.com>
3218 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3219 Compute_Compilation_Phases): new subprogram.
3220 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3221 The number of mains as well as the various compilation phases that
3222 need to be run are now project tree specific, since various
3223 aggregated trees might have different requirements. In particular,
3224 they do not all require bind or link phases.
3226 2011-08-04 Emmanuel Briot <briot@adacore.com>
3228 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3229 (Project_Tree_Appdata): New type.
3230 It is now possible to associate application-specific data to a project
3231 tree. In particular, this is used in the gprbuild builder to avoid a
3232 number of global tables and htables, especially now that there can be
3233 several project trees loaded at once because of aggregate projects.
3234 (Debug_Name): new procedure.
3235 * projects.texi: Clarify syntax of "**" for Source_Dirs
3237 2011-08-03 Emmanuel Briot <briot@adacore.com>
3239 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3240 the "roots" for a main.
3241 (Fill_From_Project): add support for aggregate projects. Main units
3242 in aggregated projects are now automatically added in the list of
3243 files to build (although this fails later on in gprbuild, because
3244 these files are not using the root proejct tree, so this needs
3246 * gcc-interface/Make-lang.in: Update dependencies.
3248 2011-08-03 Yannick Moy <moy@adacore.com>
3250 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3251 conditional expression in ALFA.
3252 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3253 expressions as not in ALFA.
3255 2011-08-03 Robert Dewar <dewar@adacore.com>
3257 * a-cofove.adb: Minor reformatting.
3259 2011-08-03 Emmanuel Briot <briot@adacore.com>
3261 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3262 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3264 These packages are more logically placed in the Queue package, since
3265 they manipulate the queue. It is also likely that they can be adapted
3266 for gnatmake, thus sharing more code.
3267 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3268 that we could move the above.
3270 2011-08-03 Emmanuel Briot <briot@adacore.com>
3272 * errutil.adb (Finalize): clean up the list of error messages on exit.
3273 Calling this subprogram multiple times will no longer show duplicate
3274 error messages on stderr.
3276 2011-08-03 Emmanuel Briot <briot@adacore.com>
3278 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3279 Getopt_Switches when we have already define a command line
3282 2011-08-03 Yannick Moy <moy@adacore.com>
3284 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3285 in ALFA. Instead, they are considered as assertions to prove.
3286 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3287 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3288 if they have no ELSE part, or if they occur in pre- and postconditions,
3289 where the Condition cannot have side-effects in ALFA
3290 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3291 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3292 Instead, include type conversion between scalar types in ALFA.
3293 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3294 if-and-only-if its type is in ALFA.
3296 2011-08-03 Thomas Quinot <quinot@adacore.com>
3298 * scos.adb, get_scos.adb, put_scos.adb
3299 New code letter for decisions: G (entry guard)
3301 (Traverse_Subprogram_Body): Rename to...
3302 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3303 (Traverse_Protected_Body): New subprogram
3304 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3305 protected bodies and entry bodies.
3307 2011-08-03 Yannick Moy <moy@adacore.com>
3309 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3310 entities with get/set subprograms, which is set on procedure entities
3311 generated by the compiler for a postcondition.
3312 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3313 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3314 entity for a declaration
3315 (Get_Unique_Entity_For_Decl): new function returning an entity which
3316 represents a declaration, so that matching spec and body have the same
3319 2011-08-03 Robert Dewar <dewar@adacore.com>
3321 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3322 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3324 2011-08-03 Yannick Moy <moy@adacore.com>
3326 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3327 library-level because retriction No_Implicit_Dynamic_Code in the
3328 front-end prevents its definition as a local subprogram
3329 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3330 for reuse in other contexts
3331 (Traverse_Declarations_Or_Statements,
3332 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3333 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3334 procedures take a callback parameter to be called on all declarations
3336 (Traverse_All_Compilation_Units): new generic function to traverse a
3337 compilation unit and call a callback parameter on all declarations
3339 2011-08-03 Javier Miranda <miranda@adacore.com>
3341 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3342 in Java since they are always enclosed in a namespace that
3343 differentiates them, and overloaded entities are supported by the VM.
3345 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3347 * checks.adb (Determine_Range): If a computed bound of an operation is
3348 outside the range of the base type of the expression, and overflow
3349 checks are enabled, the result is unknown and cannot be used for any
3350 subsequent constant folding.
3351 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3352 unknown, so is the result of the comparison.
3354 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3356 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3357 From_Abort. When finalization was triggered by an abort, propagate
3358 Standard'Abort_Signal rather than Program_Error.
3359 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3361 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3362 From_Abort. When finalization was triggered by an abort, propagate
3363 Standard'Abort_Signal rather than Program_Error.
3364 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3366 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3367 Abort_Id. Update the calls to Build_Object_Declarations and
3368 Build_Raise_Statement to include Abort_Id.
3369 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3370 calls to Build_Object_Declarations and Build_Raise_Statement to include
3372 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3373 calls to Build_Object_Declarations and Build_Raise_Statement to include
3375 (Build_Components): Create an entity for Abort_Id when exceptions are
3376 allowed on the target.
3377 (Build_Finalizer): New local variable Abort_Id.
3378 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3379 calls to Build_Object_Declarations and Build_Raise_Statement to include
3381 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3382 declaration of flag Abort_Id to preserve the original abort status
3383 before finalization code is executed.
3384 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3385 runtime routine Raise_From_Controlled_Operation.
3386 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3387 Abort_Id. Update the call to Build_Object_Declarations to include
3388 Abort_Id. Update the layout of the finalizer body.
3389 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3390 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3391 clunky code to create all flags and objects related to
3392 exception propagation and replace it with a call to
3393 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3395 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3396 Add new formal Abort_Id and associated comment on its use.
3397 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3399 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3400 Remove the clunky code to create all flags and objects related to
3401 exception propagation and replace it with a call to
3402 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3404 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3406 * s-tassta.adb: Fix minor typos.
3408 2011-08-03 Robert Dewar <dewar@adacore.com>
3410 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3411 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3413 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3415 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3416 to packages. This ensures that the finalizer body will not end up
3417 inside the freeze node.
3418 (Process_Declarations): Add code to detect whether a freeze node has a
3419 nested finalization collection.
3421 2011-08-03 Pascal Obry <obry@adacore.com>
3423 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3424 (Current_Session): Return a not null access to Session_Type.
3425 (Default_Session): Likewise.
3427 2011-08-03 Robert Dewar <dewar@adacore.com>
3429 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3430 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3432 2011-08-03 Pascal Obry <obry@adacore.com>
3434 * g-awk.ads: Minor comment fix.
3436 2011-08-03 Sergey Rybin <rybin@adacore.com>
3438 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3439 the tree structure related to discriminant constraints.
3440 Original_Discriminant cannot be used any more for computing the
3441 defining name for the reference to a discriminant.
3443 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3445 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3446 function is not visibly tagged, this is not a dispatching call and
3447 therfore is not Tag_Indeterminate, even if the function is marked as
3448 dispatching on result.
3450 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3452 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3453 (Expand_N_Free_Statement): Add a guard to protect against run-times
3454 which do not support controlled types.
3455 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3456 against run-times which do not support controlled types.
3457 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3458 against run-times which do not support controlled types.
3459 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3460 against run-times which do not support controlled types.
3461 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3462 protect against run-times which do not support controlled types.
3464 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3466 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3467 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3469 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3471 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3472 modified in the source, to prevent spurious warnings when compiling
3475 2011-08-03 Thomas Quinot <quinot@adacore.com>
3477 * a-except-2005.adb: Minor reformatting.
3479 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3481 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3482 is a renaming declaration in the private part of a package, do not emit
3483 a warning that the with_clause could be moved because the renaming may
3484 be used in the body or in a child unit.
3486 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3488 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3489 Propagate the Comes_From_Source attribute from the original return
3490 object to the renaming.
3492 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3494 * exp_ch7.adb (Build_Raise_Statement): Do not call
3495 Raise_From_Controlled_Operation when this routine is not present in
3496 the run-time library.
3497 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3498 libraries (Ravenscar), tasks are non-terminating, and protected objects
3499 and tasks can only appear at library level, so we do not want
3500 finalization of protected objects nor tasks.
3501 * exp_intr.adb: Minor clarification in comment.
3502 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3503 Gen_Output_File_C): Remove references to finalization of library-level
3504 objects when using restricted run-time libraries.
3506 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3508 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3509 Original_Discriminant only if the parent type is a generic formal.
3511 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3513 * exp_ch13.adb: Add with and use clause for Targparm;
3514 (Expand_N_Free_Statement): Prevent the generation of a custom
3515 Deallocate on .NET/JVM targets since this requires pools and address
3517 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3518 .NET/JVM targets, attach the newly allocated object to the access
3519 type's finalization collection. Do not generate a call to
3520 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3521 exist in the runtime.
3522 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3523 create a custom Allocate for object that do not require initialization.
3524 Attach a newly allocated object to the access type's finalization
3525 collection on .NET/JVM.
3526 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3527 assignment of controlled types on .NET/JVM. The two hidden pointers
3528 Prev and Next and stored and later restored after the assignment takes
3530 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3531 kludge for .NET/JVM to recognize a particular piece of code coming from
3532 Heap_Management and change the call to Finalize into Deep_Finalize.
3533 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3534 finalization collections on .NET/JVM only for types derived from
3535 Controlled. Separate the association of storage pools with a collection
3536 and only allow it on non-.NET/JVM targets.
3537 (Make_Attach_Call): New routine.
3538 (Make_Detach_Call): New routine.
3539 (Process_Object_Declarations): Suppress the generation of
3540 build-in-place return object clean up code on .NET/JVM since it uses
3542 * exp_ch7.ads (Make_Attach_Call): New routine.
3543 (Make_Detach_Call): New routine.
3544 * exp_intr.adb Add with and use clause for Targparm.
3545 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3546 on .NET/JVM targets.
3547 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3548 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3549 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3550 names used in finalization.
3552 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3554 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3555 (Attach, Detach): Lock the current task when chaining an object onto a
3558 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3560 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3561 Rewritten to create the message strings when the exception is not
3562 raised by an abort during finalization.
3563 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3564 Raise_From_Controlled_Operation and update its associated comment.
3565 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3566 Ada.Finalization.Heap_Management provides key functionality
3567 associated with controlled objects on the heap, their creation,
3568 finalization and reclamation. Type Finalization_Collection is
3569 effectively a wrapper which sits ontop of a storage pool and performs
3570 all necessary bookkeeping for all the objects it contains. Each
3571 access-to-controlled or access-to-class-wide type receives a collection
3572 as part of its expansion. The compiler generates buffer code and
3573 invokes Allocate / Deallocate to create and destroy allocated
3575 * a-finali.adb ("="): Removed.
3576 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3577 fields Prev and Next.
3578 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3579 A library unit with at least one controlled object on the library level
3580 has a special finalizer which is invoked by the binder. To signal this,
3581 ali files carry field PF.
3582 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3583 associated comment on field usage.
3584 * a-tags.adb (Get_RC_Offset): Removed.
3585 (Needs_Finalization): New routine.
3586 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3587 Dispatch tables now carry field Needs_Finalization which provides
3588 runtime indication whether a type is controlled or has controlled
3589 components or both. Remove field RC_Offset.
3590 (Get_RC_Offset): Removed along with its associated pragma Export.
3591 Since tagged types with controlled components no longer carry hidden
3592 field _controller, the special mechanism to retrieve its location is no
3594 (Needs_Finalization): New routine.
3595 * atree.ads, atree.adb (Elist24): New routine.
3596 (Set_Elist24): New routine.
3597 * atree.h: Add a define clause for Elist24.
3598 * bindgen.adb New library-level variable Lib_Final_Built.
3599 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3600 presence of a VM target, the routine generates calls to the proper
3601 library finalization routine.
3602 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3603 targets. Set the correct library finalization routine depending on
3604 whether the library has controlled objects or this is a VM compilation.
3605 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3606 to library-level finalizers of compiled units in reverse order of
3607 elaboration. It also produces exception management code and reraises a
3608 potential exception after all units have been finalized.
3609 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3610 library-level finalizers of compiled units in reverse order of
3612 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3613 definitions of all library-level finalizers available to the compilation
3614 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3616 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3617 System.Standard_Library.Adafinal directly. If the library needs
3618 finalization actions, create the sequence of finalization calls.
3619 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3620 Generate a with clause for System.Soft_Links when compiling for a VM.
3621 Remove the code which imports System.Standard_Library.Adafinal as
3622 Do_Finalize. Generate the library finalization routine.
3623 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3624 If the library needs finalization actions, create all the definitions
3625 of library- level finalizers.
3626 (Has_Finalizer): New routine. Determines whether at least one compiled
3627 unit has a library-level finalizer.
3628 Add type Qualification_Mode.
3629 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3630 * einfo.adb: New usage of field 15 as Return_Flag.
3631 Remove Finalization_Chain_Entity from the usages of field 19.
3632 Remove Associated_Final_Chain from the usages of field 23.
3633 New usage of field 23 as Associated_Collection.
3634 New usage of field 24 as Finalizer.
3635 New usage of flag 252 as Is_Processed_Transient.
3636 (Associated_Final_Chain): Removed.
3637 (Associated_Collection): New routine.
3638 (Finalization_Chain_Entity): Removed.
3639 (Finalizer): New routine.
3640 (Is_Finalizer): New routine.
3641 (Is_Processed_Transient): New routine.
3642 (Return_Flag): New routine.
3643 (Set_Associated_Final_Chain): Removed.
3644 (Set_Associated_Collection): New routine.
3645 (Set_Finalization_Chain_Entity): Removed.
3646 (Set_Finalizer): New routine.
3647 (Set_Is_Processed_Transient): New routine.
3648 (Set_Return_Flag): New routine.
3649 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3651 (Write_Field8_Name): Alphabetize the output.
3652 (Write_Field11_Name): Alphabetize the output.
3653 (Write_Field12_Name): Alphabetize the output.
3654 (Write_Field13_Name): Alphabetize the output.
3655 (Write_Field14_Name): Alphabetize the output.
3656 (Write_Field15_Name): Alphabetize the output.
3657 (Write_Field16_Name): Alphabetize the output.
3658 (Write_Field17_Name): Alphabetize the output.
3659 (Write_Field18_Name): Alphabetize the output.
3660 (Write_Field19_Name): Alphabetize the output. Remove the output of
3661 Finalization_Chain_Entity.
3662 (Write_Field20_Name): Alphabetize the output.
3663 (Write_Field21_Name): Alphabetize the output.
3664 (Write_Field22_Name): Alphabetize the output.
3665 (Write_Field23_Name): Alphabetize the output. Remove the output of
3666 Associated_Final_Chain. Add output for Associated_Collection.
3667 (Write_Field24_Name): Alphabetize the output.
3668 (Write_Field25_Name): Add output for Finalizer.
3669 (Write_Field26_Name): Alphabetize the output.
3670 (Write_Field27_Name): Alphabetize the output.
3671 (Write_Field28_Name): Alphabetize the output.
3672 * einfo.ads: Add new field description for Associated_Collection and
3674 Remove Associated_Final_Chain and its uses in nodes.
3675 Remove Finalization_Chain_Entity and its uses in nodes.
3676 Add new field description for Finalizer and its uses in nodes.
3677 Add new synthesized attribute Is_Finalizer.
3678 Add new flag description for Is_Processed_Transient and its uses in
3680 Add new field description for Return_Flag and its uses in nodes.
3681 (Associated_Final_Chain): Removed along with its pragma Inline.
3682 (Associated_Collection): New routine and pragma Inline.
3683 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3684 (Finalizer): New routine and pragma Inline.
3685 (Is_Finalizer): New routine and pragma Inline.
3686 (Is_Processed_Transient): New routine and pragma Inline.
3687 (Return_Flag): New routine and pragma Inline.
3688 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3689 (Set_Associated_Collection): New routine and pragma Inline.
3690 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3691 (Set_Finalizer): New routine and pragma Inline.
3692 (Set_Is_Processed_Transient): New routine and pragma Inline.
3693 (Set_Return_Flag): New routine and pragma Inline.
3694 * exp_aggr.adb: Alphabetize subprograms.
3695 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3696 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3697 associated comments. Remove local variables External_Final_List and
3699 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3700 Ancestor. Remove the retrieval of finalization lists. Update the call to
3702 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3703 lists. Update the call to Late_Expansion.
3704 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3705 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3706 (Gen_Assign): Remove the retrieval of the finalization list used to
3707 build the assignment. Update the calls to Make_Init_Call and
3709 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3710 Remove the mechanism to determine attachment levels and finalization
3711 list retrieval. Remove the processing for coextensions.
3712 (Init_Controller): Removed. Controllers no longer exist.
3713 (Late_Expansion): Remove formals Flist and Obj along with their
3714 associated comments. Update the calls to Build_Record_Aggr_Code and
3715 Build_Array_Aggr_Code.
3716 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3717 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3718 appear in entry bodies, protected subprograms and task bodies.
3719 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3720 * exp_ch3.adb (Add_Final_Chain): Removed.
3721 (Build_Array_Init_Proc): Alphabetize local variables.
3722 (Build_Assignment): Alphabetize local variables. Update the call to
3724 (Build_Class_Wide_Master): Rename local variables to better reflect
3726 (Build_Discriminant_Assignments): Code reformatting.
3727 (Build_Init_Call_Thru): Code reformatting.
3728 (Build_Init_Procedure): Code reformatting. Generate a special version
3729 of Deep_Finalize which is capable of finalizing all initialized
3730 components and ignore the rest.
3731 (Build_Init_Statements): Rename local variables to better reflect their
3733 Reimplement the mechanism to include the creation and update of an index
3734 variable called a "counter". It is used as a bookmark for tracing
3735 initialized and non-initialized components.
3736 (Build_Initialization_Call): Remove local variable Controller_Typ.
3737 Alphabetize all local variables. Remove the initialization of the
3738 record controller and update the call to Make_Init_Call.
3739 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3740 New local variable Counter.
3741 (Constrain_Array): Alphabetize.
3742 (Expand_Freeze_Array_Type): Create a collection instead of a
3744 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3745 Finalize_Address which is used in conjunction with allocated controlled
3747 (Expand_N_Object_Declaration): Remove the creation of a finalization
3748 list for anonymous access types. Update the calls to Make_Init_Call and
3750 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3751 retrieval of finalization lists. Remove the expansion of the record
3752 controller. Create TSS primitive Finalize_Address used in conjunction
3753 with controlled objects on the heap. Create finalization collections
3754 for access-to-controlled record components.
3755 (Expand_Record_Controller): Removed.
3756 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3757 class-wide types now requires additional processing. Create
3758 finalization collections for access-to-controlled types.
3759 (Increment_Counter): New routine.
3760 (Make_Counter): New routine.
3761 (Make_Eq_If): Remove the mention of Name_uController.
3762 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3763 types coming from System.Finalization_Root.
3764 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3765 (Predefined_Primitive_Bodies): There is no longer need to skip types
3766 coming from System.Finalization_Root.
3767 (Stream_Operation_OK): Do not generate stream routines for
3768 type Ada.Finalization.Heap_Management.Finalization_Collection.
3769 * exp_ch3.ads: Alphabetize subprograms.
3770 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3771 Add with and use clause for Lib.
3772 (Complete_Coextension_Finalization): Removed.
3773 (Complete_Controlled_Allocation): New routine. Create a finalization
3774 collection for anonymous access-to-controlled types. Create a custom
3775 Allocate which interfaces with the back end and the machinery in
3777 (Expand_Allocator_Expression): Add necessary calls to
3778 Complete_Controlled_Allocation. Remove the retrieval of finalization
3779 lists. Update the calls to Make_Adjust_Call. Generate a call to
3780 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3781 the associated collection.
3782 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3783 Code clean up. Remove the retrieval of finalization lists and
3785 Update the call to Make_Init_Call. Generate a call to
3786 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3787 the associated collection.
3788 (Get_Allocator_Final_List): Removed. Finalization lists are not
3790 (Suitable_Element): Remove the mention of Name_uController.
3791 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3792 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3793 the left hand side, carry out the assignment and adjust the left hand
3795 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3796 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3797 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3798 BIP_Collection and BIPcollection.
3799 (Build_Heap_Allocator): New routine used to allocate the return object
3800 of a build-in-place function onto a collection.
3801 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3802 (Expand_Call): Do not replace direct calls to Deep routines with their
3804 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3805 and update their occurrences. Add a special return flag to monitor the
3806 [ab]normal execution of the function. The flag is set right before the
3808 Rewrite the mechanism used to allocate a build-in-place return object
3809 on the heap or on a storage pool.
3810 (Is_Direct_Deep_Call): New routine.
3811 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3812 build-in-place function call instead of a final list. Build a call to
3813 Set_Finalize_Address_Ptr to decorate the associated collection.
3814 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3815 order to name the build-in-place function call's result for later
3816 finalization. Add a collection to a build-in-place function call
3817 instead of a final list.
3818 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3819 build-in-place function call instead of a final list. Remove the code
3820 which moves one final list and transforms it into the actual in a
3821 nested build-in-place call.
3822 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3823 build-in-place function call instead of a final list.
3824 (Move_Final_List): Removed.
3825 (Needs_BIP_Collection): New routine.
3826 (Needs_BIP_Final_List): Removed.
3827 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3828 enumeration type BIP_Formal_Kind.
3829 Update the related comment.
3830 (Needs_BIP_Collection): New routine.
3831 (Needs_BIP_Final_List): Removed.
3832 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3833 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3834 majority of subprograms in this unit. Add Name_Finalize_Address to
3835 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3836 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3837 statements for an array type.
3838 (Build_Adjust_Statements): Create the adjust statements for a record
3840 (Build_Cleanup_Statements): New routine. A procedure which given any
3841 construct containing asynchronous calls, references to _master, or is a
3842 task body, a task allocation or a protected body produces the necessary
3843 runtime calls to clean up these constructs.
3844 (Build_Exception_Handler): New routine.
3845 (Build_Final_List): Removed.
3846 (Build_Finalization_Collection): New routine. A core procedure which
3847 creates a collection to service heap allocated controlled objects
3848 associated with an access-to-controlled type.
3849 (Build_Finalize_Statements): Create the finalization statements for a
3851 (Build_Finalizer): New routine. A core procedure which given any
3852 construct with declarations and/or statements detects all objects which
3853 need any type of clean up (controlled objects, protected objects) and
3854 generates all necessary code to clean up the said objects in the proper
3856 (Build_Finalizer_Call): New routine.
3857 (Build_Initialize_Statements): Create the initialization statements for
3858 an array type. The generated routine contains code to finalize partially
3860 (Build_Object_Declarations): New routine.
3861 (Build_Raise_Statement): New routine.
3862 (Clean_Simple_Protected_Objects): Removed.
3863 (Controller_Component): Removed.
3864 (Enclosing_Function): New routine.
3865 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3866 either declarations or statements or both.
3867 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3868 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3870 (Find_Final_List): Removed.
3871 (Global_Flist_Ref): Removed.
3872 (In_Finalization_Root): Removed.
3873 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3874 scope in terms of tree nodes. Process all transient variables within
3876 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3877 generated after the adjust.
3878 (Make_Attach_Call): Removed.
3879 (Make_Call): New routine.
3880 (Make_Clean): Removed.
3881 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3883 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3885 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3887 (Make_Final_Call): Modified to simply create a call to either
3888 Deep_Finalize or Finalize.
3889 (Make_Finalize_Address_Body): New routine.
3890 (Make_Finalize_Address_Stmts): New routine. A function which produces
3891 TSS primitive Finalize_Address used in conjunction with heap allocated
3893 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3894 (Make_Init_Call): Rewritten. There is no longer an attach call
3895 generated after initialization.
3896 (Make_Local_Deep_Finalize): New routine.
3897 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3898 (Make_Transient_Block): Remove the finalization list retrieval and
3900 (Needs_Finalization): Moved to Exp_Util.
3901 (Parent_Field_Type): New routine.
3902 (Preprocess_Components): New routine.
3903 (Process_Transient_Objects): New routine.
3904 (Wrap_HSS_In_Block): New routine.
3905 (Wrap_Transient_Declaration): Remove finalization list management and
3906 controller insertion.
3907 (Wrap_Transient_Expression): Code reformatting.
3908 (Wrap_Transient_Statement): Code reformatting.
3909 * exp_ch7.ads (Build_Final_List): Removed.
3910 (Build_Finalization_Collection): New routine.
3911 (Build_Raise_Statement): New routine.
3912 (Controller_Component): Removed.
3913 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3914 (Find_Final_List): Removed.
3915 (In_Finalization_Root): Removed.
3916 (Is_Simple_Protected_Type): Update related comment.
3917 (Make_Adjust_Call): New parameter profile and associated comments.
3918 (Make_Attach_Call): Removed.
3919 (Make_Final_Call): New parameter profile and associated comments.
3920 (Make_Finalize_Address_Body): New routine.
3921 (Make_Init_Call): New parameter profile and associated comments.
3922 (Make_Local_Deep_Finalize): New routine.
3923 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3924 (Needs_Finalization): Moved to Exp_Util.
3925 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3926 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3927 (Find_Protection_Type): Moved to Exp_Util.
3928 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3929 (Make_DT): Update sequence of dispatch table initialization. Remove the
3930 initialization of field RC_Offset. Add initialization of field Needs_
3932 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3933 Reimplement how an object is first finalized, then deallocated.
3934 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3936 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3937 Register TSS_Finalize_Address with type TSS_Names.
3938 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3939 procedure provides the interface between an allocation / deallocation
3940 and the support machinery in Ada.Finalization.Heap_Management.
3941 (Find_Init_Call): Code reformatting.
3942 (Find_Init_Call_In_List): Code reformatting.
3943 (Find_Protection_Type): Moved from Exp_Ch9.
3944 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3945 (Has_Controlled_Coextensions): Removed.
3946 (Has_Controlled_Objects): New routine.
3947 (In_Library_Level_Package_Body): New routine.
3948 (Insert_Action_After): New routine.
3949 (Is_Finalizable_Transient): New routine. This predicate determines
3950 whether an object declaration is one of the many variants of controlled
3952 (Is_Null_Access_BIP_Func_Call): New routine.
3953 (Is_Non_BIP_Func_Call): New routine.
3954 (Is_Related_To_Func_Return): New routine.
3955 (Needs_Finalization): Moved from Exp_Ch7.
3956 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3957 (Find_Protection_Type): Moved from Exp_Ch9.
3958 (Has_Controlled_Coextensions): Removed.
3959 (Has_Controlled_Objects): New routine.
3960 (In_Library_Level_Package_Body): New routine.
3961 (Insert_Action_After): New routine.
3962 (Is_Finalizable_Transient): New routine.
3963 (Is_Null_Access_BIP_Func_Call): New routine.
3964 (Is_Non_BIP_Func_Call): New routine.
3965 (Is_Related_To_Func_Return): New routine.
3966 (Needs_Finalization): Moved from Exp_ch7.
3967 * expander.adb (Expand): Add a case for N_Free_Statement.
3968 * freeze.adb (Freeze_All): Replace the generation of a finalization
3969 list with a collection for access-to-controlled types.
3970 (Freeze_Entity): Code reformatting.
3971 (Freeze_Record_Type): Remove the freezing of a record controller
3973 (Freeze_Subprogram): Code reformatting.
3974 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3976 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3977 has a library-level finalizer.
3978 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3979 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3980 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3981 files. Add a-fihema to the list of object files.
3983 Alphabetize the associations in type Is_Parameterless_Attribute.
3984 * rtsfind.ads: Ada.Finalization_List.Controller and
3985 System.Finalization_Implementation are no longer a GNAT unit.
3986 Update the range of type Ada_Finalization_Child. Remove the following
3987 recoverable entities:
3989 RE_Attach_To_Final_List
3993 RE_Finalizable_Ptr_Ptr
3994 RE_Global_Final_List
3995 RE_Limited_Record_Controller
3998 RE_Record_Controller
3999 RE_Simple_List_Controller
4001 Add the following recoverable entities:
4003 RE_Add_Offset_To_Address
4007 RE_Exception_Identity
4008 RE_Finalization_Collection
4009 RE_Finalization_Collection_Ptr
4010 RE_Needs_Finalization
4011 RE_Save_Library_Occurrence
4012 RE_Set_Finalize_Address_Ptr
4013 RE_Set_Storage_Pool_Ptr
4015 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
4017 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
4018 (First_Stored_Discriminant): Remove the mention of Name_uController.
4019 * sem_aux.ads: Comment reformatting.
4020 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
4021 to redecorate an already existing class-wide type.
4022 (Decorate_Tagged_Type): New parameter profile and associated comment.
4023 Create a "shadow class-wide type" for a shadow entity.
4024 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
4025 of the final chain along with the associated comment.
4026 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
4027 Full_Desig and set it to the full view of the designated type.
4028 Initialize the finalization collection to empty.
4029 (Build_Derived_Record_Type): Alphabetize local variables. Code
4031 (Collect_Fixed_Components): Remove the mention of Name_uController.
4032 (Create_Constrained_Components): Remove the mention of Name_uController.
4033 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
4034 class-wide type of a shadow entity.
4035 (Process_Full_View): Update the machinery which marks type
4036 Limited_Controlled's entity as limited.
4037 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
4038 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
4039 list, instead make a collection build-in-place formal.
4040 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
4041 a designated type in order to establish a match between the renaming
4042 and the renamed entity.
4043 (Find_Selected_Component): Add guard to prevent spurious exceptions
4044 from being raised on .NET/JVM.
4045 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
4046 to the list of primitive that need special processing. Update arrays
4047 C_Names and D_Names.
4048 (Replace_Types): Handle class-wide types.
4049 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
4050 different parameter profile, look at the first formal.
4051 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
4052 use clauses for Exp_Util.
4053 * sem_res.adb: Remove with and use clauses for Elists.
4054 (Propagate_Coextensions): Removed.
4055 (Resolve_Allocator): Do not propagate the list of coextensions from one
4056 allocator to another.
4057 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
4058 Deaccessed_T to Desig_Typ.
4059 (Enter_Name): Remove the mention of Name_uController.
4060 (Gather_Components): Remove the mention of Name_uController.
4061 (Incomplete_Or_Private_View): New routine.
4062 (Is_Coextension_Root): Removed.
4063 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
4064 * sem_util.ads (Incomplete_Or_Private_View): New routine.
4065 (Is_Coextension_Root): Removed.
4066 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
4067 Controlled types are now derived from a null tagged record. Remove
4068 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
4069 * sinfo.adb (Coextensions): Removed.
4070 (Set_Coextensions): Removed.
4071 * sinfo.ads: Remove Coextensions from the explanation of node fields
4072 and its uses in nodes.
4073 Update the field usage of N_Allocator.
4074 (Coextensions): Removed along with its pragma Inline.
4075 (Set_Coextensions): Removed along with its pragma Inline.
4076 * snames.ads-tmpl: Remove names
4081 Name_uLocal_Final_List
4082 Name_Finalization_Root
4089 Name_Finalize_Address
4090 * s-pooglo.adb (Allocate): Add overriding indicator.
4091 (Deallocate): Add overriding indicator.
4092 (Storage_Size): Add overriding indicator.
4093 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
4094 than Finalize_Global_List.
4095 (Null_Finalize_Global_List): Removed.
4096 (Save_Library_Occurrence): New routine.
4097 * s-soflin.ads: Remove variable Finalize_Global_List along with its
4098 initialization. Add variable Finalize_Library_Objects along with its
4099 pragma Export. Add variables Library_Exception and
4100 Library_Exception_Set along with their pragma Export.
4101 (Null_Finalize_Global_List): Removed.
4102 (Save_Library_Occurrence): New routine.
4103 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
4104 rather than Finalize_Global_List.
4105 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
4106 of the constructed node.
4108 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4110 * link.c: Include "auto-host.h" before system headers.
4112 2011-08-03 Vincent Celier <celier@adacore.com>
4114 * make.adb (Gnatmake): Add to table Library_Projs only library projects
4115 that are not extended. Do not check if a library project that is
4116 extended should be regenerated. Do not add to table Library_Paths the
4117 libraries that are in extended projects. Link only with libraries that
4118 are in libray projects that are not extended.
4119 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
4120 for a library project that is extended.
4122 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4124 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
4125 conforming subprogram renamings that appear to be completions if they
4126 are not fully conformant.
4127 Such renamings are homographs but not completions.
4128 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
4129 names in a subprogram renaming that appears in an instance.
4131 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4133 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
4134 not immutably limited, build actual subtype from expression to provide
4135 proper bounds to caller.
4137 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4139 * sem_ch8.adb: Minor comment correction.
4141 2011-08-03 Thomas Quinot <quinot@adacore.com>
4143 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
4144 returning a limited array, use an extended return statement.
4146 2011-08-03 Vincent Celier <celier@adacore.com>
4148 * make.adb (Initialize): If --subdirs= is used, but no project file is
4149 specified, attempt to create the specify subdir if it does not already
4150 exist and use it as the object directory as if -D had been specified.
4152 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4154 * s-tpopsp-vms.adb: New file.
4155 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4156 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4158 2011-08-03 Emmanuel Briot <briot@adacore.com>
4160 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4163 2011-08-03 Yannick Moy <moy@adacore.com>
4165 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4166 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4167 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4168 detect that an array has static bounds.
4170 2011-08-03 Thomas Quinot <quinot@adacore.com>
4172 * exp_dist.adb: Minor reformatting.
4174 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4176 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4177 (ATCB_Key): Removed, not always used.
4179 2011-08-03 Emmanuel Briot <briot@adacore.com>
4181 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4182 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4183 most remaining global variables.
4185 2011-08-03 Robert Dewar <dewar@adacore.com>
4187 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4188 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4191 2011-08-03 Javier Miranda <miranda@adacore.com>
4193 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4194 that must be passed by copy in VM targets.
4196 2011-08-03 Emmanuel Briot <briot@adacore.com>
4198 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4199 duplicates a similar htable now in the project tree.
4201 2011-08-03 Claire Dross <dross@adacore.com>
4203 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4204 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4205 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4206 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4207 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4208 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4209 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4212 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4214 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4215 (ATCB_Key): Removed, not always used.
4216 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4218 * s-tpopsp-tls.adb: New file.
4219 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4220 x86/x64/ia64/powerpc/sparc Linux.
4222 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4224 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4225 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4227 2011-08-03 Thomas Quinot <quinot@adacore.com>
4229 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4230 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4231 Fix type selection for mapping integer types to PolyORB types.
4233 2011-08-03 Bob Duff <duff@adacore.com>
4235 * sem_ch7.adb: Minor comment clarification.
4237 2011-08-03 Bob Duff <duff@adacore.com>
4239 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4240 an error analyzing a choice, skip further processing. Further
4241 processing could cause a crash or cascade errors.
4243 2011-08-03 Emmanuel Briot <briot@adacore.com>
4245 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4246 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4247 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4248 prj-env.ads (Shared_Project_Tree_Data): new type
4249 An aggregate project and its aggregated trees need to share the common
4250 data structures used for lists of strings, packages,... This makes the
4251 code simpler since otherwise we have to pass the root tree (also used
4252 for the configuration file data) in addition to the current project
4253 tree. This also avoids ambiguities as to which tree should be used.
4254 And finally this saves a bit of memory.
4255 (For_Every_Project_Imported): new parameter Tree.
4256 Since aggregated projects are using a different tree, we need to let
4257 the caller know which tree to use to manipulate the returned project.
4259 2011-08-03 Robert Dewar <dewar@adacore.com>
4261 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4262 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4263 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4264 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4266 2011-08-03 Javier Miranda <miranda@adacore.com>
4268 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4269 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4271 2011-08-03 Bob Duff <duff@adacore.com>
4273 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4276 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4278 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4279 g-sehash.ads: Fix typo. Update header.
4281 2011-08-03 Thomas Quinot <quinot@adacore.com>
4283 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4286 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4288 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4289 prefixes of private types along with records, since the selector may be
4291 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4292 private types along with records, since the selector may be a
4295 2011-08-03 Emmanuel Briot <briot@adacore.com>
4297 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4299 2011-08-03 Javier Miranda <miranda@adacore.com>
4301 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4302 Tagged_Type_Expansion.
4304 2011-08-03 Yannick Moy <moy@adacore.com>
4306 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4307 violation when the argument of concatenation is the name of a
4310 2011-08-03 Emmanuel Briot <briot@adacore.com>
4312 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4313 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4314 (Process_Declarative_Items): new parameter Child_Env.
4316 2011-08-03 Yannick Moy <moy@adacore.com>
4318 * alfa.ads: Update format of ALFA section in ALI file in order to
4319 add a mapping from bodies to specs when both are present.
4320 (ALFA_Scope_Record): Add components for spec file/scope.
4321 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4323 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4324 collected, fill in the spec information when relevant.
4325 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4328 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4330 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4331 code unit to decide whether to add internally generated subprograms.
4333 2011-08-03 Javier Miranda <miranda@adacore.com>
4335 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4336 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4337 be handled by copy in VM targets.
4339 2011-08-03 Emmanuel Briot <briot@adacore.com>
4341 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4342 code with Makeutl.Get_Switches.
4343 * prj-tree.adb: Update comment.
4345 2011-08-03 Thomas Quinot <quinot@adacore.com>
4347 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4348 subprogram with a limited formal that does not support external
4351 2011-08-03 Yannick Moy <moy@adacore.com>
4353 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4355 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4356 not from current unit in two phases, because it is not possible to
4357 change the table while iterating over its content.
4358 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4360 2011-08-03 Sergey Rybin <rybin@adacore.com>
4362 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4363 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4365 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4367 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4368 and the component type is composite, this is ambiguous for predefined
4369 concatenation, but if the node is not overloaded and the entity is a use
4370 -defined function its profile can be used to resolve that aggregate.
4372 2011-08-03 Robert Dewar <dewar@adacore.com>
4374 * exp_ch4.adb: Minor code cleanup.
4376 2011-08-03 Thomas Quinot <quinot@adacore.com>
4378 * exp_dist.adb: Do not generate distribution stubs if serious errors
4379 have been diagnosed.
4381 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4383 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4384 the first formal of a primitive operation, go to the base type to
4385 handle properly an access to a derived type with constrained
4387 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4388 user-defined function that is only use-visible.
4390 2011-08-03 Robert Dewar <dewar@adacore.com>
4392 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4393 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4394 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4395 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4396 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4397 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4398 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4399 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4401 2011-08-03 Robert Dewar <dewar@adacore.com>
4403 * repinfo.adb (List_Mechanism): Add handling of
4404 Convention_Ada_Pass_By_XXX.
4405 * sem_mech.adb (Set_Mechanism): Ditto.
4406 * sem_prag.adb (Process_Convention): Add entries for
4407 Convention_Ada_Pass_By_XXX.
4408 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4410 2011-08-03 Pascal Obry <obry@adacore.com>
4412 * makeutl.adb: Minor reformatting.
4414 2011-08-03 Vincent Celier <celier@adacore.com>
4417 (Get_File_Name) If the file cannot be found when there are no config
4418 pragmas file and May_Fail is True, return No_File instead of the file
4419 name, to be consistent.
4421 2011-08-03 Pascal Obry <obry@adacore.com>
4423 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4426 2011-08-03 Javier Miranda <miranda@adacore.com>
4429 (Same_Representation): In VM targets the representation of arrays with
4430 aliased components differs from arrays with non-aliased components.
4432 2011-08-03 Emmanuel Briot <briot@adacore.com>
4434 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4435 not systematically lower case attribute indexes that contain no "."
4436 Fix definition of several Naming attributes, which take
4437 a unit name as index and therefore should be case insensitive.
4438 Minor refactoring (reduce length of variable names).
4440 2011-08-03 Emmanuel Briot <briot@adacore.com>
4442 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4444 2011-08-03 Emmanuel Briot <briot@adacore.com>
4446 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4447 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4448 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4449 prj-tree.ads (Prj.Tree.Environment): new type.
4451 2011-08-03 Emmanuel Briot <briot@adacore.com>
4453 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4454 prj-tree.adb, prj-tree.ads (Environment): new type.
4456 2011-08-03 Emmanuel Briot <briot@adacore.com>
4458 * prj-tree.ads: Remove unused variable.
4460 2011-08-03 Yannick Moy <moy@adacore.com>
4462 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4463 issuing messages related to SPARK restriction violation.
4465 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4467 * sem_ch6.adb: guard against error nodes in return statements.
4469 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4471 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4472 a warning can only appear on a configuration file, so emit warning
4473 without further checks.
4475 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4477 * s-interr.ads: add overriding keyword.
4479 2011-08-03 Geert Bosch <bosch@adacore.com>
4481 * exp_attr.adb: Fix minor typo.
4483 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4485 * par-ch4.adb: improve error recovery.
4487 2011-08-03 Emmanuel Briot <briot@adacore.com>
4489 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4490 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4493 2011-08-03 Emmanuel Briot <briot@adacore.com>
4495 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4496 "external" as an attribute name in aggregate projects.
4498 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4500 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4501 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4502 from 0, so we need to adjust.
4504 2011-08-03 Emmanuel Briot <briot@adacore.com>
4506 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4507 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4509 2011-08-03 Yannick Moy <moy@adacore.com>
4511 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4512 restriction on overloaded entity if the entity is not an operator.
4514 2011-08-03 Yannick Moy <moy@adacore.com>
4516 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4517 restrict.ads: Rename remaining Check_Formal_Restriction* into
4518 Check_SPARK_Restriction*.
4520 2011-08-03 Emmanuel Briot <briot@adacore.com>
4522 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4523 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4525 (Project_Empty): removed
4526 (Empty_Project): new parameter Qualifier
4527 This is used to have fields specific to aggregate projects, cleaner
4528 New field to store the list of aggregated projects.
4529 (Check_Aggregate_Project): removed
4530 (Process_Aggregated_Projects, Free): new subprograms.
4532 2011-08-03 Olivier Hainque <hainque@adacore.com>
4534 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4536 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4538 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4539 explicit dereference of an unconstrained type, create a constrained
4540 subtype for it, as is done for function calls that return an
4543 2011-08-03 Thomas Quinot <quinot@adacore.com>
4545 * g-pehage.adb (Finalize): Avoid possible double-free.
4547 2011-08-03 Steve Baird <baird@adacore.com>
4549 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4550 Elab_Spec/Body attrs in CodePeer_Mode.
4552 2011-08-03 Javier Miranda <miranda@adacore.com>
4554 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4555 low bound is not known at compile time but they have no others choice.
4556 Done because in this case the bounds can be obtained directly from the
4559 2011-08-03 Ed Falis <falis@adacore.com>
4561 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4562 on VxWorks SMP. Remove unusable constant ANY_CPU.
4564 2011-08-03 Emmanuel Briot <briot@adacore.com>
4566 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4567 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4568 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4569 Prj.Env.Initialize_Empty): new subprograms
4570 (Get_Env, Find_Project): remove parameter Target_Name.
4572 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4574 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4575 as a condition for the delayed call to Derived_Subprograms done for the
4576 case of the rewriting of a derived type that constrains the
4577 discriminants of its parent type.
4578 Avoids redundant subprogram derivations for private subtype derivations.
4580 2011-08-03 Javier Miranda <miranda@adacore.com>
4582 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4583 Build_Record_Aggr_Code.
4584 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4585 discriminants in extension aggregates.
4587 2011-08-03 Emmanuel Briot <briot@adacore.com>
4589 * prj-pp.adb (Print): also output project qualifiers, since in
4590 particular "aggregate" is mandatory in an aggregate project.
4592 2011-08-03 Emmanuel Briot <briot@adacore.com>
4594 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4595 (Debug_Output): new function.
4597 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4599 * gnat_ugn.texi: Document -Wstack-usage.
4600 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4602 2011-08-03 Thomas Quinot <quinot@adacore.com>
4604 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4605 have keyword LIMITED.
4607 2011-08-03 Yannick Moy <moy@adacore.com>
4609 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4610 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4611 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4612 section (does not happen in compiler, only if code directly calls
4614 * get_alfa.adb, get_alfa.ads: New files.
4615 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4617 * lib-xref-alfa.adb: New file.
4618 * lib-xref.adb, lib-xref.ads
4619 (Xref_Entry): redefine information needed in cross-references for ALFA.
4620 Push ALFA treatments in separated local package.
4621 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4622 identifiers. Return entity of package body instead of spec. Return
4623 Empty for a scope with no location.
4624 (Generate_Reference): adapt to new components for ALFA information.
4625 Remove the need for D references on definitions.
4626 (Is_Local_Reference): moved to ALFA local package
4627 (Output_References): extract subfunction as Extract_Source_Name
4628 (Output_Local_References): remove procedure, replaced by filtering of
4629 cross-references in package ALFA and printing in Put_ALFA.
4630 (Write_Entity_Name): remove procedure
4631 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4632 print exact name of entity as it appears in source file
4633 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4634 * put_alfa.adb, put_alfa.ads: New files.
4635 * xref_lib.adb (Search_Xref): protect read of cross-references against
4636 reading other sections of the ALI file, in gnatxref
4637 (Search): protect read of cross-references against reading other
4638 sections of the ALI file, in gnatfind.
4639 * gcc-interface/Make-lang.in: Update dependencies.
4641 2011-08-03 Thomas Quinot <quinot@adacore.com>
4643 * sem_ch3.adb: Minor reformatting.
4645 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4647 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4648 raising an exception.
4650 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4652 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4653 type, always use 1 as the lower bound or string, even if lower bound of
4654 context is not static, to handle properly null strings in a non-static
4657 2011-08-03 Bob Duff <duff@adacore.com>
4659 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4660 always legal on the right-hand side of an assignment statement; there
4661 is always an applicable index constraint in this case. Therefore, the
4662 check for Pkind = N_Assignment_Statement is now unconditional -- it
4663 doesn't depend on whether Is_Constrained (Typ).
4665 2011-08-03 Robert Dewar <dewar@adacore.com>
4667 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4669 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4671 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4672 for an itype created within a generic unit.
4674 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4676 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4677 suppresses all inlining.
4679 2011-08-03 Robert Dewar <dewar@adacore.com>
4681 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4682 exp_aggr.adb: Minor reformatting.
4684 2011-08-03 Thomas Quinot <quinot@adacore.com>
4686 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4687 tagged assignment when discriminant checks are suppressed. This is
4688 useless and extremely costly in terms of static stack usage.
4690 2011-08-03 Bob Duff <duff@adacore.com>
4692 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4693 of generics, because this leads to the wrong entity in the wrong scope,
4694 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4696 (Process_Interface_Name): Follow Alias for instances of generics, to
4697 correct for the above change.
4699 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4701 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4702 is an integer literal it is always safe to replace the reference. In
4703 addition, if the reference appears in the generated code for an object
4704 declaration it is necessary to copy because otherwise the reference
4705 might be to the uninitilized value of the discriminant of the object
4708 2011-08-03 Pascal Obry <obry@adacore.com>
4710 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4711 ACL used, in this case we want to check for ending .exe, not .exe
4712 anywhere in the path.
4714 2011-08-03 Sergey Rybin <rybin@adacore.com>
4716 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4717 the tree structure (semantic decoration of references to record
4720 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4722 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4723 choices of a named array aggregate, bail out when any choices are
4724 marked as Errors_Posted.
4726 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4728 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4729 in which entity is frozen, to handle properly loop variables in
4732 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4734 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4735 subtype is not static, compute the upper bound using attributes, to
4736 handle properly index types that are not integer types.
4738 2011-08-03 Bob Duff <duff@adacore.com>
4740 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4741 Update copyright notice.
4743 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4745 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4746 Original_Discriminant if within an instance.
4747 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4749 2011-08-03 Thomas Quinot <quinot@adacore.com>
4751 * einfo.ads: Minor reformatting.
4753 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4755 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4756 composite type with an unfrozen subcomponent, in the profile of a
4757 primitive operation.
4759 2011-08-03 Robert Dewar <dewar@adacore.com>
4761 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4763 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4765 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4766 unconstrained type with discriminants is initialized with an aggregate,
4767 use the constrained subtype of the aggregate as the type of the object,
4768 because it is immutable, and this allows the back-end to generate no
4769 code for the object declaration.
4771 2011-08-03 Robert Dewar <dewar@adacore.com>
4773 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4774 comparison operand is variable, and turns out to be zero or negative.
4776 2011-08-03 Javier Miranda <miranda@adacore.com>
4779 (Expand_Dispatching_Constructor_Call): Disable expansion of
4780 code required for native targets. Done to avoid generating
4781 references to unavailable runtime entities in VM targets.
4783 (Expand_N_Object_Declaration): Add missing support to handle
4784 the explicit initialization of class-wide interface objects.
4787 2011-08-03 Matthew Heaney <heaney@adacore.com>
4789 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4791 2011-08-03 Matthew Heaney <heaney@adacore.com>
4793 * a-cbdlli.adb (Splice): move source items from first to last
4795 2011-08-03 Yannick Moy <moy@adacore.com>
4797 * sem_util.ads: comment added.
4799 2011-08-03 Javier Miranda <miranda@adacore.com>
4802 (Expand_Record_Aggregate): In VM targets disable the expansion into
4803 assignments of aggregates whose type is not known at compile time.
4805 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4807 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4808 protected entries and task entries, to build the proper renaming
4809 declaration for entry formals, used in debugging.
4810 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4811 parameters in the same way.
4813 2011-08-02 Robert Dewar <dewar@adacore.com>
4815 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4816 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4817 code reorganization.
4819 2011-08-02 Robert Dewar <dewar@adacore.com>
4821 * debug.adb: Debug flag d.P to suppress length comparison optimization
4822 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4823 comparison of Length by comparing First/Last instead.
4825 2011-08-02 Matthew Heaney <heaney@adacore.com>
4827 * a-cobove.ads: Code clean up.
4829 2011-08-02 Vincent Celier <celier@adacore.com>
4831 * adaint.c (file_names_case_sensitive_cache): New static int.
4832 (__gnat_get_file_names_case_sensitive): Cache the return value in
4833 file_names_case_sensitive_cache at the first invocation, to avoid
4834 multiple calls to getenv.
4836 2011-08-02 Bob Duff <duff@adacore.com>
4838 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4840 2011-08-02 Yannick Moy <moy@adacore.com>
4842 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4843 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4844 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4845 indicate that we are in a precondition or postcondition. This is used in
4846 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4847 decide whether to flag the spec or body of the current subprogram as
4850 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4852 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4854 * a-extiin.ads: New file.
4856 2011-08-02 Bob Duff <duff@adacore.com>
4858 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4859 now raises Name_Error instead of Use_Error in certain cases. The other
4860 parts of this AI were already implemented properly.
4862 2011-08-02 Vincent Celier <celier@adacore.com>
4864 * link.c: Only import "auto-host.h" when building the gnattools.
4866 2011-08-02 Yannick Moy <moy@adacore.com>
4868 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4869 which calls a local subprogram, so extract subprogram
4870 from Mark_Non_ALFA_Subprogram_Body.
4872 2011-08-02 Javier Miranda <miranda@adacore.com>
4875 (Extract_Dispatching_Call): If the type of the dispatching object is an
4876 access type then return an explicit dereference in the Object out-mode
4879 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4881 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4882 compatibility checks for all indexes of an array subtype, not just the
4883 first. Reset Has_Dynamic_Range_Check on the subtype before each
4884 potential check to ensure that Insert_Range_Checks will not elide any
4885 of the dynamic checks.
4887 2011-08-02 Yannick Moy <moy@adacore.com>
4889 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4890 SPARK restriction at parsing time.
4891 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4892 directive only if the SPARK restriction is set for this unit.
4894 2011-08-02 Yannick Moy <moy@adacore.com>
4896 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4897 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4898 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4899 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4900 Mark_Non_ALFA_Subprogram_Body.
4901 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4904 2011-08-02 Yannick Moy <moy@adacore.com>
4906 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4909 2011-08-02 Robert Dewar <dewar@adacore.com>
4911 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4912 exp_ch3.adb: Minor reformatting.
4914 2011-08-02 Emmanuel Briot <briot@adacore.com>
4916 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4917 files, not any regular file.
4918 (__gnat_locate_file_with_predicate): new subprogram.
4920 2011-08-02 Yannick Moy <moy@adacore.com>
4922 * sinfo.adb, sinfo.ads: Restrict the use of flags
4923 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4924 nodes, plus N_Subtype_Declaration for the 2nd one.
4926 2011-08-02 Sergey Rybin <rybin@adacore.com>
4928 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4929 - fix bugs in the description of Source_Trace;
4930 - get rid of UNIT_NAME;
4932 2011-08-02 Javier Miranda <miranda@adacore.com>
4935 (Build_Dispatching_Requeue): Adding support for VM targets
4936 since we cannot directly reference the Tag entity.
4937 * exp_sel.adb (Build_K): Adding support for VM targets.
4938 (Build_S_Assignment): Adding support for VM targets.
4940 (Default_Prim_Op_Position): In VM targets do not restrict availability
4941 of predefined interface primitives to compiling in Ada 2005 mode.
4942 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4943 restricted to compiling in Ada 2005 mode.
4944 (Make_VM_TSD): Generate code that declares and initializes the OSD
4945 record. Needed to support dispatching calls through synchronized
4948 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4949 primitives associated with synchronized interfaces.
4950 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4951 primitives associated with synchronized interfaces.
4953 2011-08-02 Yannick Moy <moy@adacore.com>
4955 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4956 statements hidden in SPARK if preceded by the HIDE directive
4957 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4958 exception handlers as hidden in SPARK if preceded by the HIDE directive
4959 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4960 if starting with the HIDE directive
4961 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4962 starting with the HIDE directive; mark the declarations in a private
4963 part as hidden in SPARK if the private part starts with the HIDE
4965 * restrict.adb, restrict.ads
4966 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4967 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4968 argument node belongs to a part which is hidden in SPARK
4969 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4970 parts in SPARK; protect the possibly costly call to
4971 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4972 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4973 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4974 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4976 (Scan): recognize special comment starting with '#' and followed by
4977 SPARK keyword "hide" as a HIDE directive.
4979 2011-08-02 Yannick Moy <moy@adacore.com>
4981 * types.ads, erroutc.ads: Minor reformatting.
4983 2011-08-02 Vincent Celier <celier@adacore.com>
4985 * link.c: Add response file support for cross platforms.
4987 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4989 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4990 in an association, set parent field of copy before partial analysis.
4991 * sem_res.adb (Resolve_Slice): create reference to itype only when
4992 expansion is enabled.
4994 2011-08-02 Yannick Moy <moy@adacore.com>
4996 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4997 for new flag denoting which subprogram bodies are in ALFA
4998 * restrict.adb, sem_ch7.adb: Update comment
4999 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
5000 sem_ch9.adb, sem_res.adb: Add calls to
5001 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
5002 * sem_ch6.adb (Analyze_Function_Return): add calls to
5003 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
5004 middle of the body, and extended return.
5005 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
5006 False when missing return.
5007 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
5008 to True for subprograms whose spec is in ALFA. Remove later on the flag
5009 on the entity used for a subprogram body when there exists a separate
5011 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
5012 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
5013 False, otherwise do nothing.
5015 2011-08-02 Robert Dewar <dewar@adacore.com>
5017 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5019 2011-08-02 Yannick Moy <moy@adacore.com>
5021 * sem_ch4.ads: minor formatting.
5023 2011-08-02 Yannick Moy <moy@adacore.com>
5025 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
5026 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
5027 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
5028 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
5029 opt.ads: cleanup of SPARK mode
5031 2011-08-02 Yannick Moy <moy@adacore.com>
5033 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
5035 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
5036 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
5038 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
5039 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
5040 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
5041 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
5043 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
5045 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
5046 functions whose return type is not in ALFA.
5047 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
5049 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
5050 parameter's type is not in ALFA.
5051 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
5054 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5056 * sem_ch6 (Analyze_Expression_Function): treat the function as
5057 Inline_Always, and introduce a subprogram declaration for it when it is
5059 * inline.adb (Add_Inlined_Body): recognize bodies that come from
5060 expression functions, so that the back-end can determine whether they
5061 can in fact be inlined.
5062 * sem_util.adb (Is_Expression_Function): predicate to determine whether
5063 a function body comes from an expression function.
5065 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5067 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
5068 null exclusions to test Can_Never_Be_Null on the anonymous access types
5069 of the formals rather than testing the formals themselves. Exclude this
5070 check in cases where the Old_Formal is marked as a controlling formal,
5071 to avoid issuing spurious errors for bodies completing dispatching
5072 operations (due to the flag not getting set on controlling access
5073 formals in body specs).
5074 (Find_Corresponding_Spec): When checking full and subtype conformance of
5075 subprogram bodies in instances, pass Designated and E in that order, for
5076 consistency with the expected order of the formals (New_Id followed by
5079 2011-08-02 Robert Dewar <dewar@adacore.com>
5081 * sem_ch8.adb: Minor reformatting.
5083 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5085 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
5086 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
5087 primitive operations of class-wide actuals.
5089 2011-08-02 Javier Miranda <miranda@adacore.com>
5091 * exp_atag.ads, exp_atag.adb
5092 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
5093 since its value is implicitly passed in argument Typ.
5094 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
5095 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
5096 Build_Common_Dispatching_Select_Statements.
5098 2011-08-02 Robert Dewar <dewar@adacore.com>
5100 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
5101 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
5104 2011-08-02 Robert Dewar <dewar@adacore.com>
5106 * sem_res.adb: Minor reformatting.
5107 * sem_prag.adb: Minor reformatting.
5109 2011-08-02 Javier Miranda <miranda@adacore.com>
5111 * exp_atag.adb, exp_atags.ads
5112 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
5113 by the tagged type Entity. Required to use this routine in the VM
5114 targets since we do not have available the Tag entity in the VM
5117 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
5118 Ada.Tags has not been previously loaded.
5120 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
5121 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
5123 (Enclosing_Dynamic_Scope): Add missing support to handle the full
5124 view of enclosing scopes. Required to handle enclosing scopes that
5125 are synchronized types whose full view is a task type.
5127 (Build_VM_TSDs): Minor code improvement to avoid generating and
5128 analyzing lists with empty nodes.
5129 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
5130 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
5131 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
5132 (Make_Disp_Timed_Select_Body): Add support for VM targets.
5133 (Make_Select_Specific_Data_Table): Add support for VM targets.
5134 (Make_VM_TSD): Generate code to initialize the SSD structure of
5137 2011-08-02 Yannick Moy <moy@adacore.com>
5139 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
5140 cross-references section in ALI.
5141 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
5142 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
5144 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5145 subprogram or package entity of a node
5146 (Is_Local_Reference_Type): new function returns True for references
5147 selected in local cross-references.
5148 (Lt): function extracted from Lt in Output_References
5149 (Write_Entity_Name): function extracted from Output_References
5150 (Generate_Definition): generate reference with type 'D' for definition
5151 of objects (object declaration and parameter specification), with
5152 appropriate locations and units, for use in local cross-references.
5153 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5154 references of type 'I' for initialization in object definition.
5155 (Output_References): move part of function Lt and procedure
5156 Write_Entity_Name outside of the body. Ignore references of types 'D'
5157 and 'I' introduced for local cross-references.
5158 (Output_Local_References): new procedure to output the local
5159 cross-references sections.
5160 (Lref_Entity_Status): new array defining whether an entity is a local
5161 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5162 with 'I' type when initialization expression is present.
5163 * get_scos.adb, get_scos.ads: Correct comments and typos
5165 2011-08-02 Javier Miranda <miranda@adacore.com>
5167 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5169 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5171 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5174 2011-08-02 Vincent Celier <celier@adacore.com>
5176 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5177 (No_Space_Img): New function
5178 (Find_Excluded_Sources): When reading from a file, record the file name
5179 and the line number for each excluded source.
5180 (Mark_Excluded_Sources): When reporting an error, if the excluded
5181 sources were read from a file, include file name and line number in
5184 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5186 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5188 2011-08-02 Robert Dewar <dewar@adacore.com>
5190 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5192 2011-08-02 Javier Miranda <miranda@adacore.com>
5194 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5195 generation of TSDs to the DOTNET compiler.
5196 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5197 generation of TSDs to the DOTNET compiler.
5199 2011-08-02 Javier Miranda <miranda@adacore.com>
5201 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5202 record of all the tagged types declared inside library level package
5203 declarations, library level package bodies or library level subprograms.
5204 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5205 associated with a given tagged type.
5206 (Build_VM_TSDs): New subprogram.
5207 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5208 compilation units that are subprograms.
5209 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5210 compilation units that are package bodies.
5211 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5212 units that are a package declaration or a package instantiation.
5213 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5214 reorganization to improve the error generated by the frontend when the
5215 function Ada.Tags.Secondary_Tag is not available.
5216 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5217 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5219 2011-08-02 Javier Miranda <miranda@adacore.com>
5221 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5223 2011-08-02 Robert Dewar <dewar@adacore.com>
5225 * s-imenne.ads: Minor reformatting.
5227 2011-08-02 Robert Dewar <dewar@adacore.com>
5229 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5230 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5231 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5233 2011-08-02 Robert Dewar <dewar@adacore.com>
5235 * einfo.ads (Materialize_Entity): Document this is only for renamings
5236 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5237 required debug information in the case where we transform the object
5238 declaration into a renaming declaration.
5239 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5241 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5244 2011-08-02 Robert Dewar <dewar@adacore.com>
5246 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5247 Suppress_Init_Procs.
5248 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5249 Suppress_Initialization/Initialization_Suppressed.
5250 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5251 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5252 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5253 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5255 2011-08-02 Robert Dewar <dewar@adacore.com>
5257 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5260 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5262 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5263 only have inheritable classwide pre/postconditions.
5265 2011-08-02 Javier Miranda <miranda@adacore.com>
5267 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5268 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5269 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5270 checks if the external tag of a type is the same as the external tag
5271 of some other declaration.
5273 2011-08-02 Thomas Quinot <quinot@adacore.com>
5275 * s-taskin.ads: Minor reformatting.
5277 2011-08-02 Emmanuel Briot <briot@adacore.com>
5279 * g-comlin.adb (Display_Help): swap the order in which it prints the
5280 short help and the general usage.
5282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5284 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5285 the aspect declarations and attach them to the generic copy for
5286 subsequent analysis.
5287 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5288 declarations of the generic tree to the new subprogram declarations.
5289 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5290 conditions that apply to a subprogram instance.
5292 2011-08-02 Robert Dewar <dewar@adacore.com>
5294 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5296 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5298 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5299 private type with a tagged full view is not derived in the immediate
5300 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5302 2011-08-02 Robert Dewar <dewar@adacore.com>
5304 * exp_ch4.adb: Minor reformatting.
5306 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5308 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5309 Ada2012 iterator, the loop will be rewritten during expansion into a
5310 while loop with a cursor and an element declaration. Do not analyze the
5311 body in this case, because if the container is for indefinite types the
5312 actual subtype of the elements will only be determined when the cursor
5313 declaration is analyzed.
5315 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5317 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5318 size/alignment related attributes in CodePeer_Mode.
5320 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5322 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5323 Prepend_Element, since this can result in the operation getting the
5324 wrong slot in the full type's dispatch table if the full type has
5325 inherited operations. The incomplete type's operation will get added
5326 to the proper position in the full type's primitives
5327 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5328 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5329 dispatching operations, since there are cases where nonprimitive
5330 subprograms can get added to the list of incomplete dependents (such
5331 as subprograms in nested packages).
5332 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5333 private part when determining whether to add a primitive with a
5334 parameter of a tagged incomplete type to the Private_Dependents list.
5335 Such primitives can also occur in the visible part, and should not have
5336 been excluded from being private dependents.
5337 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5338 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5339 list of a Taft-amendment incomplete type is a primitive before issuing
5340 an error that the full type must appear in the same unit. There are
5341 cases where nonprimitives can be in the list (such as subprograms in
5343 * sem_disp.adb (Derives_From): Use correct condition for checking that
5344 a formal's type is derived from the type of the corresponding formal in
5345 the parent subprogram (the condition was completely wrong). Add
5346 checking that was missing for controlling result types being derived
5347 from the result type of the parent operation.
5349 2011-08-02 Yannick Moy <moy@adacore.com>
5351 * errout.adb (First_Node): minor renaming
5352 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5355 2011-08-02 Yannick Moy <moy@adacore.com>
5357 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5358 before accessing operands.
5359 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5360 decide whether an initialization expression respects SPARK rules, as
5361 the plain node is the expanded one. This allows for more valid warnings
5363 * gnat_rm.texi: Minor update.
5365 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5367 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5370 2011-08-02 Robert Dewar <dewar@adacore.com>
5372 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5374 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5376 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5377 loop statements and the element renaming declaration with a block when
5378 the element type is controlled.
5380 2011-08-02 Yannick Moy <moy@adacore.com>
5382 * sinfo.ads: Minor formatting.
5384 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5386 * sem_aggr.adb (Add_Association): if the association has a box and no
5387 expression, use the Sloc of the aggregate itself for the new
5389 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5392 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5394 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5395 When a container is provided via a function call, generate a renaming
5396 of the function result. This avoids the creation of a transient scope
5397 and the premature finalization of the container.
5398 * exp_ch7.adb (Is_Container_Cursor): Removed.
5399 (Wrap_Transient_Declaration): Remove the supression of the finalization
5400 of the list controller when the declaration denotes a container cursor,
5403 2011-08-02 Yannick Moy <moy@adacore.com>
5405 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5406 node is from source, instead of the original node being from source.
5408 (Resolve_Array_Aggregate): refine the check for a static expression, to
5409 recognize also static ranges
5410 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5411 Array_Type_Declaration): postpone the test for the type being a subtype
5412 mark after the type has been resolved, so that component-selection and
5413 expanded-name are discriminated.
5414 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5415 to distinguish the case of an iteration scheme, so that an error is
5416 issed on a non-static range in SPARK except in an iteration scheme.
5417 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5418 In_Iter_Schm = True.
5419 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5420 user-defined operators so that they are allowed in renaming
5422 (Find_Selected_Component): refine the check for prefixing of operators
5423 so that they are allowed in renaming. Move the checks for restrictions
5424 on selector name after analysis discriminated between
5425 component-selection and expanded-name.
5426 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5427 concatenation argument of string type if it is static.
5428 * sem_util.adb, sem_util.ads
5429 (Check_Later_Vs_Basic_Declarations): add a new function
5430 Is_Later_Declarative_Item to decice which declarations are allowed as
5431 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5432 mode, add that renamings are considered as later items.
5433 (Enclosing_Package): new function to return the enclosing package
5434 (Enter_Name): correct the rule for homonyms in SPARK
5435 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5436 from source (result of expansion) to avoid issuing wrong warnings.
5438 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5440 * errout.adb: On anything but an expression First_Node returns its
5443 2011-08-02 Pascal Obry <obry@adacore.com>
5445 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5447 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5449 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5450 Set the associated loop as the related expression of internally
5452 * exp_ch7.adb (Is_Container_Cursor): New routine.
5453 (Wrap_Transient_Declaration): Supress the finalization of the list
5454 controller when the declaration denotes a container cursor.
5456 2011-08-02 Yannick Moy <moy@adacore.com>
5458 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5460 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5461 expression is a simple expression. This check cannot be performed in
5462 the semantics, so just drop it.
5463 (P_Index_Or_Discriminant_Constraint): move check that the index or
5464 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5465 semantics. Other cases were previously checked in the semantics.
5466 * par-ch4.adb (P_Name): move checks that a selector name is not
5467 character literal or an operator symbol to Find_Selected_Component in
5469 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5470 declarations are not placed after later declarations in a separate
5471 procedure in Sem_Util (possibly not the best choice?), to be used both
5472 during parsing, for Ada 83 mode, and during semantic analysis, for
5474 * par-endh.adb (Check_End): move check that end label is not missing
5475 to Process_End_Label in the semantics
5476 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5477 the special case for SPARK restriction
5478 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5479 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5480 parameter Force to issue the error message even on internal node (used
5481 for generated end label). Call Check_Restriction to check when an error
5482 must be issued. In SPARK mode, issue an error message even if the
5483 restriction is not set.
5484 (Check_Restriction): new procedure with an additional out parameter to
5485 inform the caller that a message has been issued
5486 * sem_aggr.adb: Minor modification of message
5487 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5488 instead of issuing an error message directly
5489 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5490 declarations are not placed after later declarations, by calling
5491 Check_Later_Vs_Basic_Declarations
5492 (Analyze_Subtype_Declaration): move here the check that an index or
5493 discriminant constraint must be a subtype mark. Change the check that
5494 a subtype of String must start at one so that it works on subtype marks.
5495 * sem_ch4.adb (Analyze_Call): move here the check that a named
5496 association cannot follow a positional one in a call
5497 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5498 instead of issuing an error message directly
5499 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5500 selector name is not a character literal or an operator symbol. Move
5501 here the check that the prefix of an expanded name cannot be a
5502 subprogram or a loop statement.
5503 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5504 procedure called from parsing and semantics to check that basic
5505 declarations are not placed after later declarations
5506 (Process_End_Label): move here the check that end label is not missing
5508 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5510 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5511 representation clause in codepeer mode, since it confuses CodePeer and
5512 does not bring useful info.
5514 2011-08-02 Ed Falis <falis@adacore.com>
5516 * init.c: initialize fp hw on MILS.
5518 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5520 * errout.adb (First_Node): for bodies, return the node itself (small
5521 optimization). For other nodes, do not check source_unit if the node
5522 comes from Standard.
5524 2011-08-02 Robert Dewar <dewar@adacore.com>
5526 * exp_ch3.adb: Minor comment additions.
5527 * sem_ch13.adb: Minor reformatting.
5529 2011-08-02 Pascal Obry <obry@adacore.com>
5531 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5533 2011-08-02 Robert Dewar <dewar@adacore.com>
5535 * sem_attr.adb: Minor reformatting.
5537 2011-08-02 Robert Dewar <dewar@adacore.com>
5539 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5540 (Has_Default_Component_Value): Removed
5541 * einfo.ads Comment updates
5542 (Has_Default_Aspect): Replaces Has_Default_Value
5543 (Has_Default_Component_Value): Removed
5545 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5547 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5548 (Get_Simple_Init_Val): Handle Default_Value aspect
5549 (Needs_Simple_Initialization): Handle Default_Value aspect
5550 * exp_ch3.ads: Needs_Simple_Initialization
5551 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5552 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5554 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5555 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5556 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5558 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5560 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5561 package containing iteration primitives.
5562 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5564 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5566 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5567 "of", pre-analyze expression in case it is a function call with
5568 finalization actions that must be placed ahead of the loop.
5569 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5570 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5572 2011-08-02 Geert Bosch <bosch@adacore.com>
5574 * cstand.adb (Create_Float_Types): Only consider C's long double for
5575 Long_Long_Float, in addition to double.
5577 2011-08-02 Robert Dewar <dewar@adacore.com>
5579 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5580 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5581 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5584 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5586 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5589 2011-08-02 Javier Miranda <miranda@adacore.com>
5591 * einfo.ads, einfo.adb
5592 (Original_Access_Type): Move this attribute to Node26 since there was
5593 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5594 which causes conflicts and breaks the generation of the .NET compiler.
5595 (Interface_Name): Add missing documentation on JGNAT only uses of
5598 2011-08-02 Geert Bosch <bosch@adacore.com>
5600 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5601 (Find_Back_End_Float_Type): Likewise
5602 (Create_Back_End_Float_Types): Likewise
5603 (Create_Float_Types): Likewise
5604 (Register_Float_Type): Likewise
5605 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5606 Nlist and split out type selection in new local Find_Base_Type function.
5607 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5609 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5611 2011-08-02 Robert Dewar <dewar@adacore.com>
5613 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5615 * opt.ads: Minor comment change.
5616 * sem_ch12.adb: Minor code reorganization.
5618 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5620 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5621 subtype's list of rep items to the list on the full subtype in the case
5622 where the lists are the same.
5624 2011-08-02 Geert Bosch <bosch@adacore.com>
5626 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5627 using the one from System.Strings, which also deallocates all strings.
5629 2011-08-02 Geert Bosch <bosch@adacore.com>
5631 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5633 * gcc-interface/Make-lang.in: Update dependencies.
5635 2011-08-02 Olivier Hainque <hainque@adacore.com>
5637 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5640 2011-08-02 Javier Miranda <miranda@adacore.com>
5642 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5643 associated with anonymous access to subprograms.
5645 2011-08-02 Geert Bosch <bosch@adacore.com>
5648 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5649 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5650 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5651 (Add_Symbol_Definition): Move to switch-c.adb
5652 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5653 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5654 (Add_Symbol_Definition): Move to switch-c.adb.
5655 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5657 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5659 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5660 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5662 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5663 (Add_Symbol_Definition): Moved from Prepcomp.
5664 * switch-c.ads: Update copyright notice. Use String_List instead of
5665 Argument_List, removing dependency on System.OS_Lib.
5667 2011-08-02 Yannick Moy <moy@adacore.com>
5669 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5670 mode on initialization expression which does not respect SPARK
5672 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5673 if the tree referenced by its argument represents an initialization
5674 expression in SPARK, suitable for initializing an object in an object
5677 2011-08-02 Javier Miranda <miranda@adacore.com>
5679 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5680 internally generated access to subprogram with its associated protected
5682 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5684 2011-08-02 Geert Bosch <bosch@adacore.com>
5686 * cstand.adb (Register_Float_Type): Print information about type to
5687 register, if the Debug_Flag_Dot_B is set.
5688 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5689 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5690 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5691 with a requested precision of more than Max_Digits digits and no more
5692 than Max_Base_Digits digits, if a range specification is present and the
5693 Predefined_Float_Types list has a suitable type to derive from.
5694 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5695 case of type completion with pragma Import
5697 (Process_Import_Predefined_Type): Processing to complete a type
5698 with pragma Import. Currently supports floating point types only.
5699 (Set_Convention_From_Pragma): Do nothing without underlying type.
5700 (Process_Convention): Guard against absence of underlying type,
5701 which may happen when importing incomplete types.
5702 (Process_Import_Or_Interface): Handle case of importing predefined
5703 types. Tweak error message.
5705 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5707 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5708 functions to previous change. Reorganize code slightly.
5710 2011-08-02 Geert Bosch <bosch@adacore.com>
5712 * back_end.ads (Register_Type_Proc): New call back procedure type for
5713 allowing the back end to provide information about available types.
5714 (Register_Back_End_Types): New procedure to register back end types.
5715 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5717 * cstand.adb (Back_End_Float_Types): New list for floating point types
5718 supported by the back end.
5719 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5720 (Copy_Float_Type): New procedure to make new copies of predefined types.
5721 (Register_Float_Type): New call back procedure to populate the BEFT list
5722 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5723 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5724 (Create_Float_Types): New procedure to create entities for floating
5725 point types predefined in Standard, and put these and any remaining
5726 BEFTs on the Predefined_Float_Types list.
5727 * stand.ads (Predefined_Float_Types): New list for predefined floating
5728 point types that do not have declarations in package Standard.
5730 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5732 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5733 entity node for the unit containing the parameter.
5734 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5735 (Add_Inlined_Subprogram): Likewise.
5736 * gcc-interface/Make-lang.in: Update dependencies.
5738 2011-08-02 Thomas Quinot <quinot@adacore.com>
5740 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5743 2011-08-02 Geert Bosch <bosch@adacore.com>
5745 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5747 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5749 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5750 computed value of Base_Type.
5752 2011-08-02 Yannick Moy <moy@adacore.com>
5754 * restrict.adb (Check_Restriction): issue an error for any use of
5755 class-wide, even if the No_Dispatch restriction is not set.
5756 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5757 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5758 when completing a private extension, the type named in the private part
5759 is not the same as that named in the visible part.
5760 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5761 of an inherited primitive operations of a tagged type or type extension
5762 that returns the tagged type.
5763 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5764 function which returns True for an implicit operation inherited by the
5765 derived type declaration for the argument type.
5766 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5769 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5771 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5772 Process_Bounds, to perform analysis with expansion of a range or an
5773 expression that is the iteration scheme for a loop.
5774 (Analyze_Iterator_Specification): If domain of iteration is given by a
5775 function call with a controlled result, as is the case if call returns
5776 a predefined container, ensure that finalization actions are properly
5778 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5780 2011-08-02 Javier Miranda <miranda@adacore.com>
5782 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5783 * gcc-interface/Make-lang.in: Update dependencies.
5785 2011-08-02 Javier Miranda <miranda@adacore.com>
5787 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5788 determine if the analysis is performed using N or Original_Node (N).
5789 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5790 functionality of routine Is_Variable avoids code duplication.
5791 * checks.adb (Determine_Range): Handle temporaries generated by
5792 Remove_Side_Effects.
5794 2011-08-02 Javier Miranda <miranda@adacore.com>
5796 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5797 expansion of the condition. Required since the previous analysis was
5798 done with expansion disabled (see Resolve_Quantified_Expression) and
5799 hence checks were not inserted and record comparisons have not been
5802 2011-08-02 Ed Falis <falis@adacore.com>
5804 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5807 2011-08-02 Bob Duff <duff@adacore.com>
5809 * opt.ads: Minor comment fix.
5811 2011-08-02 Bob Duff <duff@adacore.com>
5813 * sem_ch12.adb (Analyze_Package_Instantiation,
5814 Analyze_Subprogram_Instantiation): Turn off style checking while
5815 analyzing an instance. Whatever style checks that apply to the generic
5816 unit should apply, so it makes no sense to apply them in an instance.
5817 This was causing trouble when compiling an instance of a runtime
5818 unit that violates the -gnatyO switch.
5819 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5820 one of the two case statements, causing spurious errors.
5822 2011-08-02 Robert Dewar <dewar@adacore.com>
5824 * uname.adb: Minor reformatting.
5825 * gnatcmd.adb: Minor reformatting.
5826 * exp_attr.adb: Minor reformatting.
5828 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5830 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5831 No_Dispatching_Calls, do not look for the Assign primitive, because
5832 predefined primitives are not created in this case.
5834 2011-08-02 Bob Duff <duff@adacore.com>
5836 * stylesw.ads: Minor comment fixes.
5838 2011-08-02 Robert Dewar <dewar@adacore.com>
5840 * freeze.adb (Add_To_Result): New procedure.
5842 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5844 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5845 time, if the specific run-time routines for handling streams of strings
5846 are not available, use the default mechanism.
5848 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5850 * s-regpat.ads: Fix typo.
5852 2011-08-02 Vincent Celier <celier@adacore.com>
5854 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5855 not null, call it to create the in memory config project file without
5856 parsing an existing default config project file.
5858 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5860 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5862 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5864 * sem_elim.adb: an abstract subprogram does not need an eliminate
5865 pragma for its descendant to be eliminable.
5867 2011-08-02 Ed Falis <falis@adacore.com>
5869 * init.c: revert to handling before previous checkin for VxWorks
5870 * s-intman-vxworks.adb: delete unnecessary declarations related to
5871 using Ada interrupt facilities for handling signals.
5872 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5873 * s-intman-vxworks.ads: Import __gnat_install_handler as
5874 Initialize_Interrupts.
5875 * s-taprop-vxworks.adb: Delete Signal_Mask.
5876 (Abort_Handler): change construction of mask to unblock exception
5879 2011-08-02 Jerome Guitton <guitton@adacore.com>
5881 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5882 Debug_Raise_Exception before propagation starts.
5884 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5886 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5887 to Restriction_Check_Required.
5888 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5889 * sem_res.adb (Resolve_Call): Likewise.
5890 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5892 2011-08-02 Bob Duff <duff@adacore.com>
5894 * stylesw.ads: Update comment.
5895 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5896 * errout.ads: Remove obsolete comment.
5898 2011-08-02 Javier Miranda <miranda@adacore.com>
5900 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5901 (Set_Is_Safe_To_Reevaluate): new procedure.
5902 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5903 assignment is allowed on safe-to-reevaluate variables.
5904 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5905 temporary created to remove side effects in expressions that use
5906 the secondary stack as safe-to-reevaluate.
5907 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5908 variables that are not true constants.
5910 2011-08-02 Robert Dewar <dewar@adacore.com>
5912 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5913 sem_res.adb, sem_ch6.adb: Minor reformatting.
5915 2011-08-02 Jerome Guitton <guitton@adacore.com>
5917 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5919 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5921 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5922 not set Overridden_Operation if subprogram is an initialization
5925 2011-08-02 Yannick Moy <moy@adacore.com>
5927 * par-ch6.adb: Correct obsolete name in comments
5928 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5929 which takes two message arguments (existing function takes one), with
5930 second message used for continuation.
5931 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5932 block statements that originate from a source block statement, not
5933 generated block statements
5934 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5935 symmetry with procedure case
5936 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5937 function to issue an error in formal mode if a package specification
5938 contains more than one tagged type or type extension.
5939 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5940 parameters matching formals of tagged types are objects (or ancestor
5941 type conversions of objects), not general expressions. Issue an error
5942 on view conversions that are not involving ancestor conversion of an
5944 (Resolve_Type_Conversion): in formal mode, issue an error on the
5945 operand of an ancestor type conversion which is not an object
5946 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5947 procedure so that it works also for actuals of function calls
5948 (Is_Actual_Tagged_Parameter): new function which determines if its
5949 argument is an actual parameter of a formal of tagged type in a
5951 (Is_SPARK_Object_Reference): new function which determines if the tree
5952 referenced by its argument represents an object in SPARK
5954 2011-08-02 Robert Dewar <dewar@adacore.com>
5956 * sem_ch3.adb: Minor reformatting
5957 Minor comment addition
5958 Minor error msg text change
5960 2011-08-02 Javier Miranda <miranda@adacore.com>
5962 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5963 function. Used to be more precise when we generate a variable plus one
5964 assignment to remove side effects in the evaluation of the Bound
5966 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5967 of the bound expression to force its re-analysis and thus expand the
5968 associated transient scope (if required). Code cleanup replacing the
5969 previous code that declared the constant entity by an invocation to
5970 routine Force_Evaluation which centralizes this work in the frontend.
5972 2011-08-02 Robert Dewar <dewar@adacore.com>
5974 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5975 (Base_Type): Now uses improved Is_Base_Type function
5976 * einfo.ads (Base_Type): Inline this function
5978 2011-08-02 Robert Dewar <dewar@adacore.com>
5980 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5981 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5983 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5985 * gcc-interface/Make-lang.in: Update dependencies.
5986 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5989 2011-08-02 Yannick Moy <moy@adacore.com>
5991 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5992 non-simple expression used in delta constraint
5993 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5994 index constraint which is not a subtype mark
5995 * par.adb: With and use Restrict
5996 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5997 mode on component type which is not a subtype mark and default
5998 expression on component
5999 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
6000 of string which does not have a lower index bound equal to 1
6001 (Array_Type_Declaration): issue an error in formal mode on index or
6002 component type which is not a subtype mark, and on aliased keyword on
6004 (Derived_Type_Declaration): issue an error in formal mode on interface,
6005 limited or abstract type
6006 (Record_Type_Declaration): issue an error in formal mode on interface
6007 (Record_Type_Definition): issue an error in formal mode on tagged types
6008 and type extensions not declared in the specification of a library unit
6009 package; on null non-tagged record; on variant part
6011 2011-08-02 Vincent Celier <celier@adacore.com>
6013 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
6014 not declared for qualified library project when Library_Name is not
6015 declared, but Library_Dir is.
6017 2011-08-02 Robert Dewar <dewar@adacore.com>
6019 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
6020 pragmas (affects aspects [Component_]Default_Value
6021 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
6022 component type for the resolution
6024 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6026 * einfo.adb (Base_Type): Tune implementation for speed.
6028 2011-08-02 Robert Dewar <dewar@adacore.com>
6030 * freeze.adb: Minor reformatting.
6032 2011-08-02 Thomas Quinot <quinot@adacore.com>
6034 * scos.ads: Update comments.
6036 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6038 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
6039 base type, because the parent may be a subtype of a private type whose
6040 convention is established in a private part.
6042 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
6044 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
6045 statement in a block when the expansion of the return expression has
6046 created a finalization chain.
6047 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
6048 with the parent node.
6049 Add N_Extended_Return_Statement to handle the case where a transient
6050 object declaration appears in the Return_Object_Declarations list of
6051 an extended return statement.
6053 2011-08-02 Matthew Gingell <gingell@adacore.com>
6055 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
6056 unused parameter 'name'.
6058 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6060 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
6061 inherited operation, check whether its alias, which is the source
6062 operastion that it renames, has been marked eliminated.
6064 2011-08-02 Javier Miranda <miranda@adacore.com>
6066 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
6067 in-mode parameter whose type is an access type since it can be used to
6068 modify its designated object. Enforce code that handles as safe an
6069 access type that is not access-to-constant but it is the result of a
6070 previous removal of side-effects.
6071 (Remove_Side_Effects): Minor code reorganization of cases which require
6072 no action. Done to incorporate documentation on new cases uncovered
6073 working in this ticket: no action needed if this routine was invoked
6074 too early and the nodes are not yet decorated.
6075 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
6076 to routine Remove_Side_Effects by calls to Force_Evaluation since they
6077 were issued with actuals that are implicitly provided by
6080 2011-08-02 Robert Dewar <dewar@adacore.com>
6082 * sem_ch3.adb, sem_res.adb: Minor reformatting.
6084 2011-08-02 Yannick Moy <moy@adacore.com>
6086 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
6087 to issue an error in formal mode on attribute not supported in this mode
6088 (Analyze_Attribute): issue errors on standard attributes not supported
6090 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
6091 comment, and issue error in formal mode on modulus which is not a power
6093 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
6095 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
6097 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
6098 operator on modular type (except 'not').
6100 2011-08-02 Robert Dewar <dewar@adacore.com>
6102 * gnat_rm.texi: Minor reformatting.
6104 2011-08-02 Arnaud Charlet <charlet@adacore.com>
6106 * s-osinte-linux.ads: Minor comment update and reformatting.
6107 * i-cexten.ads: Make this unit pure, as for its parent.
6108 Will allow its usage in more contexts if needed.
6110 2011-08-02 Robert Dewar <dewar@adacore.com>
6112 * s-utf_32.ads: Minor comment fix.
6114 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6116 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
6117 operation of a tagged synchronized type, handle the case where the
6118 controlling argument is overloaded.
6120 2011-08-02 Yannick Moy <moy@adacore.com>
6122 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
6123 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
6124 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
6125 SPARK mode and formal verification mode on processing SPARK restriction
6126 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
6127 requiring consistency checking.
6129 2011-08-02 Robert Dewar <dewar@adacore.com>
6131 * sem_res.adb: Minor reformatting.
6133 2011-08-02 Robert Dewar <dewar@adacore.com>
6135 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6136 a-cforse.ads: Remove unneeded with of Ada.Containers
6137 Remove commented out pragma Inline's
6138 Move specifications of new subprograms to the actual specs
6140 2011-08-02 Yannick Moy <moy@adacore.com>
6142 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6143 a-cforse.ads: Update comments.
6145 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6147 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6149 2011-08-02 Robert Dewar <dewar@adacore.com>
6151 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6152 a-cforse.ads, a-cofove.ads: Minor reformatting.
6154 2011-08-02 Claire Dross <dross@adacore.com>
6156 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6157 a-cofove.ads: Add comments.
6159 2011-08-02 Yannick Moy <moy@adacore.com>
6161 * gnat_rm.texi: Document formal containers.
6163 2011-08-02 Emmanuel Briot <briot@adacore.com>
6165 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6168 2011-08-02 Robert Dewar <dewar@adacore.com>
6170 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6173 2011-08-02 Robert Dewar <dewar@adacore.com>
6175 * aspects.adb: New aspects Default_Value and Default_Component_Value
6176 New format of Aspect_Names table checks for omitted entries
6177 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6178 handling of boolean aspects for derived types.
6179 New aspects Default_Value and Default_Component_Value
6180 New format of Aspect_Names table checks for omitted entries
6181 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6182 (Has_Default_Value): New flag
6183 (Has_Default_Component_Value): New flag
6184 (Has_Default_Value): New flag
6185 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6187 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6188 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6189 Default_Value and Default_Component_Value
6190 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6191 New aspects Default_Value and Default_Component_Value
6192 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6193 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6195 2011-08-02 Vincent Celier <celier@adacore.com>
6197 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6198 inherit library kind.
6200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6202 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6205 2011-08-02 Robert Dewar <dewar@adacore.com>
6207 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6209 2011-08-02 Yannick Moy <moy@adacore.com>
6211 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6213 2011-08-02 Robert Dewar <dewar@adacore.com>
6215 * impunit.adb: Add comment.
6217 2011-08-02 Yannick Moy <moy@adacore.com>
6219 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6220 qualification of aggregates in formal mode
6221 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6223 (Resolve_Aggregate): complete the test that an aggregate is adequately
6224 qualified in formal mode
6226 2011-08-02 Pascal Obry <obry@adacore.com>
6228 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6229 * mlib-prj.adb: Supress warning when compiling binder generated file.
6230 (Build_Library): Supress all warnings when compiling the binder
6233 2011-08-02 Yannick Moy <moy@adacore.com>
6235 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6237 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6238 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6239 Add with/use clauses to make Check_Formal_Restriction visible
6241 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6243 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6244 in-parameters when type of the generic formal is private in the generic
6245 spec and non-private in the body.
6247 2011-08-02 Claire Dross <dross@adacore.com>
6249 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6250 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6251 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6252 * impunit.adb, Makefile.rtl: Take new files into account.
6254 2011-08-02 Robert Dewar <dewar@adacore.com>
6256 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6257 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6259 2011-08-02 Yannick Moy <moy@adacore.com>
6261 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6263 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6264 matching static array bounds, taking into account the special case of
6266 * sem_ch3.adb: Typo in comment.
6268 2011-08-02 Yannick Moy <moy@adacore.com>
6270 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6271 which issues an error in formal mode if its argument node is originally
6273 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6274 has a discriminant specification so that it does not include the case
6276 (Derived_Type_Declaration): move here the test that a derived type has a
6277 discriminant specification
6278 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6279 first element of a component association before accessing its choices
6280 (presence of component association is not enough)
6281 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6282 declaration is a library item before accessing the next element in a
6283 list, as library items are not member of lists
6284 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6285 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6286 Check_Formal_Restriction whenever possible.
6288 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6290 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6291 reference when needed.
6293 2011-08-02 Bob Duff <duff@adacore.com>
6295 * gnat_ugn.texi: Fix typo.
6297 2011-08-02 Vincent Celier <celier@adacore.com>
6299 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6300 archive file name. Do not use the full path name of archives for Open
6303 2011-08-02 Robert Dewar <dewar@adacore.com>
6305 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6306 Analyze_Aspect_Specifications
6308 (Analyze_Aspect_Specifications): New handling for boolean aspects
6309 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6310 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6311 sequence for Analyze_Aspect_Specifications
6312 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6313 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6315 2011-08-02 Robert Dewar <dewar@adacore.com>
6317 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6318 aspects, since these no longer exist.
6320 2011-08-02 Robert Dewar <dewar@adacore.com>
6322 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6323 semicolon, do not try to see if there are aspects following it.
6324 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6327 2011-08-02 Robert Dewar <dewar@adacore.com>
6329 * sem_ch8.adb, aspects.ads: Minor reformatting.
6331 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6333 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6334 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6336 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6338 2011-08-02 Yannick Moy <moy@adacore.com>
6340 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6341 mode on subprogram declaration outside of package specification, unless
6342 it is followed by a pragma Import
6343 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6344 Access_Type_Declaration): issue error in formal mode on access type
6345 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6347 (Analyze_Object_Declaration): issue error in formal mode on object
6348 declaration which does not respect SPARK restrictions
6349 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6350 declaration which does not respect SPARK restrictions
6351 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6352 error in formal mode on digits or delta constraint
6353 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6354 decimal fixed point type
6355 (Derived_Type_Declaration): issue error in formal mode on derived type
6356 other than type extensions of tagged record types
6357 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6358 with check on access definition
6359 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6360 mode on protected definition.
6361 (Analyze_Task_Definition): issue error in formal mode on task definition
6363 2011-08-02 Robert Dewar <dewar@adacore.com>
6365 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6367 2011-08-02 Javier Miranda <miranda@adacore.com>
6369 * sem_ch6.adb (Can_Override_Operator): New function.
6370 (Verify_Overriding_Indicator): Add missing code to check overriding
6371 indicator in operators. Fixes regression.
6372 (Check_Overriding_Indicator): Minor reformating after replacing the
6373 code that evaluates if the subprogram can override an operator by
6374 invocations to the above new function.
6376 (Write_Field26_Name): Add missing code to ensure that, following
6377 the documentation in einfo.ads, this field is not shown as attribute
6378 "Static_Initialization" on non-dispatching functions.
6380 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6382 * sem_res.adb (Resolve_Call): A call to
6383 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6384 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6385 i.e., when the second parameter is of type Time_Span.
6387 2011-08-02 Vincent Celier <celier@adacore.com>
6389 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6390 with an archive instead of -L<library dir> -l<library name>.
6392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6394 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6395 mark the base types In_Use in addition to making the operations
6398 2011-08-02 Ed Falis <falis@adacore.com>
6400 * init.c: add and setup __gnat_signal_mask for the exception signals
6401 * s-inmaop-vxworks.adb: new file.
6402 * s-intman-vxworks.adb: remove unnecessary initializations and
6404 * s-intman-vxworks.ads: remove unnecessary variable
6405 * s-taprop-vxworks.adb: simplify signal initialization
6407 2011-08-02 Robert Dewar <dewar@adacore.com>
6409 * sem_ch8.adb: Minor code reorganization, comment updates.
6411 2011-08-02 Robert Dewar <dewar@adacore.com>
6413 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6414 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6416 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6417 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6421 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6422 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6423 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6424 use_type_clauses, to handle more efficiently use_type and use_all_type
6426 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6427 Ada2012 Use_All_Type clause.
6428 (Use_Class_Wide_Operations): new procedure.
6430 2011-08-02 Robert Dewar <dewar@adacore.com>
6432 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6433 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6434 expression to expression function.
6436 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6438 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6439 if types are compatible.
6441 2011-08-02 Yannick Moy <moy@adacore.com>
6443 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6444 returns True if its argument array types have same dimension and same
6445 static bounds at each index.
6446 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6447 OUT or IN OUT paramaters which are not view conversions in SPARK.
6448 (Resolve_Arithmetic_Op): issue an error in formal mode on
6449 multiplication or division with operands of fixed point types which are
6450 not qualified or explicitly converted.
6451 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6452 Boolean or array type (except String) operands.
6453 (Resolve_Equality_Op): issue an error in formal mode on equality
6454 operators for array types other than String with non-matching static
6456 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6457 for array types with non-matching static bounds. Factorize the code in
6458 Matching_Static_Array_Bounds.
6459 (Resolve_Qualified_Expression): issue an error in formal mode on
6460 qualified expressions for array types with non-matching static bounds.
6461 (Resolve_Type_Conversion): issue an error in formal mode on type
6462 conversion for array types with non-matching static bounds
6464 2011-08-02 Robert Dewar <dewar@adacore.com>
6466 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6468 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6470 * par-ch9.adb: save location of entry for proper error message.
6472 2011-08-02 Javier Miranda <miranda@adacore.com>
6474 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6475 (Use_Full_View) which permits this routine to climb through the
6476 ancestors using the full-view of private parents.
6477 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6478 Use_Full_View to true in calls to Is_Ancestor.
6479 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6480 true in call to Is_Ancestor.
6481 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6482 Use_Full_View to true in call to Is_Ancestor.
6483 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6484 call to Is_Ancestor.
6485 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6486 Use_Full_View to true in calls to Is_Ancestor.
6487 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6488 Make_Select_Specific_Data_Table, Register_Primitive,
6489 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6490 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6491 to true in call to Is_Ancestor.
6492 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6493 Use_Full_View to true in calls to Is_Ancestor.
6495 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6496 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6498 2011-08-02 Robert Dewar <dewar@adacore.com>
6500 * gnat_rm.texi: Minor reformatting.
6501 * sem_prag.adb: Minor reformatting.
6503 2011-08-02 Tristan Gingold <gingold@adacore.com>
6505 * vms_data.ads: Add VMS qualifier for -gnateP.
6507 2011-08-02 Robert Dewar <dewar@adacore.com>
6509 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6510 * par-ch7.adb (P_Package): Proper placement of aspects for package
6512 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6513 (End_Statements): Add Is_Sloc parameterr
6514 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6515 (Check_End): Ad Is_Sloc parameter
6516 (End_Statements): Add Is_Sloc parameterr
6518 2011-08-02 Vincent Celier <celier@adacore.com>
6520 * ug_words: Add VMS qualifier equivalent to -gnateP:
6521 /SYMBOL_PREPROCESSING.
6523 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6525 * gnat-style.texi: For hexadecimal numeric literals the typical
6526 grouping of digits is 4 to represent 2 bytes.
6527 A procedure spec which is split into several lines is indented two
6530 2011-08-02 Yannick Moy <moy@adacore.com>
6532 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6533 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6534 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6536 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6537 choice in array aggregate
6538 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6540 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6541 positional and named aggregate for record, or others in record
6542 aggregate, or multiple choice in record aggregate
6543 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6544 array operands to logical operations AND, OR and XOR do not have the
6545 same static lower and higher bounds
6546 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6548 2011-08-01 Robert Dewar <dewar@adacore.com>
6550 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6551 Replaces Last_Source_Node_In_Sequence.
6552 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6553 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6554 parens and blank in string (this was inconsistently implemented).
6556 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6557 blank in string (this was inconsistently implemented).
6559 (Set_Global_Switches): Set formal mode switches appropriately
6560 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6562 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6563 call Set_Error_Msg_Lang to set "spark" as language name.
6564 * par.adb: Remove unnecessary call to set formal language for errout
6565 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6566 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6568 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6569 calls to it, moved after resolution so that types are known
6570 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6571 result of concatenation is not of type String
6572 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6573 concatenation is not properly restricted
6574 * gnat_rm.texi: Add doc on pragma Spark_95.
6575 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6576 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6577 * gcc-interface/Make-lang.in: Update dependencies.
6579 2011-08-01 Javier Miranda <miranda@adacore.com>
6581 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6582 condition that detects if the overridden operation must replace an
6585 2011-08-01 Javier Miranda <miranda@adacore.com>
6587 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6588 code declarations inserted by Insert_Actions in each alternative of the
6589 N_Case_Expression node.
6591 2011-08-01 Robert Dewar <dewar@adacore.com>
6593 * sem_ch6.adb: Minor code reorganization.
6594 * sem_util.adb: Minor reformatting.
6596 2011-08-01 Pascal Obry <obry@adacore.com>
6598 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6599 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6601 2011-08-01 Yannick Moy <moy@adacore.com>
6603 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6604 literal or operator symbol which is prefixed
6605 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6606 mode on access attributes.
6607 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6608 that concatenation operands are properly restricted in formal mode
6609 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6610 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6611 result of the concatenation has a type different from String.
6612 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6613 Analyze_Quantified_Expression, Analyze_Slice,
6614 Analyze_Null): issue an error in formal mode on unsupported constructs
6616 (Analyze_Block_Statement): only issue error on source block statement
6617 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6618 function which returns the last node in a list of nodes for which
6619 Comes_From_Source returns True, if any
6620 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6621 Last_Source_Node_In_Sequence
6622 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6623 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6624 mode on unsupported constructs
6625 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6626 rest of the actions may be needed later on since the error is marked as
6628 * sinfo.ads: Typos in comments.
6630 2011-08-01 Pascal Obry <obry@adacore.com>
6632 * projects.texi: Minor editing.
6634 2011-08-01 Yannick Moy <moy@adacore.com>
6636 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6637 insertion character ~~
6638 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6639 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6640 with insertion character ~~
6641 (Set_Msg_Text): treat insertion character ~~
6642 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6643 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6644 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6645 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6646 errors related to the formal language restriction not serious
6647 (insertion character |).
6648 * par.adb (Par): set formal language for error messages if needed
6649 * sem_ch6.adb (Check_Missing_Return): take into account possible
6650 generated statements at the end of the function
6651 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6652 enumeration value to define a new pragma SPARK_95
6653 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6654 SPARK_Version): new type and variables to store the SPARK version
6656 (SPARK_Mode): return True when SPARK_Version is set
6657 * par-prag.adb: Correct indentation
6658 (Prag): take Pragma_SPARK_95 into account
6659 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6662 2011-08-01 Robert Dewar <dewar@adacore.com>
6664 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6665 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6666 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6668 2011-08-01 Pascal Obry <obry@adacore.com>
6670 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6671 Target_Name to Get_Path call.
6672 (Parse_Single_Project): Likewise.
6673 (Post_Parse_Context_Clause): Likewise.
6674 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6675 Call Initialise_Project_Path with the proper Target_Name.
6676 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6678 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6679 with the proper Target_Name.
6680 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6682 (Parse_Project_And_Apply_Config): Likewise.
6683 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6684 This is fine as this part of the code is supporting only native
6686 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6687 is fine as this part of the code is supporting only native compilation.
6689 2011-08-01 Yannick Moy <moy@adacore.com>
6691 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6692 of homonym, unless the homonym is one of the cases allowed in SPARK
6693 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6694 package declaration occurring after a body.
6696 2011-08-01 Robert Dewar <dewar@adacore.com>
6698 * checks.adb, exp_ch4.adb: Minor reformatting.
6700 2011-08-01 Javier Miranda <miranda@adacore.com>
6702 * einfo.ads (Access_Disp_Table): Fix documentation.
6703 (Dispatch_Table_Wrappers): Fix documentation.
6705 2011-08-01 Pascal Obry <obry@adacore.com>
6707 * prj-env.adb, prj-env.ads: Minor reformatting.
6709 2011-08-01 Yannick Moy <moy@adacore.com>
6711 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6712 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6713 procedures out of these packages.
6714 * errout.ads, errout.adb
6715 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6716 procedures in of this package
6717 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6718 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6719 on misplaced later vs initial declarations, like in Ada 83
6720 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6721 formal mode on attribute of private type whose full type declaration
6723 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6724 package declaration inside a package specification
6725 (Analyze_Full_Type_Declaration): issue error in formal mode on
6726 controlled type or discriminant type
6727 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6728 user-defined operator means that it should come from the source
6729 (New_Overloaded_Entity): issue error in formal mode on overloaded
6731 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6733 2011-08-01 Thomas Quinot <quinot@adacore.com>
6735 * atree.adb: Minor reformatting.
6736 * checks.adb: Minor reformatting.
6738 2011-08-01 Vincent Celier <celier@adacore.com>
6740 * s-parame-vms-ia64.ads: Fix typo in comment
6742 * s-parame-vms-restrict.ads: Removed, unused.
6744 2011-08-01 Javier Miranda <miranda@adacore.com>
6747 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6749 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6750 * sem_ch3.ads, sem_ch3.adb
6751 (Is_Constant_Bound): New extended version of the subprogram that was
6752 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6753 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6754 * sem_aux.ads (Constant_Value): Fix typo in comment.
6755 * checks.adb (Generate_Index_Checks): New implementation which, for
6756 array objects with constant bounds, generates the runtime check
6757 referencing the bounds of the array type. For other cases this routine
6758 provides its previous behavior obtaining such values from the array
6760 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6762 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6763 we cannot have semantic interpretations of the new node.
6765 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6767 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6770 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6772 * sem_ch8.adb: Minor code editing.
6773 * s-vxwext.adb: Remove trailing space.
6774 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6775 consistency with other files.
6777 2011-08-01 Thomas Quinot <quinot@adacore.com>
6779 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6781 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6783 * par-ch10.adb: reject parameterized expressions as compilation unit.
6784 * sem_ch4.adb: handle properly conditional expression with overloaded
6785 then_clause and no else_clause.
6787 2011-08-01 Tristan Gingold <gingold@adacore.com>
6789 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6790 like done by System.Aux_DEC.
6791 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6793 2011-08-01 Yannick Moy <moy@adacore.com>
6795 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6796 missing label at end of declaration (subprogram or package)
6797 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6798 of positional and named parameter association
6799 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6800 Error_Msg_SP which adds a prefix to the error message giving the name
6801 of the formal language analyzed
6802 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6803 access result type in subprogram, unconstrained array as result type,.
6804 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6806 * sem_ch8.adb: Code clean up.
6808 2011-08-01 Javier Miranda <miranda@adacore.com>
6810 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6811 * einfo.ads (Access_Disp_Table): Fix documentation.
6812 (Dispatch_Table_Wrappers): Fix documentation.
6813 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6814 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6815 to enforce the documentation of this attribute.
6816 (Set_Is_Interface): Cleanup the assertion.
6817 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6818 the Underlying_Type entity before reading attribute Access_Disp_Table.
6819 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6820 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6821 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6822 the Underlying_Type entity before reading attribute Access_Disp_Table.
6823 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6824 Locate the Underlying_Type entity before reading attribute
6827 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6829 * s-poosiz.ads: Additional overriding indicators.
6831 2011-08-01 Yannick Moy <moy@adacore.com>
6833 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6835 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6836 parameter specification does not include a subtype mark.
6837 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6838 formal mode on abstract subprogram.
6839 (Analyze_Subprogram_Specification): issue error in formal mode on
6840 user-defined operator.
6841 (Process_Formals): issue error in formal mode on access parameter and
6843 * sem_ch9.adb (Analyze_Abort_Statement,
6844 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6845 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6846 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6847 Analyze_Requeue, Analyze_Selective_Accept,
6848 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6849 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6850 issue error in formal mode on user-defined raise statement.
6852 2011-08-01 Thomas Quinot <quinot@adacore.com>
6854 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6855 declaration being hidden when overriding an implicit inherited
6857 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6858 (-gnats), do not complain about a source file that contains only a
6861 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6863 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6864 variable if already set.
6866 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6868 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6869 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6870 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6871 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6872 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6873 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6874 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6875 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6876 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6877 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6878 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6879 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6880 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6881 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6882 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6883 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6884 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6885 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6886 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6887 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6888 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6889 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6890 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6891 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6892 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6893 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6894 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6895 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6896 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6897 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6898 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6899 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6900 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6901 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6902 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6903 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6904 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6905 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6906 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6907 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6908 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6909 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6910 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6911 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6912 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6913 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6914 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6915 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6916 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6917 Use GNAT instead of GNARL.
6919 2011-08-01 Bob Duff <duff@adacore.com>
6921 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6922 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6923 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6926 2011-08-01 Yannick Moy <moy@adacore.com>
6928 * debug.adb (d.D) reverve flag for the SPARK mode
6929 (d.E) reverve flag for SPARK generation mode
6930 (d.F) reverve flag for Why generation mode
6931 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6932 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6933 functions which return True when the corresponding modes are set
6934 (Formal_Language): return "spark" or "alfa" when in formal verification
6936 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6937 Error_Msg to prefix the error message with a tag giving the formal
6939 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6940 message with a tag giving the formal language
6941 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6943 (Analyze_Case_Statement): issue error in formal mode on case statement
6944 with a single "others" case alternative
6945 (Analyze_Exit_Statement): issue errors in formal mode on exit
6946 statements which do not respect SPARK restrictions
6947 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6948 (Check_Unreachable_Code): always issue an error (not a warning) in
6949 formal mode on unreachable code (concerns both code after an infinite
6950 loop and after an unconditional jump, both not allowed in SPARK)
6951 * sem_ch6.adb (Analyze_Return_Statement): add call to
6952 Set_Return_Present for a procedure containing a return statement
6953 (already done for functions in Analyze_Function_Return)
6954 (Analyze_Function_Return): issue error in formal mode on extended
6955 return or if return is not last statement in function
6956 (Check_Missing_Return): issue error in formal mode if function does
6957 not end with return or if procedure contains a return
6958 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6959 function to detect if there is an inner scope of its parameter S which
6962 2011-08-01 Thomas Quinot <quinot@adacore.com>
6964 * sem_ch6.ads: Minor reformatting.
6966 2011-08-01 Javier Miranda <miranda@adacore.com>
6968 * sem_util.adb (Abstract_Interface_List): Complete condition when
6969 processing private type declarations to avoid reading unavailable
6971 (Is_Synchronized_Tagged_Type): Complete condition when processing
6972 private extension declaration nodes to avoid reading unavailable
6975 2011-08-01 Thomas Quinot <quinot@adacore.com>
6977 * sem_ch3.adb: Minor reformatting.
6979 2011-08-01 Thomas Quinot <quinot@adacore.com>
6981 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6982 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6983 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6984 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6985 for VMS, instead parametrize the common implementation with
6986 System.Parameters declarations.
6988 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6990 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6992 2011-08-01 Tristan Gingold <gingold@adacore.com>
6994 * seh_init.c: Fix SEH handler installation on win64.
6996 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6998 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6999 double analysis of an anonymous access to subprogram, because it can
7000 lead to improper sharing of profiles and a back-end crash.
7002 2011-08-01 Robert Dewar <dewar@adacore.com>
7004 * make.adb, sem_ch4.adb: Minor reformatting.
7005 * gcc-interface/Make-lang.in: Update dependencies.
7006 * sem_util.adb, exp_ch5.adb: Minor reformatting.
7008 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7010 * gnat_rm.texi: Fix definition of Long_Integer.
7012 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7014 * exp_aggr.adb: check limit size of static aggregate unconditionally,
7015 to prevent storage exhaustion.
7016 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
7017 finalized is a function body, insert the cleanup code before the final
7018 return statement, to prevent spurious warnings.
7019 * s-pooglo.ads: add overriding indicator.
7021 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7023 * sem_ch4.adb (Operator_Check): improve error message when both a
7024 with_clause and a use_clause are needed to make operator usage legal.
7025 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
7026 determine whether a compilation unit is visible within an other,
7027 either through a with_clause in the current unit, or a with_clause in
7028 its library unit or one one of its parents.
7030 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7032 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
7033 over an arbitrary expression of an array or container type.
7034 * lib-xref.adb: clarify comment.
7036 2011-08-01 Bob Duff <duff@adacore.com>
7038 * einfo.ads: Minor reformatting.
7039 * debug.adb: Minor comment improvement.
7041 2011-08-01 Javier Miranda <miranda@adacore.com>
7043 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
7044 consider hidden subprograms as valid candidates.
7046 2011-08-01 Arnaud Charlet <charlet@adacore.com>
7048 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
7050 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
7052 * gnat_ugn.texi: Fix typo.
7054 2011-08-01 Robert Dewar <dewar@adacore.com>
7056 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
7057 lib-xref.adb: Minor reformatting
7059 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7061 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
7062 when to generate a call to Move_Final_List.
7063 (Has_Controlled_Parts): Remove this function.
7065 2011-08-01 Geert Bosch <bosch@adacore.com>
7067 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
7070 2011-08-01 Thomas Quinot <quinot@adacore.com>
7072 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
7073 explicit raise of a predefined exception as Comes_From_Source if the
7074 original N_Raise_Statement comes from source.
7076 2011-08-01 Robert Dewar <dewar@adacore.com>
7078 * sinfo.ads: Add comment.
7079 * sem_ch6.adb: Minor reformatting.
7081 2011-08-01 Robert Dewar <dewar@adacore.com>
7083 * freeze.adb (Freeze_Entity): Refine check for bad component size
7084 clause to avoid rejecting confirming clause when atomic/aliased present.
7086 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7088 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
7089 better determine whether an entity reference is a write.
7090 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
7092 * lib-xref.adb (Output_References): Do no suppress a read reference at
7093 the same location as an immediately preceeding modify-reference, to
7094 handle properly in-out actuals.
7096 2011-08-01 Tristan Gingold <gingold@adacore.com>
7098 * env.c (__gnat_setenv) [VMS]: Refine previous change.
7100 2011-08-01 Quentin Ochem <ochem@adacore.com>
7102 * i-cstrin.adb (New_String): Changed implementation, now uses only the
7103 heap to compute the result.
7105 2011-08-01 Robert Dewar <dewar@adacore.com>
7107 * atree.ads: Minor reformatting.
7109 2011-08-01 Emmanuel Briot <briot@adacore.com>
7111 * g-expect.adb (Get_Command_Output): Fix memory leak.
7113 2011-08-01 Geert Bosch <bosch@adacore.com>
7115 * cstand.adb (P_Float_Type): New procedure to print the definition of
7116 predefined fpt types.
7117 (P_Mixed_Name): New procedure to print a name using mixed case
7118 (Print_Standard): Use P_Float_Type for printing floating point types
7119 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
7120 precision IEEE float.
7122 2011-08-01 Thomas Quinot <quinot@adacore.com>
7124 * sem_ch3.adb: Minor reformatting.
7126 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7128 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
7129 the completion of a generic function, insert the new body rather than
7130 rewriting the original.
7132 2011-08-01 Yannick Moy <moy@adacore.com>
7134 * sinfo.ads, errout.ads: Typos in comments.
7136 2011-08-01 Robert Dewar <dewar@adacore.com>
7138 * par-endh.adb: Minor reformatting.
7140 2011-08-01 Robert Dewar <dewar@adacore.com>
7142 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
7143 (Pre_Post_Aspects): New subtype.
7144 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7145 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7146 * par-ch7.adb (P_Package): Remove Decl parameter
7147 (P_Package): Handle new syntax for aspects (before IS)
7148 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7150 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7151 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7152 (P_Package): Remove Decl parameter
7153 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7155 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7157 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7158 * sinfo.ads: Document new syntax for aspects in packages etc.
7159 * sprint.adb: Handle new syntax of aspects before IS in package
7161 2011-08-01 Thomas Quinot <quinot@adacore.com>
7163 * atree.ads: Minor reformatting.
7164 * sem_prag.adb: Minor reformatting.
7166 2011-08-01 Robert Dewar <dewar@adacore.com>
7168 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7169 case expr alternative.
7171 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7173 * sem_ch12.adb: Fix typo.
7175 2011-08-01 Geert Bosch <bosch@adacore.com>
7177 * sem_prag.adb (Check_No_Link_Name): New procedure.
7178 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7179 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7180 instead of Standard_Long_Long_Float_Size global. Preparation for
7181 eventual removal of per type constants.
7182 * exp_util.ads (Get_Stream_Size): New function returning the stream
7183 size value of subtype E.
7184 * exp_util.adb (Get_Stream_Size): Implement new function.
7185 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7187 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7189 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7191 2011-08-01 Geert Bosch <bosch@adacore.com>
7193 * cstand.adb: Fix comments.
7194 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7197 2011-08-01 Robert Dewar <dewar@adacore.com>
7199 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7201 2011-08-01 Geert Bosch <bosch@adacore.com>
7203 * atree.ads: Fix comment.
7205 2011-08-01 Robert Dewar <dewar@adacore.com>
7207 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7208 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7209 * par.adb: Add with for Namet.Sp.
7210 * par-tchk.adb: Minor reformatting.
7212 2011-08-01 Vincent Celier <celier@adacore.com>
7214 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7215 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7216 of the init procedure of a SAL.
7217 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7220 2011-08-01 Thomas Quinot <quinot@adacore.com>
7222 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7225 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7227 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7229 2011-08-01 Thomas Quinot <quinot@adacore.com>
7231 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7232 conformant with its spec (return True only for types that have
7233 an overriding Initialize primitive operation that prevents them from
7234 having preelaborable initialization).
7235 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7236 initialization for controlled types in Ada 2005 or later mode.
7238 2011-08-01 Robert Dewar <dewar@adacore.com>
7240 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7242 (Same_Aspect): New function.
7243 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7244 Type_Invariant, Precondition, Postcondition.
7245 * snames.ads-tmpl: Add Name_Type_Invariant.
7247 2011-08-01 Robert Dewar <dewar@adacore.com>
7249 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7251 (Freeze_All_Ent): Fix error in handling inherited aspects.
7252 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7253 already analyzed, but don't skip entire processing of a declaration,
7254 that's wrong in some cases of declarations being rewritten.
7255 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7256 Don't delay for integer, string literals
7257 Treat predicates in usual manner for delay, remove special case code,
7259 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7260 (Build_Predicate_Function): Update saved expression in aspect
7261 (Build_Invariant_Procedure): Update saved expression in aspect
7262 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7263 of replacement of discriminant references if the reference is simple.
7265 2011-08-01 Robert Dewar <dewar@adacore.com>
7267 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7268 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7269 Static_Predicate and Dynamic_Predicate.
7270 (Build_Predicate_Function): Add processing for Static_Predicate
7271 and Dynamic_Predicate.
7272 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7273 (From_Static_Predicate): New flag
7274 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7276 2011-08-01 Robert Dewar <dewar@adacore.com>
7278 * usage.adb: Documentation cleanup for Ada version modes in usage.
7279 * expander.adb: Minor reformatting.
7281 2011-08-01 Robert Dewar <dewar@adacore.com>
7283 * atree.ads: Minor comment fix.
7284 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7285 a-witeio.ads, sem_prag.adb: Minor reformatting.
7287 2011-08-01 Doug Rupp <rupp@adacore.com>
7289 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7290 pointers. Use descrip.h header file for convenience. Add some
7293 2011-08-01 Robert Dewar <dewar@adacore.com>
7295 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7296 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7297 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7299 (Check_Aspect_At_End_Of_Declarations): New procedure
7300 (Analye_Aspect_Specification): Minor changes for above procedures
7301 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7302 specification node as well.
7304 2011-08-01 Pascal Obry <obry@adacore.com>
7306 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7307 Windows files. Use GetFilesAttributes() in this case to check for file
7308 existence instead of returning with an error code.
7310 2011-08-01 Vincent Celier <celier@adacore.com>
7312 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7313 High is above Source length.
7315 2011-08-01 Robert Dewar <dewar@adacore.com>
7317 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7319 2011-08-01 Robert Dewar <dewar@adacore.com>
7321 * aspects.ads (Boolean_Aspects): New subtype.
7322 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7323 for derived types in cases where the parent type and derived type have
7325 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7326 with aspects when parent type also has aspects.
7327 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7328 boolean expression at this point).
7329 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7330 accordance with final decision on the Ada 2012 feature.
7331 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7333 2011-08-01 Matthew Heaney <heaney@adacore.com>
7335 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7337 2011-08-01 Pascal Obry <obry@adacore.com>
7339 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7340 Fix Replace_Slice when High is above current string size.
7341 (Replace_Slice): Fix DL computation when High is above current
7344 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7346 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7348 2011-08-01 Matthew Heaney <heaney@adacore.com>
7350 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7353 2011-08-01 Pascal Obry <obry@adacore.com>
7355 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7358 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7360 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7361 access to protected subprograms in generic bodies.
7362 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7363 protected type, indicate that the convention of the subprogram is
7364 Convention_Protected, because it may be used in subsequent declarations
7365 within the protected declaration.
7367 2011-08-01 Vincent Celier <celier@adacore.com>
7369 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7370 and "final" procedures when the name of the library is "ada", to avoid
7371 duplicate symbols "adainit" and "adafinal" in executables.
7373 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7375 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7376 quantified expression that appears within a postcondition and uses the
7377 Ada2012 'Result attribute.
7379 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7381 * init.c (__gnat_error_handler): Cast reason to int.
7382 (__gnat_install_handler): Explain sa_sigaction use.
7384 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7386 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7387 subprogram has copy-in copy-out parameters, try to promote the mode of
7388 the return type if it is passed in registers.
7390 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7392 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7393 left operand as addressable.
7395 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7397 * gcc-interface/gigi.h (build_function_stub): Remove.
7398 (build_return_expr): Likewise.
7399 (convert_vms_descriptor): Declare.
7400 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7401 (build_function_stub): Move to...
7402 * gcc-interface/utils2.c (build_return_expr): Move to...
7403 * gcc-interface/trans.c (build_function_stub): ...here.
7404 (build_return_expr): ...here.
7405 (Subprogram_Body_to_gnu): Add local variable for language_function.
7406 Disconnect the parameter attributes cache, if any, once done with it.
7407 Call end_subprog_body only after setting the end_locus.
7408 Build the stub associated with the function, if any, at the very end.
7409 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7410 variables and streamline control flow.
7412 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7415 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7418 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7421 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7422 Assign to act.sa_sigaction.
7423 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7424 current->return_address to char * before arithmetic.
7426 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7428 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7429 Correct argument types.
7430 Extract code from reason.
7431 (__gnat_install_handler): Assign to act.sa_sigaction.
7433 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7435 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7436 (GNAT1_OBJS): ...here.
7438 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7441 * g-socthi-mingw.adb (Fill): Fix formatting.
7443 * gcc-interface/gigi.h: Move around comment.
7445 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7448 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7450 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7453 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7455 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7457 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7458 range comparison if Pmode is SImode.
7460 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7461 Eric Botcazou <ebotcazou@adacore.com>
7463 * adadecode.c: Wrap up in extern "C" block.
7464 * adadecode.h: Likewise.
7465 * adaint.c: Likewise. Remove 'const' keyword.
7466 * adaint.h: Likewise.
7468 * atree.h: Likewise.
7470 * cstreams.c: Likewise.
7474 * final.c: Likewise.
7476 * initialize.c: Likewise.
7478 * namet.h: Likewise.
7479 * nlists.h: Likewise.
7480 * raise.c: Likewise.
7481 * raise.h: Likewise.
7482 * repinfo.h: Likewise.
7483 * seh_init.c: Likewise.
7484 * targext.c: Likewise.
7485 * tracebak.c: Likewise.
7486 * uintp.h: Likewise.
7487 * urealp.h: Likewise.
7488 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7489 * xsinfo.adb: Likewise.
7490 * xsnamest.adb: Likewise.
7491 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7492 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7493 * gcc-interface/misc.c: Likewise.
7494 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7495 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7496 ada/targext.o here...
7497 (GNAT_ADA_OBJS): ...and not here.
7498 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7499 (GNATBIND_OBJS): Reorder.
7501 2011-07-07 Richard Henderson <rth@redhat.com>
7503 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7504 dwarf2out_frame_init.
7506 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7508 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7510 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7513 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7515 2011-07-06 Richard Guenther <rguenther@suse.de>
7517 * gcc-interface/misc.c (gnat_init): Merge calls to
7518 build_common_tree_nodes and build_common_tree_nodes_2.
7519 Re-initialize boolean_false_node.
7521 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7522 Olivier Hainque <hainque@adacore.com>
7523 Nicolas Setton <setton@adacore.com>
7525 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7526 the type according to the ARTIFICIAL_P parameter.
7527 (create_type_decl): Likewise.
7528 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7530 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7532 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7533 (gnatbind): Likewise.
7535 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7537 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7539 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7541 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7542 local variable throughout. Remove useless call to Base_Type.
7543 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7544 Take it also into account for the volatileness of the field. Set the
7545 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7547 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7549 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7550 on a dereference built for a by-ref object if it has an address clause.
7552 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7554 * einfo.ads (Address_Taken): Document use for the second argument of
7555 Asm_Input and Asm_Output attributes.
7556 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7557 argument is an entity name, then set Address_Taken on it.
7558 <Attribute_Asm_Output>: Likewise.
7559 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7560 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7561 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7562 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7564 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7567 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7569 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7571 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7572 (ada/utils.o): Update dependencies.
7573 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7574 ../../../libcpp/libcpp.a.
7575 * gcc-interface/utils.c: Include common/common-target.h.
7576 (process_attributes): Use targetm_common.have_named_sections.
7578 2011-06-07 Richard Guenther <rguenther@suse.de>
7580 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7583 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7585 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7586 TREE_THIS_NOTRAP flag.
7588 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7590 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7593 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7595 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7596 constants whose full view has discriminants specially.
7598 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7600 * gcc-interface/utils.c: Include diagnostic.h.
7601 (gnat_write_global_declarations): Output debug information for all
7602 global type declarations before finalizing the compilation unit.
7603 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7605 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7607 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7609 2011-05-25 Kai Tietz <ktietz@redhat.com>
7611 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7612 initialization instead of const/none-const pointer assignment.
7614 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7616 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7617 $(EXTRA_GNAT1_OBJS).
7618 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7619 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7620 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7621 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7622 libcommon-target.a instead of prefix.o.
7624 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7627 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7629 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7631 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7632 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7633 instead of version.o.
7635 2011-05-18 Kai Tietz <ktietz@redhat.com>
7637 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7638 boolean_false_node instead of integer_zero_node.
7639 (convert_with_check): Likewise.
7640 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7642 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7644 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7645 type of the parameter is an unconstrained array, convert the actual to
7646 the type of the formal in the In Out and Out cases as well.
7648 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7650 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7651 call build_function_type_array or build_varargs_function_type_array
7653 (create_subprog_type): Don't call build_function_type; call
7654 build_function_type_vec instead.
7656 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7658 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7659 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7660 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7662 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7664 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7666 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7667 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7669 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7671 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7673 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7675 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7676 instead of accessing TYPE_ARG_TYPES directly.
7677 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7679 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7682 * gcc-interface/gigi.h (get_variant_part): Declare.
7683 * gcc-interface/decl.c (get_variant_part): Make global.
7684 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7685 types have the same constant size, are record types and T1 has a
7686 variant part while T2 doesn't.
7688 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7690 * gcc-interface/utils.c (begin_subprog_body): Do not call
7692 (end_subprog_body): Likewise.
7694 2011-05-04 Richard Guenther <rguenther@suse.de>
7696 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7698 (pos_to_constructor): Likewise.
7700 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7701 Eric Botcazou <ebotcazou@adacore.com>
7703 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7704 of build_function_type. Adjust calls to...
7705 (build_raise_check): ...this. Do not take a void_tree parameter.
7706 Call build_function_type_list instead of build_function_type.
7707 Fix head comment and swap couple of conditional blocks.
7709 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7711 * gnatvsn.ads (Library_Version): Bump to 4.7.
7712 (Current_Year): Bump to 2011.
7714 2011-04-29 Michael Matz <matz@suse.de>
7716 * gcc-interface/misc.c (gnat_handle_option): Set
7717 warn_maybe_uninitialized.
7719 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7721 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7722 the Watson/McCabe paper.
7724 2011-04-23 Jim Meyering <meyering@redhat.com>
7726 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7728 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7730 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7733 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7735 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7737 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7738 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7739 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7740 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7741 <all>: Do not set flags on the reused DECL node coming from an alias.
7742 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7743 don't need debug info here...
7744 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7745 (gigi): Adjust calls to create_subprog_decl.
7746 (build_raise_check): Likewise.
7747 (establish_gnat_vms_condition_handler): Likewise.
7748 (Compilation_Unit_to_gnu): Likewise.
7749 (gnat_to_gnu): Likewise.
7751 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7753 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7754 (NO_REORDER_ADAFLAGS): New variable.
7755 (EXTRA_GNATTOOLS): Always define.
7756 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7757 Clean up and adjust list of files compiled with special options.
7758 * gcc-interface/Make-lang.in: Likewise.
7759 (ada/decl.o): Cosmetical change.
7760 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7762 2011-04-20 Jim Meyering <meyering@redhat.com>
7764 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7766 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7768 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7769 $(CFLAGS) on the link line.
7771 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7773 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7774 padded type built for the return type if it is unconstrained.
7776 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7778 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7780 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7782 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7783 before calling TREE_CHAIN.
7784 * gcc-interface/misc.c (gnat_init_ts): New function.
7785 (LANG_HOOKS_INIT_TS): Define.
7787 2011-04-12 Martin Jambor <mjambor@suse.cz>
7789 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7790 instead of cgraph_node.
7792 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7794 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7795 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7798 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7800 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7801 of aggregate types that contain a placeholder.
7803 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7805 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7807 (handle_type_generic_attribute): Likewise.
7809 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7812 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7814 2011-04-04 Kai Tietz <ktietz@redhat.com>
7817 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7820 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7822 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7823 type case, do not strip a padding type around the array type.
7825 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7827 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7830 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7832 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7833 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7834 code for -feliminate-unused-debug-types.
7835 (gnat_post_options): Likewise.
7837 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7839 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7840 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7843 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7845 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7846 DECL_ARTIFICIAL flag on enumeration types.
7848 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7850 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7851 fat pointer types artificial unconditionally.
7852 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7855 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7857 * gcc-interface/gigi.h (get_dummy_type): Declare.
7858 (build_dummy_unc_pointer_types): Likewise.
7859 (finish_fat_pointer_type): Likewise.
7860 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7861 fat pointer type has been built, complete it in place.
7862 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7863 and thin pointers. Remove useless variable.
7864 (finish_fat_pointer_type): Make global and move to...
7865 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7866 (get_dummy_type): New function.
7867 (build_dummy_unc_pointer_types): Likewise.
7868 (gnat_pushdecl): Propage the name to the anonymous variants only.
7869 (update_pointer_to): Only adjust the pointer types in the unconstrained
7872 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7874 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7875 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7876 if this is a Taft amendment type and the full declaration is available.
7877 * gcc-interface/trans.c (process_type): Likewise.
7878 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7879 (process_freeze_entity): Likewise.
7880 * gcc-interface/utils.c (dummy_global): New static variable.
7881 (gnat_write_global_declarations): If there are types declared as used
7882 at the global level, insert them in the global hash table.
7884 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7886 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7887 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7888 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7890 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7891 flag of the type accordingly.
7892 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7894 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7896 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7897 finalizing types when updating the pointers to the designated type.
7898 <all>: Finalize the deferred types even if we didn't defer processing
7899 of incomplete types in this invocation.
7901 2011-04-01 Olivier Hainque <hainque@adacore.com>
7902 Nicolas Setton <setton@adacore.com>
7903 Eric Botcazou <ebotcazou@adacore.com>
7905 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7906 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7908 2011-03-28 Kai Tietz <ktietz@redhat.com>
7910 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7912 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7913 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7915 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7917 2011-03-28 Tristan Gingold <gingold@adacore.com>
7920 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7921 Use ada output of gnatbind.
7922 (ada/b_gnatb.adb): Ditto.
7923 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7924 (ada.mostlyclean, ada.stage1)
7925 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7926 (ada.stagefeedback): Adjust.
7927 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7928 Use ada output of gnatbind.
7929 (b_gnatm.adb): Ditto.
7930 (b_gnatl.o, b_gnatm.o): New rules.
7932 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7934 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7935 for the padded type built to support a specified size or alignment.
7937 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7939 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7940 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7941 unconditionally to the end of the unit when the designated type is
7943 <all>: Rename local variable. Attempt to un-defer types only and do it
7944 for limited_with'ed types as well.
7945 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7946 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7947 consistently and remove redundant call to finalize_from_with_types.
7949 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7951 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7952 subprograms without a previous spec declared in the same unit.
7953 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7954 subprograms at the end of the unit instead of at the beginning.
7955 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7956 isn't public for the special handling of non-inline functions nested
7957 inside inline external functions.
7959 2011-03-25 Jeff Law <law@redhat.com>
7961 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7963 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7965 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7966 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7967 to compute Set_Size_Depends_On_Discriminant.
7968 (Layout_Type): Call it on array types in back-end layout mode.
7969 * sem_util.adb (Requires_Transient_Scope): Return true for array
7970 types only if the size depends on the value of discriminants.
7971 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7972 type if the RHS is a call to a function that returns an unconstrained
7973 type with default discriminant.
7975 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7977 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7978 non-conversion to the nominal result type at the end.
7980 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7982 * gcc-interface/trans.c (create_temporary): New function taken from...
7983 (create_init_temporary): ...here. Call it.
7984 (call_to_gnu): Create the temporary for the return value early, if any.
7985 Create it for a function with copy-in/copy-out parameters if there is
7986 no target; in other cases of copy-in/copy-out, use another temporary.
7987 Push the new binding level lazily. Add and rename local variables.
7989 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7991 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7993 (set_rm_size): Likewise.
7995 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7997 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7998 for the padded type built in order to support a specified alignment.
7999 Fix incorrect formatting.
8001 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8004 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
8006 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8008 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
8009 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
8010 to the end of the list. Adjust recursive call. Rename local variable.
8011 If REORDER is true, reorder components of the record type.
8012 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
8013 components_to_record and adjust the parameter list.
8015 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
8017 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
8018 disabled, use the variable for bounds of loop iteration scheme.
8020 2011-03-21 Kai Tietz <ktietz@redhat.com>
8023 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
8025 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8027 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
8028 out whether the expression is read-only. Short-circuit placeholder
8029 case and rename a couple of local variables.
8031 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
8033 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
8034 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
8035 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
8036 (convert): Deal with conversions from a smaller form type specially.
8038 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
8040 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
8041 its argument, except for the special -I- switch.
8043 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
8045 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
8048 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
8050 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
8052 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
8054 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
8056 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
8057 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
8058 instead of GNAT_FORMAL. Protect the expression against multiple uses.
8059 Do not generate the check directly, instead instantiate the template
8060 check present in the descriptor.
8061 (make_descriptor_field): Move around.
8062 (build_vms_descriptor32): Build a template check in the POINTER field.
8063 (build_vms_descriptor): Remove useless suffixes.
8064 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
8066 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
8069 * targext.c: Include target files if IN_RTS is defined.
8071 2011-01-26 Richard Guenther <rguenther@suse.de>
8074 * targext.c: Include config.h.
8075 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
8078 2011-01-04 Pascal Obry <obry@adacore.com>
8079 Eric Botcazou <ebotcazou@adacore.com>
8081 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
8083 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8085 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
8086 end-of-case on the end label and its associated gotos, if any.
8088 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8090 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
8091 expressions of the parameter cache within the statement group of
8094 2011-01-04 Olivier Hainque <hainque@adacore.com>
8095 Eric Botcazou <ebotcazou@adacore.com>
8097 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
8098 (set_end_locus_from_node): New function.
8099 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
8100 make and the function end_locus.
8101 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
8102 for the elaboration subprogram.
8103 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
8104 set the end_locus of the expression as well.
8106 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
8109 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
8110 variables that are referenced in exception handlers volatile.
8114 Copyright (C) 2011 Free Software Foundation, Inc.
8116 Copying and distribution of this file, with or without modification,
8117 are permitted in any medium without royalty provided the copyright
8118 notice and this notice are preserved.
8120 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8121 - fix bugs in the description of Source_Trace;
8122 - get rid of UNIT_NAME;
8124 2011-08-02 Javier Miranda <miranda@adacore.com>
8127 (Build_Dispatching_Requeue): Adding support for VM targets
8128 since we cannot directly reference the Tag entity.
8129 * exp_sel.adb (Build_K): Adding support for VM targets.
8130 (Build_S_Assignment): Adding support for VM targets.
8132 (Default_Prim_Op_Position): In VM targets do not restrict availability
8133 of predefined interface primitives to compiling in Ada 2005 mode.
8134 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8135 restricted to compiling in Ada 2005 mode.
8136 (Make_VM_TSD): Generate code that declares and initializes the OSD
8137 record. Needed to support dispatching calls through synchronized
8140 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8141 primitives associated with synchronized interfaces.
8142 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8143 primitives associated with synchronized interfaces.
8145 2011-08-02 Yannick Moy <moy@adacore.com>
8147 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8148 statements hidden in SPARK if preceded by the HIDE directive
8149 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8150 exception handlers as hidden in SPARK if preceded by the HIDE directive
8151 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8152 if starting with the HIDE directive
8153 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8154 starting with the HIDE directive; mark the declarations in a private
8155 part as hidden in SPARK if the private part starts with the HIDE
8157 * restrict.adb, restrict.ads
8158 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8159 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8160 argument node belongs to a part which is hidden in SPARK
8161 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8162 parts in SPARK; protect the possibly costly call to
8163 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8164 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8165 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8166 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8168 (Scan): recognize special comment starting with '#' and followed by
8169 SPARK keyword "hide" as a HIDE directive.
8171 2011-08-02 Yannick Moy <moy@adacore.com>
8173 * types.ads, erroutc.ads: Minor reformatting.
8175 2011-08-02 Vincent Celier <celier@adacore.com>
8177 * link.c: Add response file support for cross platforms.
8179 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8181 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8182 in an association, set parent field of copy before partial analysis.
8183 * sem_res.adb (Resolve_Slice): create reference to itype only when
8184 expansion is enabled.
8186 2011-08-02 Yannick Moy <moy@adacore.com>
8188 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8189 for new flag denoting which subprogram bodies are in ALFA
8190 * restrict.adb, sem_ch7.adb: Update comment
8191 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8192 sem_ch9.adb, sem_res.adb: Add calls to
8193 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8194 * sem_ch6.adb (Analyze_Function_Return): add calls to
8195 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8196 middle of the body, and extended return.
8197 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8198 False when missing return.
8199 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8200 to True for subprograms whose spec is in ALFA. Remove later on the flag
8201 on the entity used for a subprogram body when there exists a separate
8203 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8204 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8205 False, otherwise do nothing.
8207 2011-08-02 Robert Dewar <dewar@adacore.com>
8209 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8211 2011-08-02 Yannick Moy <moy@adacore.com>
8213 * sem_ch4.ads: minor formatting.
8215 2011-08-02 Yannick Moy <moy@adacore.com>
8217 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8218 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8219 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8220 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8221 opt.ads: cleanup of SPARK mode
8223 2011-08-02 Yannick Moy <moy@adacore.com>
8225 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8227 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8228 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8230 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8231 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8232 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8233 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8235 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8237 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8238 functions whose return type is not in ALFA.
8239 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8241 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8242 parameter's type is not in ALFA.
8243 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8246 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8248 * sem_ch6 (Analyze_Expression_Function): treat the function as
8249 Inline_Always, and introduce a subprogram declaration for it when it is
8251 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8252 expression functions, so that the back-end can determine whether they
8253 can in fact be inlined.
8254 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8255 a function body comes from an expression function.
8257 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8259 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8260 null exclusions to test Can_Never_Be_Null on the anonymous access types
8261 of the formals rather than testing the formals themselves. Exclude this
8262 check in cases where the Old_Formal is marked as a controlling formal,
8263 to avoid issuing spurious errors for bodies completing dispatching
8264 operations (due to the flag not getting set on controlling access
8265 formals in body specs).
8266 (Find_Corresponding_Spec): When checking full and subtype conformance of
8267 subprogram bodies in instances, pass Designated and E in that order, for
8268 consistency with the expected order of the formals (New_Id followed by
8271 2011-08-02 Robert Dewar <dewar@adacore.com>
8273 * sem_ch8.adb: Minor reformatting.
8275 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8277 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8278 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8279 primitive operations of class-wide actuals.
8281 2011-08-02 Javier Miranda <miranda@adacore.com>
8283 * exp_atag.ads, exp_atag.adb
8284 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8285 since its value is implicitly passed in argument Typ.
8286 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8287 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8288 Build_Common_Dispatching_Select_Statements.
8290 2011-08-02 Robert Dewar <dewar@adacore.com>
8292 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8293 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8296 2011-08-02 Robert Dewar <dewar@adacore.com>
8298 * sem_res.adb: Minor reformatting.
8299 * sem_prag.adb: Minor reformatting.
8301 2011-08-02 Javier Miranda <miranda@adacore.com>
8303 * exp_atag.adb, exp_atags.ads
8304 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8305 by the tagged type Entity. Required to use this routine in the VM
8306 targets since we do not have available the Tag entity in the VM
8309 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8310 Ada.Tags has not been previously loaded.
8312 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8313 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8315 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8316 view of enclosing scopes. Required to handle enclosing scopes that
8317 are synchronized types whose full view is a task type.
8319 (Build_VM_TSDs): Minor code improvement to avoid generating and
8320 analyzing lists with empty nodes.
8321 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8322 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8323 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8324 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8325 (Make_Select_Specific_Data_Table): Add support for VM targets.
8326 (Make_VM_TSD): Generate code to initialize the SSD structure of
8329 2011-08-02 Yannick Moy <moy@adacore.com>
8331 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8332 cross-references section in ALI.
8333 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8334 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8336 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8337 subprogram or package entity of a node
8338 (Is_Local_Reference_Type): new function returns True for references
8339 selected in local cross-references.
8340 (Lt): function extracted from Lt in Output_References
8341 (Write_Entity_Name): function extracted from Output_References
8342 (Generate_Definition): generate reference with type 'D' for definition
8343 of objects (object declaration and parameter specification), with
8344 appropriate locations and units, for use in local cross-references.
8345 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8346 references of type 'I' for initialization in object definition.
8347 (Output_References): move part of function Lt and procedure
8348 Write_Entity_Name outside of the body. Ignore references of types 'D'
8349 and 'I' introduced for local cross-references.
8350 (Output_Local_References): new procedure to output the local
8351 cross-references sections.
8352 (Lref_Entity_Status): new array defining whether an entity is a local
8353 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8354 with 'I' type when initialization expression is present.
8355 * get_scos.adb, get_scos.ads: Correct comments and typos
8357 2011-08-02 Javier Miranda <miranda@adacore.com>
8359 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8361 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8363 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8366 2011-08-02 Vincent Celier <celier@adacore.com>
8368 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8369 (No_Space_Img): New function
8370 (Find_Excluded_Sources): When reading from a file, record the file name
8371 and the line number for each excluded source.
8372 (Mark_Excluded_Sources): When reporting an error, if the excluded
8373 sources were read from a file, include file name and line number in
8376 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8378 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8380 2011-08-02 Robert Dewar <dewar@adacore.com>
8382 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8384 2011-08-02 Javier Miranda <miranda@adacore.com>
8386 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8387 generation of TSDs to the DOTNET compiler.
8388 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8389 generation of TSDs to the DOTNET compiler.
8391 2011-08-02 Javier Miranda <miranda@adacore.com>
8393 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8394 record of all the tagged types declared inside library level package
8395 declarations, library level package bodies or library level subprograms.
8396 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8397 associated with a given tagged type.
8398 (Build_VM_TSDs): New subprogram.
8399 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8400 compilation units that are subprograms.
8401 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8402 compilation units that are package bodies.
8403 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8404 units that are a package declaration or a package instantiation.
8405 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8406 reorganization to improve the error generated by the frontend when the
8407 function Ada.Tags.Secondary_Tag is not available.
8408 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8409 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8411 2011-08-02 Javier Miranda <miranda@adacore.com>
8413 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8415 2011-08-02 Robert Dewar <dewar@adacore.com>
8417 * s-imenne.ads: Minor reformatting.
8419 2011-08-02 Robert Dewar <dewar@adacore.com>
8421 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8422 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8423 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8425 2011-08-02 Robert Dewar <dewar@adacore.com>
8427 * einfo.ads (Materialize_Entity): Document this is only for renamings
8428 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8429 required debug information in the case where we transform the object
8430 declaration into a renaming declaration.
8431 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8433 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8436 2011-08-02 Robert Dewar <dewar@adacore.com>
8438 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8439 Suppress_Init_Procs.
8440 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8441 Suppress_Initialization/Initialization_Suppressed.
8442 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8443 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8444 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8445 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8447 2011-08-02 Robert Dewar <dewar@adacore.com>
8449 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8454 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8455 only have inheritable classwide pre/postconditions.
8457 2011-08-02 Javier Miranda <miranda@adacore.com>
8459 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8460 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8461 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8462 checks if the external tag of a type is the same as the external tag
8463 of some other declaration.
8465 2011-08-02 Thomas Quinot <quinot@adacore.com>
8467 * s-taskin.ads: Minor reformatting.
8469 2011-08-02 Emmanuel Briot <briot@adacore.com>
8471 * g-comlin.adb (Display_Help): swap the order in which it prints the
8472 short help and the general usage.
8474 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8476 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8477 the aspect declarations and attach them to the generic copy for
8478 subsequent analysis.
8479 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8480 declarations of the generic tree to the new subprogram declarations.
8481 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8482 conditions that apply to a subprogram instance.
8484 2011-08-02 Robert Dewar <dewar@adacore.com>
8486 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8488 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8490 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8491 private type with a tagged full view is not derived in the immediate
8492 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8494 2011-08-02 Robert Dewar <dewar@adacore.com>
8496 * exp_ch4.adb: Minor reformatting.
8498 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8500 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8501 Ada2012 iterator, the loop will be rewritten during expansion into a
8502 while loop with a cursor and an element declaration. Do not analyze the
8503 body in this case, because if the container is for indefinite types the
8504 actual subtype of the elements will only be determined when the cursor
8505 declaration is analyzed.
8507 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8509 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8510 size/alignment related attributes in CodePeer_Mode.
8512 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8514 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8515 Prepend_Element, since this can result in the operation getting the
8516 wrong slot in the full type's dispatch table if the full type has
8517 inherited operations. The incomplete type's operation will get added
8518 to the proper position in the full type's primitives
8519 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8520 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8521 dispatching operations, since there are cases where nonprimitive
8522 subprograms can get added to the list of incomplete dependents (such
8523 as subprograms in nested packages).
8524 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8525 private part when determining whether to add a primitive with a
8526 parameter of a tagged incomplete type to the Private_Dependents list.
8527 Such primitives can also occur in the visible part, and should not have
8528 been excluded from being private dependents.
8529 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8530 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8531 list of a Taft-amendment incomplete type is a primitive before issuing
8532 an error that the full type must appear in the same unit. There are
8533 cases where nonprimitives can be in the list (such as subprograms in
8535 * sem_disp.adb (Derives_From): Use correct condition for checking that
8536 a formal's type is derived from the type of the corresponding formal in
8537 the parent subprogram (the condition was completely wrong). Add
8538 checking that was missing for controlling result types being derived
8539 from the result type of the parent operation.
8541 2011-08-02 Yannick Moy <moy@adacore.com>
8543 * errout.adb (First_Node): minor renaming
8544 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8547 2011-08-02 Yannick Moy <moy@adacore.com>
8549 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8550 before accessing operands.
8551 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8552 decide whether an initialization expression respects SPARK rules, as
8553 the plain node is the expanded one. This allows for more valid warnings
8555 * gnat_rm.texi: Minor update.
8557 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8559 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8562 2011-08-02 Robert Dewar <dewar@adacore.com>
8564 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8566 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8568 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8569 loop statements and the element renaming declaration with a block when
8570 the element type is controlled.
8572 2011-08-02 Yannick Moy <moy@adacore.com>
8574 * sinfo.ads: Minor formatting.
8576 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8578 * sem_aggr.adb (Add_Association): if the association has a box and no
8579 expression, use the Sloc of the aggregate itself for the new
8581 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8584 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8586 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8587 When a container is provided via a function call, generate a renaming
8588 of the function result. This avoids the creation of a transient scope
8589 and the premature finalization of the container.
8590 * exp_ch7.adb (Is_Container_Cursor): Removed.
8591 (Wrap_Transient_Declaration): Remove the supression of the finalization
8592 of the list controller when the declaration denotes a container cursor,
8595 2011-08-02 Yannick Moy <moy@adacore.com>
8597 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8598 node is from source, instead of the original node being from source.
8600 (Resolve_Array_Aggregate): refine the check for a static expression, to
8601 recognize also static ranges
8602 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8603 Array_Type_Declaration): postpone the test for the type being a subtype
8604 mark after the type has been resolved, so that component-selection and
8605 expanded-name are discriminated.
8606 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8607 to distinguish the case of an iteration scheme, so that an error is
8608 issed on a non-static range in SPARK except in an iteration scheme.
8609 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8610 In_Iter_Schm = True.
8611 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8612 user-defined operators so that they are allowed in renaming
8614 (Find_Selected_Component): refine the check for prefixing of operators
8615 so that they are allowed in renaming. Move the checks for restrictions
8616 on selector name after analysis discriminated between
8617 component-selection and expanded-name.
8618 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8619 concatenation argument of string type if it is static.
8620 * sem_util.adb, sem_util.ads
8621 (Check_Later_Vs_Basic_Declarations): add a new function
8622 Is_Later_Declarative_Item to decice which declarations are allowed as
8623 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8624 mode, add that renamings are considered as later items.
8625 (Enclosing_Package): new function to return the enclosing package
8626 (Enter_Name): correct the rule for homonyms in SPARK
8627 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8628 from source (result of expansion) to avoid issuing wrong warnings.
8630 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8632 * errout.adb: On anything but an expression First_Node returns its
8635 2011-08-02 Pascal Obry <obry@adacore.com>
8637 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8639 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8641 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8642 Set the associated loop as the related expression of internally
8644 * exp_ch7.adb (Is_Container_Cursor): New routine.
8645 (Wrap_Transient_Declaration): Supress the finalization of the list
8646 controller when the declaration denotes a container cursor.
8648 2011-08-02 Yannick Moy <moy@adacore.com>
8650 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8652 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8653 expression is a simple expression. This check cannot be performed in
8654 the semantics, so just drop it.
8655 (P_Index_Or_Discriminant_Constraint): move check that the index or
8656 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8657 semantics. Other cases were previously checked in the semantics.
8658 * par-ch4.adb (P_Name): move checks that a selector name is not
8659 character literal or an operator symbol to Find_Selected_Component in
8661 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8662 declarations are not placed after later declarations in a separate
8663 procedure in Sem_Util (possibly not the best choice?), to be used both
8664 during parsing, for Ada 83 mode, and during semantic analysis, for
8666 * par-endh.adb (Check_End): move check that end label is not missing
8667 to Process_End_Label in the semantics
8668 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8669 the special case for SPARK restriction
8670 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8671 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8672 parameter Force to issue the error message even on internal node (used
8673 for generated end label). Call Check_Restriction to check when an error
8674 must be issued. In SPARK mode, issue an error message even if the
8675 restriction is not set.
8676 (Check_Restriction): new procedure with an additional out parameter to
8677 inform the caller that a message has been issued
8678 * sem_aggr.adb: Minor modification of message
8679 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8680 instead of issuing an error message directly
8681 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8682 declarations are not placed after later declarations, by calling
8683 Check_Later_Vs_Basic_Declarations
8684 (Analyze_Subtype_Declaration): move here the check that an index or
8685 discriminant constraint must be a subtype mark. Change the check that
8686 a subtype of String must start at one so that it works on subtype marks.
8687 * sem_ch4.adb (Analyze_Call): move here the check that a named
8688 association cannot follow a positional one in a call
8689 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8690 instead of issuing an error message directly
8691 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8692 selector name is not a character literal or an operator symbol. Move
8693 here the check that the prefix of an expanded name cannot be a
8694 subprogram or a loop statement.
8695 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8696 procedure called from parsing and semantics to check that basic
8697 declarations are not placed after later declarations
8698 (Process_End_Label): move here the check that end label is not missing
8700 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8702 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8703 representation clause in codepeer mode, since it confuses CodePeer and
8704 does not bring useful info.
8706 2011-08-02 Ed Falis <falis@adacore.com>
8708 * init.c: initialize fp hw on MILS.
8710 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8712 * errout.adb (First_Node): for bodies, return the node itself (small
8713 optimization). For other nodes, do not check source_unit if the node
8714 comes from Standard.
8716 2011-08-02 Robert Dewar <dewar@adacore.com>
8718 * exp_ch3.adb: Minor comment additions.
8719 * sem_ch13.adb: Minor reformatting.
8721 2011-08-02 Pascal Obry <obry@adacore.com>
8723 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8725 2011-08-02 Robert Dewar <dewar@adacore.com>
8727 * sem_attr.adb: Minor reformatting.
8729 2011-08-02 Robert Dewar <dewar@adacore.com>
8731 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8732 (Has_Default_Component_Value): Removed
8733 * einfo.ads Comment updates
8734 (Has_Default_Aspect): Replaces Has_Default_Value
8735 (Has_Default_Component_Value): Removed
8737 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8739 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8740 (Get_Simple_Init_Val): Handle Default_Value aspect
8741 (Needs_Simple_Initialization): Handle Default_Value aspect
8742 * exp_ch3.ads: Needs_Simple_Initialization
8743 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8744 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8746 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8747 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8748 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8750 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8752 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8753 package containing iteration primitives.
8754 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8756 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8758 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8759 "of", pre-analyze expression in case it is a function call with
8760 finalization actions that must be placed ahead of the loop.
8761 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8762 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8764 2011-08-02 Geert Bosch <bosch@adacore.com>
8766 * cstand.adb (Create_Float_Types): Only consider C's long double for
8767 Long_Long_Float, in addition to double.
8769 2011-08-02 Robert Dewar <dewar@adacore.com>
8771 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8772 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8773 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8776 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8778 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8781 2011-08-02 Javier Miranda <miranda@adacore.com>
8783 * einfo.ads, einfo.adb
8784 (Original_Access_Type): Move this attribute to Node26 since there was
8785 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8786 which causes conflicts and breaks the generation of the .NET compiler.
8787 (Interface_Name): Add missing documentation on JGNAT only uses of
8790 2011-08-02 Geert Bosch <bosch@adacore.com>
8792 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8793 (Find_Back_End_Float_Type): Likewise
8794 (Create_Back_End_Float_Types): Likewise
8795 (Create_Float_Types): Likewise
8796 (Register_Float_Type): Likewise
8797 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8798 Nlist and split out type selection in new local Find_Base_Type function.
8799 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8801 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8803 2011-08-02 Robert Dewar <dewar@adacore.com>
8805 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8807 * opt.ads: Minor comment change.
8808 * sem_ch12.adb: Minor code reorganization.
8810 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8812 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8813 subtype's list of rep items to the list on the full subtype in the case
8814 where the lists are the same.
8816 2011-08-02 Geert Bosch <bosch@adacore.com>
8818 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8819 using the one from System.Strings, which also deallocates all strings.
8821 2011-08-02 Geert Bosch <bosch@adacore.com>
8823 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8825 * gcc-interface/Make-lang.in: Update dependencies.
8827 2011-08-02 Olivier Hainque <hainque@adacore.com>
8829 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8832 2011-08-02 Javier Miranda <miranda@adacore.com>
8834 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8835 associated with anonymous access to subprograms.
8837 2011-08-02 Geert Bosch <bosch@adacore.com>
8840 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8841 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8842 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8843 (Add_Symbol_Definition): Move to switch-c.adb
8844 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8845 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8846 (Add_Symbol_Definition): Move to switch-c.adb.
8847 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8849 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8851 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8852 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8854 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8855 (Add_Symbol_Definition): Moved from Prepcomp.
8856 * switch-c.ads: Update copyright notice. Use String_List instead of
8857 Argument_List, removing dependency on System.OS_Lib.
8859 2011-08-02 Yannick Moy <moy@adacore.com>
8861 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8862 mode on initialization expression which does not respect SPARK
8864 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8865 if the tree referenced by its argument represents an initialization
8866 expression in SPARK, suitable for initializing an object in an object
8869 2011-08-02 Javier Miranda <miranda@adacore.com>
8871 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8872 internally generated access to subprogram with its associated protected
8874 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8876 2011-08-02 Geert Bosch <bosch@adacore.com>
8878 * cstand.adb (Register_Float_Type): Print information about type to
8879 register, if the Debug_Flag_Dot_B is set.
8880 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8881 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8882 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8883 with a requested precision of more than Max_Digits digits and no more
8884 than Max_Base_Digits digits, if a range specification is present and the
8885 Predefined_Float_Types list has a suitable type to derive from.
8886 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8887 case of type completion with pragma Import
8889 (Process_Import_Predefined_Type): Processing to complete a type
8890 with pragma Import. Currently supports floating point types only.
8891 (Set_Convention_From_Pragma): Do nothing without underlying type.
8892 (Process_Convention): Guard against absence of underlying type,
8893 which may happen when importing incomplete types.
8894 (Process_Import_Or_Interface): Handle case of importing predefined
8895 types. Tweak error message.
8897 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8899 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8900 functions to previous change. Reorganize code slightly.
8902 2011-08-02 Geert Bosch <bosch@adacore.com>
8904 * back_end.ads (Register_Type_Proc): New call back procedure type for
8905 allowing the back end to provide information about available types.
8906 (Register_Back_End_Types): New procedure to register back end types.
8907 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8909 * cstand.adb (Back_End_Float_Types): New list for floating point types
8910 supported by the back end.
8911 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8912 (Copy_Float_Type): New procedure to make new copies of predefined types.
8913 (Register_Float_Type): New call back procedure to populate the BEFT list
8914 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8915 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8916 (Create_Float_Types): New procedure to create entities for floating
8917 point types predefined in Standard, and put these and any remaining
8918 BEFTs on the Predefined_Float_Types list.
8919 * stand.ads (Predefined_Float_Types): New list for predefined floating
8920 point types that do not have declarations in package Standard.
8922 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8924 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8925 entity node for the unit containing the parameter.
8926 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8927 (Add_Inlined_Subprogram): Likewise.
8928 * gcc-interface/Make-lang.in: Update dependencies.
8930 2011-08-02 Thomas Quinot <quinot@adacore.com>
8932 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8935 2011-08-02 Geert Bosch <bosch@adacore.com>
8937 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8939 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8941 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8942 computed value of Base_Type.
8944 2011-08-02 Yannick Moy <moy@adacore.com>
8946 * restrict.adb (Check_Restriction): issue an error for any use of
8947 class-wide, even if the No_Dispatch restriction is not set.
8948 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8949 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8950 when completing a private extension, the type named in the private part
8951 is not the same as that named in the visible part.
8952 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8953 of an inherited primitive operations of a tagged type or type extension
8954 that returns the tagged type.
8955 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8956 function which returns True for an implicit operation inherited by the
8957 derived type declaration for the argument type.
8958 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8961 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8963 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8964 Process_Bounds, to perform analysis with expansion of a range or an
8965 expression that is the iteration scheme for a loop.
8966 (Analyze_Iterator_Specification): If domain of iteration is given by a
8967 function call with a controlled result, as is the case if call returns
8968 a predefined container, ensure that finalization actions are properly
8970 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8972 2011-08-02 Javier Miranda <miranda@adacore.com>
8974 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8975 * gcc-interface/Make-lang.in: Update dependencies.
8977 2011-08-02 Javier Miranda <miranda@adacore.com>
8979 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8980 determine if the analysis is performed using N or Original_Node (N).
8981 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8982 functionality of routine Is_Variable avoids code duplication.
8983 * checks.adb (Determine_Range): Handle temporaries generated by
8984 Remove_Side_Effects.
8986 2011-08-02 Javier Miranda <miranda@adacore.com>
8988 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8989 expansion of the condition. Required since the previous analysis was
8990 done with expansion disabled (see Resolve_Quantified_Expression) and
8991 hence checks were not inserted and record comparisons have not been
8994 2011-08-02 Ed Falis <falis@adacore.com>
8996 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8999 2011-08-02 Bob Duff <duff@adacore.com>
9001 * opt.ads: Minor comment fix.
9003 2011-08-02 Bob Duff <duff@adacore.com>
9005 * sem_ch12.adb (Analyze_Package_Instantiation,
9006 Analyze_Subprogram_Instantiation): Turn off style checking while
9007 analyzing an instance. Whatever style checks that apply to the generic
9008 unit should apply, so it makes no sense to apply them in an instance.
9009 This was causing trouble when compiling an instance of a runtime
9010 unit that violates the -gnatyO switch.
9011 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9012 one of the two case statements, causing spurious errors.
9014 2011-08-02 Robert Dewar <dewar@adacore.com>
9016 * uname.adb: Minor reformatting.
9017 * gnatcmd.adb: Minor reformatting.
9018 * exp_attr.adb: Minor reformatting.
9020 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9022 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9023 No_Dispatching_Calls, do not look for the Assign primitive, because
9024 predefined primitives are not created in this case.
9026 2011-08-02 Bob Duff <duff@adacore.com>
9028 * stylesw.ads: Minor comment fixes.
9030 2011-08-02 Robert Dewar <dewar@adacore.com>
9032 * freeze.adb (Add_To_Result): New procedure.
9034 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9036 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9037 time, if the specific run-time routines for handling streams of strings
9038 are not available, use the default mechanism.
9040 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9042 * s-regpat.ads: Fix typo.
9044 2011-08-02 Vincent Celier <celier@adacore.com>
9046 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9047 not null, call it to create the in memory config project file without
9048 parsing an existing default config project file.
9050 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9052 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9054 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9056 * sem_elim.adb: an abstract subprogram does not need an eliminate
9057 pragma for its descendant to be eliminable.
9059 2011-08-02 Ed Falis <falis@adacore.com>
9061 * init.c: revert to handling before previous checkin for VxWorks
9062 * s-intman-vxworks.adb: delete unnecessary declarations related to
9063 using Ada interrupt facilities for handling signals.
9064 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9065 * s-intman-vxworks.ads: Import __gnat_install_handler as
9066 Initialize_Interrupts.
9067 * s-taprop-vxworks.adb: Delete Signal_Mask.
9068 (Abort_Handler): change construction of mask to unblock exception
9071 2011-08-02 Jerome Guitton <guitton@adacore.com>
9073 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9074 Debug_Raise_Exception before propagation starts.
9076 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9078 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9079 to Restriction_Check_Required.
9080 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9081 * sem_res.adb (Resolve_Call): Likewise.
9082 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9084 2011-08-02 Bob Duff <duff@adacore.com>
9086 * stylesw.ads: Update comment.
9087 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9088 * errout.ads: Remove obsolete comment.
9090 2011-08-02 Javier Miranda <miranda@adacore.com>
9092 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9093 (Set_Is_Safe_To_Reevaluate): new procedure.
9094 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9095 assignment is allowed on safe-to-reevaluate variables.
9096 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9097 temporary created to remove side effects in expressions that use
9098 the secondary stack as safe-to-reevaluate.
9099 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9100 variables that are not true constants.
9102 2011-08-02 Robert Dewar <dewar@adacore.com>
9104 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9105 sem_res.adb, sem_ch6.adb: Minor reformatting.
9107 2011-08-02 Jerome Guitton <guitton@adacore.com>
9109 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9111 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9113 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9114 not set Overridden_Operation if subprogram is an initialization
9117 2011-08-02 Yannick Moy <moy@adacore.com>
9119 * par-ch6.adb: Correct obsolete name in comments
9120 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9121 which takes two message arguments (existing function takes one), with
9122 second message used for continuation.
9123 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9124 block statements that originate from a source block statement, not
9125 generated block statements
9126 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9127 symmetry with procedure case
9128 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9129 function to issue an error in formal mode if a package specification
9130 contains more than one tagged type or type extension.
9131 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9132 parameters matching formals of tagged types are objects (or ancestor
9133 type conversions of objects), not general expressions. Issue an error
9134 on view conversions that are not involving ancestor conversion of an
9136 (Resolve_Type_Conversion): in formal mode, issue an error on the
9137 operand of an ancestor type conversion which is not an object
9138 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9139 procedure so that it works also for actuals of function calls
9140 (Is_Actual_Tagged_Parameter): new function which determines if its
9141 argument is an actual parameter of a formal of tagged type in a
9143 (Is_SPARK_Object_Reference): new function which determines if the tree
9144 referenced by its argument represents an object in SPARK
9146 2011-08-02 Robert Dewar <dewar@adacore.com>
9148 * sem_ch3.adb: Minor reformatting
9149 Minor comment addition
9150 Minor error msg text change
9152 2011-08-02 Javier Miranda <miranda@adacore.com>
9154 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9155 function. Used to be more precise when we generate a variable plus one
9156 assignment to remove side effects in the evaluation of the Bound
9158 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9159 of the bound expression to force its re-analysis and thus expand the
9160 associated transient scope (if required). Code cleanup replacing the
9161 previous code that declared the constant entity by an invocation to
9162 routine Force_Evaluation which centralizes this work in the frontend.
9164 2011-08-02 Robert Dewar <dewar@adacore.com>
9166 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9167 (Base_Type): Now uses improved Is_Base_Type function
9168 * einfo.ads (Base_Type): Inline this function
9170 2011-08-02 Robert Dewar <dewar@adacore.com>
9172 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9173 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9175 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9177 * gcc-interface/Make-lang.in: Update dependencies.
9178 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9181 2011-08-02 Yannick Moy <moy@adacore.com>
9183 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9184 non-simple expression used in delta constraint
9185 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9186 index constraint which is not a subtype mark
9187 * par.adb: With and use Restrict
9188 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9189 mode on component type which is not a subtype mark and default
9190 expression on component
9191 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9192 of string which does not have a lower index bound equal to 1
9193 (Array_Type_Declaration): issue an error in formal mode on index or
9194 component type which is not a subtype mark, and on aliased keyword on
9196 (Derived_Type_Declaration): issue an error in formal mode on interface,
9197 limited or abstract type
9198 (Record_Type_Declaration): issue an error in formal mode on interface
9199 (Record_Type_Definition): issue an error in formal mode on tagged types
9200 and type extensions not declared in the specification of a library unit
9201 package; on null non-tagged record; on variant part
9203 2011-08-02 Vincent Celier <celier@adacore.com>
9205 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9206 not declared for qualified library project when Library_Name is not
9207 declared, but Library_Dir is.
9209 2011-08-02 Robert Dewar <dewar@adacore.com>
9211 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9212 pragmas (affects aspects [Component_]Default_Value
9213 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9214 component type for the resolution
9216 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9218 * einfo.adb (Base_Type): Tune implementation for speed.
9220 2011-08-02 Robert Dewar <dewar@adacore.com>
9222 * freeze.adb: Minor reformatting.
9224 2011-08-02 Thomas Quinot <quinot@adacore.com>
9226 * scos.ads: Update comments.
9228 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9230 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9231 base type, because the parent may be a subtype of a private type whose
9232 convention is established in a private part.
9234 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9236 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9237 statement in a block when the expansion of the return expression has
9238 created a finalization chain.
9239 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9240 with the parent node.
9241 Add N_Extended_Return_Statement to handle the case where a transient
9242 object declaration appears in the Return_Object_Declarations list of
9243 an extended return statement.
9245 2011-08-02 Matthew Gingell <gingell@adacore.com>
9247 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9248 unused parameter 'name'.
9250 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9252 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9253 inherited operation, check whether its alias, which is the source
9254 operastion that it renames, has been marked eliminated.
9256 2011-08-02 Javier Miranda <miranda@adacore.com>
9258 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9259 in-mode parameter whose type is an access type since it can be used to
9260 modify its designated object. Enforce code that handles as safe an
9261 access type that is not access-to-constant but it is the result of a
9262 previous removal of side-effects.
9263 (Remove_Side_Effects): Minor code reorganization of cases which require
9264 no action. Done to incorporate documentation on new cases uncovered
9265 working in this ticket: no action needed if this routine was invoked
9266 too early and the nodes are not yet decorated.
9267 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9268 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9269 were issued with actuals that are implicitly provided by
9272 2011-08-02 Robert Dewar <dewar@adacore.com>
9274 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9276 2011-08-02 Yannick Moy <moy@adacore.com>
9278 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9279 to issue an error in formal mode on attribute not supported in this mode
9280 (Analyze_Attribute): issue errors on standard attributes not supported
9282 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9283 comment, and issue error in formal mode on modulus which is not a power
9285 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9287 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9289 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9290 operator on modular type (except 'not').
9292 2011-08-02 Robert Dewar <dewar@adacore.com>
9294 * gnat_rm.texi: Minor reformatting.
9296 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9298 * s-osinte-linux.ads: Minor comment update and reformatting.
9299 * i-cexten.ads: Make this unit pure, as for its parent.
9300 Will allow its usage in more contexts if needed.
9302 2011-08-02 Robert Dewar <dewar@adacore.com>
9304 * s-utf_32.ads: Minor comment fix.
9306 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9308 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9309 operation of a tagged synchronized type, handle the case where the
9310 controlling argument is overloaded.
9312 2011-08-02 Yannick Moy <moy@adacore.com>
9314 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9315 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9316 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9317 SPARK mode and formal verification mode on processing SPARK restriction
9318 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9319 requiring consistency checking.
9321 2011-08-02 Robert Dewar <dewar@adacore.com>
9323 * sem_res.adb: Minor reformatting.
9325 2011-08-02 Robert Dewar <dewar@adacore.com>
9327 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9328 a-cforse.ads: Remove unneeded with of Ada.Containers
9329 Remove commented out pragma Inline's
9330 Move specifications of new subprograms to the actual specs
9332 2011-08-02 Yannick Moy <moy@adacore.com>
9334 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9335 a-cforse.ads: Update comments.
9337 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9339 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9341 2011-08-02 Robert Dewar <dewar@adacore.com>
9343 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9344 a-cforse.ads, a-cofove.ads: Minor reformatting.
9346 2011-08-02 Claire Dross <dross@adacore.com>
9348 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9349 a-cofove.ads: Add comments.
9351 2011-08-02 Yannick Moy <moy@adacore.com>
9353 * gnat_rm.texi: Document formal containers.
9355 2011-08-02 Emmanuel Briot <briot@adacore.com>
9357 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9360 2011-08-02 Robert Dewar <dewar@adacore.com>
9362 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9365 2011-08-02 Robert Dewar <dewar@adacore.com>
9367 * aspects.adb: New aspects Default_Value and Default_Component_Value
9368 New format of Aspect_Names table checks for omitted entries
9369 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9370 handling of boolean aspects for derived types.
9371 New aspects Default_Value and Default_Component_Value
9372 New format of Aspect_Names table checks for omitted entries
9373 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9374 (Has_Default_Value): New flag
9375 (Has_Default_Component_Value): New flag
9376 (Has_Default_Value): New flag
9377 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9379 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9380 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9381 Default_Value and Default_Component_Value
9382 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9383 New aspects Default_Value and Default_Component_Value
9384 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9385 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9387 2011-08-02 Vincent Celier <celier@adacore.com>
9389 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9390 inherit library kind.
9392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9394 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9397 2011-08-02 Robert Dewar <dewar@adacore.com>
9399 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9401 2011-08-02 Yannick Moy <moy@adacore.com>
9403 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9405 2011-08-02 Robert Dewar <dewar@adacore.com>
9407 * impunit.adb: Add comment.
9409 2011-08-02 Yannick Moy <moy@adacore.com>
9411 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9412 qualification of aggregates in formal mode
9413 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9415 (Resolve_Aggregate): complete the test that an aggregate is adequately
9416 qualified in formal mode
9418 2011-08-02 Pascal Obry <obry@adacore.com>
9420 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9421 * mlib-prj.adb: Supress warning when compiling binder generated file.
9422 (Build_Library): Supress all warnings when compiling the binder
9425 2011-08-02 Yannick Moy <moy@adacore.com>
9427 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9429 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9430 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9431 Add with/use clauses to make Check_Formal_Restriction visible
9433 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9435 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9436 in-parameters when type of the generic formal is private in the generic
9437 spec and non-private in the body.
9439 2011-08-02 Claire Dross <dross@adacore.com>
9441 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9442 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9443 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9444 * impunit.adb, Makefile.rtl: Take new files into account.
9446 2011-08-02 Robert Dewar <dewar@adacore.com>
9448 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9449 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9451 2011-08-02 Yannick Moy <moy@adacore.com>
9453 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9455 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9456 matching static array bounds, taking into account the special case of
9458 * sem_ch3.adb: Typo in comment.
9460 2011-08-02 Yannick Moy <moy@adacore.com>
9462 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9463 which issues an error in formal mode if its argument node is originally
9465 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9466 has a discriminant specification so that it does not include the case
9468 (Derived_Type_Declaration): move here the test that a derived type has a
9469 discriminant specification
9470 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9471 first element of a component association before accessing its choices
9472 (presence of component association is not enough)
9473 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9474 declaration is a library item before accessing the next element in a
9475 list, as library items are not member of lists
9476 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9477 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9478 Check_Formal_Restriction whenever possible.
9480 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9482 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9483 reference when needed.
9485 2011-08-02 Bob Duff <duff@adacore.com>
9487 * gnat_ugn.texi: Fix typo.
9489 2011-08-02 Vincent Celier <celier@adacore.com>
9491 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9492 archive file name. Do not use the full path name of archives for Open
9495 2011-08-02 Robert Dewar <dewar@adacore.com>
9497 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9498 Analyze_Aspect_Specifications
9500 (Analyze_Aspect_Specifications): New handling for boolean aspects
9501 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9502 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9503 sequence for Analyze_Aspect_Specifications
9504 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9505 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9507 2011-08-02 Robert Dewar <dewar@adacore.com>
9509 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9510 aspects, since these no longer exist.
9512 2011-08-02 Robert Dewar <dewar@adacore.com>
9514 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9515 semicolon, do not try to see if there are aspects following it.
9516 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9519 2011-08-02 Robert Dewar <dewar@adacore.com>
9521 * sem_ch8.adb, aspects.ads: Minor reformatting.
9523 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9525 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9526 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9528 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9530 2011-08-02 Yannick Moy <moy@adacore.com>
9532 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9533 mode on subprogram declaration outside of package specification, unless
9534 it is followed by a pragma Import
9535 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9536 Access_Type_Declaration): issue error in formal mode on access type
9537 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9539 (Analyze_Object_Declaration): issue error in formal mode on object
9540 declaration which does not respect SPARK restrictions
9541 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9542 declaration which does not respect SPARK restrictions
9543 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9544 error in formal mode on digits or delta constraint
9545 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9546 decimal fixed point type
9547 (Derived_Type_Declaration): issue error in formal mode on derived type
9548 other than type extensions of tagged record types
9549 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9550 with check on access definition
9551 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9552 mode on protected definition.
9553 (Analyze_Task_Definition): issue error in formal mode on task definition
9555 2011-08-02 Robert Dewar <dewar@adacore.com>
9557 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9559 2011-08-02 Javier Miranda <miranda@adacore.com>
9561 * sem_ch6.adb (Can_Override_Operator): New function.
9562 (Verify_Overriding_Indicator): Add missing code to check overriding
9563 indicator in operators. Fixes regression.
9564 (Check_Overriding_Indicator): Minor reformating after replacing the
9565 code that evaluates if the subprogram can override an operator by
9566 invocations to the above new function.
9568 (Write_Field26_Name): Add missing code to ensure that, following
9569 the documentation in einfo.ads, this field is not shown as attribute
9570 "Static_Initialization" on non-dispatching functions.
9572 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9574 * sem_res.adb (Resolve_Call): A call to
9575 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9576 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9577 i.e., when the second parameter is of type Time_Span.
9579 2011-08-02 Vincent Celier <celier@adacore.com>
9581 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9582 with an archive instead of -L<library dir> -l<library name>.
9584 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9586 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9587 mark the base types In_Use in addition to making the operations
9590 2011-08-02 Ed Falis <falis@adacore.com>
9592 * init.c: add and setup __gnat_signal_mask for the exception signals
9593 * s-inmaop-vxworks.adb: new file.
9594 * s-intman-vxworks.adb: remove unnecessary initializations and
9596 * s-intman-vxworks.ads: remove unnecessary variable
9597 * s-taprop-vxworks.adb: simplify signal initialization
9599 2011-08-02 Robert Dewar <dewar@adacore.com>
9601 * sem_ch8.adb: Minor code reorganization, comment updates.
9603 2011-08-02 Robert Dewar <dewar@adacore.com>
9605 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9606 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9608 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9609 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9613 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9614 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9615 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9616 use_type_clauses, to handle more efficiently use_type and use_all_type
9618 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9619 Ada2012 Use_All_Type clause.
9620 (Use_Class_Wide_Operations): new procedure.
9622 2011-08-02 Robert Dewar <dewar@adacore.com>
9624 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9625 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9626 expression to expression function.
9628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9630 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9631 if types are compatible.
9633 2011-08-02 Yannick Moy <moy@adacore.com>
9635 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9636 returns True if its argument array types have same dimension and same
9637 static bounds at each index.
9638 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9639 OUT or IN OUT paramaters which are not view conversions in SPARK.
9640 (Resolve_Arithmetic_Op): issue an error in formal mode on
9641 multiplication or division with operands of fixed point types which are
9642 not qualified or explicitly converted.
9643 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9644 Boolean or array type (except String) operands.
9645 (Resolve_Equality_Op): issue an error in formal mode on equality
9646 operators for array types other than String with non-matching static
9648 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9649 for array types with non-matching static bounds. Factorize the code in
9650 Matching_Static_Array_Bounds.
9651 (Resolve_Qualified_Expression): issue an error in formal mode on
9652 qualified expressions for array types with non-matching static bounds.
9653 (Resolve_Type_Conversion): issue an error in formal mode on type
9654 conversion for array types with non-matching static bounds
9656 2011-08-02 Robert Dewar <dewar@adacore.com>
9658 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9660 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9662 * par-ch9.adb: save location of entry for proper error message.
9664 2011-08-02 Javier Miranda <miranda@adacore.com>
9666 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9667 (Use_Full_View) which permits this routine to climb through the
9668 ancestors using the full-view of private parents.
9669 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9670 Use_Full_View to true in calls to Is_Ancestor.
9671 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9672 true in call to Is_Ancestor.
9673 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9674 Use_Full_View to true in call to Is_Ancestor.
9675 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9676 call to Is_Ancestor.
9677 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9678 Use_Full_View to true in calls to Is_Ancestor.
9679 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9680 Make_Select_Specific_Data_Table, Register_Primitive,
9681 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9682 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9683 to true in call to Is_Ancestor.
9684 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9685 Use_Full_View to true in calls to Is_Ancestor.
9687 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9688 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9690 2011-08-02 Robert Dewar <dewar@adacore.com>
9692 * gnat_rm.texi: Minor reformatting.
9693 * sem_prag.adb: Minor reformatting.
9695 2011-08-02 Tristan Gingold <gingold@adacore.com>
9697 * vms_data.ads: Add VMS qualifier for -gnateP.
9699 2011-08-02 Robert Dewar <dewar@adacore.com>
9701 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9702 * par-ch7.adb (P_Package): Proper placement of aspects for package
9704 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9705 (End_Statements): Add Is_Sloc parameterr
9706 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9707 (Check_End): Ad Is_Sloc parameter
9708 (End_Statements): Add Is_Sloc parameterr
9710 2011-08-02 Vincent Celier <celier@adacore.com>
9712 * ug_words: Add VMS qualifier equivalent to -gnateP:
9713 /SYMBOL_PREPROCESSING.
9715 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9717 * gnat-style.texi: For hexadecimal numeric literals the typical
9718 grouping of digits is 4 to represent 2 bytes.
9719 A procedure spec which is split into several lines is indented two
9722 2011-08-02 Yannick Moy <moy@adacore.com>
9724 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9725 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9726 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9728 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9729 choice in array aggregate
9730 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9732 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9733 positional and named aggregate for record, or others in record
9734 aggregate, or multiple choice in record aggregate
9735 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9736 array operands to logical operations AND, OR and XOR do not have the
9737 same static lower and higher bounds
9738 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9740 2011-08-01 Robert Dewar <dewar@adacore.com>
9742 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9743 Replaces Last_Source_Node_In_Sequence.
9744 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9745 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9746 parens and blank in string (this was inconsistently implemented).
9748 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9749 blank in string (this was inconsistently implemented).
9751 (Set_Global_Switches): Set formal mode switches appropriately
9752 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9754 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9755 call Set_Error_Msg_Lang to set "spark" as language name.
9756 * par.adb: Remove unnecessary call to set formal language for errout
9757 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9758 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9760 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9761 calls to it, moved after resolution so that types are known
9762 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9763 result of concatenation is not of type String
9764 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9765 concatenation is not properly restricted
9766 * gnat_rm.texi: Add doc on pragma Spark_95.
9767 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9768 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9769 * gcc-interface/Make-lang.in: Update dependencies.
9771 2011-08-01 Javier Miranda <miranda@adacore.com>
9773 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9774 condition that detects if the overridden operation must replace an
9777 2011-08-01 Javier Miranda <miranda@adacore.com>
9779 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9780 code declarations inserted by Insert_Actions in each alternative of the
9781 N_Case_Expression node.
9783 2011-08-01 Robert Dewar <dewar@adacore.com>
9785 * sem_ch6.adb: Minor code reorganization.
9786 * sem_util.adb: Minor reformatting.
9788 2011-08-01 Pascal Obry <obry@adacore.com>
9790 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9791 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9793 2011-08-01 Yannick Moy <moy@adacore.com>
9795 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9796 literal or operator symbol which is prefixed
9797 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9798 mode on access attributes.
9799 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9800 that concatenation operands are properly restricted in formal mode
9801 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9802 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9803 result of the concatenation has a type different from String.
9804 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9805 Analyze_Quantified_Expression, Analyze_Slice,
9806 Analyze_Null): issue an error in formal mode on unsupported constructs
9808 (Analyze_Block_Statement): only issue error on source block statement
9809 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9810 function which returns the last node in a list of nodes for which
9811 Comes_From_Source returns True, if any
9812 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9813 Last_Source_Node_In_Sequence
9814 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9815 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9816 mode on unsupported constructs
9817 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9818 rest of the actions may be needed later on since the error is marked as
9820 * sinfo.ads: Typos in comments.
9822 2011-08-01 Pascal Obry <obry@adacore.com>
9824 * projects.texi: Minor editing.
9826 2011-08-01 Yannick Moy <moy@adacore.com>
9828 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9829 insertion character ~~
9830 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9831 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9832 with insertion character ~~
9833 (Set_Msg_Text): treat insertion character ~~
9834 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9835 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9836 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9837 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9838 errors related to the formal language restriction not serious
9839 (insertion character |).
9840 * par.adb (Par): set formal language for error messages if needed
9841 * sem_ch6.adb (Check_Missing_Return): take into account possible
9842 generated statements at the end of the function
9843 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9844 enumeration value to define a new pragma SPARK_95
9845 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9846 SPARK_Version): new type and variables to store the SPARK version
9848 (SPARK_Mode): return True when SPARK_Version is set
9849 * par-prag.adb: Correct indentation
9850 (Prag): take Pragma_SPARK_95 into account
9851 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9854 2011-08-01 Robert Dewar <dewar@adacore.com>
9856 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9857 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9858 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9860 2011-08-01 Pascal Obry <obry@adacore.com>
9862 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9863 Target_Name to Get_Path call.
9864 (Parse_Single_Project): Likewise.
9865 (Post_Parse_Context_Clause): Likewise.
9866 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9867 Call Initialise_Project_Path with the proper Target_Name.
9868 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9870 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9871 with the proper Target_Name.
9872 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9874 (Parse_Project_And_Apply_Config): Likewise.
9875 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9876 This is fine as this part of the code is supporting only native
9878 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9879 is fine as this part of the code is supporting only native compilation.
9881 2011-08-01 Yannick Moy <moy@adacore.com>
9883 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9884 of homonym, unless the homonym is one of the cases allowed in SPARK
9885 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9886 package declaration occurring after a body.
9888 2011-08-01 Robert Dewar <dewar@adacore.com>
9890 * checks.adb, exp_ch4.adb: Minor reformatting.
9892 2011-08-01 Javier Miranda <miranda@adacore.com>
9894 * einfo.ads (Access_Disp_Table): Fix documentation.
9895 (Dispatch_Table_Wrappers): Fix documentation.
9897 2011-08-01 Pascal Obry <obry@adacore.com>
9899 * prj-env.adb, prj-env.ads: Minor reformatting.
9901 2011-08-01 Yannick Moy <moy@adacore.com>
9903 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9904 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9905 procedures out of these packages.
9906 * errout.ads, errout.adb
9907 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9908 procedures in of this package
9909 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9910 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9911 on misplaced later vs initial declarations, like in Ada 83
9912 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9913 formal mode on attribute of private type whose full type declaration
9915 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9916 package declaration inside a package specification
9917 (Analyze_Full_Type_Declaration): issue error in formal mode on
9918 controlled type or discriminant type
9919 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9920 user-defined operator means that it should come from the source
9921 (New_Overloaded_Entity): issue error in formal mode on overloaded
9923 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9925 2011-08-01 Thomas Quinot <quinot@adacore.com>
9927 * atree.adb: Minor reformatting.
9928 * checks.adb: Minor reformatting.
9930 2011-08-01 Vincent Celier <celier@adacore.com>
9932 * s-parame-vms-ia64.ads: Fix typo in comment
9934 * s-parame-vms-restrict.ads: Removed, unused.
9936 2011-08-01 Javier Miranda <miranda@adacore.com>
9939 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9941 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9942 * sem_ch3.ads, sem_ch3.adb
9943 (Is_Constant_Bound): New extended version of the subprogram that was
9944 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9945 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9946 * sem_aux.ads (Constant_Value): Fix typo in comment.
9947 * checks.adb (Generate_Index_Checks): New implementation which, for
9948 array objects with constant bounds, generates the runtime check
9949 referencing the bounds of the array type. For other cases this routine
9950 provides its previous behavior obtaining such values from the array
9952 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9954 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9955 we cannot have semantic interpretations of the new node.
9957 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9959 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9962 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9964 * sem_ch8.adb: Minor code editing.
9965 * s-vxwext.adb: Remove trailing space.
9966 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9967 consistency with other files.
9969 2011-08-01 Thomas Quinot <quinot@adacore.com>
9971 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9973 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9975 * par-ch10.adb: reject parameterized expressions as compilation unit.
9976 * sem_ch4.adb: handle properly conditional expression with overloaded
9977 then_clause and no else_clause.
9979 2011-08-01 Tristan Gingold <gingold@adacore.com>
9981 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9982 like done by System.Aux_DEC.
9983 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9985 2011-08-01 Yannick Moy <moy@adacore.com>
9987 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9988 missing label at end of declaration (subprogram or package)
9989 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9990 of positional and named parameter association
9991 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9992 Error_Msg_SP which adds a prefix to the error message giving the name
9993 of the formal language analyzed
9994 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9995 access result type in subprogram, unconstrained array as result type,.
9996 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9998 * sem_ch8.adb: Code clean up.
10000 2011-08-01 Javier Miranda <miranda@adacore.com>
10002 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10003 * einfo.ads (Access_Disp_Table): Fix documentation.
10004 (Dispatch_Table_Wrappers): Fix documentation.
10005 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10006 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10007 to enforce the documentation of this attribute.
10008 (Set_Is_Interface): Cleanup the assertion.
10009 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10010 the Underlying_Type entity before reading attribute Access_Disp_Table.
10011 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10012 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10013 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10014 the Underlying_Type entity before reading attribute Access_Disp_Table.
10015 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10016 Locate the Underlying_Type entity before reading attribute
10019 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10021 * s-poosiz.ads: Additional overriding indicators.
10023 2011-08-01 Yannick Moy <moy@adacore.com>
10025 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10027 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10028 parameter specification does not include a subtype mark.
10029 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10030 formal mode on abstract subprogram.
10031 (Analyze_Subprogram_Specification): issue error in formal mode on
10032 user-defined operator.
10033 (Process_Formals): issue error in formal mode on access parameter and
10034 default expression.
10035 * sem_ch9.adb (Analyze_Abort_Statement,
10036 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10037 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10038 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10039 Analyze_Requeue, Analyze_Selective_Accept,
10040 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10041 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10042 issue error in formal mode on user-defined raise statement.
10044 2011-08-01 Thomas Quinot <quinot@adacore.com>
10046 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10047 declaration being hidden when overriding an implicit inherited
10049 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10050 (-gnats), do not complain about a source file that contains only a
10053 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10055 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10056 variable if already set.
10058 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10060 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10061 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10062 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10063 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10064 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10065 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10066 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10067 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10068 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10069 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10070 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10071 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10072 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10073 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10074 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10075 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10076 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10077 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10078 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10079 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10080 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10081 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10082 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10083 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10084 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10085 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10086 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10087 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10088 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10089 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10090 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10091 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10092 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10093 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10094 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10095 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10096 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10097 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10098 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10099 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10100 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10101 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10102 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10103 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10104 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10105 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10106 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10107 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10108 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10109 Use GNAT instead of GNARL.
10111 2011-08-01 Bob Duff <duff@adacore.com>
10113 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10114 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10115 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10118 2011-08-01 Yannick Moy <moy@adacore.com>
10120 * debug.adb (d.D) reverve flag for the SPARK mode
10121 (d.E) reverve flag for SPARK generation mode
10122 (d.F) reverve flag for Why generation mode
10123 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10124 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10125 functions which return True when the corresponding modes are set
10126 (Formal_Language): return "spark" or "alfa" when in formal verification
10128 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10129 Error_Msg to prefix the error message with a tag giving the formal
10131 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10132 message with a tag giving the formal language
10133 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10135 (Analyze_Case_Statement): issue error in formal mode on case statement
10136 with a single "others" case alternative
10137 (Analyze_Exit_Statement): issue errors in formal mode on exit
10138 statements which do not respect SPARK restrictions
10139 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10140 (Check_Unreachable_Code): always issue an error (not a warning) in
10141 formal mode on unreachable code (concerns both code after an infinite
10142 loop and after an unconditional jump, both not allowed in SPARK)
10143 * sem_ch6.adb (Analyze_Return_Statement): add call to
10144 Set_Return_Present for a procedure containing a return statement
10145 (already done for functions in Analyze_Function_Return)
10146 (Analyze_Function_Return): issue error in formal mode on extended
10147 return or if return is not last statement in function
10148 (Check_Missing_Return): issue error in formal mode if function does
10149 not end with return or if procedure contains a return
10150 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10151 function to detect if there is an inner scope of its parameter S which
10154 2011-08-01 Thomas Quinot <quinot@adacore.com>
10156 * sem_ch6.ads: Minor reformatting.
10158 2011-08-01 Javier Miranda <miranda@adacore.com>
10160 * sem_util.adb (Abstract_Interface_List): Complete condition when
10161 processing private type declarations to avoid reading unavailable
10163 (Is_Synchronized_Tagged_Type): Complete condition when processing
10164 private extension declaration nodes to avoid reading unavailable
10167 2011-08-01 Thomas Quinot <quinot@adacore.com>
10169 * sem_ch3.adb: Minor reformatting.
10171 2011-08-01 Thomas Quinot <quinot@adacore.com>
10173 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10174 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10175 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10176 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10177 for VMS, instead parametrize the common implementation with
10178 System.Parameters declarations.
10180 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10182 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10184 2011-08-01 Tristan Gingold <gingold@adacore.com>
10186 * seh_init.c: Fix SEH handler installation on win64.
10188 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10190 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10191 double analysis of an anonymous access to subprogram, because it can
10192 lead to improper sharing of profiles and a back-end crash.
10194 2011-08-01 Robert Dewar <dewar@adacore.com>
10196 * make.adb, sem_ch4.adb: Minor reformatting.
10197 * gcc-interface/Make-lang.in: Update dependencies.
10198 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10200 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10202 * gnat_rm.texi: Fix definition of Long_Integer.
10204 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10206 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10207 to prevent storage exhaustion.
10208 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10209 finalized is a function body, insert the cleanup code before the final
10210 return statement, to prevent spurious warnings.
10211 * s-pooglo.ads: add overriding indicator.
10213 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10215 * sem_ch4.adb (Operator_Check): improve error message when both a
10216 with_clause and a use_clause are needed to make operator usage legal.
10217 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10218 determine whether a compilation unit is visible within an other,
10219 either through a with_clause in the current unit, or a with_clause in
10220 its library unit or one one of its parents.
10222 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10224 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10225 over an arbitrary expression of an array or container type.
10226 * lib-xref.adb: clarify comment.
10228 2011-08-01 Bob Duff <duff@adacore.com>
10230 * einfo.ads: Minor reformatting.
10231 * debug.adb: Minor comment improvement.
10233 2011-08-01 Javier Miranda <miranda@adacore.com>
10235 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10236 consider hidden subprograms as valid candidates.
10238 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10240 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10242 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10244 * gnat_ugn.texi: Fix typo.
10246 2011-08-01 Robert Dewar <dewar@adacore.com>
10248 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10249 lib-xref.adb: Minor reformatting
10251 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10253 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10254 when to generate a call to Move_Final_List.
10255 (Has_Controlled_Parts): Remove this function.
10257 2011-08-01 Geert Bosch <bosch@adacore.com>
10259 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10260 "," in choice list.
10262 2011-08-01 Thomas Quinot <quinot@adacore.com>
10264 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10265 explicit raise of a predefined exception as Comes_From_Source if the
10266 original N_Raise_Statement comes from source.
10268 2011-08-01 Robert Dewar <dewar@adacore.com>
10270 * sinfo.ads: Add comment.
10271 * sem_ch6.adb: Minor reformatting.
10273 2011-08-01 Robert Dewar <dewar@adacore.com>
10275 * freeze.adb (Freeze_Entity): Refine check for bad component size
10276 clause to avoid rejecting confirming clause when atomic/aliased present.
10278 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10280 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10281 better determine whether an entity reference is a write.
10282 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10284 * lib-xref.adb (Output_References): Do no suppress a read reference at
10285 the same location as an immediately preceeding modify-reference, to
10286 handle properly in-out actuals.
10288 2011-08-01 Tristan Gingold <gingold@adacore.com>
10290 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10292 2011-08-01 Quentin Ochem <ochem@adacore.com>
10294 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10295 heap to compute the result.
10297 2011-08-01 Robert Dewar <dewar@adacore.com>
10299 * atree.ads: Minor reformatting.
10301 2011-08-01 Emmanuel Briot <briot@adacore.com>
10303 * g-expect.adb (Get_Command_Output): Fix memory leak.
10305 2011-08-01 Geert Bosch <bosch@adacore.com>
10307 * cstand.adb (P_Float_Type): New procedure to print the definition of
10308 predefined fpt types.
10309 (P_Mixed_Name): New procedure to print a name using mixed case
10310 (Print_Standard): Use P_Float_Type for printing floating point types
10311 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10312 precision IEEE float.
10314 2011-08-01 Thomas Quinot <quinot@adacore.com>
10316 * sem_ch3.adb: Minor reformatting.
10318 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10320 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10321 the completion of a generic function, insert the new body rather than
10322 rewriting the original.
10324 2011-08-01 Yannick Moy <moy@adacore.com>
10326 * sinfo.ads, errout.ads: Typos in comments.
10328 2011-08-01 Robert Dewar <dewar@adacore.com>
10330 * par-endh.adb: Minor reformatting.
10332 2011-08-01 Robert Dewar <dewar@adacore.com>
10334 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10335 (Pre_Post_Aspects): New subtype.
10336 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10337 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10338 * par-ch7.adb (P_Package): Remove Decl parameter
10339 (P_Package): Handle new syntax for aspects (before IS)
10340 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10342 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10343 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10344 (P_Package): Remove Decl parameter
10345 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10347 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10349 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10350 * sinfo.ads: Document new syntax for aspects in packages etc.
10351 * sprint.adb: Handle new syntax of aspects before IS in package
10353 2011-08-01 Thomas Quinot <quinot@adacore.com>
10355 * atree.ads: Minor reformatting.
10356 * sem_prag.adb: Minor reformatting.
10358 2011-08-01 Robert Dewar <dewar@adacore.com>
10360 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10361 case expr alternative.
10363 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10365 * sem_ch12.adb: Fix typo.
10367 2011-08-01 Geert Bosch <bosch@adacore.com>
10369 * sem_prag.adb (Check_No_Link_Name): New procedure.
10370 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10371 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10372 instead of Standard_Long_Long_Float_Size global. Preparation for
10373 eventual removal of per type constants.
10374 * exp_util.ads (Get_Stream_Size): New function returning the stream
10375 size value of subtype E.
10376 * exp_util.adb (Get_Stream_Size): Implement new function.
10377 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10379 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10381 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10383 2011-08-01 Geert Bosch <bosch@adacore.com>
10385 * cstand.adb: Fix comments.
10386 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10387 count of arguments.
10389 2011-08-01 Robert Dewar <dewar@adacore.com>
10391 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10393 2011-08-01 Geert Bosch <bosch@adacore.com>
10395 * atree.ads: Fix comment.
10397 2011-08-01 Robert Dewar <dewar@adacore.com>
10399 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10400 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10401 * par.adb: Add with for Namet.Sp.
10402 * par-tchk.adb: Minor reformatting.
10404 2011-08-01 Vincent Celier <celier@adacore.com>
10406 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10407 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10408 of the init procedure of a SAL.
10409 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10412 2011-08-01 Thomas Quinot <quinot@adacore.com>
10414 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10417 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10419 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10421 2011-08-01 Thomas Quinot <quinot@adacore.com>
10423 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10424 conformant with its spec (return True only for types that have
10425 an overriding Initialize primitive operation that prevents them from
10426 having preelaborable initialization).
10427 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10428 initialization for controlled types in Ada 2005 or later mode.
10430 2011-08-01 Robert Dewar <dewar@adacore.com>
10432 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10434 (Same_Aspect): New function.
10435 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10436 Type_Invariant, Precondition, Postcondition.
10437 * snames.ads-tmpl: Add Name_Type_Invariant.
10439 2011-08-01 Robert Dewar <dewar@adacore.com>
10441 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10443 (Freeze_All_Ent): Fix error in handling inherited aspects.
10444 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10445 already analyzed, but don't skip entire processing of a declaration,
10446 that's wrong in some cases of declarations being rewritten.
10447 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10448 Don't delay for integer, string literals
10449 Treat predicates in usual manner for delay, remove special case code,
10451 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10452 (Build_Predicate_Function): Update saved expression in aspect
10453 (Build_Invariant_Procedure): Update saved expression in aspect
10454 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10455 of replacement of discriminant references if the reference is simple.
10457 2011-08-01 Robert Dewar <dewar@adacore.com>
10459 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10460 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10461 Static_Predicate and Dynamic_Predicate.
10462 (Build_Predicate_Function): Add processing for Static_Predicate
10463 and Dynamic_Predicate.
10464 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10465 (From_Static_Predicate): New flag
10466 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10468 2011-08-01 Robert Dewar <dewar@adacore.com>
10470 * usage.adb: Documentation cleanup for Ada version modes in usage.
10471 * expander.adb: Minor reformatting.
10473 2011-08-01 Robert Dewar <dewar@adacore.com>
10475 * atree.ads: Minor comment fix.
10476 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10477 a-witeio.ads, sem_prag.adb: Minor reformatting.
10479 2011-08-01 Doug Rupp <rupp@adacore.com>
10481 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10482 pointers. Use descrip.h header file for convenience. Add some
10485 2011-08-01 Robert Dewar <dewar@adacore.com>
10487 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10488 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10489 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10491 (Check_Aspect_At_End_Of_Declarations): New procedure
10492 (Analye_Aspect_Specification): Minor changes for above procedures
10493 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10494 specification node as well.
10496 2011-08-01 Pascal Obry <obry@adacore.com>
10498 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10499 Windows files. Use GetFilesAttributes() in this case to check for file
10500 existence instead of returning with an error code.
10502 2011-08-01 Vincent Celier <celier@adacore.com>
10504 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10505 High is above Source length.
10507 2011-08-01 Robert Dewar <dewar@adacore.com>
10509 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10511 2011-08-01 Robert Dewar <dewar@adacore.com>
10513 * aspects.ads (Boolean_Aspects): New subtype.
10514 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10515 for derived types in cases where the parent type and derived type have
10517 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10518 with aspects when parent type also has aspects.
10519 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10520 boolean expression at this point).
10521 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10522 accordance with final decision on the Ada 2012 feature.
10523 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10525 2011-08-01 Matthew Heaney <heaney@adacore.com>
10527 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10529 2011-08-01 Pascal Obry <obry@adacore.com>
10531 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10532 Fix Replace_Slice when High is above current string size.
10533 (Replace_Slice): Fix DL computation when High is above current
10536 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10538 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10540 2011-08-01 Matthew Heaney <heaney@adacore.com>
10542 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10545 2011-08-01 Pascal Obry <obry@adacore.com>
10547 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10550 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10552 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10553 access to protected subprograms in generic bodies.
10554 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10555 protected type, indicate that the convention of the subprogram is
10556 Convention_Protected, because it may be used in subsequent declarations
10557 within the protected declaration.
10559 2011-08-01 Vincent Celier <celier@adacore.com>
10561 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10562 and "final" procedures when the name of the library is "ada", to avoid
10563 duplicate symbols "adainit" and "adafinal" in executables.
10565 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10567 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10568 quantified expression that appears within a postcondition and uses the
10569 Ada2012 'Result attribute.
10571 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10573 * init.c (__gnat_error_handler): Cast reason to int.
10574 (__gnat_install_handler): Explain sa_sigaction use.
10576 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10578 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10579 subprogram has copy-in copy-out parameters, try to promote the mode of
10580 the return type if it is passed in registers.
10582 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10584 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10585 left operand as addressable.
10587 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10589 * gcc-interface/gigi.h (build_function_stub): Remove.
10590 (build_return_expr): Likewise.
10591 (convert_vms_descriptor): Declare.
10592 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10593 (build_function_stub): Move to...
10594 * gcc-interface/utils2.c (build_return_expr): Move to...
10595 * gcc-interface/trans.c (build_function_stub): ...here.
10596 (build_return_expr): ...here.
10597 (Subprogram_Body_to_gnu): Add local variable for language_function.
10598 Disconnect the parameter attributes cache, if any, once done with it.
10599 Call end_subprog_body only after setting the end_locus.
10600 Build the stub associated with the function, if any, at the very end.
10601 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10602 variables and streamline control flow.
10604 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10607 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10608 g-trasym-dwarf.adb.
10610 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10613 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10614 Assign to act.sa_sigaction.
10615 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10616 current->return_address to char * before arithmetic.
10618 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10620 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10621 Correct argument types.
10622 Extract code from reason.
10623 (__gnat_install_handler): Assign to act.sa_sigaction.
10625 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10627 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10628 (GNAT1_OBJS): ...here.
10630 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10633 * g-socthi-mingw.adb (Fill): Fix formatting.
10635 * gcc-interface/gigi.h: Move around comment.
10637 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10640 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10642 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10645 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10647 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10649 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10650 range comparison if Pmode is SImode.
10652 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10653 Eric Botcazou <ebotcazou@adacore.com>
10655 * adadecode.c: Wrap up in extern "C" block.
10656 * adadecode.h: Likewise.
10657 * adaint.c: Likewise. Remove 'const' keyword.
10658 * adaint.h: Likewise.
10659 * argv.c: Likewise.
10660 * atree.h: Likewise.
10662 * cstreams.c: Likewise.
10664 * exit.c: Likewise.
10666 * final.c: Likewise.
10667 * init.c: Likewise.
10668 * initialize.c: Likewise.
10669 * link.c: Likewise.
10670 * namet.h: Likewise.
10671 * nlists.h: Likewise.
10672 * raise.c: Likewise.
10673 * raise.h: Likewise.
10674 * repinfo.h: Likewise.
10675 * seh_init.c: Likewise.
10676 * targext.c: Likewise.
10677 * tracebak.c: Likewise.
10678 * uintp.h: Likewise.
10679 * urealp.h: Likewise.
10680 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10681 * xsinfo.adb: Likewise.
10682 * xsnamest.adb: Likewise.
10683 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10684 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10685 * gcc-interface/misc.c: Likewise.
10686 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10687 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10688 ada/targext.o here...
10689 (GNAT_ADA_OBJS): ...and not here.
10690 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10691 (GNATBIND_OBJS): Reorder.
10693 2011-07-07 Richard Henderson <rth@redhat.com>
10695 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10696 dwarf2out_frame_init.
10698 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10700 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10702 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10705 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10707 2011-07-06 Richard Guenther <rguenther@suse.de>
10709 * gcc-interface/misc.c (gnat_init): Merge calls to
10710 build_common_tree_nodes and build_common_tree_nodes_2.
10711 Re-initialize boolean_false_node.
10713 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10714 Olivier Hainque <hainque@adacore.com>
10715 Nicolas Setton <setton@adacore.com>
10717 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10718 the type according to the ARTIFICIAL_P parameter.
10719 (create_type_decl): Likewise.
10720 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10722 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10724 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10725 (gnatbind): Likewise.
10727 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10729 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10731 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10733 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10734 local variable throughout. Remove useless call to Base_Type.
10735 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10736 Take it also into account for the volatileness of the field. Set the
10737 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10739 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10741 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10742 on a dereference built for a by-ref object if it has an address clause.
10744 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10746 * einfo.ads (Address_Taken): Document use for the second argument of
10747 Asm_Input and Asm_Output attributes.
10748 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10749 argument is an entity name, then set Address_Taken on it.
10750 <Attribute_Asm_Output>: Likewise.
10751 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10752 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10753 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10754 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10756 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10758 PR middle-end/46500
10759 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10761 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10763 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10764 (ada/utils.o): Update dependencies.
10765 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10766 ../../../libcpp/libcpp.a.
10767 * gcc-interface/utils.c: Include common/common-target.h.
10768 (process_attributes): Use targetm_common.have_named_sections.
10770 2011-06-07 Richard Guenther <rguenther@suse.de>
10772 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10775 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10777 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10778 TREE_THIS_NOTRAP flag.
10780 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10782 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10785 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10787 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10788 constants whose full view has discriminants specially.
10790 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10792 * gcc-interface/utils.c: Include diagnostic.h.
10793 (gnat_write_global_declarations): Output debug information for all
10794 global type declarations before finalizing the compilation unit.
10795 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10797 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10799 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10801 2011-05-25 Kai Tietz <ktietz@redhat.com>
10803 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10804 initialization instead of const/none-const pointer assignment.
10806 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10808 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10809 $(EXTRA_GNAT1_OBJS).
10810 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10811 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10812 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10813 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10814 libcommon-target.a instead of prefix.o.
10816 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10819 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10821 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10823 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10824 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10825 instead of version.o.
10827 2011-05-18 Kai Tietz <ktietz@redhat.com>
10829 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10830 boolean_false_node instead of integer_zero_node.
10831 (convert_with_check): Likewise.
10832 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10834 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10836 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10837 type of the parameter is an unconstrained array, convert the actual to
10838 the type of the formal in the In Out and Out cases as well.
10840 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10842 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10843 call build_function_type_array or build_varargs_function_type_array
10845 (create_subprog_type): Don't call build_function_type; call
10846 build_function_type_vec instead.
10848 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10850 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10851 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10852 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10854 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10856 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10858 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10859 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10861 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10863 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10865 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10867 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10868 instead of accessing TYPE_ARG_TYPES directly.
10869 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10871 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10874 * gcc-interface/gigi.h (get_variant_part): Declare.
10875 * gcc-interface/decl.c (get_variant_part): Make global.
10876 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10877 types have the same constant size, are record types and T1 has a
10878 variant part while T2 doesn't.
10880 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10882 * gcc-interface/utils.c (begin_subprog_body): Do not call
10884 (end_subprog_body): Likewise.
10886 2011-05-04 Richard Guenther <rguenther@suse.de>
10888 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10890 (pos_to_constructor): Likewise.
10892 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10893 Eric Botcazou <ebotcazou@adacore.com>
10895 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10896 of build_function_type. Adjust calls to...
10897 (build_raise_check): ...this. Do not take a void_tree parameter.
10898 Call build_function_type_list instead of build_function_type.
10899 Fix head comment and swap couple of conditional blocks.
10901 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10903 * gnatvsn.ads (Library_Version): Bump to 4.7.
10904 (Current_Year): Bump to 2011.
10906 2011-04-29 Michael Matz <matz@suse.de>
10908 * gcc-interface/misc.c (gnat_handle_option): Set
10909 warn_maybe_uninitialized.
10911 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10913 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10914 the Watson/McCabe paper.
10916 2011-04-23 Jim Meyering <meyering@redhat.com>
10918 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10920 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10922 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10925 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10927 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10929 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10930 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10931 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10932 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10933 <all>: Do not set flags on the reused DECL node coming from an alias.
10934 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10935 don't need debug info here...
10936 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10937 (gigi): Adjust calls to create_subprog_decl.
10938 (build_raise_check): Likewise.
10939 (establish_gnat_vms_condition_handler): Likewise.
10940 (Compilation_Unit_to_gnu): Likewise.
10941 (gnat_to_gnu): Likewise.
10943 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10945 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10946 (NO_REORDER_ADAFLAGS): New variable.
10947 (EXTRA_GNATTOOLS): Always define.
10948 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10949 Clean up and adjust list of files compiled with special options.
10950 * gcc-interface/Make-lang.in: Likewise.
10951 (ada/decl.o): Cosmetical change.
10952 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10954 2011-04-20 Jim Meyering <meyering@redhat.com>
10956 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10958 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10960 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10961 $(CFLAGS) on the link line.
10963 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10965 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10966 padded type built for the return type if it is unconstrained.
10968 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10970 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10972 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10974 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10975 before calling TREE_CHAIN.
10976 * gcc-interface/misc.c (gnat_init_ts): New function.
10977 (LANG_HOOKS_INIT_TS): Define.
10979 2011-04-12 Martin Jambor <mjambor@suse.cz>
10981 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10982 instead of cgraph_node.
10984 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10986 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10987 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10990 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10992 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10993 of aggregate types that contain a placeholder.
10995 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10997 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10999 (handle_type_generic_attribute): Likewise.
11001 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11004 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11006 2011-04-04 Kai Tietz <ktietz@redhat.com>
11009 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11012 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11014 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11015 type case, do not strip a padding type around the array type.
11017 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11019 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11022 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11024 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11025 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11026 code for -feliminate-unused-debug-types.
11027 (gnat_post_options): Likewise.
11029 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11031 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11032 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11035 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11037 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11038 DECL_ARTIFICIAL flag on enumeration types.
11040 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11042 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11043 fat pointer types artificial unconditionally.
11044 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11047 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11049 * gcc-interface/gigi.h (get_dummy_type): Declare.
11050 (build_dummy_unc_pointer_types): Likewise.
11051 (finish_fat_pointer_type): Likewise.
11052 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11053 fat pointer type has been built, complete it in place.
11054 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11055 and thin pointers. Remove useless variable.
11056 (finish_fat_pointer_type): Make global and move to...
11057 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11058 (get_dummy_type): New function.
11059 (build_dummy_unc_pointer_types): Likewise.
11060 (gnat_pushdecl): Propage the name to the anonymous variants only.
11061 (update_pointer_to): Only adjust the pointer types in the unconstrained
11064 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11066 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11067 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11068 if this is a Taft amendment type and the full declaration is available.
11069 * gcc-interface/trans.c (process_type): Likewise.
11070 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11071 (process_freeze_entity): Likewise.
11072 * gcc-interface/utils.c (dummy_global): New static variable.
11073 (gnat_write_global_declarations): If there are types declared as used
11074 at the global level, insert them in the global hash table.
11076 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11078 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11079 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11080 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11082 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11083 flag of the type accordingly.
11084 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11086 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11088 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11089 finalizing types when updating the pointers to the designated type.
11090 <all>: Finalize the deferred types even if we didn't defer processing
11091 of incomplete types in this invocation.
11093 2011-04-01 Olivier Hainque <hainque@adacore.com>
11094 Nicolas Setton <setton@adacore.com>
11095 Eric Botcazou <ebotcazou@adacore.com>
11097 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11098 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11100 2011-03-28 Kai Tietz <ktietz@redhat.com>
11102 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11104 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11105 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11107 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11109 2011-03-28 Tristan Gingold <gingold@adacore.com>
11112 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11113 Use ada output of gnatbind.
11114 (ada/b_gnatb.adb): Ditto.
11115 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11116 (ada.mostlyclean, ada.stage1)
11117 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11118 (ada.stagefeedback): Adjust.
11119 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11120 Use ada output of gnatbind.
11121 (b_gnatm.adb): Ditto.
11122 (b_gnatl.o, b_gnatm.o): New rules.
11124 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11126 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11127 for the padded type built to support a specified size or alignment.
11129 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11131 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11132 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11133 unconditionally to the end of the unit when the designated type is
11135 <all>: Rename local variable. Attempt to un-defer types only and do it
11136 for limited_with'ed types as well.
11137 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11138 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11139 consistently and remove redundant call to finalize_from_with_types.
11141 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11143 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11144 subprograms without a previous spec declared in the same unit.
11145 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11146 subprograms at the end of the unit instead of at the beginning.
11147 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11148 isn't public for the special handling of non-inline functions nested
11149 inside inline external functions.
11151 2011-03-25 Jeff Law <law@redhat.com>
11153 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11155 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11157 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11158 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11159 to compute Set_Size_Depends_On_Discriminant.
11160 (Layout_Type): Call it on array types in back-end layout mode.
11161 * sem_util.adb (Requires_Transient_Scope): Return true for array
11162 types only if the size depends on the value of discriminants.
11163 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11164 type if the RHS is a call to a function that returns an unconstrained
11165 type with default discriminant.
11167 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11169 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11170 non-conversion to the nominal result type at the end.
11172 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11174 * gcc-interface/trans.c (create_temporary): New function taken from...
11175 (create_init_temporary): ...here. Call it.
11176 (call_to_gnu): Create the temporary for the return value early, if any.
11177 Create it for a function with copy-in/copy-out parameters if there is
11178 no target; in other cases of copy-in/copy-out, use another temporary.
11179 Push the new binding level lazily. Add and rename local variables.
11181 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11183 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11185 (set_rm_size): Likewise.
11187 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11189 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11190 for the padded type built in order to support a specified alignment.
11191 Fix incorrect formatting.
11193 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11196 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11198 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11200 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11201 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11202 to the end of the list. Adjust recursive call. Rename local variable.
11203 If REORDER is true, reorder components of the record type.
11204 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11205 components_to_record and adjust the parameter list.
11207 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11209 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11210 disabled, use the variable for bounds of loop iteration scheme.
11212 2011-03-21 Kai Tietz <ktietz@redhat.com>
11215 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11217 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11219 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11220 out whether the expression is read-only. Short-circuit placeholder
11221 case and rename a couple of local variables.
11223 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11225 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11226 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11227 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11228 (convert): Deal with conversions from a smaller form type specially.
11230 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11232 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11233 its argument, except for the special -I- switch.
11235 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11237 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11240 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11242 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11244 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11246 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11248 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11249 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11250 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11251 Do not generate the check directly, instead instantiate the template
11252 check present in the descriptor.
11253 (make_descriptor_field): Move around.
11254 (build_vms_descriptor32): Build a template check in the POINTER field.
11255 (build_vms_descriptor): Remove useless suffixes.
11256 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11258 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11261 * targext.c: Include target files if IN_RTS is defined.
11263 2011-01-26 Richard Guenther <rguenther@suse.de>
11266 * targext.c: Include config.h.
11267 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11270 2011-01-04 Pascal Obry <obry@adacore.com>
11271 Eric Botcazou <ebotcazou@adacore.com>
11273 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11275 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11277 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11278 end-of-case on the end label and its associated gotos, if any.
11280 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11282 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11283 expressions of the parameter cache within the statement group of
11284 the CICO mechanism.
11286 2011-01-04 Olivier Hainque <hainque@adacore.com>
11287 Eric Botcazou <ebotcazou@adacore.com>
11289 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11290 (set_end_locus_from_node): New function.
11291 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11292 make and the function end_locus.
11293 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11294 for the elaboration subprogram.
11295 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11296 set the end_locus of the expression as well.
11298 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11301 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11302 variables that are referenced in exception handlers volatile.
11306 Copyright (C) 2011 Free Software Foundation, Inc.
11308 Copying and distribution of this file, with or without modification,
11309 are permitted in any medium without royalty provided the copyright
11310 notice and this notice are preserved.