1 2011-08-29 Geert Bosch <bosch@adacore.com>
3 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4 the closest machine number to Pi / 2.0.
6 2011-08-29 Jose Ruiz <ruiz@adacore.com>
8 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
9 package Ada.Synchronous_Barriers.
10 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
11 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
12 default implementation using protected objects and another one
13 a-synbar-posix using POSIX barriers as the underlying support.
14 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
15 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
16 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
17 Clean up dependencies.
18 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
20 2011-08-29 Robert Dewar <dewar@adacore.com>
22 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
23 exp_dist.adb: Minor code reorganization.
26 2011-08-29 Thomas Quinot <quinot@adacore.com>
28 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
29 primitive operation must support external streaming if it is not a
30 controlling access result.
32 2011-08-29 Thomas Quinot <quinot@adacore.com>
34 * sinfo.ads, sem_ch7.adb: Minor reformatting.
36 2011-08-29 Bob Duff <duff@adacore.com>
38 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
39 restriction on allocators, as required by AI05-0013-1.
40 * restrict.ads: Minor comment fix.
42 2011-08-29 Tristan Gingold <gingold@adacore.com>
44 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
45 (To_Jmpbuf_Address): Ditto
46 (builtin_longjmp): Ditto
48 2011-08-29 Thomas Quinot <quinot@adacore.com>
50 * sem_res.adb: Minor reformatting.
52 2011-08-29 Vincent Celier <celier@adacore.com>
54 * make.adb (Gnatmake): Move special processing for VM targets after the
55 call to Get_Target_Parameters.
57 2011-08-29 Thomas Quinot <quinot@adacore.com>
59 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
61 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
63 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
64 where an anonymous access discriminant of a limited designated type
65 appears in a non-immutably limited discriminated type and issue an
66 error message. Add local variable Desig_T and replace all occurrences
69 2011-08-29 Jose Ruiz <ruiz@adacore.com>
71 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
72 implementation is compliant to RM D.15(15/2) after the modification
73 imposed by AI05-0094-1 (binding interpretation).
75 2011-08-29 Robert Dewar <dewar@adacore.com>
77 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
78 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
80 2011-08-29 Thomas Quinot <quinot@adacore.com>
82 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
83 the scope name, do not report a missing label as a style violation (it
84 will be diagnosed as an illegality).
85 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
86 variant records: Get_Enum_Lit_From_Pos already returns a usage
87 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
88 on Expr in Integer_Literal case so that it can be used by
91 2011-08-29 Tristan Gingold <gingold@adacore.com>
93 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
95 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
96 (Build_Abort_Block_Handler): New function to build an Abort_Signal
98 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
99 Build_Abort_Block_Handler to build the exception handler. Do not
100 undefer aborts for the Abort_Signal exception handler if back-end
102 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
103 back_end exceptions for all others and abort_signal.
104 * s-except.ads (ZCX_By_Default): New constant.
105 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
106 (Raise_Exception_Always): Ditto.
107 (Raise_From_Signal_Handler): Ditto.
108 (Raise_With_Location_And_Msg): Ditto.
109 (Raise_With_Msg): Ditto.
111 (Reraise_Occurence): Ditto.
112 (Reraise_Occurrence_Always): Ditto.
113 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
114 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
116 2011-08-29 Thomas Quinot <quinot@adacore.com>
118 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
120 2011-08-29 Robert Dewar <dewar@adacore.com>
122 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
123 Minor code reorganization.
125 2011-08-29 Bob Duff <duff@adacore.com>
127 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
128 2012, not just Ada 2005.
130 2011-08-29 Vincent Celier <celier@adacore.com>
132 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
133 with a project file or with gprbuid, if -gnatep= is specified, the
134 builder may need to be invoked with -x.
136 2011-08-29 Tristan Gingold <gingold@adacore.com>
138 * a-exexpr-gcc.adb: Minor comment fix.
140 2011-08-29 Robert Dewar <dewar@adacore.com>
142 * sem_ch8.adb: Minor reformatting.
144 2011-08-29 Bob Duff <duff@adacore.com>
146 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
147 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
148 treating "some" as unreserved in earlier Ada versions. This is now
149 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
150 rather than Name_Some, since Tok_Some is now recognized as reserved.
151 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
153 * scans.ads: Minor comment fixes.
154 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
155 for other language versions.
156 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
157 treating "some" as unreserved in earlier Ada versions. This is now
158 handled in Snames.Is_Keyword_Name.
159 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
161 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
162 unreserved in earlier Ada versions. This is now handled in
163 Snames.Is_Keyword_Name.
164 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
165 words as for other language versions.
166 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
167 Ada 2012, not just Ada 2005.
169 2011-08-29 Ed Schonberg <schonberg@adacore.com>
171 * sem_ch13.adb: Additional semantic checks for aspects involved in
174 2011-08-29 Matthew Heaney <heaney@adacore.com>
176 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
177 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
179 (Ancestor_Find): ditto.
181 2011-08-29 Thomas Quinot <quinot@adacore.com>
183 * par-endh.adb: Minor reformatting.
185 2011-08-29 Tristan Gingold <gingold@adacore.com>
187 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
188 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
189 (Adjust_N_CLeanups_For): Remove.
190 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
192 (Propgate_Exception): Adjust.
193 * raise-gcc.c: Add a few static/const.
194 (Adjust_N_Cleanups_For): Remove declaration.
195 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
197 2011-08-29 Ed Schonberg <schonberg@adacore.com>
199 * sem_ch8.adb: Use type of function return when rewriting as object
202 2011-08-29 Gary Dismukes <dismukes@adacore.com>
204 * sem_type.adb: Minor reformatting.
206 2011-08-29 Robert Dewar <dewar@adacore.com>
208 * makeutl.adb: Minor reformatting.
210 2011-08-29 Ed Schonberg <schonberg@adacore.com>
212 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
213 function call of a limited type, the expansion of the renaming is
214 complicated by the presence of various temporaries and subtypes that
215 capture constraints of the renamed object.
216 Rewrite node as an object declaration, whose expansion is simpler.
217 Given that the object is limited there is no copy involved and no
220 2011-08-29 Robert Dewar <dewar@adacore.com>
222 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
223 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
225 2011-08-29 Tristan Gingold <gingold@adacore.com>
227 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
228 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
229 system-linux-hppa.ads, system-linux-s390.ads,
230 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
231 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
232 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
233 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
234 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
235 system-solaris-sparc.ads, system-lynxos-x86.ads,
236 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
237 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
238 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
239 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
240 system-vxworks-x86.ads: Remove GCC_ZCX_Support
241 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
242 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
243 * opt.ads: Adjust comment.
244 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
245 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
246 * system.ads: Move GCC_ZCX_Support to obsolete entries.
248 2011-08-29 Emmanuel Briot <briot@adacore.com>
250 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
251 file name is specified on the gnatmake or gprbuild command line, and
252 before we search for that file in the project.
254 2011-08-29 Ed Schonberg <schonberg@adacore.com>
256 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
257 used to determine whether a possible interpretation for an overloadable
258 entity is declared within the current instantiation and should be
259 included in the candidate set.
261 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
263 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
265 2011-08-29 Ed Schonberg <schonberg@adacore.com>
267 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
268 access subtype is access_to_subprogram, when applying checks for
271 2011-08-29 Matthew Heaney <heaney@adacore.com>
273 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
274 for sibling when common parent.
276 2011-08-29 Thomas Quinot <quinot@adacore.com>
278 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
281 2011-08-29 Ed Schonberg <schonberg@adacore.com>
283 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
284 for the return type when in ASIS mode.
286 2011-08-29 Vincent Celier <celier@adacore.com>
288 * make.adb (Gnatmake): Get the default search dirs, then the target
289 parameters after getting the Builder switches, as the Builder switches
290 may include --RTS= and that could change the default search dirs.
292 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
294 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
295 Make_Final_Call. Move the processing for class-wide types before the
296 processing for derivations from [Limited_]Controlled.
297 (Make_Final_Call): Move the processing for class-wide types before the
298 processing for derivations from [Limited_]Controlled.
299 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
300 Add code to account for alignments larger than the list header. Add a
301 comment illustrating the structure of the allocated object + padding +
303 (Deallocate_Any_Controlled): Add code to account for alignments larger
304 than the list header.
306 2011-08-29 Ed Schonberg <schonberg@adacore.com>
308 * sinfo.ads, sinfo.adb: New node kind
309 N_Formal_Incomplete_Type_Definition, related flags.
310 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
311 Parse formal incomplete types.
312 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
314 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
315 Formal incomplete types do not need completion.
316 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
317 Validate_Incomplete_Type_Instance): New procedures to handle formal
319 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
320 that corresponds to a formal incomplete type.
321 * sprint.adb: Handle formal incomplete type declarations.
322 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
325 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
327 * a-fihema.ads, a-fihema.adb: Unit removed.
328 * a-undesu.ads, a-undesu.adb: New unit implementing
329 Ada.Unchecked_Deallocate_Subpool.
330 * einfo.adb: Remove Associated_Collection from the node usage.
331 Add Finalization_Master to the node usage.
332 (Associated_Collection): Removed.
333 (Finalization_Master): New routine.
334 (Set_Associated_Collection): Removed.
335 (Set_Finalization_Master): New routine.
336 (Write_Field23_Name): Remove Associated_Collection from the output. Add
337 Finalization_Master to the output.
338 * einfo.ads: Remove attribute Associated_Collection and its uses in
340 Add new attribute Finalization_Master along with its uses in entitites.
341 (Associated_Collection): Removed along with its pragma import.
342 (Finalization_Master): New routine along with a pragma import.
343 (Set_Associated_Collection): Removed along with its pragma import.
344 (Set_Finalization_Master): New routine along with a pragma import.
345 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
346 Build_Finalization_Collection with Build_Finalization_Master.
347 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
348 before the bodies of the predefined routines. Add comment explaining
349 this. Replace call to Build_Finalization_Collection with
350 Build_Finalization_Master.
351 (Freeze_Type): Replace call to Build_Finalization_Collection with
352 Build_Finalization_Master.
353 (Make_Finalize_Address_Body): Comment reformatting.
354 (Make_Predefined_Primitive_Specs): Code reformatting.
355 (Stream_Operation_OK): Update comment mentioning finalization
356 collections. Replace RE_Finalization_Collection with
357 RE_Finalization_Master.
358 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
359 Associated_Collection with Finalization_Master. Replace call to
360 Build_Finalization_Collection with Build_Finalization_Master.
361 (Expand_Allocator_Expression): Replace call to Associated_Collection
362 with Finalization_Master. Replace call to Set_Associated_Collection with
363 Set_Finalization_Master. Remove the generation of
364 Set_Finalize_Address_Ptr.
365 (Expand_N_Allocator): Replace call to Associated_Collection with
366 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
367 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
368 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
369 comment on usage. Replace call to Needs_BIP_Collection with
370 Needs_BIP_Finalization_Master Remplace BIP_Collection with
371 BIP_Finalization_Master. Update all comments which mention finalization
372 collections. Replace Associated_Collection with
373 Finalization_Master. Replace Build_Finalization_Collection with
374 Build_Finalization_Master.
375 (BIP_Formal_Suffix): Update BIP_Collection's case.
376 (Build_Heap_Allocator): Update the related comment. Rename local
377 variable Collect to Fin_Mas_Id and update its occurrences. Update
378 comments which mention finalization collections. Replace
379 Set_Associated_Collection with Set_Finalization_Master.
380 (Expand_Call): Update the code which detects a special piece of library
382 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
383 Add_Collection_Actual_To_Build_In_Place_Call with
384 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
385 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
386 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
387 Add_Collection_Actual_To_Build_In_Place_Call with
388 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
389 (Make_Build_In_Place_Call_In_Assignment): Replace call to
390 Add_Collection_Actual_To_Build_In_Place_Call with
391 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
392 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
393 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
394 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
395 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
396 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
397 Replace call to Set_Associated_Collection with Set_Finalization_Master.
398 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
399 Replace the call to Associated_Collection with Finalization_Master.
400 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
401 Update the way finalization master names are generated. Update the
402 retrieval of the correct access type which will carry the pool and
404 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
405 (Make_Finalize_Address_Body): Abstract types do not need
406 Finalize_Address. Code reformatting.
407 (Make_Finalize_Address_Stmts): Update comment on usage.
408 (Make_Set_Finalize_Address_Ptr_Call): Removed.
409 (Process_Declarations): Update comments.
410 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
411 Build_Finalization_Master. Update associated comment.
412 (Make_Set_Finalize_Address_Ptr_Call): Removed.
413 * exp_ch13.adb: Update comments which mention finalization collections.
414 (Expand_N_Free_Statement): Replace the call to Associated_Collection
415 with Finalization_Master.
416 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
417 create calls to routines Allocate_Any_Controlled and
418 Deallocate_Any_Controlled.
419 (Find_Finalize_Address): New routine.
420 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
422 (Requires_Cleanup_Actions): Update the comment on freeze node
424 * exp_util.ads: Remove comment on generated code for
425 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
426 is better to simply look in the body.
427 * freeze.adb (Freeze_All): Update the comment of finalization
428 collections. Replace the call to Associated_Collection with
429 Finalization_Master. Replace the call to Build_Finalization_Collection
430 with Build_Finalization_Master.
431 * impunit.adb: Add a-undesu and s-stposu to the list of units.
432 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
434 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
435 Ada.Finalization. Add processing for children of System.Storage_Pools.
436 * rtsfind.ads: Remove the naming of second level children of
438 Remove Ada_Finalization_Heap_Management from the list of units.
439 Remove subtype Ada_Finalization_Child.
440 Remove the following subprogram entities:
444 RE_Finalization_Collection
445 RE_Finalization_Collection_Ptr
446 RE_Set_Finalize_Address_Ptr
448 Add the naming of second level children of System.Storage_Pools.
449 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
451 Add subtype System_Storage_Pools_Child.
452 Add the following subprogram entities to System.Finalization_Masters:
454 RE_Finalization_Master
455 RE_Finalization_Master_Ptr
457 Add the following subprogram entities to System.Storage_Pools.Subpools:
459 RE_Allocate_Any_Controlled
460 RE_Deallocate_Any_Controlled
461 RE_Root_Storage_Pool_With_Subpools
465 Move the following subprogram entities from
466 Ada.Finalization.Heap_Management to System.Finalization_Masters:
468 RE_Add_Offset_To_Address
473 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
474 Set_Associated_Collection with Set_Finalization_Master.
475 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
476 BIP_Finalization_Master is created.
477 * s-finmas.adb: New unit System.Finalization_Masters.
478 * s-finmas.ads: New unit System.Finalization_Masters.
479 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
480 * s-stposu.ads, s-stposu.adb: New unit implementing
481 System.Storage_Pools.Subpools.
483 2011-08-29 Bob Duff <duff@adacore.com>
485 * tbuild.adb: Add assertion.
487 2011-08-29 Thomas Quinot <quinot@adacore.com>
489 * s-pooglo.adb: Minor reformatting.
491 2011-08-29 Ed Schonberg <schonberg@adacore.com>
493 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
494 an indexed component of a packed array whose element type is a record
495 with a representation clause different from that of the right-hand
496 side, generate a temporary to minimuze the number of bit-field
497 operations generated.
499 2011-08-29 Ed Schonberg <schonberg@adacore.com>
501 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
502 declarations, and thus are likely insertion points for actions.
504 2011-08-29 Bob Duff <duff@adacore.com>
506 * einfo.ads: Minor comment fix.
508 2011-08-29 Robert Dewar <dewar@adacore.com>
510 * frontend.adb, gnat1drv.adb: Minor reformatting.
512 2011-08-29 Tristan Gingold <gingold@adacore.com>
514 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
515 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
516 space in front of the header.
518 2011-08-29 Johannes Kanig <kanig@adacore.com>
520 * frontend.adb (Frontend): Exit after creating Standard package when
522 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
525 2011-08-29 Robert Dewar <dewar@adacore.com>
527 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
528 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
529 snames.ads-tmpl: Minor reformatting.
531 2011-08-29 Philippe Gil <gil@adacore.com>
533 * prj.adb (Reset_Units_In_Table): New procedure.
534 Reset units to avoid access to freed memory.
536 2011-08-29 Thomas Quinot <quinot@adacore.com>
538 * get_scos.adb: When reading a P statement SCO without a pragma name
539 (from an older ALI file), ensure that the Pragma_Name component is set
540 to Unknown_Pragma (not left uninitialized).
542 2011-08-29 Vincent Celier <celier@adacore.com>
544 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
545 modified to compute correctly the object path of a SAL project that is
546 extending another library project.
547 (Write_Path_File): New procedure.
548 * makeutl.ads (Directories): New table moved from Buildgpr
549 (Get_Directories): New procedure moved from Buildgpr
550 (Write_Path_File): New procedure
551 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
552 paths before binding SALs, instead of Set_Ada_Paths.
553 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
555 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
556 (Current_Source_Path_File_Of): New function
557 (Set_Current_Object_Path_File_Of): New procedure
558 (Current_Source_Object_File_Of): New function
559 (Set_Current_Object_Path_File_Of): New procedure
560 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
561 (Current_Source_Path_File_Of): New function
562 (Set_Current_Object_Path_File_Of): New procedure
563 (Current_Source_Object_File_Of): New function
564 (Set_Current_Object_Path_File_Of): New procedure
566 2011-08-29 Ed Schonberg <schonberg@adacore.com>
568 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
569 packed entity, use a bit-field assignment only if there is no change of
572 2011-08-29 Thomas Quinot <quinot@adacore.com>
574 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
575 Is_RTU instead of using Chars comparisons.
577 2011-08-29 Thomas Quinot <quinot@adacore.com>
579 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
580 temporary object if the actual is constrained, and the discriminants
581 read from the stream don't match.
583 2011-08-29 Tristan Gingold <gingold@adacore.com>
585 * sem_attr.adb, exp_attr.adb: Add handling of
586 Attribute_System_Allocator_Alignment
587 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
588 Attribute_System_Allocator_Alignment.
589 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
590 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
591 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
592 get_target_system_allocator_alignment.
594 2011-08-29 Arnaud Charlet <charlet@adacore.com>
596 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
599 2011-08-29 Arnaud Charlet <charlet@adacore.com>
601 * exp_ch3.adb (In_Runtime): Fix typo.
603 2011-08-29 Bob Duff <duff@adacore.com>
605 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
607 2011-08-29 Ed Schonberg <schonberg@adacore.com>
609 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
610 and a separate tag assignment is generated, ensure that the tag
611 assignment is analyzed.
613 2011-08-29 Ed Schonberg <schonberg@adacore.com>
615 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
616 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
617 of statement lists that may contain local declarations.
618 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
619 duplicate the triggering statements needed for the expansion of this
620 construct, when the trigger is a dispatching call to a synchronized
623 2011-08-29 Arnaud Charlet <charlet@adacore.com>
625 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
626 * bindgen.adb: Add comments.
627 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
630 2011-08-29 Robert Dewar <dewar@adacore.com>
632 * exp_attr.adb: Minor reformatting.
633 Minor code reorganization and commenting.
634 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
637 2011-08-29 Thomas Quinot <quinot@adacore.com>
639 * get_scos.adb: Ignore chaining indicators not currently supported
642 2011-08-29 Arnaud Charlet <charlet@adacore.com>
644 * system.ads: Minor editing.
646 2011-08-29 Arnaud Charlet <charlet@adacore.com>
648 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
650 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
651 Attribute_Elab_Subp_Body.
652 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
653 * sem_util.adb: Update comments.
655 2011-08-29 Thomas Quinot <quinot@adacore.com>
657 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
658 pragma name for each SCO statement corresponding to a pragma.
660 2011-08-29 Arnaud Charlet <charlet@adacore.com>
662 * opt.ads: Minor editing.
664 2011-08-29 Yannick Moy <moy@adacore.com>
666 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
667 that only made sense for CodePeer mode.
669 2011-08-29 Jose Ruiz <ruiz@adacore.com>
671 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
672 which is no longer used.
673 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
674 handling of the 64-bit division check.
675 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
677 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
680 2011-08-29 Thomas Quinot <quinot@adacore.com>
682 * get_scos.adb: Minor reformatting.
684 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
686 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
687 statement list is wrapped in a block, the block is explicitly analyzed
688 in order to properly redecorate the entities and create a servicing
691 2011-08-29 Tristan Gingold <gingold@adacore.com>
693 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
694 (Set_Zero_Cost_Handling): Remove.
696 2011-08-29 Thomas Quinot <quinot@adacore.com>
698 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
700 2011-08-29 Geert Bosch <bosch@adacore.com>
702 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
703 instruction, as the latter may produce -0.0, which is not a valid VAX
705 (Neg_G): Likewise for VAX F float.
707 2011-08-29 Robert Dewar <dewar@adacore.com>
709 * exp_util.adb: Minor reformatting.
711 2011-08-29 Yannick Moy <moy@adacore.com>
713 * sem_ch3.adb: Minor comment update.
715 2011-08-29 Thomas Quinot <quinot@adacore.com>
717 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
720 2011-08-29 Thomas Quinot <quinot@adacore.com>
722 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
723 current statement sequence on a generic instantiation or a subprogram
726 2011-08-29 Robert Dewar <dewar@adacore.com>
728 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
731 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
733 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
734 Correct the check which involves the freeze node of a controlled or
735 access-to-controlled type.
737 2011-08-29 Geert Bosch <bosch@adacore.com>
739 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
741 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
744 2011-08-29 Yannick Moy <moy@adacore.com>
746 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
747 for every index type and component type that is not a subtype_mark.
748 (Process_Subtype): Set Etype of subtype.
750 2011-08-29 Robert Dewar <dewar@adacore.com>
752 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
753 reorganization. Minor reformatting.
755 2011-08-29 Steve Baird <baird@adacore.com>
757 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
758 for CodePeer and ALFA modes.
760 2011-08-29 Ed Schonberg <schonberg@adacore.com>
762 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
763 that comes from an enclosing scope if it is not the renaming of an
764 actual, to handle properly a spurious ambiguity in an instance.
766 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
768 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
769 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
770 use it instead of the Esize of the first parameter.
771 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
773 <Size>: Likewise. Call it for composite types on the RM size.
775 2011-08-29 Yannick Moy <moy@adacore.com>
777 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
778 * sem_util.adb (Unique_Name): Correct behaviour for names of
781 2011-08-29 Yannick Moy <moy@adacore.com>
783 * sem_prag.adb (Check_Precondition_Postcondition): In formal
784 verification mode, analyze pragma expression for correctness, for
785 pre/post on library-level subprogram, as it is not expanded later.
787 2011-08-29 Yannick Moy <moy@adacore.com>
789 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
790 in formal verification.
792 2011-08-29 Thomas Quinot <quinot@adacore.com>
794 * sem_util.adb: Minor reformatting.
795 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
797 * par_sco.ads, par_sco.adb: Update comments.
799 2011-08-29 Yannick Moy <moy@adacore.com>
801 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
802 associated getter/setter.
803 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
805 2011-08-29 Vincent Celier <celier@adacore.com>
807 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
808 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
809 with declarations for Language_Kind and Dependency_Kind for Ada.
810 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
811 (Process_Compiler): Take into account the new attributes Dependency_Kind
813 (Check_Configuration): Check if language kind is unit based, not if the
814 language name is Ada.
815 (Process_Exceptions_Unit_Based): Ditto
816 (Add_Language): Remove default additions of language and dependency kind
817 * prj.ads: Minor comment change
818 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
820 2011-08-29 Johannes Kanig <kanig@adacore.com>
822 * debug.adb: Update comments.
824 2011-08-24 Joseph Myers <joseph@codesourcery.com>
826 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
827 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
828 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
829 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
830 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
832 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
834 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
835 (GNATLIBCFLAGS_FOR_C): Replace
836 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
837 (gnatlib-shared-default, gnatlib-shared-dual-win32)
838 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
839 (gnatlib-sjlj, gnatlib-zcx): Likewise.
841 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
843 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
845 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
847 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
849 2011-08-05 Nicolas Roche <roche@adacore.com>
851 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
852 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
854 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
856 2011-08-05 Matthew Heaney <heaney@adacore.com>
858 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
859 subprogram bodies declared out-of-order.
861 2011-08-05 Yannick Moy <moy@adacore.com>
863 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
864 entities directly in package Standard, otherwise skip the standard
867 2011-08-05 Robert Dewar <dewar@adacore.com>
869 * a-cbmutr.adb: Minor reformatting
870 (Allocate_Node): refactor node allocation algorithm
872 2011-08-05 Robert Dewar <dewar@adacore.com>
874 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
875 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
877 (Analyze_Pragma, case Check_Policy): Ditto.
878 * sem_prag.ads (Check_Disabled): New function
879 * snames.ads-tmpl: Add Name_Disable.
881 2011-08-05 Robert Dewar <dewar@adacore.com>
883 * gnat_rm.texi: Document implementation-defined policy DISABLE for
884 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
886 2011-08-05 Ed Schonberg <schonberg@adacore.com>
888 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
889 that appears in a generic formal part and applies to a formal
892 2011-08-05 Robert Dewar <dewar@adacore.com>
894 * a-cbmutr.ads: Minor reformatting.
896 2011-08-05 Matthew Heaney <heaney@adacore.com>
898 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
899 to check count, check sign of value instead.
900 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
901 (Copy_Subtree): allocate copy of source element
902 (Equal_Subtree): compare elements, not access objects
904 2011-08-05 Vincent Celier <celier@adacore.com>
906 * gnat_ugn.texi: Fix VMS alternative.
908 2011-08-05 Thomas Quinot <quinot@adacore.com>
910 * sem_ch11.adb: Add comment.
912 2011-08-05 Robert Dewar <dewar@adacore.com>
914 * exp_util.adb: Minor comment fix.
916 2011-08-05 Robert Dewar <dewar@adacore.com>
918 * scng.adb (Error_Unterminated_String): Improve flag position when
921 2011-08-05 Matthew Heaney <heaney@adacore.com>
923 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
925 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
926 multiway tree containers.
928 2011-08-05 Robert Dewar <dewar@adacore.com>
930 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
931 * stylesw.adb: Implement -gnatyC to control comment spacing
932 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
934 * usage.adb: Add line for -gnatyC.
936 2011-08-05 Robert Dewar <dewar@adacore.com>
938 * gnat_ugn.texi: Document -gnatyC.
939 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
940 synonym for COMMENTS2).
942 2011-08-05 Robert Dewar <dewar@adacore.com>
944 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
945 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
946 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
947 a-comutr.ads, lib-xref.adb: Minor reformatting.
949 2011-08-05 Robert Dewar <dewar@adacore.com>
951 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
952 warning if there is an exception handler present.
954 2011-08-05 Pascal Obry <obry@adacore.com>
956 * a-iteint.ads: Fix copyright year.
958 2011-08-05 Thomas Quinot <quinot@adacore.com>
960 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
961 statement SCO for a USE clause or a representation clause.
963 2011-08-05 Yannick Moy <moy@adacore.com>
965 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
966 between body and spec for stub.
967 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
968 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
969 pragma precondition or postcondition, for which the enclosing
970 subprogram or package in the AST is not the desired one, return empty.
972 2011-08-05 Thomas Quinot <quinot@adacore.com>
974 * g-expect.adb: Minor reformatting.
976 2011-08-05 Bob Duff <duff@adacore.com>
978 * a-fihema.adb: Comment out OS_Lib.
980 2011-08-05 Matthew Heaney <heaney@adacore.com>
982 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
983 (unbounded multiway tree containers) and a-iteint.ads.
984 * a-comutr.ads, a-comutr.adb:
985 This is the new Ada 2012 unit for unbounded multiway tree containers
986 * a-cimutr.ads, a-cimutr.adb
987 This is the new Ada 2012 unit for indefinite multiway tree containers
988 * a-iteint.ads: New file.
990 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
992 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
994 2011-08-05 Bob Duff <duff@adacore.com>
996 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
998 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1000 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1002 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1003 general indexing aspects of Ada2012. Called when analyzing indexed
1004 components when other interpretations fail.
1005 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1006 in an expression context where overloading is meaningful. This excludes
1007 the occurrence in an aspect specification (efficiency only).
1008 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1009 related to iterators can be set by an attribute specification, but
1011 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1012 Constant_Indexing and Variable_Indexing.
1013 (Check_Indexing_Functions): New procedure to perform legality checks.
1014 Additional semantic checks at end of declarations.
1016 2011-08-05 Sergey Rybin <rybin@adacore.com>
1018 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1019 order of calling Tree_Write/Tree_Read routines made for aspects.
1021 2011-08-05 Bob Duff <duff@adacore.com>
1023 * a-fihema.adb (Finalize): Fix race condition.
1025 2011-08-05 Yannick Moy <moy@adacore.com>
1027 * sem_ch12.adb (Analyze_Package_Instantiation,
1028 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1031 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1033 * sem_type.adb (Specific_Type): in an instance, the type-specific
1034 operand of an equality check that involves null may have a private
1035 type. Use full view to determine legality of construct.
1037 2011-08-05 Vincent Celier <celier@adacore.com>
1039 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1040 delete or close the file when the call to gnatmake was successful.
1042 2011-08-05 Yannick Moy <moy@adacore.com>
1044 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1045 Global_Discard_Names.
1047 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1049 * sinfo.ads: comments on use of entity field for aspect specifications.
1051 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1053 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1054 node is not itself an entity but a selected component, it is a
1055 rewritten parameterless call to an en enclosing synchronized operation,
1056 and this expansion will be performed again in the instance, so there is
1057 no global information to preserve.
1059 2011-08-05 Javier Miranda <miranda@adacore.com>
1061 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1062 for renamings of predefined primitives.
1063 (In_Predef_Prims_DT): New subprogram.
1065 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1067 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1068 possible interpretation of name is a reference type, add an
1069 interpretation that is the designated type of the reference
1070 discriminant of that type.
1071 * sem_res.adb (resolve): If the interpretation imposed by context is an
1072 implicit dereference, rewrite the node as the deference of the
1073 reference discriminant.
1074 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1075 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1076 parent type or base type.
1077 * sem_ch4.adb (Process_Indexed_Component,
1078 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1079 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1080 Check for implicit dereference.
1081 (List_Operand_Interps): Indicate when an implicit dereference is
1083 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1085 2011-08-05 Thomas Quinot <quinot@adacore.com>
1087 * scos.ads: Update documentation of SCO table. Pragma statements can now
1088 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1089 * par_sco.ads, par_sco.adb: Implement the above change.
1090 (Process_Decisions_Defer): Generate a P decision for the first parameter
1091 of a dyadic pragma Debug.
1092 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1094 * put_scos.adb: Code simplification based on above change.
1096 2011-08-05 Robert Dewar <dewar@adacore.com>
1098 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1099 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1100 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1101 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1103 2011-08-05 Bob Duff <duff@adacore.com>
1105 * a-stunau.ads, g-spipat.adb: Update comments.
1107 2011-08-05 Bob Duff <duff@adacore.com>
1109 * a-fihema.ads: Minor comment fix.
1110 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1112 (Attach, Detach): Remove some unnecessary code.
1113 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1115 2011-08-05 Bob Duff <duff@adacore.com>
1117 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1118 allocation for Objects component. This simplifies the code somewhat. It
1119 is also a little more efficient in the not-so-unusual case where there
1120 are no controlled objects allocated.
1121 Make Finalization_Started flag atomic.
1122 (Finalize): Avoid unnecessary detachment of items from the list.
1123 (pcol): Minor cleanup.
1125 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1127 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1128 package whose name is the same as that of the generic unit, or its
1131 2011-08-05 Bob Duff <duff@adacore.com>
1133 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1134 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1135 Minor comment fixes.
1137 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1139 * make.adb (Linking_Phase): No longer need to set source search path
1140 before calling gnatlink in CodePeer mode.
1141 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1142 gcc in CodePeer mode, since the binder generated file no longer has a
1144 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1145 * switch-c.adb: Update comment.
1147 2011-08-05 Thomas Quinot <quinot@adacore.com>
1149 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1151 2011-08-05 Nicolas Roche <roche@adacore.com>
1153 * gnat_ugn.texi: Fix minor syntax error issue.
1155 2011-08-05 Vincent Celier <celier@adacore.com>
1157 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1158 delete or close the file when the call to gnatmake returns a non
1159 successful return code.
1161 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1163 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1164 check, indicate that the copy of the original node does not come from
1165 source, to prevent an infinite recursion of the expansion.
1167 2011-08-05 Johannes Kanig <kanig@adacore.com>
1169 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1170 VC generation for subprogram bodies.
1172 2011-08-05 Yannick Moy <moy@adacore.com>
1175 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1176 the base type with the smallest allowed base type.
1178 2011-08-05 Sergey Rybin <rybin@adacore.com>
1180 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1183 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1185 * sem_ch12.ads: minor comment updates.
1187 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1189 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1190 instantiation and a formal package the compiler generates a package
1191 renaming declaration so that the generic name within the declaration
1192 is interpreted as a renaming of the instance. At the end of a formal
1193 package declaration, this renaming must become invisible.
1195 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1197 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1198 comparison and rely on concrete entities instead.
1200 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1202 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1203 and discriminants, to indicate that the type has an access discriminant
1204 that supports implicit dereference.
1205 * snames.ads-tmpl: Add names of aspects and attributes related to
1206 Ada2012 iterators: constant_indexing, default_iterator,
1207 iterator_element, implicit_dereference, variable_indexing.
1208 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1209 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1210 iterator-related aspects.
1211 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1213 2011-08-05 Sergey Rybin <rybin@adacore.com>
1215 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1216 metrics in gnatmetric to cover new kinds of coupling mentrics.
1218 2011-08-05 Steve Baird <baird@adacore.com>
1220 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1221 of calling the user-defined main subprogram.
1222 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1223 is set) Call_Main_Subprogram ahead of, as opposed to
1225 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1226 generation of a "with" of the user-defined main subprogram.
1227 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1228 (which is now called from Gen_Main instead).
1230 2011-08-05 Emmanuel Briot <briot@adacore.com>
1232 * projects.texi: Added reference to the Makefile package.
1234 2011-08-05 Thomas Quinot <quinot@adacore.com>
1236 * exp_ch7.adb: Minor comment rewording.
1238 2011-08-05 Ed Falis <falis@adacore.com>
1240 * env.c: Fix comment.
1242 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1244 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1245 character comparison and rely on concrete entities instead.
1247 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1249 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1250 suggested by AI95-0068.
1252 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1254 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1255 the two potential initialization calls. This accounts for any
1256 access-before-elaboration checks which may precede the initialization
1258 (Next_Suitable_Statement): New routine. Returns the next real statement
1259 after the input node while skipping generated checks.
1260 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1261 with comment on usage.
1262 Do not generate Elaborate_All when the trigger is a finalization call
1263 coming from a type init proc.
1264 (Check_Elab_Call): Propagate the initialization procedure context to
1265 subsequent calls to Check_A_Call.
1266 (Check_Internal_Call_Continue): Propagate the initialization procedure
1267 context to subsequent calls to Check_Elab_Call.
1268 (Is_Finalization_Procedure): New routine. Returns True if the input
1269 entity denotes a [Deep_]Finalize routine.
1270 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1271 along with comment on usage.
1273 2011-08-05 Vadim Godunko <godunko@adacore.com>
1275 * s-atocou.ads: Add list of supported platforms.
1277 2011-08-05 Yannick Moy <moy@adacore.com>
1279 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1281 * opt.ads (Disable_ALI_File): new Boolean flag
1282 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1284 2011-08-05 Ed Falis <falis@adacore.com>
1286 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1287 environ is properly defined.
1289 2011-08-05 Vincent Celier <celier@adacore.com>
1291 * make.adb (Compilation_Phase): Exit immediately when all objects have
1292 been found up to date, to avoid multiple exit messages.
1293 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1294 same project for languages with no compiler.
1295 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1297 2011-08-05 Robert Dewar <dewar@adacore.com>
1299 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1300 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1301 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1302 s-atocou-builtin.adb: Minor reformatting.
1304 2011-08-05 Yannick Moy <moy@adacore.com>
1306 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1307 if the node to wrap is a pragma check, this node and enclosed
1308 expression are not expanded, so do not apply any transformations here.
1309 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1310 introducing transient scopes.
1312 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1314 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1315 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1316 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1317 routine is available, so we use the default implementation of these
1319 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1320 support for copying attributes on VxWorks 6.
1322 2011-08-05 Yannick Moy <moy@adacore.com>
1324 * debug.adb: Remove use of -gnatd.D.
1325 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1326 * opt.ads: Simplify variables for ALFA mode, to keep one only
1327 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1330 2011-08-05 Vincent Celier <celier@adacore.com>
1332 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1333 Builder'Default_Switches.
1335 2011-08-05 Vincent Celier <celier@adacore.com>
1337 * makeusg.adb: Add lines for --create-map-file switches.
1339 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1341 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1342 profile is incomplete and the full view is available, replace it with
1344 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1345 incomplete, freezing the subprogram is delayed until the full view is
1347 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1348 fixed-point multiplication operator and the predefined operator is
1349 resolved in favor of the user-defined one.
1351 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1353 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1356 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1358 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1359 whether a type lacks user-defined Read or Write operations, or has a
1360 component that lacks them.
1361 * sem_attr.adb (Check_Stream_Attribute): if restriction
1362 No_Default_Stream_Attributes is active, verify that all subcomponent
1363 types of the target have user-defined stream operations, and report
1365 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1366 * exp_strm.adb: Build_Elementary_Input_Call,
1367 Build_Elementary_Write_Call): remove checks for restriction
1368 No_Default_Stream_Attributes, now checked in semantics.
1370 2011-08-04 Vincent Celier <celier@adacore.com>
1372 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1373 switches on the command line, look for all valid --RTS switches in the
1374 Builder switches and for each language use the first runtime name found
1375 to invoke gprconfig.
1376 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1377 command line and there is no auto-configuration.
1378 (Runtime_Name_Set_For): New function.
1380 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1382 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1383 elaborate initialization expression for variable Abort when processing
1384 a package body or a declaration.
1385 (Create_Finalizer): Propagate the package context when creating the
1386 exception-related variables.
1387 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1388 For_Package along with usage comment.
1390 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1392 * gcc-interface/Makefile.in: Clean up targets.
1393 Enable new package for atomic counters and copy-on-write implementation
1394 of unbounded strings on x86 platforms.
1395 * gcc-interface/Make-lang.in: Update dependencies.
1397 2011-08-04 Robert Dewar <dewar@adacore.com>
1399 * exp_ch7.adb: Minor reformatting.
1401 2011-08-04 Robert Dewar <dewar@adacore.com>
1403 * exp_strm.adb: Minor reformatting.
1405 2011-08-04 Vadim Godunko <godunko@adacore.com>
1407 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1408 operations are not supported.
1409 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1410 * s-atocou-x86.adb: New file.
1411 * Makefile.rtl: Add s-atocou.o file
1413 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1415 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1416 (Compilation_Phase): ... here.
1417 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1419 2011-08-04 Thomas Quinot <quinot@adacore.com>
1421 * Make-generated.in: Fix minor typo in comment.
1423 2011-08-04 Thomas Quinot <quinot@adacore.com>
1425 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1428 2011-08-04 Robert Dewar <dewar@adacore.com>
1430 * a-coinho.adb: Minor reformatting.
1432 2011-08-04 Robert Dewar <dewar@adacore.com>
1434 * a-coinho.ads: Minor reformatting.
1436 2011-08-04 Vadim Godunko <godunko@adacore.com>
1438 * s-atocou.ads, s-atocou.adb: New files.
1439 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1440 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1441 direct use of GCC's atomic builtins and replace them by use of new
1442 atomic counter package.
1444 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1446 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1448 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1450 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1451 with a call to Get_External_Tag.
1452 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1453 subprogram usage. Remove the guard against package declarations and
1454 bodies since Build_Cleanup_Statements is no longer invoked in that
1456 (Build_Components): Initialize Tagged_Type_Stmts when the context
1457 contains at least one library-level tagged type.
1458 (Build_Finalizer): New local variables Has_Tagged_Types and
1459 Tagged_Type_Stmts along with associated comments on usage. Update the
1460 logic to include tagged type processing.
1461 (Create_Finalizer): Insert all library-level tagged type unregistration
1462 code before the jump block circuitry.
1463 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1464 (Expand_N_Package_Declaration): Remove the call to
1465 Build_Cleanup_Statements.
1466 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1467 unregister the external tag of a tagged type.
1468 (Processing_Actions): Reimplemented to handle tagged types.
1469 (Process_Declarations): Detect the declaration of a library-level
1470 tagged type and carry out the appropriate actions.
1471 (Unregister_Tagged_Types): Removed. The machinery has been directly
1472 merged with Build_Finalizer.
1474 2011-08-04 Robert Dewar <dewar@adacore.com>
1476 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1477 gnatls.adb, exp_ch3.adb: Minor reformatting.
1479 2011-08-04 Marc Sango <sango@adacore.com>
1481 * sem_attr.adb (Analyze_Attribute): Replace the message
1482 "invisible attribute of}" of the spark restriction violation in
1483 attribute reference by the simple message "invisible attribute of type".
1484 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1485 two insertion characters: '&' and '}'.
1487 2011-08-04 Vadim Godunko <godunko@adacore.com>
1489 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1490 * a-coinho.ads, a-coinho.adb: New file.
1491 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1493 2011-08-04 Nicolas Roche <roche@adacore.com>
1495 * alfa_test.adb: Not all ali files are containing alfa information even
1496 if compiled with -gnatd.F. So suppress warning about missing ALFA
1499 2011-08-04 Yannick Moy <moy@adacore.com>
1501 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1503 * put_alfa.adb: Check that scope name is not empty.
1505 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1507 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1508 Needs_Elementary_Stream_Operation, to determine whether user-defined
1509 Read and Write attributes are available for the elementary components
1510 of the given type. If only the predefined attributes are available,
1511 then when restriction No_Default_Stream_Attributes is active the
1512 predefined stream attributes for the composite type cannot be created.
1514 2011-08-04 Robert Dewar <dewar@adacore.com>
1516 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1517 Put routines in alpha order
1519 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1521 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1522 * gcc-interface/Make-lang.in: Update dependencies.
1524 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1526 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1527 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1530 2011-08-04 Robert Dewar <dewar@adacore.com>
1532 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1533 lib-xref-alfa.adb: Minor reformatting.
1535 2011-08-04 Marc Sango <sango@adacore.com>
1537 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1538 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1539 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1542 2011-08-04 Tristan Gingold <gingold@adacore.com>
1544 * bindgen.adb (Gen_Adainit_C): Remove.
1545 (Gen_Adafinal_C): Ditto.
1546 (Gen_Elab_Externals_C): Ditto.
1547 (Gen_Elab_Calls_C): Ditto.
1548 (Gen_Elab_Order_C): Ditto.
1549 (Gen_Elab_Defs_C): Ditto.
1550 (Gen_Finalize_Library_C): Ditto.
1551 (Gen_Finalize_Library_Defs_C): Ditto.
1552 (Gen_Main_C): Ditto.
1553 (Gen_Output_File_C): Ditto.
1554 (Gen_Restrictions_C): Ditto.
1555 (Gen_Versions_C): Ditto.
1556 (Write_Info_Ada_C): Ditto.
1557 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1558 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1559 Always call Gen_Output_File_Ada.
1560 * gnatlink.adb (Begin_Info): Now a constant.
1562 (Ada_Bind_File): Remove
1563 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1564 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1565 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1566 * opt.ads (Ada_Bind_File): Remove.
1568 2011-08-04 Thomas Quinot <quinot@adacore.com>
1570 * projects.texi: Document target-specific directory in default project
1573 2011-08-04 Thomas Quinot <quinot@adacore.com>
1575 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1578 2011-08-04 Yannick Moy <moy@adacore.com>
1580 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1581 opt.ads, lib-xref.ads: Code clean up.
1583 2011-08-04 Yannick Moy <moy@adacore.com>
1585 * gnat_rm.texi: Update description of Test_Case
1586 * gnat_ugn.texi: Typo.
1588 2011-08-04 Ed Falis <falis@adacore.com>
1590 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1592 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1594 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1595 it is of type Root_Controlled. This action eliminates fields Prev and
1596 Next from type equality.
1598 2011-08-04 Yannick Moy <moy@adacore.com>
1600 * lib-xref-alfa.adb: Correct typo.
1602 2011-08-04 Matthew Heaney <heaney@adacore.com>
1604 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1607 2011-08-04 Yannick Moy <moy@adacore.com>
1609 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1610 (Analyze_Pragma): allow static string expression for name of Test_Case,
1611 instead of simply string literals.
1612 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1615 2011-08-04 Vincent Celier <celier@adacore.com>
1617 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1618 case suffixes to find truncated main sources.
1620 2011-08-04 Tristan Gingold <gingold@adacore.com>
1622 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1623 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1624 (Compute_Current_Task): Ditto.
1626 2011-08-04 Tristan Gingold <gingold@adacore.com>
1628 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1630 2011-08-04 Yannick Moy <moy@adacore.com>
1632 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1633 library-level constant.
1634 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1635 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1636 used as selector of parameter association, in ALFA mode.
1638 2011-08-04 Robert Dewar <dewar@adacore.com>
1640 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1641 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1644 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1646 * make.adb (Linking_Phase): Set source search path before calling
1647 gnatlink in CodePeer mode.
1649 2011-08-04 Javier Miranda <miranda@adacore.com>
1651 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1652 Remove code which takes care of building TSDs.
1653 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1654 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1655 the accessibility check in VM targets.
1656 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1657 (Building_Static_DT): Now returns false for VM targets.
1658 (Build_VM_TSDs): Removed.
1659 (Expand_Interface_Conversion): Generate missing runtime check for
1660 conversions to interface types whose target type is unknown at compile
1662 (Make_VM_TSD): Add missing code to disable the generation of calls to
1663 Check_TSD if the tagged type is not defined at library level, or not
1664 has a representation clause specifying its external tag, or -gnatdQ is
1666 * exp_disp.ads (Build_VM_TSDs): Removed.
1667 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1668 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1669 register primitives in the dispatch tables in VM targets.
1670 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1671 initialization of class-wide interface objects in VM targets.
1672 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1675 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1677 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1678 when dotnet-ld cannot be found.
1680 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1682 * bindgen.adb: Simplify significantly generation of binder body file in
1684 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1685 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1688 2011-08-04 Yannick Moy <moy@adacore.com>
1690 * sem_prag.adb, sem.ads: Code cleanup.
1692 2011-08-04 Tristan Gingold <gingold@adacore.com>
1694 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1695 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1696 results if possible.
1697 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1698 * gnat_ugn.texi: Update dynamic stack usage section.
1700 2011-08-04 Steve Baird <baird@adacore.com>
1702 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1703 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1704 contains only a call to the user-defined main subprogram.
1705 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1706 call the "wrapper" subprogram instead of directly
1707 calling the user-defined main subprogram.
1709 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1711 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1712 alternatives of a case statement for controlled objects. Rename local
1713 variable A to Dead_Alt.
1714 (Expand_N_If_Statement): Check the then and else statements of an if
1715 statement for controlled objects. Check the then statements of all
1716 elsif parts of an if statement for controlled objects.
1717 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1719 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1720 detects a loop associated with the expansion of an array object.
1721 Augment the processing of the loop statements to account for a possible
1722 wrap done by Process_Statements_For_Controlled_Objects.
1723 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1724 statements and abortable part of an asynchronous select for controlled
1726 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1727 conditional entry call for controlled objects.
1728 (Expand_N_Selective_Accept): Check the alternatives of a selective
1729 accept for controlled objects.
1730 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1731 alternatives of a timed entry call for controlled objects.
1732 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1733 exception handler for controlled objects.
1734 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1735 Add formal parameter Nested_Constructs along with its associated
1737 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1738 Requires_Cleanup_Actions.
1739 (Process_Statements_For_Controlled_Objects): New routine.
1740 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1741 routine. Inspect a node which contains a non-handled sequence of
1742 statements for controlled objects. If such an object is found, the
1743 statements are wrapped in a block.
1745 2011-08-04 Bob Duff <duff@adacore.com>
1747 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1748 need to compare with Class_Wide_Type (T2), in order to get at the
1749 original class-wide type node.
1750 * sem_type.ads (Covers): Improve the comment.
1751 * einfo.ads (Class_Wide_Type): Improve the comment.
1752 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1753 the type of the Deref.
1755 2011-08-04 Yannick Moy <moy@adacore.com>
1757 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1758 separate declarations.
1759 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1760 check identifier of pragma argument.
1761 (Chain_TC): check that no other test case associated to the same entity
1762 share the same name.
1763 (Check_Test_Case): disallow test case inside subprogram body
1764 (Analyze_Pragma): correct call to check identifier and not argument
1765 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1766 function gets name from test case pragma.
1768 2011-08-04 Yannick Moy <moy@adacore.com>
1770 * gnat_rm.texi: Document new pragma and aspect.
1771 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1772 (No_Duplicates_Allowed): new constant array defining whether duplicates
1773 aspects of each kind can appear on the same declaration.
1774 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1775 field, which points to a node holding the previous Spec_PPC_List.
1776 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1777 through the indirection with Contract.
1778 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1779 * par-prag.adb (Prag): do nothing on Test_Case pragma
1780 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1782 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1783 component Ensures of Test_Case.
1784 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1785 (Analyze_Generic_Subprogram_Declaration,
1786 Analyze_Subprogram_Instantiation,
1787 Analyze_Abstract_Subprogram_Declaration,
1788 Analyze_Subprogram_Body_Helper,
1789 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1790 insert contract in subprogram node at point of definition
1792 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1793 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1794 corresponding pragma
1795 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1796 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1797 similar to the analysis of pre/post
1798 (Derive_Subprogram): insert contract in subprogram node at point of
1800 * sem_prag.adb, sem_prag.ads
1801 (Check_Arg_Is_String_Literal, Check_Identifier):
1802 new checking procedures to be called in treatment of pragmas
1803 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1804 pragma is well-formed. This does not check currently that 'Result is
1805 used only in the Ensures component of a Test_Case.
1806 (Analyze_Pragma): add case for Test_Case
1807 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1808 components of a Test_Case.
1809 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1810 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1811 pragma, treated as spec expressions.
1812 (Sig_Flags): add value -1 for Test_Case.
1813 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1814 Get_Requires_From_Test_Case_Pragma): getters for both expression
1815 components of a Test_Case.
1816 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1817 indirection between an entry or [generic] subprogram entity and its
1818 pre/post + test-cases.
1819 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1820 get/set for fields of an N_Contract node.
1821 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1822 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1823 names and pragma for Test_Case.
1824 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1826 2011-08-04 Vincent Celier <celier@adacore.com>
1828 * gnat_ugn.texi: Improve documentation of gnatmake switch
1829 --source-info-file=.
1831 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1833 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1834 type). Initialize Atyp to the appropriate type which is later checked
1835 for completion. Rewrite the assertion associated with private type
1838 2011-08-04 Ed Falis <falis@adacore.com>
1840 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1841 initialize the number of CPUs.
1843 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1845 * sem_type.adb (Disambiguate): New subsidiary routine
1846 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1847 equality on an anonymous access type whose designated type is private
1848 does not lead to an ambiguity with the universal access equality
1849 operator in the body or child units of the defining package. The same
1850 is true for a multiplication operator on a private type completed with
1853 2011-08-04 Javier Miranda <miranda@adacore.com>
1855 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1856 (Normalize_Scalars_Config): Removed.
1858 (Register_Opt_Config_Switches): Remove registering config values of
1859 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1860 (Restore_Opt_Config_Switches): Remove code which restores the values of
1861 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1862 Init_Or_Norm_Scalars.
1863 (Save_Opt_Config_Switches): Remove code which saves values of
1864 Init_Or_Norm_Scalars and Normalize_Scalars.
1865 (Set_Opt_Config_Switches): Remove code which restores config values of
1866 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1867 Init_Or_Norm_Scalars.
1869 2011-08-04 Yannick Moy <moy@adacore.com>
1871 * frontend.adb (Frontend): remove previous patch to avoid full
1872 qualification in ALFA mode.
1873 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1874 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1875 unique name for an entity, which could be used to identify the entity
1876 across compilation units.
1878 2011-08-04 Thomas Quinot <quinot@adacore.com>
1881 (Initialize_Default_Project_Path): Add target specific directory
1882 ($prefix/$target/lib/gnat) in front of project path in all cases
1883 (making gnatmake's behaviour consistent with gprbuild).
1884 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1885 Pass target name from Sdefault to project subsystem.
1886 * gnatls.adb: Show new target specific default project directory.
1888 2011-08-04 Johannes Kanig <kanig@adacore.com>
1890 * cstand.adb: Add Information to Identifier in Standard
1891 (Identifer_For): Set Entity to the corresponding entity
1893 2011-08-04 Sergey Rybin <rybin@adacore.com>
1895 * gnat_ugn.texi: Update doc on gnatcheck.
1897 2011-08-04 Yannick Moy <moy@adacore.com>
1899 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1902 2011-08-04 Yannick Moy <moy@adacore.com>
1904 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1905 performing expansion.
1906 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1907 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1908 it is not called in ALFA mode.
1910 2011-08-04 Emmanuel Briot <briot@adacore.com>
1912 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1913 after all, so removed.
1915 2011-08-04 Sergey Rybin <rybin@adacore.com>
1917 * vms_data.ads: Add missing VMS qualifiers.
1919 2011-08-04 Emmanuel Briot <briot@adacore.com>
1921 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1922 the list of files on the command line after processing it through
1925 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1927 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1928 processing for .NET/JVM. These targets can now benefit from
1929 Raise_From_Controlled_Operation and they share the same processing with
1931 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1932 These targets need transient scopes in order to properly finalize short
1933 lived controlled objects.
1934 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1935 NET/JVM. These targets can now benefit from
1936 Raise_From_Controlled_Operation and they share the same processing with
1939 2011-08-04 Geert Bosch <bosch@adacore.com>
1941 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1943 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1945 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1946 Expand_Record_Aggregate, to determine whether aggregate must be
1947 expanded into assignments. This is the case if the ancestor part is
1948 private, regarless of the setting of the flag Has_Private_Ancestor.
1950 2011-08-04 Ed Falis <falis@adacore.com>
1952 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1954 2011-08-04 Bob Duff <duff@adacore.com>
1956 * sinfo.ads: Fix comment.
1958 2011-08-04 Steve Baird <baird@adacore.com>
1960 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1961 choose a package name in much the same way as is
1962 done for JGNAT when VM_Target /= No_VM, except that
1963 a slightly more distinctive prefix string is used.
1965 2011-08-04 Emmanuel Briot <briot@adacore.com>
1967 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1968 gnatmake command line.
1969 This behavior was never documented (and was supported only because of
1970 an early bug in the code). This case might lead to ambiguous cases
1971 (between unit names and truncated base names without suffixes).
1973 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1975 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1976 Remove the external tag of a tagged type from the internal hash table.
1977 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1978 expanded usage of the routine. Strenghten the check for Is_Master. Add
1979 processing for tagged types.
1980 (Build_Finalizer): Create all the necessary lists used in finalizer
1981 creation when the processed context is a package that may contain
1983 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1984 Requires_Cleanup_Actions.
1985 (Expand_N_Package_Body): Package bodies may need clean up code
1986 depending on whether they contain tagged types.
1987 (Expand_N_Package_Declaration): Package declarations may need clean up
1988 code depending on whether they contain tagged types.
1989 (Unregister_Tagged_Types): New routine. Search through a list of
1990 declarations or statements, looking for non-abstract Ada tagged types.
1991 For each such type, generate code to unregister the external tag.
1992 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1993 Requires_Cleanup_Actions.
1994 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1995 through a list of declarations or statements looking for non-abstract
1996 Ada tagged types or controlled objects.
1997 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1998 Requires_Cleanup_Actions.
1999 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2000 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2003 2011-08-04 Vincent Celier <celier@adacore.com>
2005 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2006 has Ada sources, not project Project, because if the root project
2007 Project has no sources of its own, all projects will be deemed without
2010 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2012 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2013 of the No_Param_Proc acc-to-subp type used for initialization of
2014 __gnat_finalize_library_objects so that it's declared at library level
2015 rather than nested inside of the adainit routine.
2017 2011-08-04 Javier Miranda <miranda@adacore.com>
2019 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2020 if the tagged type has a representation clause which specifies its
2023 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2025 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2026 Remove previous procedure with that name.
2027 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2029 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2030 subtype mark, the ancestor cannot have unknown discriminants.
2031 (Resolve_Record_Aggregate): if the type has invisible components
2032 because of a private ancestor, the aggregate is illegal.
2034 2011-08-04 Vincent Celier <celier@adacore.com>
2036 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2037 account switches -gnat2005, -gnat12 and -gnat2012.
2039 2011-08-04 Bob Duff <duff@adacore.com>
2041 * s-tasdeb.ads: Minor comment fix.
2043 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2045 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2047 * switch.ads, switch.adb (Is_Language_Switch): New function.
2049 2011-08-04 Vincent Celier <celier@adacore.com>
2051 * switch-c.adb: Minor comment addition.
2053 2011-08-04 Vincent Celier <celier@adacore.com>
2055 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2056 ending with '=' is followed by a space (missing file name).
2058 2011-08-04 Pascal Obry <obry@adacore.com>
2060 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2062 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2064 * sem_ch12.adb (Analyze_Associations): New routine
2065 Check_Overloaded_Formal_Subprogram to reject a formal package when
2066 there is a named association or a box initialisation for an overloaded
2067 formal subprogram of the corresponding generic.
2069 2011-08-04 Yannick Moy <moy@adacore.com>
2071 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2072 * get_alfa.adb, put_alfa.adb: Read and write new component of
2074 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2076 2011-08-04 Pascal Obry <obry@adacore.com>
2078 * urealp.adb: Minor reformatting.
2080 2011-08-04 Tristan Gingold <gingold@adacore.com>
2082 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2083 Handle the case when Cleanup_Protected_Object returns Empty.
2085 2011-08-04 Yannick Moy <moy@adacore.com>
2087 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2089 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2091 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2092 call, ignore functions.
2094 2011-08-04 Geert Bosch <bosch@adacore.com>
2096 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2099 2011-08-04 Emmanuel Briot <briot@adacore.com>
2101 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2102 as an index for Builder'Switches. This conforms to the documentation.
2103 * make.adb (Insert_Project_Sources): avoid duplicate code
2105 2011-08-04 Emmanuel Briot <briot@adacore.com>
2107 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2108 name on the command line (for instance "../dummy"), never assume it can
2111 2011-08-04 Tristan Gingold <gingold@adacore.com>
2113 * bindgen.adb: Remove code the reference or create the
2114 Break_Start/__gnat_break_start procedure.
2115 * s-stalib.adb (Break_Start): Removed.
2117 2011-08-04 Emmanuel Briot <briot@adacore.com>
2119 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2120 shared with gprbuild.
2122 2011-08-04 Yannick Moy <moy@adacore.com>
2124 * par-ch4.adb (P_Primary): preferentially issue an error message about
2125 a missing parenthesis arount a conditional or case expression in Ada
2126 2012 mode, if we detect that the alignment is not correct for a
2129 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2131 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2132 tag-to-class-wide conversion as needing finalization actions.
2133 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2134 a tag-to-class-wide conversion as needing finalization actions.
2135 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2136 conversion does not need finalization actions.
2137 (Is_Tag_To_CW_Conversion): New routine.
2138 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2139 whether an object is the result of a tag-to-class-wide conversion.
2141 2011-08-04 Yannick Moy <moy@adacore.com>
2143 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2144 the left-hand-side and right-hand-side of a conjunct are inserted when
2145 translating a pre- or postcondition
2146 * sem_ch6.adb: Correct typo in comment
2148 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2150 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2151 Unchecked_Conversion and Unchecked_Deallocation.
2153 2011-08-04 Thomas Quinot <quinot@adacore.com>
2155 * make.adb: Minor reformatting.
2157 2011-08-04 Emmanuel Briot <briot@adacore.com>
2159 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2160 sources in the project and its imported projects, but not in the whole
2163 2011-08-04 Emmanuel Briot <briot@adacore.com>
2165 * make.adb: Remove debug trace.
2167 2011-08-04 Vincent Celier <celier@adacore.com>
2169 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2170 path in canonical form, to be able to compare path names on platforms
2171 such as Windows or Darwin.
2173 2011-08-04 Thomas Quinot <quinot@adacore.com>
2175 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2176 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2177 * scos.ads: Update documentation accordingly.
2178 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2181 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2183 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2184 attribute only if prefix type is scalar.
2186 2011-08-04 Emmanuel Briot <briot@adacore.com>
2188 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2189 in gnatmake for specifying mains on the command line that do not belong
2190 to the main project. These mains must currently all belong to the same
2192 (Ultimate_Extension_Of): removed, since duplicated
2193 Ultimate_Extending_Project.
2195 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2197 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2199 (CodePeer_Mode_String): New.
2200 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2202 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2203 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2204 mode, since no useful elaboration subprogram is needed by CodePeer.
2205 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2206 In this mode, compile binder file with -gnatC and do stop after this
2209 2011-08-04 Vincent Celier <celier@adacore.com>
2211 * exp_ch7.adb: Minor comment fix.
2213 2011-08-04 Robert Dewar <dewar@adacore.com>
2215 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2216 exp_ch4.adb, makeutl.adb: Minor reformatting.
2218 2011-08-04 Emmanuel Briot <briot@adacore.com>
2220 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2221 Create several new subprograms to move code out of Make. This makes the
2222 code more readable, removes code duplication, and is a preparation work
2223 for adding support for aggregate projects.
2225 2011-08-04 Tristan Gingold <gingold@adacore.com>
2227 * s-po32gl.ads, s-po32gl.adb: New files.
2228 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2229 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2230 (Build_Finalization_Collection): Use it.
2231 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2232 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2234 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2235 * gcc-interface/Make-lang.in: Update dependencies.
2237 2011-08-04 Emmanuel Briot <briot@adacore.com>
2239 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2242 2011-08-04 Emmanuel Briot <briot@adacore.com>
2244 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2245 command line is not a file name, also check whether it could be a unit
2248 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2250 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2251 the header of the finalization routine.
2252 If the unit has no finalizer but is a body whose spec has one, then
2253 generate the decrement of the elaboration entity only.
2254 If the unit has a finalizer and is a spec, then do not generate the
2255 decrement of the elaboration entity.
2256 (Gen_Finalize_Library_C): Likewise.
2258 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2260 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2261 (Bounds_Size_Expression): Removed.
2262 (Double_Alignment_Of): New subsidiary routine.
2263 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2264 for a hole in the dope vector of unconstrained arrays due to different
2265 index and element alignments.
2267 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2269 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2270 raise program_error because body has not been seen yet.
2272 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2274 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2277 2011-08-04 Vincent Celier <celier@adacore.com>
2279 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2281 2011-08-04 Yannick Moy <moy@adacore.com>
2283 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2284 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2286 2011-08-04 Thomas Quinot <quinot@adacore.com>
2288 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2289 instantiation in RCI.
2291 2011-08-04 Emmanuel Briot <briot@adacore.com>
2293 * make.adb: Share more code with gprbuild
2295 2011-08-04 Emmanuel Briot <briot@adacore.com>
2297 * projects.texi: Added documentation for the IDE'Gnat project file
2300 2011-08-04 Nicolas Roche <roche@adacore.com>
2302 * gnat_rm.texi: Minor editing.
2304 2011-08-04 Javier Miranda <miranda@adacore.com>
2306 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2307 and the library case for VM targets.
2308 (Gen_Adainit_Ada): Likewise.
2310 2011-08-04 Robert Dewar <dewar@adacore.com>
2312 * g-altive.ads: Minor comment updates.
2313 * prj-nmsc.adb: Minor reformatting.
2315 2011-08-04 Javier Miranda <miranda@adacore.com>
2318 (Normalize_Scalars_Config): Value of the configuration switch set by
2319 pragma Normalize_Scalars when it appears in the gnat.adc file.
2320 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2321 to save and restore settings of this pragma.
2323 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2324 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2326 2011-08-04 Vincent Celier <celier@adacore.com>
2328 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2330 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2332 * makeutl.adb: Minor reformatting.
2334 2011-08-04 Olivier Hainque <hainque@adacore.com>
2336 * g-altive.ads: Update comments to reflect that only the soft
2337 binding is available today.
2339 2011-08-04 Robert Dewar <dewar@adacore.com>
2341 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2342 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2343 * gcc-interface/Make-lang.in: Update dependencies.
2345 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2347 * prj-env.adb: Remove local debug traces.
2349 2011-08-04 Yannick Moy <moy@adacore.com>
2351 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2352 was used instead of Hi_OK, which could cause a read of an uninitialized
2353 value later on. Detected while working on the new warning.
2354 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2356 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2357 in more cases, in order to detect more unreferenced values.
2358 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2359 object for expression, if any.
2361 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2363 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2364 the operand types instead of the Esize.
2366 2011-08-04 Steve Baird <baird@adacore.com>
2368 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2369 enable CodePeer_Mode.
2370 * bindusg.adb (Display): Add help message describing -P binder switch.
2371 * gnat_ugn.texi: Document -P binder switch.
2372 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2373 user-defined main program directly.
2374 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2375 user-defined main program in the context clause of the package body.
2377 2011-08-04 Yannick Moy <moy@adacore.com>
2379 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2380 duplicate of Defining_Entity
2381 (Get_Unique_Entity_For_Decl): rename function into
2382 Unique_Defining_Entity
2383 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2384 (Formal_Proof_On): remove synthesized flag
2385 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2386 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2387 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2388 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2389 Annotate (Formal_Proof)
2391 2011-08-04 Emmanuel Briot <briot@adacore.com>
2393 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2394 source files with non-standard naming schemes, in imported projects
2396 2011-08-04 Emmanuel Briot <briot@adacore.com>
2398 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2399 specified on the gprbuild command line, we need to compile all units
2400 within that file, not just the first one we find
2401 Fix error message for mains that are not found.
2403 2011-08-04 Thomas Quinot <quinot@adacore.com>
2405 * sem_ch6.adb: Update comment.
2406 * sem_ch12.adb: Minor reformatting.
2408 2011-08-04 Bob Duff <duff@adacore.com>
2410 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2411 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2412 race condition whose symptom is to fail to lock Parent. That, in turn,
2413 causes Parent.Awake_Count to be accessed without locking Parent, which
2414 causes another race condition whose symptom is that Parent.Awake_Count
2415 can be off by 1 (either too high or too low). The solution is to lock
2416 Parent unconditionally, and then lock Acceptor, before reading
2417 Acceptor.Terminate_Alternative.
2419 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2421 * debug.adb: Update comment.
2423 2011-08-04 Robert Dewar <dewar@adacore.com>
2425 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2426 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2427 exp_ch6.adb: Minor reformatting.
2429 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2431 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2434 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2436 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2438 2011-08-04 Thomas Quinot <quinot@adacore.com>
2440 * sinfo.ads: Minor reformatting.
2442 2011-08-04 Emmanuel Briot <briot@adacore.com>
2444 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2445 even if there is no location.
2447 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2449 * sem_res.adb, sem_ch4.adb: move check for restriction
2450 No_Task_Hierarchy to resolve_allocator.
2452 2011-08-04 Thomas Quinot <quinot@adacore.com>
2454 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2455 This flag of N_Pragma nodes is not used, remove it as well as all of
2456 the associated circuitry.
2458 2011-08-04 Javier Miranda <miranda@adacore.com>
2460 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2461 runtime check on duplicated externa tags
2462 * debug.adb Document switch -gnatdQ.
2464 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2466 * a-fihema.ads: Minor typo fix.
2468 2011-08-04 Yannick Moy <moy@adacore.com>
2470 * sem_ch10.adb: Minor comment update.
2472 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2474 * einfo.adb: Update the node field usage to reflect the renaming of
2475 Return_Flag to Return_ Flag_Or_Transient_Decl.
2476 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2477 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2478 (Write_Field15_Name): Change Return_Flag to
2479 Return_Flag_Or_Transient_Decl.
2480 * einfo.ads: Rename node field Return_Flag to
2481 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2482 occurrences in entities.
2483 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2484 associated Inline pragma.
2485 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2486 associated Inline pragma.
2487 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2489 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2490 Return_Flag and Set_Return_Flag.
2491 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2492 objects generated for controlled transients declared inside an
2493 Exception_With_Actions. Update the calls to Return_Flag.
2494 (Process_Object_Declaration): Add code to add a null guard for hook
2495 objects generated for controlled transients declared inside an
2496 Exception_With_Actions. Update related comment.
2497 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2498 objects generated for controlled transients declared inside an
2499 Exception_With_Actions. Update the calls to Return_Flag.
2500 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2502 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2504 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2505 positional aggregate.
2507 2011-08-04 Vincent Celier <celier@adacore.com>
2509 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2510 SLOC only for pragmas.
2512 2011-08-04 Emmanuel Briot <briot@adacore.com>
2514 * projects.texi: Minor typo fix.
2516 2011-08-04 Emmanuel Briot <briot@adacore.com>
2518 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2519 on case-sensitive file systems.
2521 2011-08-04 Thomas Quinot <quinot@adacore.com>
2523 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2524 nested in a disabled pragma.
2525 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2526 enclosing pragma, if any, for X decisions.
2528 2011-08-04 Thomas Quinot <quinot@adacore.com>
2530 * sem_prag.adb: Minor reformatting.
2532 2011-08-04 Vincent Celier <celier@adacore.com>
2534 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2535 allowed in no run time mode.
2537 2011-08-04 Vincent Celier <celier@adacore.com>
2539 * make.adb (Check): When -gnatc is used, check for the source file
2540 inside the ALI file with a canonical case file name.
2542 2011-08-04 Emmanuel Briot <briot@adacore.com>
2544 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2545 overriding the separator.
2547 2011-08-04 Robert Dewar <dewar@adacore.com>
2549 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2550 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2552 2011-08-04 Robert Dewar <dewar@adacore.com>
2554 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2556 2011-08-04 Yannick Moy <moy@adacore.com>
2558 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2559 'Result only appears in postcondition of function.
2561 2011-08-04 Thomas Quinot <quinot@adacore.com>
2563 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2564 external tag, include the value of the external tag in the exception
2567 2011-08-04 Yannick Moy <moy@adacore.com>
2569 * sem_attr.adb (Result): modify error message for misplaced 'Result
2571 2011-08-04 Sergey Rybin <rybin@adacore.com>
2573 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2574 clear that the second argument must be an identifier.
2576 2011-08-04 Thomas Quinot <quinot@adacore.com>
2578 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2579 -fpreserve-control-flow, insert an IF statement on the barrier
2580 condition to ensure that a conditional branch instruction is generated.
2582 2011-08-04 Emmanuel Briot <briot@adacore.com>
2584 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2585 (Processing_Flags.Ignore_Missing_With): new flag.
2587 2011-08-04 Emmanuel Briot <briot@adacore.com>
2589 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2590 Source_List_File on case-insensitive systems where the file is actually
2591 on a case-sensitive file system (NFS,...).
2593 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2595 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2596 function return contains a controlled [extension] aggregate and the
2597 return statement is not part of a handled sequence of statements, wrap
2598 the return in a block. This ensures that all controlled temporaries
2599 generated during aggregate resolution will be picked up by the
2600 finalization machinery.
2602 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2604 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2605 components, freeze type before resolution, to ensure that default
2606 initializations are present for all components.
2607 * sem_res.adb (Resolve_Actuals): the designated object of an
2608 accces-to-constant type is a legal actual in a call to an
2609 initialization procedure.
2611 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2613 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2614 N_Unchecked_Type_Conversion to the possible containers of a renamed
2617 2011-08-04 Yannick Moy <moy@adacore.com>
2619 * par-ch13.adb (Aspect_Specifications_Present): recognize
2620 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2621 is issued in Strict mode.
2622 * par.adb: Fix typos in comments.
2624 2011-08-04 Yannick Moy <moy@adacore.com>
2626 * sem_attr.adb (Result): modify error message to take into account Post
2627 aspect when compiling Ada 2012 (or newer) code.
2629 2011-08-04 Nicolas Roche <roche@adacore.com>
2631 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2632 remove need for GCC exceptions.
2634 2011-08-04 Vincent Celier <celier@adacore.com>
2636 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2637 project, not the source file name.
2638 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2639 excluded, continue looking. This excluded source will only be returned
2640 if there is no other source with the same base name that is not locally
2643 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2645 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2646 private and one of the operands is a real literal, use a qualified
2647 expression rather than a conversion which is not meaningful to the
2650 2011-08-04 Yannick Moy <moy@adacore.com>
2652 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2653 corresponding aspect X'Class are allowed, proceed with analysis of the
2654 aspect instead of skipping it.
2656 2011-08-04 Tristan Gingold <gingold@adacore.com>
2658 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2659 This will allow to have an Ada implementation for the subprogram.
2661 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2663 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2664 completion and aspects are present, apply them to the entity for the
2665 type which is currently the partial view, but which is the one that
2667 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2668 applies to a partial view, indicate that the full view has predicates
2669 and delayed aspects.
2670 (Replace_Type_Reference): Handle properly predicates that apply to the
2671 full view of a private completion.
2673 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2675 * layout.adb (Layout_Type): For composite types, do not set Esize.
2676 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2678 (Size_Known): Look at the RM size of components instead of the Esize.
2679 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2680 issue warning and activate Implicit_Packing.
2681 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2682 if the Esize is not known.
2683 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2684 for elementary types only.
2685 (Analyze_Record_Representation_Clause): Look at the RM size instead
2686 of the Esize to issue errors.
2687 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2689 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2691 Look at the RM size instead of the Esize for types if the latter is
2693 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2695 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2697 * sem_type.adb: proper handling of equality not involving anonymous
2700 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2702 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2703 Vis_Decls. When creating a library-level finalizer for a package spec,
2704 both the declaration and body of the finalizer are inserted either in
2705 the visible or private declarations of the package spec.
2707 2011-08-04 Javier Miranda <miranda@adacore.com>
2709 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2710 use of the full-view of a type when invoking Is_Ancestor.
2711 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2712 the full-view of private parents is requested, then use also the
2713 full-view of the parent of the first derivation.
2715 2011-08-04 Tristan Gingold <gingold@adacore.com>
2717 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2718 instead of the locally imported procedure.
2719 * s-taprop-mingw.adb (Enter_Task): Ditto.
2720 * s-valrea.adb (Scan_Real): Ditto.
2721 * s-imgrea.adb (Set_Image_Real): Ditto.
2722 * s-flocon.ads: Make the package pure.
2724 2011-08-04 Thomas Quinot <quinot@adacore.com>
2726 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2727 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2728 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2729 New subprogram, moved here from...
2730 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2731 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2732 rewriting of the last argument into a procedure call statement here...
2733 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2736 2011-08-04 Thomas Quinot <quinot@adacore.com>
2738 * par_sco.adb: Minor reformatting.
2740 2011-08-04 Robert Dewar <dewar@adacore.com>
2742 * erroutc.adb: Minor reformatting.
2744 2011-08-04 Thomas Quinot <quinot@adacore.com>
2746 * par_sco.adb: Comment update.
2748 2011-08-04 Tristan Gingold <gingold@adacore.com>
2750 * s-flocon.ads: New file.
2751 * g-flocon.ads: Now a renaming of s-flocon.
2752 * Makefile.rtl: Add s-flocon.o
2754 2011-08-04 Javier Miranda <miranda@adacore.com>
2756 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2757 constrained, do not attempt to build a subtype of it.
2759 2011-08-04 Yannick Moy <moy@adacore.com>
2761 * errout.ads Change comments: remove 'R'M as an example where quotes
2762 are needed; add ALFA as another case where quotes are not needed
2763 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2764 case where quotes are not needed.
2765 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2766 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2767 Remove all occurrences of 'A'L'F'A
2769 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2771 * sem_ch13.adb: check legality of invariant pragma.
2773 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2775 * bindgen.adb: Add comments.
2777 2011-08-04 Yannick Moy <moy@adacore.com>
2779 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2781 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2782 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2784 2011-08-04 Robert Dewar <dewar@adacore.com>
2786 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2787 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2788 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2790 2011-08-04 Thomas Quinot <quinot@adacore.com>
2792 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2794 2011-08-04 Thomas Quinot <quinot@adacore.com>
2797 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2800 2011-08-04 Robert Dewar <dewar@adacore.com>
2802 * einfo.ads, exp_ch4.adb: Minor reformatting.
2804 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2806 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2808 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2810 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2811 type in all cases to compute list of primitive operations, because full
2812 view may be an itype that is not attached to the list of declarations.
2814 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2816 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2817 library has already been finalized.
2818 (Gen_Adafinal_C): Likewise.
2819 (Gen_Adainit_Ada): Generate an early return if the library has
2820 already been elaborated.
2821 (Gen_Adainit_C): Likewise.
2822 (Gen_Output_File_Ada): Generate an elaboration flag.
2823 (Gen_Output_File_C): Likewise.
2825 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2827 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2828 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2829 built in the first place.
2830 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2831 for CodePeer because Finalize_Address was not built to begin with.
2832 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2834 2011-08-04 Pascal Obry <obry@adacore.com>
2836 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2837 filenames, this ensures unicity of filenames across processes.
2839 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2841 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2842 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2843 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2844 Add False as the actual to From_Abort in the generated call to
2845 Raise_From_Controlled_Operation.
2847 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2849 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2850 so that the ali file name can be retrieved from outside of this package.
2851 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2852 doing nothing in the general case, but used to update the object file
2853 timestamp if directly generated by the backend.
2854 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2855 to a later time than the ali file one.
2857 2011-08-04 Yannick Moy <moy@adacore.com>
2859 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2860 entities whose body contains an Annotate pragma which forces formal
2862 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2863 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2864 Mark_Non_ALFA_Subprogram to pass in a message and node.
2865 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2866 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2867 surrounding subprogram.
2868 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2869 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2870 as not in ALFA is annotated with Formal_Proof being On, then an error
2871 is issued based on the additional parameters for message and node.
2872 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2873 * gcc-interface/Make-lang.in: Update dependencies.
2875 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2877 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2878 Finalize_Address when CodePeer is enabled.
2880 2011-08-04 Pascal Obry <obry@adacore.com>
2882 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2883 the latter returns a pointer to a static buffer which is deallocated
2884 at the end of the routine.
2886 2011-08-04 Yannick Moy <moy@adacore.com>
2888 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2889 after index creation; mark unconstrained base array type generated as
2890 being in/not in ALFA as well
2891 (Make_Index): mark subtype created as in/not in ALFA
2892 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2893 over a loop as in/not in ALFA, depending on its type and form of loop
2896 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2898 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2899 directly to False on .NET and JVM.
2901 2011-08-04 Yannick Moy <moy@adacore.com>
2903 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2904 constraint that subtype must come from source code to be in ALFA, so
2905 that anonymous subtypes can be in ALFA too.
2907 2011-08-04 Yannick Moy <moy@adacore.com>
2909 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2910 reference for ALFA mode.
2911 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2912 procedure public so as to use it from formal verification back-end.
2914 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2916 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2917 invalid checks of the Parameter, making Remove_Switch not working
2920 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2922 * targparm.ads: Update header: no run-time exception is needed on this
2925 2011-08-04 Vincent Celier <celier@adacore.com>
2927 * a-fihema.adb: Use System.IO instead of GNAT.IO
2929 2011-08-04 Thomas Quinot <quinot@adacore.com>
2931 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2932 are forbidden in Compiler_Unit mode.
2934 2011-08-04 Robert Dewar <dewar@adacore.com>
2936 * sem_util.adb: Minor reformatting.
2938 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2940 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2941 library-level finalizers.
2942 (Gen_Finalize_Library_C): Update the import string for library-level
2944 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2945 library-level finalizer.
2946 * exp_ch7.adb: Remove with and use clauses for Stringt.
2947 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2948 Spec_Decl. Add local variable Body_Id. The names of library-level
2949 finalizers are now manually fully qualified and are no longer external.
2950 A single name is now capable of servicing .NET, JVM and non-VM targets.
2951 Pragma Export is no longer required to provide visibility for the name.
2952 (Create_Finalizer_String): Removed.
2953 (New_Finalizer_Name): New routine which mimics New_..._Name.
2955 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2957 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2958 elaboration counter to Standard_Short_Integer.
2959 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2960 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2961 (Gen_Elab_Externals_C): Likewise.
2963 2011-08-04 Ed Falis <falis@adacore.com>
2965 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2966 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2967 system-vxworks-mips.ads, system-vxworks-x86.ads
2968 (Always_Compatible_Rep): set to False for all VxWorks targets.
2970 2011-08-04 Robert Dewar <dewar@adacore.com>
2972 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2973 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2974 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2975 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2976 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2977 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2978 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2979 Minor reformatting and code reorganization.
2981 2011-08-04 Emmanuel Briot <briot@adacore.com>
2983 * projects.texi: Added doc for aggregate projects.
2985 2011-08-04 Emmanuel Briot <briot@adacore.com>
2987 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2988 Add support for overriding the Project_Path in aggregate projects.
2990 2011-08-04 Robert Dewar <dewar@adacore.com>
2992 * a-cofove.ads: Minor reformatting.
2994 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2996 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2997 on the generated code.
2998 (Build_Finalize_Statements): Update the comment on the generated code.
2999 (Build_Initialize_Statements): Update the comment on the generated code.
3000 (Build_Object_Declarations): Add local variable Result. The object
3001 declarations are now built in sequence.
3002 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3005 2011-08-04 Robert Dewar <dewar@adacore.com>
3007 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3009 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3011 * einfo.ads (Elaboration_Entity): Document new definition and use.
3012 (Elaboration_Entity_Required): Adjust to above change.
3013 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3014 * exp_ch12.adb: And with and use for Snames.
3015 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3016 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3017 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3018 <Check_Unit_Name>: Deal with N_Expanded_Name.
3019 <Attribute_Elaborated>: Extend to all unit names.
3020 * sem_elab.adb: And with and use for Uintp.
3021 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3022 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3023 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3024 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3025 from Gen_Adainit_Ada.
3026 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3027 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3028 case, do not call System.Standard_Library.Adafinal; instead call
3029 finalize_library if needed.
3030 (Gen_Adafinal_C): Likewise.
3031 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3032 non-main program case.
3033 (Gen_Adainit_C): Generate a couple of external declarations here.
3034 In the main program case, set SSL.Finalize_Library_Objects.
3035 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3036 (Gen_Elab_Calls_C): Likewise.
3037 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3038 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3039 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3041 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3042 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3044 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3045 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3046 of external declarations. Call Gen_Finalize_Library_C.
3048 2011-08-04 Emmanuel Briot <briot@adacore.com>
3050 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3051 Compute_Compilation_Phases): new subprogram.
3052 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3053 The number of mains as well as the various compilation phases that
3054 need to be run are now project tree specific, since various
3055 aggregated trees might have different requirements. In particular,
3056 they do not all require bind or link phases.
3058 2011-08-04 Emmanuel Briot <briot@adacore.com>
3060 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3061 (Project_Tree_Appdata): New type.
3062 It is now possible to associate application-specific data to a project
3063 tree. In particular, this is used in the gprbuild builder to avoid a
3064 number of global tables and htables, especially now that there can be
3065 several project trees loaded at once because of aggregate projects.
3066 (Debug_Name): new procedure.
3067 * projects.texi: Clarify syntax of "**" for Source_Dirs
3069 2011-08-03 Emmanuel Briot <briot@adacore.com>
3071 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3072 the "roots" for a main.
3073 (Fill_From_Project): add support for aggregate projects. Main units
3074 in aggregated projects are now automatically added in the list of
3075 files to build (although this fails later on in gprbuild, because
3076 these files are not using the root proejct tree, so this needs
3078 * gcc-interface/Make-lang.in: Update dependencies.
3080 2011-08-03 Yannick Moy <moy@adacore.com>
3082 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3083 conditional expression in ALFA.
3084 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3085 expressions as not in ALFA.
3087 2011-08-03 Robert Dewar <dewar@adacore.com>
3089 * a-cofove.adb: Minor reformatting.
3091 2011-08-03 Emmanuel Briot <briot@adacore.com>
3093 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3094 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3096 These packages are more logically placed in the Queue package, since
3097 they manipulate the queue. It is also likely that they can be adapted
3098 for gnatmake, thus sharing more code.
3099 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3100 that we could move the above.
3102 2011-08-03 Emmanuel Briot <briot@adacore.com>
3104 * errutil.adb (Finalize): clean up the list of error messages on exit.
3105 Calling this subprogram multiple times will no longer show duplicate
3106 error messages on stderr.
3108 2011-08-03 Emmanuel Briot <briot@adacore.com>
3110 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3111 Getopt_Switches when we have already define a command line
3114 2011-08-03 Yannick Moy <moy@adacore.com>
3116 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3117 in ALFA. Instead, they are considered as assertions to prove.
3118 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3119 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3120 if they have no ELSE part, or if they occur in pre- and postconditions,
3121 where the Condition cannot have side-effects in ALFA
3122 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3123 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3124 Instead, include type conversion between scalar types in ALFA.
3125 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3126 if-and-only-if its type is in ALFA.
3128 2011-08-03 Thomas Quinot <quinot@adacore.com>
3130 * scos.adb, get_scos.adb, put_scos.adb
3131 New code letter for decisions: G (entry guard)
3133 (Traverse_Subprogram_Body): Rename to...
3134 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3135 (Traverse_Protected_Body): New subprogram
3136 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3137 protected bodies and entry bodies.
3139 2011-08-03 Yannick Moy <moy@adacore.com>
3141 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3142 entities with get/set subprograms, which is set on procedure entities
3143 generated by the compiler for a postcondition.
3144 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3145 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3146 entity for a declaration
3147 (Get_Unique_Entity_For_Decl): new function returning an entity which
3148 represents a declaration, so that matching spec and body have the same
3151 2011-08-03 Robert Dewar <dewar@adacore.com>
3153 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3154 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3156 2011-08-03 Yannick Moy <moy@adacore.com>
3158 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3159 library-level because retriction No_Implicit_Dynamic_Code in the
3160 front-end prevents its definition as a local subprogram
3161 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3162 for reuse in other contexts
3163 (Traverse_Declarations_Or_Statements,
3164 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3165 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3166 procedures take a callback parameter to be called on all declarations
3168 (Traverse_All_Compilation_Units): new generic function to traverse a
3169 compilation unit and call a callback parameter on all declarations
3171 2011-08-03 Javier Miranda <miranda@adacore.com>
3173 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3174 in Java since they are always enclosed in a namespace that
3175 differentiates them, and overloaded entities are supported by the VM.
3177 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3179 * checks.adb (Determine_Range): If a computed bound of an operation is
3180 outside the range of the base type of the expression, and overflow
3181 checks are enabled, the result is unknown and cannot be used for any
3182 subsequent constant folding.
3183 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3184 unknown, so is the result of the comparison.
3186 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3188 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3189 From_Abort. When finalization was triggered by an abort, propagate
3190 Standard'Abort_Signal rather than Program_Error.
3191 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3193 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3194 From_Abort. When finalization was triggered by an abort, propagate
3195 Standard'Abort_Signal rather than Program_Error.
3196 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3198 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3199 Abort_Id. Update the calls to Build_Object_Declarations and
3200 Build_Raise_Statement to include Abort_Id.
3201 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3202 calls to Build_Object_Declarations and Build_Raise_Statement to include
3204 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3205 calls to Build_Object_Declarations and Build_Raise_Statement to include
3207 (Build_Components): Create an entity for Abort_Id when exceptions are
3208 allowed on the target.
3209 (Build_Finalizer): New local variable Abort_Id.
3210 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3211 calls to Build_Object_Declarations and Build_Raise_Statement to include
3213 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3214 declaration of flag Abort_Id to preserve the original abort status
3215 before finalization code is executed.
3216 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3217 runtime routine Raise_From_Controlled_Operation.
3218 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3219 Abort_Id. Update the call to Build_Object_Declarations to include
3220 Abort_Id. Update the layout of the finalizer body.
3221 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3222 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3223 clunky code to create all flags and objects related to
3224 exception propagation and replace it with a call to
3225 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3227 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3228 Add new formal Abort_Id and associated comment on its use.
3229 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3231 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3232 Remove the clunky code to create all flags and objects related to
3233 exception propagation and replace it with a call to
3234 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3236 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3238 * s-tassta.adb: Fix minor typos.
3240 2011-08-03 Robert Dewar <dewar@adacore.com>
3242 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3243 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3245 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3247 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3248 to packages. This ensures that the finalizer body will not end up
3249 inside the freeze node.
3250 (Process_Declarations): Add code to detect whether a freeze node has a
3251 nested finalization collection.
3253 2011-08-03 Pascal Obry <obry@adacore.com>
3255 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3256 (Current_Session): Return a not null access to Session_Type.
3257 (Default_Session): Likewise.
3259 2011-08-03 Robert Dewar <dewar@adacore.com>
3261 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3262 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3264 2011-08-03 Pascal Obry <obry@adacore.com>
3266 * g-awk.ads: Minor comment fix.
3268 2011-08-03 Sergey Rybin <rybin@adacore.com>
3270 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3271 the tree structure related to discriminant constraints.
3272 Original_Discriminant cannot be used any more for computing the
3273 defining name for the reference to a discriminant.
3275 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3277 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3278 function is not visibly tagged, this is not a dispatching call and
3279 therfore is not Tag_Indeterminate, even if the function is marked as
3280 dispatching on result.
3282 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3284 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3285 (Expand_N_Free_Statement): Add a guard to protect against run-times
3286 which do not support controlled types.
3287 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3288 against run-times which do not support controlled types.
3289 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3290 against run-times which do not support controlled types.
3291 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3292 against run-times which do not support controlled types.
3293 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3294 protect against run-times which do not support controlled types.
3296 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3298 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3299 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3301 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3303 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3304 modified in the source, to prevent spurious warnings when compiling
3307 2011-08-03 Thomas Quinot <quinot@adacore.com>
3309 * a-except-2005.adb: Minor reformatting.
3311 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3313 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3314 is a renaming declaration in the private part of a package, do not emit
3315 a warning that the with_clause could be moved because the renaming may
3316 be used in the body or in a child unit.
3318 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3320 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3321 Propagate the Comes_From_Source attribute from the original return
3322 object to the renaming.
3324 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3326 * exp_ch7.adb (Build_Raise_Statement): Do not call
3327 Raise_From_Controlled_Operation when this routine is not present in
3328 the run-time library.
3329 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3330 libraries (Ravenscar), tasks are non-terminating, and protected objects
3331 and tasks can only appear at library level, so we do not want
3332 finalization of protected objects nor tasks.
3333 * exp_intr.adb: Minor clarification in comment.
3334 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3335 Gen_Output_File_C): Remove references to finalization of library-level
3336 objects when using restricted run-time libraries.
3338 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3340 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3341 Original_Discriminant only if the parent type is a generic formal.
3343 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3345 * exp_ch13.adb: Add with and use clause for Targparm;
3346 (Expand_N_Free_Statement): Prevent the generation of a custom
3347 Deallocate on .NET/JVM targets since this requires pools and address
3349 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3350 .NET/JVM targets, attach the newly allocated object to the access
3351 type's finalization collection. Do not generate a call to
3352 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3353 exist in the runtime.
3354 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3355 create a custom Allocate for object that do not require initialization.
3356 Attach a newly allocated object to the access type's finalization
3357 collection on .NET/JVM.
3358 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3359 assignment of controlled types on .NET/JVM. The two hidden pointers
3360 Prev and Next and stored and later restored after the assignment takes
3362 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3363 kludge for .NET/JVM to recognize a particular piece of code coming from
3364 Heap_Management and change the call to Finalize into Deep_Finalize.
3365 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3366 finalization collections on .NET/JVM only for types derived from
3367 Controlled. Separate the association of storage pools with a collection
3368 and only allow it on non-.NET/JVM targets.
3369 (Make_Attach_Call): New routine.
3370 (Make_Detach_Call): New routine.
3371 (Process_Object_Declarations): Suppress the generation of
3372 build-in-place return object clean up code on .NET/JVM since it uses
3374 * exp_ch7.ads (Make_Attach_Call): New routine.
3375 (Make_Detach_Call): New routine.
3376 * exp_intr.adb Add with and use clause for Targparm.
3377 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3378 on .NET/JVM targets.
3379 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3380 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3381 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3382 names used in finalization.
3384 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3386 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3387 (Attach, Detach): Lock the current task when chaining an object onto a
3390 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3392 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3393 Rewritten to create the message strings when the exception is not
3394 raised by an abort during finalization.
3395 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3396 Raise_From_Controlled_Operation and update its associated comment.
3397 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3398 Ada.Finalization.Heap_Management provides key functionality
3399 associated with controlled objects on the heap, their creation,
3400 finalization and reclamation. Type Finalization_Collection is
3401 effectively a wrapper which sits ontop of a storage pool and performs
3402 all necessary bookkeeping for all the objects it contains. Each
3403 access-to-controlled or access-to-class-wide type receives a collection
3404 as part of its expansion. The compiler generates buffer code and
3405 invokes Allocate / Deallocate to create and destroy allocated
3407 * a-finali.adb ("="): Removed.
3408 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3409 fields Prev and Next.
3410 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3411 A library unit with at least one controlled object on the library level
3412 has a special finalizer which is invoked by the binder. To signal this,
3413 ali files carry field PF.
3414 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3415 associated comment on field usage.
3416 * a-tags.adb (Get_RC_Offset): Removed.
3417 (Needs_Finalization): New routine.
3418 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3419 Dispatch tables now carry field Needs_Finalization which provides
3420 runtime indication whether a type is controlled or has controlled
3421 components or both. Remove field RC_Offset.
3422 (Get_RC_Offset): Removed along with its associated pragma Export.
3423 Since tagged types with controlled components no longer carry hidden
3424 field _controller, the special mechanism to retrieve its location is no
3426 (Needs_Finalization): New routine.
3427 * atree.ads, atree.adb (Elist24): New routine.
3428 (Set_Elist24): New routine.
3429 * atree.h: Add a define clause for Elist24.
3430 * bindgen.adb New library-level variable Lib_Final_Built.
3431 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3432 presence of a VM target, the routine generates calls to the proper
3433 library finalization routine.
3434 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3435 targets. Set the correct library finalization routine depending on
3436 whether the library has controlled objects or this is a VM compilation.
3437 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3438 to library-level finalizers of compiled units in reverse order of
3439 elaboration. It also produces exception management code and reraises a
3440 potential exception after all units have been finalized.
3441 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3442 library-level finalizers of compiled units in reverse order of
3444 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3445 definitions of all library-level finalizers available to the compilation
3446 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3448 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3449 System.Standard_Library.Adafinal directly. If the library needs
3450 finalization actions, create the sequence of finalization calls.
3451 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3452 Generate a with clause for System.Soft_Links when compiling for a VM.
3453 Remove the code which imports System.Standard_Library.Adafinal as
3454 Do_Finalize. Generate the library finalization routine.
3455 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3456 If the library needs finalization actions, create all the definitions
3457 of library- level finalizers.
3458 (Has_Finalizer): New routine. Determines whether at least one compiled
3459 unit has a library-level finalizer.
3460 Add type Qualification_Mode.
3461 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3462 * einfo.adb: New usage of field 15 as Return_Flag.
3463 Remove Finalization_Chain_Entity from the usages of field 19.
3464 Remove Associated_Final_Chain from the usages of field 23.
3465 New usage of field 23 as Associated_Collection.
3466 New usage of field 24 as Finalizer.
3467 New usage of flag 252 as Is_Processed_Transient.
3468 (Associated_Final_Chain): Removed.
3469 (Associated_Collection): New routine.
3470 (Finalization_Chain_Entity): Removed.
3471 (Finalizer): New routine.
3472 (Is_Finalizer): New routine.
3473 (Is_Processed_Transient): New routine.
3474 (Return_Flag): New routine.
3475 (Set_Associated_Final_Chain): Removed.
3476 (Set_Associated_Collection): New routine.
3477 (Set_Finalization_Chain_Entity): Removed.
3478 (Set_Finalizer): New routine.
3479 (Set_Is_Processed_Transient): New routine.
3480 (Set_Return_Flag): New routine.
3481 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3483 (Write_Field8_Name): Alphabetize the output.
3484 (Write_Field11_Name): Alphabetize the output.
3485 (Write_Field12_Name): Alphabetize the output.
3486 (Write_Field13_Name): Alphabetize the output.
3487 (Write_Field14_Name): Alphabetize the output.
3488 (Write_Field15_Name): Alphabetize the output.
3489 (Write_Field16_Name): Alphabetize the output.
3490 (Write_Field17_Name): Alphabetize the output.
3491 (Write_Field18_Name): Alphabetize the output.
3492 (Write_Field19_Name): Alphabetize the output. Remove the output of
3493 Finalization_Chain_Entity.
3494 (Write_Field20_Name): Alphabetize the output.
3495 (Write_Field21_Name): Alphabetize the output.
3496 (Write_Field22_Name): Alphabetize the output.
3497 (Write_Field23_Name): Alphabetize the output. Remove the output of
3498 Associated_Final_Chain. Add output for Associated_Collection.
3499 (Write_Field24_Name): Alphabetize the output.
3500 (Write_Field25_Name): Add output for Finalizer.
3501 (Write_Field26_Name): Alphabetize the output.
3502 (Write_Field27_Name): Alphabetize the output.
3503 (Write_Field28_Name): Alphabetize the output.
3504 * einfo.ads: Add new field description for Associated_Collection and
3506 Remove Associated_Final_Chain and its uses in nodes.
3507 Remove Finalization_Chain_Entity and its uses in nodes.
3508 Add new field description for Finalizer and its uses in nodes.
3509 Add new synthesized attribute Is_Finalizer.
3510 Add new flag description for Is_Processed_Transient and its uses in
3512 Add new field description for Return_Flag and its uses in nodes.
3513 (Associated_Final_Chain): Removed along with its pragma Inline.
3514 (Associated_Collection): New routine and pragma Inline.
3515 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3516 (Finalizer): New routine and pragma Inline.
3517 (Is_Finalizer): New routine and pragma Inline.
3518 (Is_Processed_Transient): New routine and pragma Inline.
3519 (Return_Flag): New routine and pragma Inline.
3520 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3521 (Set_Associated_Collection): New routine and pragma Inline.
3522 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3523 (Set_Finalizer): New routine and pragma Inline.
3524 (Set_Is_Processed_Transient): New routine and pragma Inline.
3525 (Set_Return_Flag): New routine and pragma Inline.
3526 * exp_aggr.adb: Alphabetize subprograms.
3527 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3528 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3529 associated comments. Remove local variables External_Final_List and
3531 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3532 Ancestor. Remove the retrieval of finalization lists. Update the call to
3534 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3535 lists. Update the call to Late_Expansion.
3536 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3537 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3538 (Gen_Assign): Remove the retrieval of the finalization list used to
3539 build the assignment. Update the calls to Make_Init_Call and
3541 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3542 Remove the mechanism to determine attachment levels and finalization
3543 list retrieval. Remove the processing for coextensions.
3544 (Init_Controller): Removed. Controllers no longer exist.
3545 (Late_Expansion): Remove formals Flist and Obj along with their
3546 associated comments. Update the calls to Build_Record_Aggr_Code and
3547 Build_Array_Aggr_Code.
3548 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3549 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3550 appear in entry bodies, protected subprograms and task bodies.
3551 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3552 * exp_ch3.adb (Add_Final_Chain): Removed.
3553 (Build_Array_Init_Proc): Alphabetize local variables.
3554 (Build_Assignment): Alphabetize local variables. Update the call to
3556 (Build_Class_Wide_Master): Rename local variables to better reflect
3558 (Build_Discriminant_Assignments): Code reformatting.
3559 (Build_Init_Call_Thru): Code reformatting.
3560 (Build_Init_Procedure): Code reformatting. Generate a special version
3561 of Deep_Finalize which is capable of finalizing all initialized
3562 components and ignore the rest.
3563 (Build_Init_Statements): Rename local variables to better reflect their
3565 Reimplement the mechanism to include the creation and update of an index
3566 variable called a "counter". It is used as a bookmark for tracing
3567 initialized and non-initialized components.
3568 (Build_Initialization_Call): Remove local variable Controller_Typ.
3569 Alphabetize all local variables. Remove the initialization of the
3570 record controller and update the call to Make_Init_Call.
3571 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3572 New local variable Counter.
3573 (Constrain_Array): Alphabetize.
3574 (Expand_Freeze_Array_Type): Create a collection instead of a
3576 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3577 Finalize_Address which is used in conjunction with allocated controlled
3579 (Expand_N_Object_Declaration): Remove the creation of a finalization
3580 list for anonymous access types. Update the calls to Make_Init_Call and
3582 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3583 retrieval of finalization lists. Remove the expansion of the record
3584 controller. Create TSS primitive Finalize_Address used in conjunction
3585 with controlled objects on the heap. Create finalization collections
3586 for access-to-controlled record components.
3587 (Expand_Record_Controller): Removed.
3588 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3589 class-wide types now requires additional processing. Create
3590 finalization collections for access-to-controlled types.
3591 (Increment_Counter): New routine.
3592 (Make_Counter): New routine.
3593 (Make_Eq_If): Remove the mention of Name_uController.
3594 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3595 types coming from System.Finalization_Root.
3596 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3597 (Predefined_Primitive_Bodies): There is no longer need to skip types
3598 coming from System.Finalization_Root.
3599 (Stream_Operation_OK): Do not generate stream routines for
3600 type Ada.Finalization.Heap_Management.Finalization_Collection.
3601 * exp_ch3.ads: Alphabetize subprograms.
3602 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3603 Add with and use clause for Lib.
3604 (Complete_Coextension_Finalization): Removed.
3605 (Complete_Controlled_Allocation): New routine. Create a finalization
3606 collection for anonymous access-to-controlled types. Create a custom
3607 Allocate which interfaces with the back end and the machinery in
3609 (Expand_Allocator_Expression): Add necessary calls to
3610 Complete_Controlled_Allocation. Remove the retrieval of finalization
3611 lists. Update the calls to Make_Adjust_Call. Generate a call to
3612 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3613 the associated collection.
3614 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3615 Code clean up. Remove the retrieval of finalization lists and
3617 Update the call to Make_Init_Call. Generate a call to
3618 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3619 the associated collection.
3620 (Get_Allocator_Final_List): Removed. Finalization lists are not
3622 (Suitable_Element): Remove the mention of Name_uController.
3623 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3624 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3625 the left hand side, carry out the assignment and adjust the left hand
3627 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3628 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3629 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3630 BIP_Collection and BIPcollection.
3631 (Build_Heap_Allocator): New routine used to allocate the return object
3632 of a build-in-place function onto a collection.
3633 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3634 (Expand_Call): Do not replace direct calls to Deep routines with their
3636 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3637 and update their occurrences. Add a special return flag to monitor the
3638 [ab]normal execution of the function. The flag is set right before the
3640 Rewrite the mechanism used to allocate a build-in-place return object
3641 on the heap or on a storage pool.
3642 (Is_Direct_Deep_Call): New routine.
3643 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3644 build-in-place function call instead of a final list. Build a call to
3645 Set_Finalize_Address_Ptr to decorate the associated collection.
3646 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3647 order to name the build-in-place function call's result for later
3648 finalization. Add a collection to a build-in-place function call
3649 instead of a final list.
3650 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3651 build-in-place function call instead of a final list. Remove the code
3652 which moves one final list and transforms it into the actual in a
3653 nested build-in-place call.
3654 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3655 build-in-place function call instead of a final list.
3656 (Move_Final_List): Removed.
3657 (Needs_BIP_Collection): New routine.
3658 (Needs_BIP_Final_List): Removed.
3659 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3660 enumeration type BIP_Formal_Kind.
3661 Update the related comment.
3662 (Needs_BIP_Collection): New routine.
3663 (Needs_BIP_Final_List): Removed.
3664 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3665 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3666 majority of subprograms in this unit. Add Name_Finalize_Address to
3667 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3668 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3669 statements for an array type.
3670 (Build_Adjust_Statements): Create the adjust statements for a record
3672 (Build_Cleanup_Statements): New routine. A procedure which given any
3673 construct containing asynchronous calls, references to _master, or is a
3674 task body, a task allocation or a protected body produces the necessary
3675 runtime calls to clean up these constructs.
3676 (Build_Exception_Handler): New routine.
3677 (Build_Final_List): Removed.
3678 (Build_Finalization_Collection): New routine. A core procedure which
3679 creates a collection to service heap allocated controlled objects
3680 associated with an access-to-controlled type.
3681 (Build_Finalize_Statements): Create the finalization statements for a
3683 (Build_Finalizer): New routine. A core procedure which given any
3684 construct with declarations and/or statements detects all objects which
3685 need any type of clean up (controlled objects, protected objects) and
3686 generates all necessary code to clean up the said objects in the proper
3688 (Build_Finalizer_Call): New routine.
3689 (Build_Initialize_Statements): Create the initialization statements for
3690 an array type. The generated routine contains code to finalize partially
3692 (Build_Object_Declarations): New routine.
3693 (Build_Raise_Statement): New routine.
3694 (Clean_Simple_Protected_Objects): Removed.
3695 (Controller_Component): Removed.
3696 (Enclosing_Function): New routine.
3697 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3698 either declarations or statements or both.
3699 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3700 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3702 (Find_Final_List): Removed.
3703 (Global_Flist_Ref): Removed.
3704 (In_Finalization_Root): Removed.
3705 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3706 scope in terms of tree nodes. Process all transient variables within
3708 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3709 generated after the adjust.
3710 (Make_Attach_Call): Removed.
3711 (Make_Call): New routine.
3712 (Make_Clean): Removed.
3713 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3715 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3717 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3719 (Make_Final_Call): Modified to simply create a call to either
3720 Deep_Finalize or Finalize.
3721 (Make_Finalize_Address_Body): New routine.
3722 (Make_Finalize_Address_Stmts): New routine. A function which produces
3723 TSS primitive Finalize_Address used in conjunction with heap allocated
3725 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3726 (Make_Init_Call): Rewritten. There is no longer an attach call
3727 generated after initialization.
3728 (Make_Local_Deep_Finalize): New routine.
3729 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3730 (Make_Transient_Block): Remove the finalization list retrieval and
3732 (Needs_Finalization): Moved to Exp_Util.
3733 (Parent_Field_Type): New routine.
3734 (Preprocess_Components): New routine.
3735 (Process_Transient_Objects): New routine.
3736 (Wrap_HSS_In_Block): New routine.
3737 (Wrap_Transient_Declaration): Remove finalization list management and
3738 controller insertion.
3739 (Wrap_Transient_Expression): Code reformatting.
3740 (Wrap_Transient_Statement): Code reformatting.
3741 * exp_ch7.ads (Build_Final_List): Removed.
3742 (Build_Finalization_Collection): New routine.
3743 (Build_Raise_Statement): New routine.
3744 (Controller_Component): Removed.
3745 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3746 (Find_Final_List): Removed.
3747 (In_Finalization_Root): Removed.
3748 (Is_Simple_Protected_Type): Update related comment.
3749 (Make_Adjust_Call): New parameter profile and associated comments.
3750 (Make_Attach_Call): Removed.
3751 (Make_Final_Call): New parameter profile and associated comments.
3752 (Make_Finalize_Address_Body): New routine.
3753 (Make_Init_Call): New parameter profile and associated comments.
3754 (Make_Local_Deep_Finalize): New routine.
3755 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3756 (Needs_Finalization): Moved to Exp_Util.
3757 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3758 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3759 (Find_Protection_Type): Moved to Exp_Util.
3760 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3761 (Make_DT): Update sequence of dispatch table initialization. Remove the
3762 initialization of field RC_Offset. Add initialization of field Needs_
3764 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3765 Reimplement how an object is first finalized, then deallocated.
3766 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3768 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3769 Register TSS_Finalize_Address with type TSS_Names.
3770 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3771 procedure provides the interface between an allocation / deallocation
3772 and the support machinery in Ada.Finalization.Heap_Management.
3773 (Find_Init_Call): Code reformatting.
3774 (Find_Init_Call_In_List): Code reformatting.
3775 (Find_Protection_Type): Moved from Exp_Ch9.
3776 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3777 (Has_Controlled_Coextensions): Removed.
3778 (Has_Controlled_Objects): New routine.
3779 (In_Library_Level_Package_Body): New routine.
3780 (Insert_Action_After): New routine.
3781 (Is_Finalizable_Transient): New routine. This predicate determines
3782 whether an object declaration is one of the many variants of controlled
3784 (Is_Null_Access_BIP_Func_Call): New routine.
3785 (Is_Non_BIP_Func_Call): New routine.
3786 (Is_Related_To_Func_Return): New routine.
3787 (Needs_Finalization): Moved from Exp_Ch7.
3788 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3789 (Find_Protection_Type): Moved from Exp_Ch9.
3790 (Has_Controlled_Coextensions): Removed.
3791 (Has_Controlled_Objects): New routine.
3792 (In_Library_Level_Package_Body): New routine.
3793 (Insert_Action_After): New routine.
3794 (Is_Finalizable_Transient): New routine.
3795 (Is_Null_Access_BIP_Func_Call): New routine.
3796 (Is_Non_BIP_Func_Call): New routine.
3797 (Is_Related_To_Func_Return): New routine.
3798 (Needs_Finalization): Moved from Exp_ch7.
3799 * expander.adb (Expand): Add a case for N_Free_Statement.
3800 * freeze.adb (Freeze_All): Replace the generation of a finalization
3801 list with a collection for access-to-controlled types.
3802 (Freeze_Entity): Code reformatting.
3803 (Freeze_Record_Type): Remove the freezing of a record controller
3805 (Freeze_Subprogram): Code reformatting.
3806 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3808 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3809 has a library-level finalizer.
3810 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3811 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3812 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3813 files. Add a-fihema to the list of object files.
3815 Alphabetize the associations in type Is_Parameterless_Attribute.
3816 * rtsfind.ads: Ada.Finalization_List.Controller and
3817 System.Finalization_Implementation are no longer a GNAT unit.
3818 Update the range of type Ada_Finalization_Child. Remove the following
3819 recoverable entities:
3821 RE_Attach_To_Final_List
3825 RE_Finalizable_Ptr_Ptr
3826 RE_Global_Final_List
3827 RE_Limited_Record_Controller
3830 RE_Record_Controller
3831 RE_Simple_List_Controller
3833 Add the following recoverable entities:
3835 RE_Add_Offset_To_Address
3839 RE_Exception_Identity
3840 RE_Finalization_Collection
3841 RE_Finalization_Collection_Ptr
3842 RE_Needs_Finalization
3843 RE_Save_Library_Occurrence
3844 RE_Set_Finalize_Address_Ptr
3845 RE_Set_Storage_Pool_Ptr
3847 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3849 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3850 (First_Stored_Discriminant): Remove the mention of Name_uController.
3851 * sem_aux.ads: Comment reformatting.
3852 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3853 to redecorate an already existing class-wide type.
3854 (Decorate_Tagged_Type): New parameter profile and associated comment.
3855 Create a "shadow class-wide type" for a shadow entity.
3856 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3857 of the final chain along with the associated comment.
3858 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3859 Full_Desig and set it to the full view of the designated type.
3860 Initialize the finalization collection to empty.
3861 (Build_Derived_Record_Type): Alphabetize local variables. Code
3863 (Collect_Fixed_Components): Remove the mention of Name_uController.
3864 (Create_Constrained_Components): Remove the mention of Name_uController.
3865 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3866 class-wide type of a shadow entity.
3867 (Process_Full_View): Update the machinery which marks type
3868 Limited_Controlled's entity as limited.
3869 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3870 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3871 list, instead make a collection build-in-place formal.
3872 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3873 a designated type in order to establish a match between the renaming
3874 and the renamed entity.
3875 (Find_Selected_Component): Add guard to prevent spurious exceptions
3876 from being raised on .NET/JVM.
3877 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3878 to the list of primitive that need special processing. Update arrays
3879 C_Names and D_Names.
3880 (Replace_Types): Handle class-wide types.
3881 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3882 different parameter profile, look at the first formal.
3883 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3884 use clauses for Exp_Util.
3885 * sem_res.adb: Remove with and use clauses for Elists.
3886 (Propagate_Coextensions): Removed.
3887 (Resolve_Allocator): Do not propagate the list of coextensions from one
3888 allocator to another.
3889 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3890 Deaccessed_T to Desig_Typ.
3891 (Enter_Name): Remove the mention of Name_uController.
3892 (Gather_Components): Remove the mention of Name_uController.
3893 (Incomplete_Or_Private_View): New routine.
3894 (Is_Coextension_Root): Removed.
3895 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3896 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3897 (Is_Coextension_Root): Removed.
3898 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3899 Controlled types are now derived from a null tagged record. Remove
3900 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3901 * sinfo.adb (Coextensions): Removed.
3902 (Set_Coextensions): Removed.
3903 * sinfo.ads: Remove Coextensions from the explanation of node fields
3904 and its uses in nodes.
3905 Update the field usage of N_Allocator.
3906 (Coextensions): Removed along with its pragma Inline.
3907 (Set_Coextensions): Removed along with its pragma Inline.
3908 * snames.ads-tmpl: Remove names
3913 Name_uLocal_Final_List
3914 Name_Finalization_Root
3921 Name_Finalize_Address
3922 * s-pooglo.adb (Allocate): Add overriding indicator.
3923 (Deallocate): Add overriding indicator.
3924 (Storage_Size): Add overriding indicator.
3925 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3926 than Finalize_Global_List.
3927 (Null_Finalize_Global_List): Removed.
3928 (Save_Library_Occurrence): New routine.
3929 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3930 initialization. Add variable Finalize_Library_Objects along with its
3931 pragma Export. Add variables Library_Exception and
3932 Library_Exception_Set along with their pragma Export.
3933 (Null_Finalize_Global_List): Removed.
3934 (Save_Library_Occurrence): New routine.
3935 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3936 rather than Finalize_Global_List.
3937 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3938 of the constructed node.
3940 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3942 * link.c: Include "auto-host.h" before system headers.
3944 2011-08-03 Vincent Celier <celier@adacore.com>
3946 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3947 that are not extended. Do not check if a library project that is
3948 extended should be regenerated. Do not add to table Library_Paths the
3949 libraries that are in extended projects. Link only with libraries that
3950 are in libray projects that are not extended.
3951 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3952 for a library project that is extended.
3954 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3956 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3957 conforming subprogram renamings that appear to be completions if they
3958 are not fully conformant.
3959 Such renamings are homographs but not completions.
3960 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3961 names in a subprogram renaming that appears in an instance.
3963 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3965 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3966 not immutably limited, build actual subtype from expression to provide
3967 proper bounds to caller.
3969 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3971 * sem_ch8.adb: Minor comment correction.
3973 2011-08-03 Thomas Quinot <quinot@adacore.com>
3975 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3976 returning a limited array, use an extended return statement.
3978 2011-08-03 Vincent Celier <celier@adacore.com>
3980 * make.adb (Initialize): If --subdirs= is used, but no project file is
3981 specified, attempt to create the specify subdir if it does not already
3982 exist and use it as the object directory as if -D had been specified.
3984 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3986 * s-tpopsp-vms.adb: New file.
3987 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3988 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3990 2011-08-03 Emmanuel Briot <briot@adacore.com>
3992 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3995 2011-08-03 Yannick Moy <moy@adacore.com>
3997 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3998 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3999 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4000 detect that an array has static bounds.
4002 2011-08-03 Thomas Quinot <quinot@adacore.com>
4004 * exp_dist.adb: Minor reformatting.
4006 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4008 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4009 (ATCB_Key): Removed, not always used.
4011 2011-08-03 Emmanuel Briot <briot@adacore.com>
4013 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4014 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4015 most remaining global variables.
4017 2011-08-03 Robert Dewar <dewar@adacore.com>
4019 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4020 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4023 2011-08-03 Javier Miranda <miranda@adacore.com>
4025 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4026 that must be passed by copy in VM targets.
4028 2011-08-03 Emmanuel Briot <briot@adacore.com>
4030 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4031 duplicates a similar htable now in the project tree.
4033 2011-08-03 Claire Dross <dross@adacore.com>
4035 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4036 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4037 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4038 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4039 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4040 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4041 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4044 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4046 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4047 (ATCB_Key): Removed, not always used.
4048 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4050 * s-tpopsp-tls.adb: New file.
4051 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4052 x86/x64/ia64/powerpc/sparc Linux.
4054 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4056 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4057 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4059 2011-08-03 Thomas Quinot <quinot@adacore.com>
4061 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4062 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4063 Fix type selection for mapping integer types to PolyORB types.
4065 2011-08-03 Bob Duff <duff@adacore.com>
4067 * sem_ch7.adb: Minor comment clarification.
4069 2011-08-03 Bob Duff <duff@adacore.com>
4071 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4072 an error analyzing a choice, skip further processing. Further
4073 processing could cause a crash or cascade errors.
4075 2011-08-03 Emmanuel Briot <briot@adacore.com>
4077 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4078 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4079 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4080 prj-env.ads (Shared_Project_Tree_Data): new type
4081 An aggregate project and its aggregated trees need to share the common
4082 data structures used for lists of strings, packages,... This makes the
4083 code simpler since otherwise we have to pass the root tree (also used
4084 for the configuration file data) in addition to the current project
4085 tree. This also avoids ambiguities as to which tree should be used.
4086 And finally this saves a bit of memory.
4087 (For_Every_Project_Imported): new parameter Tree.
4088 Since aggregated projects are using a different tree, we need to let
4089 the caller know which tree to use to manipulate the returned project.
4091 2011-08-03 Robert Dewar <dewar@adacore.com>
4093 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4094 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4095 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4096 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4098 2011-08-03 Javier Miranda <miranda@adacore.com>
4100 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4101 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4103 2011-08-03 Bob Duff <duff@adacore.com>
4105 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4108 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4110 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4111 g-sehash.ads: Fix typo. Update header.
4113 2011-08-03 Thomas Quinot <quinot@adacore.com>
4115 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4118 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4120 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4121 prefixes of private types along with records, since the selector may be
4123 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4124 private types along with records, since the selector may be a
4127 2011-08-03 Emmanuel Briot <briot@adacore.com>
4129 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4131 2011-08-03 Javier Miranda <miranda@adacore.com>
4133 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4134 Tagged_Type_Expansion.
4136 2011-08-03 Yannick Moy <moy@adacore.com>
4138 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4139 violation when the argument of concatenation is the name of a
4142 2011-08-03 Emmanuel Briot <briot@adacore.com>
4144 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4145 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4146 (Process_Declarative_Items): new parameter Child_Env.
4148 2011-08-03 Yannick Moy <moy@adacore.com>
4150 * alfa.ads: Update format of ALFA section in ALI file in order to
4151 add a mapping from bodies to specs when both are present.
4152 (ALFA_Scope_Record): Add components for spec file/scope.
4153 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4155 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4156 collected, fill in the spec information when relevant.
4157 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4160 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4162 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4163 code unit to decide whether to add internally generated subprograms.
4165 2011-08-03 Javier Miranda <miranda@adacore.com>
4167 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4168 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4169 be handled by copy in VM targets.
4171 2011-08-03 Emmanuel Briot <briot@adacore.com>
4173 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4174 code with Makeutl.Get_Switches.
4175 * prj-tree.adb: Update comment.
4177 2011-08-03 Thomas Quinot <quinot@adacore.com>
4179 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4180 subprogram with a limited formal that does not support external
4183 2011-08-03 Yannick Moy <moy@adacore.com>
4185 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4187 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4188 not from current unit in two phases, because it is not possible to
4189 change the table while iterating over its content.
4190 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4192 2011-08-03 Sergey Rybin <rybin@adacore.com>
4194 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4195 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4197 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4199 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4200 and the component type is composite, this is ambiguous for predefined
4201 concatenation, but if the node is not overloaded and the entity is a use
4202 -defined function its profile can be used to resolve that aggregate.
4204 2011-08-03 Robert Dewar <dewar@adacore.com>
4206 * exp_ch4.adb: Minor code cleanup.
4208 2011-08-03 Thomas Quinot <quinot@adacore.com>
4210 * exp_dist.adb: Do not generate distribution stubs if serious errors
4211 have been diagnosed.
4213 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4215 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4216 the first formal of a primitive operation, go to the base type to
4217 handle properly an access to a derived type with constrained
4219 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4220 user-defined function that is only use-visible.
4222 2011-08-03 Robert Dewar <dewar@adacore.com>
4224 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4225 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4226 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4227 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4228 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4229 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4230 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4231 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4233 2011-08-03 Robert Dewar <dewar@adacore.com>
4235 * repinfo.adb (List_Mechanism): Add handling of
4236 Convention_Ada_Pass_By_XXX.
4237 * sem_mech.adb (Set_Mechanism): Ditto.
4238 * sem_prag.adb (Process_Convention): Add entries for
4239 Convention_Ada_Pass_By_XXX.
4240 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4242 2011-08-03 Pascal Obry <obry@adacore.com>
4244 * makeutl.adb: Minor reformatting.
4246 2011-08-03 Vincent Celier <celier@adacore.com>
4249 (Get_File_Name) If the file cannot be found when there are no config
4250 pragmas file and May_Fail is True, return No_File instead of the file
4251 name, to be consistent.
4253 2011-08-03 Pascal Obry <obry@adacore.com>
4255 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4258 2011-08-03 Javier Miranda <miranda@adacore.com>
4261 (Same_Representation): In VM targets the representation of arrays with
4262 aliased components differs from arrays with non-aliased components.
4264 2011-08-03 Emmanuel Briot <briot@adacore.com>
4266 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4267 not systematically lower case attribute indexes that contain no "."
4268 Fix definition of several Naming attributes, which take
4269 a unit name as index and therefore should be case insensitive.
4270 Minor refactoring (reduce length of variable names).
4272 2011-08-03 Emmanuel Briot <briot@adacore.com>
4274 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4276 2011-08-03 Emmanuel Briot <briot@adacore.com>
4278 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4279 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4280 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4281 prj-tree.ads (Prj.Tree.Environment): new type.
4283 2011-08-03 Emmanuel Briot <briot@adacore.com>
4285 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4286 prj-tree.adb, prj-tree.ads (Environment): new type.
4288 2011-08-03 Emmanuel Briot <briot@adacore.com>
4290 * prj-tree.ads: Remove unused variable.
4292 2011-08-03 Yannick Moy <moy@adacore.com>
4294 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4295 issuing messages related to SPARK restriction violation.
4297 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4299 * sem_ch6.adb: guard against error nodes in return statements.
4301 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4303 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4304 a warning can only appear on a configuration file, so emit warning
4305 without further checks.
4307 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4309 * s-interr.ads: add overriding keyword.
4311 2011-08-03 Geert Bosch <bosch@adacore.com>
4313 * exp_attr.adb: Fix minor typo.
4315 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4317 * par-ch4.adb: improve error recovery.
4319 2011-08-03 Emmanuel Briot <briot@adacore.com>
4321 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4322 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4325 2011-08-03 Emmanuel Briot <briot@adacore.com>
4327 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4328 "external" as an attribute name in aggregate projects.
4330 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4332 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4333 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4334 from 0, so we need to adjust.
4336 2011-08-03 Emmanuel Briot <briot@adacore.com>
4338 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4339 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4341 2011-08-03 Yannick Moy <moy@adacore.com>
4343 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4344 restriction on overloaded entity if the entity is not an operator.
4346 2011-08-03 Yannick Moy <moy@adacore.com>
4348 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4349 restrict.ads: Rename remaining Check_Formal_Restriction* into
4350 Check_SPARK_Restriction*.
4352 2011-08-03 Emmanuel Briot <briot@adacore.com>
4354 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4355 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4357 (Project_Empty): removed
4358 (Empty_Project): new parameter Qualifier
4359 This is used to have fields specific to aggregate projects, cleaner
4360 New field to store the list of aggregated projects.
4361 (Check_Aggregate_Project): removed
4362 (Process_Aggregated_Projects, Free): new subprograms.
4364 2011-08-03 Olivier Hainque <hainque@adacore.com>
4366 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4368 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4370 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4371 explicit dereference of an unconstrained type, create a constrained
4372 subtype for it, as is done for function calls that return an
4375 2011-08-03 Thomas Quinot <quinot@adacore.com>
4377 * g-pehage.adb (Finalize): Avoid possible double-free.
4379 2011-08-03 Steve Baird <baird@adacore.com>
4381 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4382 Elab_Spec/Body attrs in CodePeer_Mode.
4384 2011-08-03 Javier Miranda <miranda@adacore.com>
4386 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4387 low bound is not known at compile time but they have no others choice.
4388 Done because in this case the bounds can be obtained directly from the
4391 2011-08-03 Ed Falis <falis@adacore.com>
4393 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4394 on VxWorks SMP. Remove unusable constant ANY_CPU.
4396 2011-08-03 Emmanuel Briot <briot@adacore.com>
4398 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4399 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4400 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4401 Prj.Env.Initialize_Empty): new subprograms
4402 (Get_Env, Find_Project): remove parameter Target_Name.
4404 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4406 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4407 as a condition for the delayed call to Derived_Subprograms done for the
4408 case of the rewriting of a derived type that constrains the
4409 discriminants of its parent type.
4410 Avoids redundant subprogram derivations for private subtype derivations.
4412 2011-08-03 Javier Miranda <miranda@adacore.com>
4414 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4415 Build_Record_Aggr_Code.
4416 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4417 discriminants in extension aggregates.
4419 2011-08-03 Emmanuel Briot <briot@adacore.com>
4421 * prj-pp.adb (Print): also output project qualifiers, since in
4422 particular "aggregate" is mandatory in an aggregate project.
4424 2011-08-03 Emmanuel Briot <briot@adacore.com>
4426 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4427 (Debug_Output): new function.
4429 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4431 * gnat_ugn.texi: Document -Wstack-usage.
4432 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4434 2011-08-03 Thomas Quinot <quinot@adacore.com>
4436 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4437 have keyword LIMITED.
4439 2011-08-03 Yannick Moy <moy@adacore.com>
4441 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4442 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4443 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4444 section (does not happen in compiler, only if code directly calls
4446 * get_alfa.adb, get_alfa.ads: New files.
4447 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4449 * lib-xref-alfa.adb: New file.
4450 * lib-xref.adb, lib-xref.ads
4451 (Xref_Entry): redefine information needed in cross-references for ALFA.
4452 Push ALFA treatments in separated local package.
4453 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4454 identifiers. Return entity of package body instead of spec. Return
4455 Empty for a scope with no location.
4456 (Generate_Reference): adapt to new components for ALFA information.
4457 Remove the need for D references on definitions.
4458 (Is_Local_Reference): moved to ALFA local package
4459 (Output_References): extract subfunction as Extract_Source_Name
4460 (Output_Local_References): remove procedure, replaced by filtering of
4461 cross-references in package ALFA and printing in Put_ALFA.
4462 (Write_Entity_Name): remove procedure
4463 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4464 print exact name of entity as it appears in source file
4465 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4466 * put_alfa.adb, put_alfa.ads: New files.
4467 * xref_lib.adb (Search_Xref): protect read of cross-references against
4468 reading other sections of the ALI file, in gnatxref
4469 (Search): protect read of cross-references against reading other
4470 sections of the ALI file, in gnatfind.
4471 * gcc-interface/Make-lang.in: Update dependencies.
4473 2011-08-03 Thomas Quinot <quinot@adacore.com>
4475 * sem_ch3.adb: Minor reformatting.
4477 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4479 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4480 raising an exception.
4482 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4484 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4485 type, always use 1 as the lower bound or string, even if lower bound of
4486 context is not static, to handle properly null strings in a non-static
4489 2011-08-03 Bob Duff <duff@adacore.com>
4491 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4492 always legal on the right-hand side of an assignment statement; there
4493 is always an applicable index constraint in this case. Therefore, the
4494 check for Pkind = N_Assignment_Statement is now unconditional -- it
4495 doesn't depend on whether Is_Constrained (Typ).
4497 2011-08-03 Robert Dewar <dewar@adacore.com>
4499 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4501 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4503 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4504 for an itype created within a generic unit.
4506 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4508 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4509 suppresses all inlining.
4511 2011-08-03 Robert Dewar <dewar@adacore.com>
4513 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4514 exp_aggr.adb: Minor reformatting.
4516 2011-08-03 Thomas Quinot <quinot@adacore.com>
4518 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4519 tagged assignment when discriminant checks are suppressed. This is
4520 useless and extremely costly in terms of static stack usage.
4522 2011-08-03 Bob Duff <duff@adacore.com>
4524 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4525 of generics, because this leads to the wrong entity in the wrong scope,
4526 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4528 (Process_Interface_Name): Follow Alias for instances of generics, to
4529 correct for the above change.
4531 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4533 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4534 is an integer literal it is always safe to replace the reference. In
4535 addition, if the reference appears in the generated code for an object
4536 declaration it is necessary to copy because otherwise the reference
4537 might be to the uninitilized value of the discriminant of the object
4540 2011-08-03 Pascal Obry <obry@adacore.com>
4542 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4543 ACL used, in this case we want to check for ending .exe, not .exe
4544 anywhere in the path.
4546 2011-08-03 Sergey Rybin <rybin@adacore.com>
4548 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4549 the tree structure (semantic decoration of references to record
4552 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4554 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4555 choices of a named array aggregate, bail out when any choices are
4556 marked as Errors_Posted.
4558 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4560 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4561 in which entity is frozen, to handle properly loop variables in
4564 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4566 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4567 subtype is not static, compute the upper bound using attributes, to
4568 handle properly index types that are not integer types.
4570 2011-08-03 Bob Duff <duff@adacore.com>
4572 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4573 Update copyright notice.
4575 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4577 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4578 Original_Discriminant if within an instance.
4579 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4581 2011-08-03 Thomas Quinot <quinot@adacore.com>
4583 * einfo.ads: Minor reformatting.
4585 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4587 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4588 composite type with an unfrozen subcomponent, in the profile of a
4589 primitive operation.
4591 2011-08-03 Robert Dewar <dewar@adacore.com>
4593 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4595 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4597 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4598 unconstrained type with discriminants is initialized with an aggregate,
4599 use the constrained subtype of the aggregate as the type of the object,
4600 because it is immutable, and this allows the back-end to generate no
4601 code for the object declaration.
4603 2011-08-03 Robert Dewar <dewar@adacore.com>
4605 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4606 comparison operand is variable, and turns out to be zero or negative.
4608 2011-08-03 Javier Miranda <miranda@adacore.com>
4611 (Expand_Dispatching_Constructor_Call): Disable expansion of
4612 code required for native targets. Done to avoid generating
4613 references to unavailable runtime entities in VM targets.
4615 (Expand_N_Object_Declaration): Add missing support to handle
4616 the explicit initialization of class-wide interface objects.
4619 2011-08-03 Matthew Heaney <heaney@adacore.com>
4621 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4623 2011-08-03 Matthew Heaney <heaney@adacore.com>
4625 * a-cbdlli.adb (Splice): move source items from first to last
4627 2011-08-03 Yannick Moy <moy@adacore.com>
4629 * sem_util.ads: comment added.
4631 2011-08-03 Javier Miranda <miranda@adacore.com>
4634 (Expand_Record_Aggregate): In VM targets disable the expansion into
4635 assignments of aggregates whose type is not known at compile time.
4637 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4639 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4640 protected entries and task entries, to build the proper renaming
4641 declaration for entry formals, used in debugging.
4642 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4643 parameters in the same way.
4645 2011-08-02 Robert Dewar <dewar@adacore.com>
4647 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4648 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4649 code reorganization.
4651 2011-08-02 Robert Dewar <dewar@adacore.com>
4653 * debug.adb: Debug flag d.P to suppress length comparison optimization
4654 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4655 comparison of Length by comparing First/Last instead.
4657 2011-08-02 Matthew Heaney <heaney@adacore.com>
4659 * a-cobove.ads: Code clean up.
4661 2011-08-02 Vincent Celier <celier@adacore.com>
4663 * adaint.c (file_names_case_sensitive_cache): New static int.
4664 (__gnat_get_file_names_case_sensitive): Cache the return value in
4665 file_names_case_sensitive_cache at the first invocation, to avoid
4666 multiple calls to getenv.
4668 2011-08-02 Bob Duff <duff@adacore.com>
4670 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4672 2011-08-02 Yannick Moy <moy@adacore.com>
4674 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4675 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4676 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4677 indicate that we are in a precondition or postcondition. This is used in
4678 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4679 decide whether to flag the spec or body of the current subprogram as
4682 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4684 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4686 * a-extiin.ads: New file.
4688 2011-08-02 Bob Duff <duff@adacore.com>
4690 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4691 now raises Name_Error instead of Use_Error in certain cases. The other
4692 parts of this AI were already implemented properly.
4694 2011-08-02 Vincent Celier <celier@adacore.com>
4696 * link.c: Only import "auto-host.h" when building the gnattools.
4698 2011-08-02 Yannick Moy <moy@adacore.com>
4700 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4701 which calls a local subprogram, so extract subprogram
4702 from Mark_Non_ALFA_Subprogram_Body.
4704 2011-08-02 Javier Miranda <miranda@adacore.com>
4707 (Extract_Dispatching_Call): If the type of the dispatching object is an
4708 access type then return an explicit dereference in the Object out-mode
4711 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4713 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4714 compatibility checks for all indexes of an array subtype, not just the
4715 first. Reset Has_Dynamic_Range_Check on the subtype before each
4716 potential check to ensure that Insert_Range_Checks will not elide any
4717 of the dynamic checks.
4719 2011-08-02 Yannick Moy <moy@adacore.com>
4721 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4722 SPARK restriction at parsing time.
4723 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4724 directive only if the SPARK restriction is set for this unit.
4726 2011-08-02 Yannick Moy <moy@adacore.com>
4728 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4729 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4730 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4731 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4732 Mark_Non_ALFA_Subprogram_Body.
4733 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4736 2011-08-02 Yannick Moy <moy@adacore.com>
4738 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4741 2011-08-02 Robert Dewar <dewar@adacore.com>
4743 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4744 exp_ch3.adb: Minor reformatting.
4746 2011-08-02 Emmanuel Briot <briot@adacore.com>
4748 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4749 files, not any regular file.
4750 (__gnat_locate_file_with_predicate): new subprogram.
4752 2011-08-02 Yannick Moy <moy@adacore.com>
4754 * sinfo.adb, sinfo.ads: Restrict the use of flags
4755 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4756 nodes, plus N_Subtype_Declaration for the 2nd one.
4758 2011-08-02 Sergey Rybin <rybin@adacore.com>
4760 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4761 - fix bugs in the description of Source_Trace;
4762 - get rid of UNIT_NAME;
4764 2011-08-02 Javier Miranda <miranda@adacore.com>
4767 (Build_Dispatching_Requeue): Adding support for VM targets
4768 since we cannot directly reference the Tag entity.
4769 * exp_sel.adb (Build_K): Adding support for VM targets.
4770 (Build_S_Assignment): Adding support for VM targets.
4772 (Default_Prim_Op_Position): In VM targets do not restrict availability
4773 of predefined interface primitives to compiling in Ada 2005 mode.
4774 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4775 restricted to compiling in Ada 2005 mode.
4776 (Make_VM_TSD): Generate code that declares and initializes the OSD
4777 record. Needed to support dispatching calls through synchronized
4780 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4781 primitives associated with synchronized interfaces.
4782 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4783 primitives associated with synchronized interfaces.
4785 2011-08-02 Yannick Moy <moy@adacore.com>
4787 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4788 statements hidden in SPARK if preceded by the HIDE directive
4789 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4790 exception handlers as hidden in SPARK if preceded by the HIDE directive
4791 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4792 if starting with the HIDE directive
4793 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4794 starting with the HIDE directive; mark the declarations in a private
4795 part as hidden in SPARK if the private part starts with the HIDE
4797 * restrict.adb, restrict.ads
4798 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4799 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4800 argument node belongs to a part which is hidden in SPARK
4801 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4802 parts in SPARK; protect the possibly costly call to
4803 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4804 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4805 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4806 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4808 (Scan): recognize special comment starting with '#' and followed by
4809 SPARK keyword "hide" as a HIDE directive.
4811 2011-08-02 Yannick Moy <moy@adacore.com>
4813 * types.ads, erroutc.ads: Minor reformatting.
4815 2011-08-02 Vincent Celier <celier@adacore.com>
4817 * link.c: Add response file support for cross platforms.
4819 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4821 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4822 in an association, set parent field of copy before partial analysis.
4823 * sem_res.adb (Resolve_Slice): create reference to itype only when
4824 expansion is enabled.
4826 2011-08-02 Yannick Moy <moy@adacore.com>
4828 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4829 for new flag denoting which subprogram bodies are in ALFA
4830 * restrict.adb, sem_ch7.adb: Update comment
4831 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4832 sem_ch9.adb, sem_res.adb: Add calls to
4833 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4834 * sem_ch6.adb (Analyze_Function_Return): add calls to
4835 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4836 middle of the body, and extended return.
4837 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4838 False when missing return.
4839 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4840 to True for subprograms whose spec is in ALFA. Remove later on the flag
4841 on the entity used for a subprogram body when there exists a separate
4843 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4844 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4845 False, otherwise do nothing.
4847 2011-08-02 Robert Dewar <dewar@adacore.com>
4849 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4851 2011-08-02 Yannick Moy <moy@adacore.com>
4853 * sem_ch4.ads: minor formatting.
4855 2011-08-02 Yannick Moy <moy@adacore.com>
4857 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4858 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4859 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4860 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4861 opt.ads: cleanup of SPARK mode
4863 2011-08-02 Yannick Moy <moy@adacore.com>
4865 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4867 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4868 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4870 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4871 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4872 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4873 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4875 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4877 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4878 functions whose return type is not in ALFA.
4879 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4881 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4882 parameter's type is not in ALFA.
4883 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4886 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4888 * sem_ch6 (Analyze_Expression_Function): treat the function as
4889 Inline_Always, and introduce a subprogram declaration for it when it is
4891 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4892 expression functions, so that the back-end can determine whether they
4893 can in fact be inlined.
4894 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4895 a function body comes from an expression function.
4897 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4899 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4900 null exclusions to test Can_Never_Be_Null on the anonymous access types
4901 of the formals rather than testing the formals themselves. Exclude this
4902 check in cases where the Old_Formal is marked as a controlling formal,
4903 to avoid issuing spurious errors for bodies completing dispatching
4904 operations (due to the flag not getting set on controlling access
4905 formals in body specs).
4906 (Find_Corresponding_Spec): When checking full and subtype conformance of
4907 subprogram bodies in instances, pass Designated and E in that order, for
4908 consistency with the expected order of the formals (New_Id followed by
4911 2011-08-02 Robert Dewar <dewar@adacore.com>
4913 * sem_ch8.adb: Minor reformatting.
4915 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4917 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4918 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4919 primitive operations of class-wide actuals.
4921 2011-08-02 Javier Miranda <miranda@adacore.com>
4923 * exp_atag.ads, exp_atag.adb
4924 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4925 since its value is implicitly passed in argument Typ.
4926 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4927 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4928 Build_Common_Dispatching_Select_Statements.
4930 2011-08-02 Robert Dewar <dewar@adacore.com>
4932 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4933 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4936 2011-08-02 Robert Dewar <dewar@adacore.com>
4938 * sem_res.adb: Minor reformatting.
4939 * sem_prag.adb: Minor reformatting.
4941 2011-08-02 Javier Miranda <miranda@adacore.com>
4943 * exp_atag.adb, exp_atags.ads
4944 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4945 by the tagged type Entity. Required to use this routine in the VM
4946 targets since we do not have available the Tag entity in the VM
4949 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4950 Ada.Tags has not been previously loaded.
4952 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4953 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4955 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4956 view of enclosing scopes. Required to handle enclosing scopes that
4957 are synchronized types whose full view is a task type.
4959 (Build_VM_TSDs): Minor code improvement to avoid generating and
4960 analyzing lists with empty nodes.
4961 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4962 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4963 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4964 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4965 (Make_Select_Specific_Data_Table): Add support for VM targets.
4966 (Make_VM_TSD): Generate code to initialize the SSD structure of
4969 2011-08-02 Yannick Moy <moy@adacore.com>
4971 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4972 cross-references section in ALI.
4973 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4974 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4976 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4977 subprogram or package entity of a node
4978 (Is_Local_Reference_Type): new function returns True for references
4979 selected in local cross-references.
4980 (Lt): function extracted from Lt in Output_References
4981 (Write_Entity_Name): function extracted from Output_References
4982 (Generate_Definition): generate reference with type 'D' for definition
4983 of objects (object declaration and parameter specification), with
4984 appropriate locations and units, for use in local cross-references.
4985 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4986 references of type 'I' for initialization in object definition.
4987 (Output_References): move part of function Lt and procedure
4988 Write_Entity_Name outside of the body. Ignore references of types 'D'
4989 and 'I' introduced for local cross-references.
4990 (Output_Local_References): new procedure to output the local
4991 cross-references sections.
4992 (Lref_Entity_Status): new array defining whether an entity is a local
4993 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4994 with 'I' type when initialization expression is present.
4995 * get_scos.adb, get_scos.ads: Correct comments and typos
4997 2011-08-02 Javier Miranda <miranda@adacore.com>
4999 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5001 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5003 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5006 2011-08-02 Vincent Celier <celier@adacore.com>
5008 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5009 (No_Space_Img): New function
5010 (Find_Excluded_Sources): When reading from a file, record the file name
5011 and the line number for each excluded source.
5012 (Mark_Excluded_Sources): When reporting an error, if the excluded
5013 sources were read from a file, include file name and line number in
5016 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5018 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5020 2011-08-02 Robert Dewar <dewar@adacore.com>
5022 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5024 2011-08-02 Javier Miranda <miranda@adacore.com>
5026 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5027 generation of TSDs to the DOTNET compiler.
5028 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5029 generation of TSDs to the DOTNET compiler.
5031 2011-08-02 Javier Miranda <miranda@adacore.com>
5033 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5034 record of all the tagged types declared inside library level package
5035 declarations, library level package bodies or library level subprograms.
5036 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5037 associated with a given tagged type.
5038 (Build_VM_TSDs): New subprogram.
5039 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5040 compilation units that are subprograms.
5041 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5042 compilation units that are package bodies.
5043 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5044 units that are a package declaration or a package instantiation.
5045 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5046 reorganization to improve the error generated by the frontend when the
5047 function Ada.Tags.Secondary_Tag is not available.
5048 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5049 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5051 2011-08-02 Javier Miranda <miranda@adacore.com>
5053 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5055 2011-08-02 Robert Dewar <dewar@adacore.com>
5057 * s-imenne.ads: Minor reformatting.
5059 2011-08-02 Robert Dewar <dewar@adacore.com>
5061 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5062 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5063 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5065 2011-08-02 Robert Dewar <dewar@adacore.com>
5067 * einfo.ads (Materialize_Entity): Document this is only for renamings
5068 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5069 required debug information in the case where we transform the object
5070 declaration into a renaming declaration.
5071 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5073 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5076 2011-08-02 Robert Dewar <dewar@adacore.com>
5078 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5079 Suppress_Init_Procs.
5080 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5081 Suppress_Initialization/Initialization_Suppressed.
5082 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5083 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5084 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5085 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5087 2011-08-02 Robert Dewar <dewar@adacore.com>
5089 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5094 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5095 only have inheritable classwide pre/postconditions.
5097 2011-08-02 Javier Miranda <miranda@adacore.com>
5099 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5100 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5101 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5102 checks if the external tag of a type is the same as the external tag
5103 of some other declaration.
5105 2011-08-02 Thomas Quinot <quinot@adacore.com>
5107 * s-taskin.ads: Minor reformatting.
5109 2011-08-02 Emmanuel Briot <briot@adacore.com>
5111 * g-comlin.adb (Display_Help): swap the order in which it prints the
5112 short help and the general usage.
5114 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5116 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5117 the aspect declarations and attach them to the generic copy for
5118 subsequent analysis.
5119 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5120 declarations of the generic tree to the new subprogram declarations.
5121 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5122 conditions that apply to a subprogram instance.
5124 2011-08-02 Robert Dewar <dewar@adacore.com>
5126 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5128 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5130 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5131 private type with a tagged full view is not derived in the immediate
5132 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5134 2011-08-02 Robert Dewar <dewar@adacore.com>
5136 * exp_ch4.adb: Minor reformatting.
5138 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5140 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5141 Ada2012 iterator, the loop will be rewritten during expansion into a
5142 while loop with a cursor and an element declaration. Do not analyze the
5143 body in this case, because if the container is for indefinite types the
5144 actual subtype of the elements will only be determined when the cursor
5145 declaration is analyzed.
5147 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5149 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5150 size/alignment related attributes in CodePeer_Mode.
5152 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5154 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5155 Prepend_Element, since this can result in the operation getting the
5156 wrong slot in the full type's dispatch table if the full type has
5157 inherited operations. The incomplete type's operation will get added
5158 to the proper position in the full type's primitives
5159 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5160 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5161 dispatching operations, since there are cases where nonprimitive
5162 subprograms can get added to the list of incomplete dependents (such
5163 as subprograms in nested packages).
5164 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5165 private part when determining whether to add a primitive with a
5166 parameter of a tagged incomplete type to the Private_Dependents list.
5167 Such primitives can also occur in the visible part, and should not have
5168 been excluded from being private dependents.
5169 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5170 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5171 list of a Taft-amendment incomplete type is a primitive before issuing
5172 an error that the full type must appear in the same unit. There are
5173 cases where nonprimitives can be in the list (such as subprograms in
5175 * sem_disp.adb (Derives_From): Use correct condition for checking that
5176 a formal's type is derived from the type of the corresponding formal in
5177 the parent subprogram (the condition was completely wrong). Add
5178 checking that was missing for controlling result types being derived
5179 from the result type of the parent operation.
5181 2011-08-02 Yannick Moy <moy@adacore.com>
5183 * errout.adb (First_Node): minor renaming
5184 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5187 2011-08-02 Yannick Moy <moy@adacore.com>
5189 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5190 before accessing operands.
5191 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5192 decide whether an initialization expression respects SPARK rules, as
5193 the plain node is the expanded one. This allows for more valid warnings
5195 * gnat_rm.texi: Minor update.
5197 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5199 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5202 2011-08-02 Robert Dewar <dewar@adacore.com>
5204 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5206 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5208 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5209 loop statements and the element renaming declaration with a block when
5210 the element type is controlled.
5212 2011-08-02 Yannick Moy <moy@adacore.com>
5214 * sinfo.ads: Minor formatting.
5216 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5218 * sem_aggr.adb (Add_Association): if the association has a box and no
5219 expression, use the Sloc of the aggregate itself for the new
5221 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5224 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5226 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5227 When a container is provided via a function call, generate a renaming
5228 of the function result. This avoids the creation of a transient scope
5229 and the premature finalization of the container.
5230 * exp_ch7.adb (Is_Container_Cursor): Removed.
5231 (Wrap_Transient_Declaration): Remove the supression of the finalization
5232 of the list controller when the declaration denotes a container cursor,
5235 2011-08-02 Yannick Moy <moy@adacore.com>
5237 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5238 node is from source, instead of the original node being from source.
5240 (Resolve_Array_Aggregate): refine the check for a static expression, to
5241 recognize also static ranges
5242 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5243 Array_Type_Declaration): postpone the test for the type being a subtype
5244 mark after the type has been resolved, so that component-selection and
5245 expanded-name are discriminated.
5246 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5247 to distinguish the case of an iteration scheme, so that an error is
5248 issed on a non-static range in SPARK except in an iteration scheme.
5249 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5250 In_Iter_Schm = True.
5251 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5252 user-defined operators so that they are allowed in renaming
5254 (Find_Selected_Component): refine the check for prefixing of operators
5255 so that they are allowed in renaming. Move the checks for restrictions
5256 on selector name after analysis discriminated between
5257 component-selection and expanded-name.
5258 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5259 concatenation argument of string type if it is static.
5260 * sem_util.adb, sem_util.ads
5261 (Check_Later_Vs_Basic_Declarations): add a new function
5262 Is_Later_Declarative_Item to decice which declarations are allowed as
5263 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5264 mode, add that renamings are considered as later items.
5265 (Enclosing_Package): new function to return the enclosing package
5266 (Enter_Name): correct the rule for homonyms in SPARK
5267 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5268 from source (result of expansion) to avoid issuing wrong warnings.
5270 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5272 * errout.adb: On anything but an expression First_Node returns its
5275 2011-08-02 Pascal Obry <obry@adacore.com>
5277 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5279 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5281 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5282 Set the associated loop as the related expression of internally
5284 * exp_ch7.adb (Is_Container_Cursor): New routine.
5285 (Wrap_Transient_Declaration): Supress the finalization of the list
5286 controller when the declaration denotes a container cursor.
5288 2011-08-02 Yannick Moy <moy@adacore.com>
5290 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5292 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5293 expression is a simple expression. This check cannot be performed in
5294 the semantics, so just drop it.
5295 (P_Index_Or_Discriminant_Constraint): move check that the index or
5296 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5297 semantics. Other cases were previously checked in the semantics.
5298 * par-ch4.adb (P_Name): move checks that a selector name is not
5299 character literal or an operator symbol to Find_Selected_Component in
5301 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5302 declarations are not placed after later declarations in a separate
5303 procedure in Sem_Util (possibly not the best choice?), to be used both
5304 during parsing, for Ada 83 mode, and during semantic analysis, for
5306 * par-endh.adb (Check_End): move check that end label is not missing
5307 to Process_End_Label in the semantics
5308 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5309 the special case for SPARK restriction
5310 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5311 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5312 parameter Force to issue the error message even on internal node (used
5313 for generated end label). Call Check_Restriction to check when an error
5314 must be issued. In SPARK mode, issue an error message even if the
5315 restriction is not set.
5316 (Check_Restriction): new procedure with an additional out parameter to
5317 inform the caller that a message has been issued
5318 * sem_aggr.adb: Minor modification of message
5319 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5320 instead of issuing an error message directly
5321 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5322 declarations are not placed after later declarations, by calling
5323 Check_Later_Vs_Basic_Declarations
5324 (Analyze_Subtype_Declaration): move here the check that an index or
5325 discriminant constraint must be a subtype mark. Change the check that
5326 a subtype of String must start at one so that it works on subtype marks.
5327 * sem_ch4.adb (Analyze_Call): move here the check that a named
5328 association cannot follow a positional one in a call
5329 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5330 instead of issuing an error message directly
5331 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5332 selector name is not a character literal or an operator symbol. Move
5333 here the check that the prefix of an expanded name cannot be a
5334 subprogram or a loop statement.
5335 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5336 procedure called from parsing and semantics to check that basic
5337 declarations are not placed after later declarations
5338 (Process_End_Label): move here the check that end label is not missing
5340 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5342 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5343 representation clause in codepeer mode, since it confuses CodePeer and
5344 does not bring useful info.
5346 2011-08-02 Ed Falis <falis@adacore.com>
5348 * init.c: initialize fp hw on MILS.
5350 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5352 * errout.adb (First_Node): for bodies, return the node itself (small
5353 optimization). For other nodes, do not check source_unit if the node
5354 comes from Standard.
5356 2011-08-02 Robert Dewar <dewar@adacore.com>
5358 * exp_ch3.adb: Minor comment additions.
5359 * sem_ch13.adb: Minor reformatting.
5361 2011-08-02 Pascal Obry <obry@adacore.com>
5363 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5365 2011-08-02 Robert Dewar <dewar@adacore.com>
5367 * sem_attr.adb: Minor reformatting.
5369 2011-08-02 Robert Dewar <dewar@adacore.com>
5371 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5372 (Has_Default_Component_Value): Removed
5373 * einfo.ads Comment updates
5374 (Has_Default_Aspect): Replaces Has_Default_Value
5375 (Has_Default_Component_Value): Removed
5377 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5379 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5380 (Get_Simple_Init_Val): Handle Default_Value aspect
5381 (Needs_Simple_Initialization): Handle Default_Value aspect
5382 * exp_ch3.ads: Needs_Simple_Initialization
5383 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5384 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5386 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5387 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5388 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5390 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5392 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5393 package containing iteration primitives.
5394 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5396 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5398 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5399 "of", pre-analyze expression in case it is a function call with
5400 finalization actions that must be placed ahead of the loop.
5401 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5402 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5404 2011-08-02 Geert Bosch <bosch@adacore.com>
5406 * cstand.adb (Create_Float_Types): Only consider C's long double for
5407 Long_Long_Float, in addition to double.
5409 2011-08-02 Robert Dewar <dewar@adacore.com>
5411 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5412 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5413 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5416 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5418 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5421 2011-08-02 Javier Miranda <miranda@adacore.com>
5423 * einfo.ads, einfo.adb
5424 (Original_Access_Type): Move this attribute to Node26 since there was
5425 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5426 which causes conflicts and breaks the generation of the .NET compiler.
5427 (Interface_Name): Add missing documentation on JGNAT only uses of
5430 2011-08-02 Geert Bosch <bosch@adacore.com>
5432 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5433 (Find_Back_End_Float_Type): Likewise
5434 (Create_Back_End_Float_Types): Likewise
5435 (Create_Float_Types): Likewise
5436 (Register_Float_Type): Likewise
5437 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5438 Nlist and split out type selection in new local Find_Base_Type function.
5439 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5441 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5443 2011-08-02 Robert Dewar <dewar@adacore.com>
5445 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5447 * opt.ads: Minor comment change.
5448 * sem_ch12.adb: Minor code reorganization.
5450 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5452 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5453 subtype's list of rep items to the list on the full subtype in the case
5454 where the lists are the same.
5456 2011-08-02 Geert Bosch <bosch@adacore.com>
5458 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5459 using the one from System.Strings, which also deallocates all strings.
5461 2011-08-02 Geert Bosch <bosch@adacore.com>
5463 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5465 * gcc-interface/Make-lang.in: Update dependencies.
5467 2011-08-02 Olivier Hainque <hainque@adacore.com>
5469 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5472 2011-08-02 Javier Miranda <miranda@adacore.com>
5474 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5475 associated with anonymous access to subprograms.
5477 2011-08-02 Geert Bosch <bosch@adacore.com>
5480 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5481 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5482 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5483 (Add_Symbol_Definition): Move to switch-c.adb
5484 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5485 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5486 (Add_Symbol_Definition): Move to switch-c.adb.
5487 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5489 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5491 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5492 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5494 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5495 (Add_Symbol_Definition): Moved from Prepcomp.
5496 * switch-c.ads: Update copyright notice. Use String_List instead of
5497 Argument_List, removing dependency on System.OS_Lib.
5499 2011-08-02 Yannick Moy <moy@adacore.com>
5501 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5502 mode on initialization expression which does not respect SPARK
5504 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5505 if the tree referenced by its argument represents an initialization
5506 expression in SPARK, suitable for initializing an object in an object
5509 2011-08-02 Javier Miranda <miranda@adacore.com>
5511 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5512 internally generated access to subprogram with its associated protected
5514 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5516 2011-08-02 Geert Bosch <bosch@adacore.com>
5518 * cstand.adb (Register_Float_Type): Print information about type to
5519 register, if the Debug_Flag_Dot_B is set.
5520 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5521 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5522 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5523 with a requested precision of more than Max_Digits digits and no more
5524 than Max_Base_Digits digits, if a range specification is present and the
5525 Predefined_Float_Types list has a suitable type to derive from.
5526 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5527 case of type completion with pragma Import
5529 (Process_Import_Predefined_Type): Processing to complete a type
5530 with pragma Import. Currently supports floating point types only.
5531 (Set_Convention_From_Pragma): Do nothing without underlying type.
5532 (Process_Convention): Guard against absence of underlying type,
5533 which may happen when importing incomplete types.
5534 (Process_Import_Or_Interface): Handle case of importing predefined
5535 types. Tweak error message.
5537 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5539 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5540 functions to previous change. Reorganize code slightly.
5542 2011-08-02 Geert Bosch <bosch@adacore.com>
5544 * back_end.ads (Register_Type_Proc): New call back procedure type for
5545 allowing the back end to provide information about available types.
5546 (Register_Back_End_Types): New procedure to register back end types.
5547 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5549 * cstand.adb (Back_End_Float_Types): New list for floating point types
5550 supported by the back end.
5551 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5552 (Copy_Float_Type): New procedure to make new copies of predefined types.
5553 (Register_Float_Type): New call back procedure to populate the BEFT list
5554 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5555 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5556 (Create_Float_Types): New procedure to create entities for floating
5557 point types predefined in Standard, and put these and any remaining
5558 BEFTs on the Predefined_Float_Types list.
5559 * stand.ads (Predefined_Float_Types): New list for predefined floating
5560 point types that do not have declarations in package Standard.
5562 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5564 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5565 entity node for the unit containing the parameter.
5566 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5567 (Add_Inlined_Subprogram): Likewise.
5568 * gcc-interface/Make-lang.in: Update dependencies.
5570 2011-08-02 Thomas Quinot <quinot@adacore.com>
5572 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5575 2011-08-02 Geert Bosch <bosch@adacore.com>
5577 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5579 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5581 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5582 computed value of Base_Type.
5584 2011-08-02 Yannick Moy <moy@adacore.com>
5586 * restrict.adb (Check_Restriction): issue an error for any use of
5587 class-wide, even if the No_Dispatch restriction is not set.
5588 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5589 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5590 when completing a private extension, the type named in the private part
5591 is not the same as that named in the visible part.
5592 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5593 of an inherited primitive operations of a tagged type or type extension
5594 that returns the tagged type.
5595 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5596 function which returns True for an implicit operation inherited by the
5597 derived type declaration for the argument type.
5598 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5601 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5603 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5604 Process_Bounds, to perform analysis with expansion of a range or an
5605 expression that is the iteration scheme for a loop.
5606 (Analyze_Iterator_Specification): If domain of iteration is given by a
5607 function call with a controlled result, as is the case if call returns
5608 a predefined container, ensure that finalization actions are properly
5610 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5612 2011-08-02 Javier Miranda <miranda@adacore.com>
5614 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5615 * gcc-interface/Make-lang.in: Update dependencies.
5617 2011-08-02 Javier Miranda <miranda@adacore.com>
5619 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5620 determine if the analysis is performed using N or Original_Node (N).
5621 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5622 functionality of routine Is_Variable avoids code duplication.
5623 * checks.adb (Determine_Range): Handle temporaries generated by
5624 Remove_Side_Effects.
5626 2011-08-02 Javier Miranda <miranda@adacore.com>
5628 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5629 expansion of the condition. Required since the previous analysis was
5630 done with expansion disabled (see Resolve_Quantified_Expression) and
5631 hence checks were not inserted and record comparisons have not been
5634 2011-08-02 Ed Falis <falis@adacore.com>
5636 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5639 2011-08-02 Bob Duff <duff@adacore.com>
5641 * opt.ads: Minor comment fix.
5643 2011-08-02 Bob Duff <duff@adacore.com>
5645 * sem_ch12.adb (Analyze_Package_Instantiation,
5646 Analyze_Subprogram_Instantiation): Turn off style checking while
5647 analyzing an instance. Whatever style checks that apply to the generic
5648 unit should apply, so it makes no sense to apply them in an instance.
5649 This was causing trouble when compiling an instance of a runtime
5650 unit that violates the -gnatyO switch.
5651 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5652 one of the two case statements, causing spurious errors.
5654 2011-08-02 Robert Dewar <dewar@adacore.com>
5656 * uname.adb: Minor reformatting.
5657 * gnatcmd.adb: Minor reformatting.
5658 * exp_attr.adb: Minor reformatting.
5660 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5662 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5663 No_Dispatching_Calls, do not look for the Assign primitive, because
5664 predefined primitives are not created in this case.
5666 2011-08-02 Bob Duff <duff@adacore.com>
5668 * stylesw.ads: Minor comment fixes.
5670 2011-08-02 Robert Dewar <dewar@adacore.com>
5672 * freeze.adb (Add_To_Result): New procedure.
5674 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5676 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5677 time, if the specific run-time routines for handling streams of strings
5678 are not available, use the default mechanism.
5680 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5682 * s-regpat.ads: Fix typo.
5684 2011-08-02 Vincent Celier <celier@adacore.com>
5686 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5687 not null, call it to create the in memory config project file without
5688 parsing an existing default config project file.
5690 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5692 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5694 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5696 * sem_elim.adb: an abstract subprogram does not need an eliminate
5697 pragma for its descendant to be eliminable.
5699 2011-08-02 Ed Falis <falis@adacore.com>
5701 * init.c: revert to handling before previous checkin for VxWorks
5702 * s-intman-vxworks.adb: delete unnecessary declarations related to
5703 using Ada interrupt facilities for handling signals.
5704 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5705 * s-intman-vxworks.ads: Import __gnat_install_handler as
5706 Initialize_Interrupts.
5707 * s-taprop-vxworks.adb: Delete Signal_Mask.
5708 (Abort_Handler): change construction of mask to unblock exception
5711 2011-08-02 Jerome Guitton <guitton@adacore.com>
5713 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5714 Debug_Raise_Exception before propagation starts.
5716 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5718 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5719 to Restriction_Check_Required.
5720 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5721 * sem_res.adb (Resolve_Call): Likewise.
5722 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5724 2011-08-02 Bob Duff <duff@adacore.com>
5726 * stylesw.ads: Update comment.
5727 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5728 * errout.ads: Remove obsolete comment.
5730 2011-08-02 Javier Miranda <miranda@adacore.com>
5732 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5733 (Set_Is_Safe_To_Reevaluate): new procedure.
5734 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5735 assignment is allowed on safe-to-reevaluate variables.
5736 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5737 temporary created to remove side effects in expressions that use
5738 the secondary stack as safe-to-reevaluate.
5739 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5740 variables that are not true constants.
5742 2011-08-02 Robert Dewar <dewar@adacore.com>
5744 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5745 sem_res.adb, sem_ch6.adb: Minor reformatting.
5747 2011-08-02 Jerome Guitton <guitton@adacore.com>
5749 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5751 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5753 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5754 not set Overridden_Operation if subprogram is an initialization
5757 2011-08-02 Yannick Moy <moy@adacore.com>
5759 * par-ch6.adb: Correct obsolete name in comments
5760 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5761 which takes two message arguments (existing function takes one), with
5762 second message used for continuation.
5763 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5764 block statements that originate from a source block statement, not
5765 generated block statements
5766 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5767 symmetry with procedure case
5768 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5769 function to issue an error in formal mode if a package specification
5770 contains more than one tagged type or type extension.
5771 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5772 parameters matching formals of tagged types are objects (or ancestor
5773 type conversions of objects), not general expressions. Issue an error
5774 on view conversions that are not involving ancestor conversion of an
5776 (Resolve_Type_Conversion): in formal mode, issue an error on the
5777 operand of an ancestor type conversion which is not an object
5778 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5779 procedure so that it works also for actuals of function calls
5780 (Is_Actual_Tagged_Parameter): new function which determines if its
5781 argument is an actual parameter of a formal of tagged type in a
5783 (Is_SPARK_Object_Reference): new function which determines if the tree
5784 referenced by its argument represents an object in SPARK
5786 2011-08-02 Robert Dewar <dewar@adacore.com>
5788 * sem_ch3.adb: Minor reformatting
5789 Minor comment addition
5790 Minor error msg text change
5792 2011-08-02 Javier Miranda <miranda@adacore.com>
5794 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5795 function. Used to be more precise when we generate a variable plus one
5796 assignment to remove side effects in the evaluation of the Bound
5798 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5799 of the bound expression to force its re-analysis and thus expand the
5800 associated transient scope (if required). Code cleanup replacing the
5801 previous code that declared the constant entity by an invocation to
5802 routine Force_Evaluation which centralizes this work in the frontend.
5804 2011-08-02 Robert Dewar <dewar@adacore.com>
5806 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5807 (Base_Type): Now uses improved Is_Base_Type function
5808 * einfo.ads (Base_Type): Inline this function
5810 2011-08-02 Robert Dewar <dewar@adacore.com>
5812 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5813 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5815 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5817 * gcc-interface/Make-lang.in: Update dependencies.
5818 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5821 2011-08-02 Yannick Moy <moy@adacore.com>
5823 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5824 non-simple expression used in delta constraint
5825 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5826 index constraint which is not a subtype mark
5827 * par.adb: With and use Restrict
5828 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5829 mode on component type which is not a subtype mark and default
5830 expression on component
5831 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5832 of string which does not have a lower index bound equal to 1
5833 (Array_Type_Declaration): issue an error in formal mode on index or
5834 component type which is not a subtype mark, and on aliased keyword on
5836 (Derived_Type_Declaration): issue an error in formal mode on interface,
5837 limited or abstract type
5838 (Record_Type_Declaration): issue an error in formal mode on interface
5839 (Record_Type_Definition): issue an error in formal mode on tagged types
5840 and type extensions not declared in the specification of a library unit
5841 package; on null non-tagged record; on variant part
5843 2011-08-02 Vincent Celier <celier@adacore.com>
5845 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5846 not declared for qualified library project when Library_Name is not
5847 declared, but Library_Dir is.
5849 2011-08-02 Robert Dewar <dewar@adacore.com>
5851 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5852 pragmas (affects aspects [Component_]Default_Value
5853 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5854 component type for the resolution
5856 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5858 * einfo.adb (Base_Type): Tune implementation for speed.
5860 2011-08-02 Robert Dewar <dewar@adacore.com>
5862 * freeze.adb: Minor reformatting.
5864 2011-08-02 Thomas Quinot <quinot@adacore.com>
5866 * scos.ads: Update comments.
5868 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5870 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5871 base type, because the parent may be a subtype of a private type whose
5872 convention is established in a private part.
5874 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5876 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5877 statement in a block when the expansion of the return expression has
5878 created a finalization chain.
5879 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5880 with the parent node.
5881 Add N_Extended_Return_Statement to handle the case where a transient
5882 object declaration appears in the Return_Object_Declarations list of
5883 an extended return statement.
5885 2011-08-02 Matthew Gingell <gingell@adacore.com>
5887 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5888 unused parameter 'name'.
5890 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5892 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5893 inherited operation, check whether its alias, which is the source
5894 operastion that it renames, has been marked eliminated.
5896 2011-08-02 Javier Miranda <miranda@adacore.com>
5898 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5899 in-mode parameter whose type is an access type since it can be used to
5900 modify its designated object. Enforce code that handles as safe an
5901 access type that is not access-to-constant but it is the result of a
5902 previous removal of side-effects.
5903 (Remove_Side_Effects): Minor code reorganization of cases which require
5904 no action. Done to incorporate documentation on new cases uncovered
5905 working in this ticket: no action needed if this routine was invoked
5906 too early and the nodes are not yet decorated.
5907 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5908 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5909 were issued with actuals that are implicitly provided by
5912 2011-08-02 Robert Dewar <dewar@adacore.com>
5914 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5916 2011-08-02 Yannick Moy <moy@adacore.com>
5918 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5919 to issue an error in formal mode on attribute not supported in this mode
5920 (Analyze_Attribute): issue errors on standard attributes not supported
5922 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5923 comment, and issue error in formal mode on modulus which is not a power
5925 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5927 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5929 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5930 operator on modular type (except 'not').
5932 2011-08-02 Robert Dewar <dewar@adacore.com>
5934 * gnat_rm.texi: Minor reformatting.
5936 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5938 * s-osinte-linux.ads: Minor comment update and reformatting.
5939 * i-cexten.ads: Make this unit pure, as for its parent.
5940 Will allow its usage in more contexts if needed.
5942 2011-08-02 Robert Dewar <dewar@adacore.com>
5944 * s-utf_32.ads: Minor comment fix.
5946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5948 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5949 operation of a tagged synchronized type, handle the case where the
5950 controlling argument is overloaded.
5952 2011-08-02 Yannick Moy <moy@adacore.com>
5954 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5955 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5956 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5957 SPARK mode and formal verification mode on processing SPARK restriction
5958 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5959 requiring consistency checking.
5961 2011-08-02 Robert Dewar <dewar@adacore.com>
5963 * sem_res.adb: Minor reformatting.
5965 2011-08-02 Robert Dewar <dewar@adacore.com>
5967 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5968 a-cforse.ads: Remove unneeded with of Ada.Containers
5969 Remove commented out pragma Inline's
5970 Move specifications of new subprograms to the actual specs
5972 2011-08-02 Yannick Moy <moy@adacore.com>
5974 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5975 a-cforse.ads: Update comments.
5977 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5979 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5981 2011-08-02 Robert Dewar <dewar@adacore.com>
5983 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5984 a-cforse.ads, a-cofove.ads: Minor reformatting.
5986 2011-08-02 Claire Dross <dross@adacore.com>
5988 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5989 a-cofove.ads: Add comments.
5991 2011-08-02 Yannick Moy <moy@adacore.com>
5993 * gnat_rm.texi: Document formal containers.
5995 2011-08-02 Emmanuel Briot <briot@adacore.com>
5997 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6000 2011-08-02 Robert Dewar <dewar@adacore.com>
6002 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6005 2011-08-02 Robert Dewar <dewar@adacore.com>
6007 * aspects.adb: New aspects Default_Value and Default_Component_Value
6008 New format of Aspect_Names table checks for omitted entries
6009 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6010 handling of boolean aspects for derived types.
6011 New aspects Default_Value and Default_Component_Value
6012 New format of Aspect_Names table checks for omitted entries
6013 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6014 (Has_Default_Value): New flag
6015 (Has_Default_Component_Value): New flag
6016 (Has_Default_Value): New flag
6017 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6019 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6020 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6021 Default_Value and Default_Component_Value
6022 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6023 New aspects Default_Value and Default_Component_Value
6024 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6025 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6027 2011-08-02 Vincent Celier <celier@adacore.com>
6029 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6030 inherit library kind.
6032 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6034 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6037 2011-08-02 Robert Dewar <dewar@adacore.com>
6039 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6041 2011-08-02 Yannick Moy <moy@adacore.com>
6043 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6045 2011-08-02 Robert Dewar <dewar@adacore.com>
6047 * impunit.adb: Add comment.
6049 2011-08-02 Yannick Moy <moy@adacore.com>
6051 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6052 qualification of aggregates in formal mode
6053 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6055 (Resolve_Aggregate): complete the test that an aggregate is adequately
6056 qualified in formal mode
6058 2011-08-02 Pascal Obry <obry@adacore.com>
6060 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6061 * mlib-prj.adb: Supress warning when compiling binder generated file.
6062 (Build_Library): Supress all warnings when compiling the binder
6065 2011-08-02 Yannick Moy <moy@adacore.com>
6067 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6069 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6070 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6071 Add with/use clauses to make Check_Formal_Restriction visible
6073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6075 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6076 in-parameters when type of the generic formal is private in the generic
6077 spec and non-private in the body.
6079 2011-08-02 Claire Dross <dross@adacore.com>
6081 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6082 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6083 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6084 * impunit.adb, Makefile.rtl: Take new files into account.
6086 2011-08-02 Robert Dewar <dewar@adacore.com>
6088 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6089 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6091 2011-08-02 Yannick Moy <moy@adacore.com>
6093 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6095 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6096 matching static array bounds, taking into account the special case of
6098 * sem_ch3.adb: Typo in comment.
6100 2011-08-02 Yannick Moy <moy@adacore.com>
6102 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6103 which issues an error in formal mode if its argument node is originally
6105 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6106 has a discriminant specification so that it does not include the case
6108 (Derived_Type_Declaration): move here the test that a derived type has a
6109 discriminant specification
6110 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6111 first element of a component association before accessing its choices
6112 (presence of component association is not enough)
6113 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6114 declaration is a library item before accessing the next element in a
6115 list, as library items are not member of lists
6116 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6117 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6118 Check_Formal_Restriction whenever possible.
6120 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6122 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6123 reference when needed.
6125 2011-08-02 Bob Duff <duff@adacore.com>
6127 * gnat_ugn.texi: Fix typo.
6129 2011-08-02 Vincent Celier <celier@adacore.com>
6131 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6132 archive file name. Do not use the full path name of archives for Open
6135 2011-08-02 Robert Dewar <dewar@adacore.com>
6137 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6138 Analyze_Aspect_Specifications
6140 (Analyze_Aspect_Specifications): New handling for boolean aspects
6141 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6142 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6143 sequence for Analyze_Aspect_Specifications
6144 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6145 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6147 2011-08-02 Robert Dewar <dewar@adacore.com>
6149 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6150 aspects, since these no longer exist.
6152 2011-08-02 Robert Dewar <dewar@adacore.com>
6154 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6155 semicolon, do not try to see if there are aspects following it.
6156 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6159 2011-08-02 Robert Dewar <dewar@adacore.com>
6161 * sem_ch8.adb, aspects.ads: Minor reformatting.
6163 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6165 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6166 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6168 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6170 2011-08-02 Yannick Moy <moy@adacore.com>
6172 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6173 mode on subprogram declaration outside of package specification, unless
6174 it is followed by a pragma Import
6175 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6176 Access_Type_Declaration): issue error in formal mode on access type
6177 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6179 (Analyze_Object_Declaration): issue error in formal mode on object
6180 declaration which does not respect SPARK restrictions
6181 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6182 declaration which does not respect SPARK restrictions
6183 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6184 error in formal mode on digits or delta constraint
6185 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6186 decimal fixed point type
6187 (Derived_Type_Declaration): issue error in formal mode on derived type
6188 other than type extensions of tagged record types
6189 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6190 with check on access definition
6191 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6192 mode on protected definition.
6193 (Analyze_Task_Definition): issue error in formal mode on task definition
6195 2011-08-02 Robert Dewar <dewar@adacore.com>
6197 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6199 2011-08-02 Javier Miranda <miranda@adacore.com>
6201 * sem_ch6.adb (Can_Override_Operator): New function.
6202 (Verify_Overriding_Indicator): Add missing code to check overriding
6203 indicator in operators. Fixes regression.
6204 (Check_Overriding_Indicator): Minor reformating after replacing the
6205 code that evaluates if the subprogram can override an operator by
6206 invocations to the above new function.
6208 (Write_Field26_Name): Add missing code to ensure that, following
6209 the documentation in einfo.ads, this field is not shown as attribute
6210 "Static_Initialization" on non-dispatching functions.
6212 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6214 * sem_res.adb (Resolve_Call): A call to
6215 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6216 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6217 i.e., when the second parameter is of type Time_Span.
6219 2011-08-02 Vincent Celier <celier@adacore.com>
6221 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6222 with an archive instead of -L<library dir> -l<library name>.
6224 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6226 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6227 mark the base types In_Use in addition to making the operations
6230 2011-08-02 Ed Falis <falis@adacore.com>
6232 * init.c: add and setup __gnat_signal_mask for the exception signals
6233 * s-inmaop-vxworks.adb: new file.
6234 * s-intman-vxworks.adb: remove unnecessary initializations and
6236 * s-intman-vxworks.ads: remove unnecessary variable
6237 * s-taprop-vxworks.adb: simplify signal initialization
6239 2011-08-02 Robert Dewar <dewar@adacore.com>
6241 * sem_ch8.adb: Minor code reorganization, comment updates.
6243 2011-08-02 Robert Dewar <dewar@adacore.com>
6245 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6246 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6248 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6249 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6251 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6253 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6254 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6255 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6256 use_type_clauses, to handle more efficiently use_type and use_all_type
6258 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6259 Ada2012 Use_All_Type clause.
6260 (Use_Class_Wide_Operations): new procedure.
6262 2011-08-02 Robert Dewar <dewar@adacore.com>
6264 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6265 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6266 expression to expression function.
6268 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6270 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6271 if types are compatible.
6273 2011-08-02 Yannick Moy <moy@adacore.com>
6275 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6276 returns True if its argument array types have same dimension and same
6277 static bounds at each index.
6278 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6279 OUT or IN OUT paramaters which are not view conversions in SPARK.
6280 (Resolve_Arithmetic_Op): issue an error in formal mode on
6281 multiplication or division with operands of fixed point types which are
6282 not qualified or explicitly converted.
6283 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6284 Boolean or array type (except String) operands.
6285 (Resolve_Equality_Op): issue an error in formal mode on equality
6286 operators for array types other than String with non-matching static
6288 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6289 for array types with non-matching static bounds. Factorize the code in
6290 Matching_Static_Array_Bounds.
6291 (Resolve_Qualified_Expression): issue an error in formal mode on
6292 qualified expressions for array types with non-matching static bounds.
6293 (Resolve_Type_Conversion): issue an error in formal mode on type
6294 conversion for array types with non-matching static bounds
6296 2011-08-02 Robert Dewar <dewar@adacore.com>
6298 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6300 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6302 * par-ch9.adb: save location of entry for proper error message.
6304 2011-08-02 Javier Miranda <miranda@adacore.com>
6306 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6307 (Use_Full_View) which permits this routine to climb through the
6308 ancestors using the full-view of private parents.
6309 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6310 Use_Full_View to true in calls to Is_Ancestor.
6311 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6312 true in call to Is_Ancestor.
6313 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6314 Use_Full_View to true in call to Is_Ancestor.
6315 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6316 call to Is_Ancestor.
6317 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6318 Use_Full_View to true in calls to Is_Ancestor.
6319 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6320 Make_Select_Specific_Data_Table, Register_Primitive,
6321 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6322 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6323 to true in call to Is_Ancestor.
6324 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6325 Use_Full_View to true in calls to Is_Ancestor.
6327 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6328 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6330 2011-08-02 Robert Dewar <dewar@adacore.com>
6332 * gnat_rm.texi: Minor reformatting.
6333 * sem_prag.adb: Minor reformatting.
6335 2011-08-02 Tristan Gingold <gingold@adacore.com>
6337 * vms_data.ads: Add VMS qualifier for -gnateP.
6339 2011-08-02 Robert Dewar <dewar@adacore.com>
6341 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6342 * par-ch7.adb (P_Package): Proper placement of aspects for package
6344 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6345 (End_Statements): Add Is_Sloc parameterr
6346 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6347 (Check_End): Ad Is_Sloc parameter
6348 (End_Statements): Add Is_Sloc parameterr
6350 2011-08-02 Vincent Celier <celier@adacore.com>
6352 * ug_words: Add VMS qualifier equivalent to -gnateP:
6353 /SYMBOL_PREPROCESSING.
6355 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6357 * gnat-style.texi: For hexadecimal numeric literals the typical
6358 grouping of digits is 4 to represent 2 bytes.
6359 A procedure spec which is split into several lines is indented two
6362 2011-08-02 Yannick Moy <moy@adacore.com>
6364 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6365 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6366 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6368 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6369 choice in array aggregate
6370 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6372 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6373 positional and named aggregate for record, or others in record
6374 aggregate, or multiple choice in record aggregate
6375 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6376 array operands to logical operations AND, OR and XOR do not have the
6377 same static lower and higher bounds
6378 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6380 2011-08-01 Robert Dewar <dewar@adacore.com>
6382 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6383 Replaces Last_Source_Node_In_Sequence.
6384 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6385 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6386 parens and blank in string (this was inconsistently implemented).
6388 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6389 blank in string (this was inconsistently implemented).
6391 (Set_Global_Switches): Set formal mode switches appropriately
6392 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6394 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6395 call Set_Error_Msg_Lang to set "spark" as language name.
6396 * par.adb: Remove unnecessary call to set formal language for errout
6397 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6398 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6400 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6401 calls to it, moved after resolution so that types are known
6402 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6403 result of concatenation is not of type String
6404 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6405 concatenation is not properly restricted
6406 * gnat_rm.texi: Add doc on pragma Spark_95.
6407 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6408 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6409 * gcc-interface/Make-lang.in: Update dependencies.
6411 2011-08-01 Javier Miranda <miranda@adacore.com>
6413 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6414 condition that detects if the overridden operation must replace an
6417 2011-08-01 Javier Miranda <miranda@adacore.com>
6419 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6420 code declarations inserted by Insert_Actions in each alternative of the
6421 N_Case_Expression node.
6423 2011-08-01 Robert Dewar <dewar@adacore.com>
6425 * sem_ch6.adb: Minor code reorganization.
6426 * sem_util.adb: Minor reformatting.
6428 2011-08-01 Pascal Obry <obry@adacore.com>
6430 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6431 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6433 2011-08-01 Yannick Moy <moy@adacore.com>
6435 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6436 literal or operator symbol which is prefixed
6437 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6438 mode on access attributes.
6439 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6440 that concatenation operands are properly restricted in formal mode
6441 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6442 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6443 result of the concatenation has a type different from String.
6444 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6445 Analyze_Quantified_Expression, Analyze_Slice,
6446 Analyze_Null): issue an error in formal mode on unsupported constructs
6448 (Analyze_Block_Statement): only issue error on source block statement
6449 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6450 function which returns the last node in a list of nodes for which
6451 Comes_From_Source returns True, if any
6452 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6453 Last_Source_Node_In_Sequence
6454 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6455 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6456 mode on unsupported constructs
6457 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6458 rest of the actions may be needed later on since the error is marked as
6460 * sinfo.ads: Typos in comments.
6462 2011-08-01 Pascal Obry <obry@adacore.com>
6464 * projects.texi: Minor editing.
6466 2011-08-01 Yannick Moy <moy@adacore.com>
6468 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6469 insertion character ~~
6470 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6471 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6472 with insertion character ~~
6473 (Set_Msg_Text): treat insertion character ~~
6474 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6475 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6476 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6477 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6478 errors related to the formal language restriction not serious
6479 (insertion character |).
6480 * par.adb (Par): set formal language for error messages if needed
6481 * sem_ch6.adb (Check_Missing_Return): take into account possible
6482 generated statements at the end of the function
6483 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6484 enumeration value to define a new pragma SPARK_95
6485 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6486 SPARK_Version): new type and variables to store the SPARK version
6488 (SPARK_Mode): return True when SPARK_Version is set
6489 * par-prag.adb: Correct indentation
6490 (Prag): take Pragma_SPARK_95 into account
6491 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6494 2011-08-01 Robert Dewar <dewar@adacore.com>
6496 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6497 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6498 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6500 2011-08-01 Pascal Obry <obry@adacore.com>
6502 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6503 Target_Name to Get_Path call.
6504 (Parse_Single_Project): Likewise.
6505 (Post_Parse_Context_Clause): Likewise.
6506 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6507 Call Initialise_Project_Path with the proper Target_Name.
6508 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6510 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6511 with the proper Target_Name.
6512 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6514 (Parse_Project_And_Apply_Config): Likewise.
6515 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6516 This is fine as this part of the code is supporting only native
6518 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6519 is fine as this part of the code is supporting only native compilation.
6521 2011-08-01 Yannick Moy <moy@adacore.com>
6523 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6524 of homonym, unless the homonym is one of the cases allowed in SPARK
6525 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6526 package declaration occurring after a body.
6528 2011-08-01 Robert Dewar <dewar@adacore.com>
6530 * checks.adb, exp_ch4.adb: Minor reformatting.
6532 2011-08-01 Javier Miranda <miranda@adacore.com>
6534 * einfo.ads (Access_Disp_Table): Fix documentation.
6535 (Dispatch_Table_Wrappers): Fix documentation.
6537 2011-08-01 Pascal Obry <obry@adacore.com>
6539 * prj-env.adb, prj-env.ads: Minor reformatting.
6541 2011-08-01 Yannick Moy <moy@adacore.com>
6543 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6544 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6545 procedures out of these packages.
6546 * errout.ads, errout.adb
6547 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6548 procedures in of this package
6549 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6550 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6551 on misplaced later vs initial declarations, like in Ada 83
6552 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6553 formal mode on attribute of private type whose full type declaration
6555 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6556 package declaration inside a package specification
6557 (Analyze_Full_Type_Declaration): issue error in formal mode on
6558 controlled type or discriminant type
6559 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6560 user-defined operator means that it should come from the source
6561 (New_Overloaded_Entity): issue error in formal mode on overloaded
6563 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6565 2011-08-01 Thomas Quinot <quinot@adacore.com>
6567 * atree.adb: Minor reformatting.
6568 * checks.adb: Minor reformatting.
6570 2011-08-01 Vincent Celier <celier@adacore.com>
6572 * s-parame-vms-ia64.ads: Fix typo in comment
6574 * s-parame-vms-restrict.ads: Removed, unused.
6576 2011-08-01 Javier Miranda <miranda@adacore.com>
6579 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6581 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6582 * sem_ch3.ads, sem_ch3.adb
6583 (Is_Constant_Bound): New extended version of the subprogram that was
6584 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6585 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6586 * sem_aux.ads (Constant_Value): Fix typo in comment.
6587 * checks.adb (Generate_Index_Checks): New implementation which, for
6588 array objects with constant bounds, generates the runtime check
6589 referencing the bounds of the array type. For other cases this routine
6590 provides its previous behavior obtaining such values from the array
6592 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6594 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6595 we cannot have semantic interpretations of the new node.
6597 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6599 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6602 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6604 * sem_ch8.adb: Minor code editing.
6605 * s-vxwext.adb: Remove trailing space.
6606 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6607 consistency with other files.
6609 2011-08-01 Thomas Quinot <quinot@adacore.com>
6611 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6613 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6615 * par-ch10.adb: reject parameterized expressions as compilation unit.
6616 * sem_ch4.adb: handle properly conditional expression with overloaded
6617 then_clause and no else_clause.
6619 2011-08-01 Tristan Gingold <gingold@adacore.com>
6621 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6622 like done by System.Aux_DEC.
6623 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6625 2011-08-01 Yannick Moy <moy@adacore.com>
6627 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6628 missing label at end of declaration (subprogram or package)
6629 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6630 of positional and named parameter association
6631 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6632 Error_Msg_SP which adds a prefix to the error message giving the name
6633 of the formal language analyzed
6634 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6635 access result type in subprogram, unconstrained array as result type,.
6636 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6638 * sem_ch8.adb: Code clean up.
6640 2011-08-01 Javier Miranda <miranda@adacore.com>
6642 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6643 * einfo.ads (Access_Disp_Table): Fix documentation.
6644 (Dispatch_Table_Wrappers): Fix documentation.
6645 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6646 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6647 to enforce the documentation of this attribute.
6648 (Set_Is_Interface): Cleanup the assertion.
6649 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6650 the Underlying_Type entity before reading attribute Access_Disp_Table.
6651 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6652 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6653 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6654 the Underlying_Type entity before reading attribute Access_Disp_Table.
6655 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6656 Locate the Underlying_Type entity before reading attribute
6659 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6661 * s-poosiz.ads: Additional overriding indicators.
6663 2011-08-01 Yannick Moy <moy@adacore.com>
6665 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6667 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6668 parameter specification does not include a subtype mark.
6669 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6670 formal mode on abstract subprogram.
6671 (Analyze_Subprogram_Specification): issue error in formal mode on
6672 user-defined operator.
6673 (Process_Formals): issue error in formal mode on access parameter and
6675 * sem_ch9.adb (Analyze_Abort_Statement,
6676 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6677 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6678 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6679 Analyze_Requeue, Analyze_Selective_Accept,
6680 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6681 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6682 issue error in formal mode on user-defined raise statement.
6684 2011-08-01 Thomas Quinot <quinot@adacore.com>
6686 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6687 declaration being hidden when overriding an implicit inherited
6689 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6690 (-gnats), do not complain about a source file that contains only a
6693 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6695 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6696 variable if already set.
6698 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6700 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6701 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6702 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6703 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6704 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6705 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6706 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6707 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6708 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6709 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6710 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6711 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6712 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6713 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6714 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6715 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6716 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6717 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6718 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6719 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6720 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6721 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6722 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6723 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6724 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6725 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6726 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6727 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6728 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6729 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6730 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6731 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6732 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6733 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6734 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6735 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6736 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6737 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6738 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6739 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6740 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6741 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6742 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6743 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6744 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6745 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6746 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6747 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6748 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6749 Use GNAT instead of GNARL.
6751 2011-08-01 Bob Duff <duff@adacore.com>
6753 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6754 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6755 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6758 2011-08-01 Yannick Moy <moy@adacore.com>
6760 * debug.adb (d.D) reverve flag for the SPARK mode
6761 (d.E) reverve flag for SPARK generation mode
6762 (d.F) reverve flag for Why generation mode
6763 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6764 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6765 functions which return True when the corresponding modes are set
6766 (Formal_Language): return "spark" or "alfa" when in formal verification
6768 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6769 Error_Msg to prefix the error message with a tag giving the formal
6771 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6772 message with a tag giving the formal language
6773 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6775 (Analyze_Case_Statement): issue error in formal mode on case statement
6776 with a single "others" case alternative
6777 (Analyze_Exit_Statement): issue errors in formal mode on exit
6778 statements which do not respect SPARK restrictions
6779 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6780 (Check_Unreachable_Code): always issue an error (not a warning) in
6781 formal mode on unreachable code (concerns both code after an infinite
6782 loop and after an unconditional jump, both not allowed in SPARK)
6783 * sem_ch6.adb (Analyze_Return_Statement): add call to
6784 Set_Return_Present for a procedure containing a return statement
6785 (already done for functions in Analyze_Function_Return)
6786 (Analyze_Function_Return): issue error in formal mode on extended
6787 return or if return is not last statement in function
6788 (Check_Missing_Return): issue error in formal mode if function does
6789 not end with return or if procedure contains a return
6790 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6791 function to detect if there is an inner scope of its parameter S which
6794 2011-08-01 Thomas Quinot <quinot@adacore.com>
6796 * sem_ch6.ads: Minor reformatting.
6798 2011-08-01 Javier Miranda <miranda@adacore.com>
6800 * sem_util.adb (Abstract_Interface_List): Complete condition when
6801 processing private type declarations to avoid reading unavailable
6803 (Is_Synchronized_Tagged_Type): Complete condition when processing
6804 private extension declaration nodes to avoid reading unavailable
6807 2011-08-01 Thomas Quinot <quinot@adacore.com>
6809 * sem_ch3.adb: Minor reformatting.
6811 2011-08-01 Thomas Quinot <quinot@adacore.com>
6813 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6814 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6815 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6816 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6817 for VMS, instead parametrize the common implementation with
6818 System.Parameters declarations.
6820 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6822 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6824 2011-08-01 Tristan Gingold <gingold@adacore.com>
6826 * seh_init.c: Fix SEH handler installation on win64.
6828 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6830 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6831 double analysis of an anonymous access to subprogram, because it can
6832 lead to improper sharing of profiles and a back-end crash.
6834 2011-08-01 Robert Dewar <dewar@adacore.com>
6836 * make.adb, sem_ch4.adb: Minor reformatting.
6837 * gcc-interface/Make-lang.in: Update dependencies.
6838 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6840 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6842 * gnat_rm.texi: Fix definition of Long_Integer.
6844 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6846 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6847 to prevent storage exhaustion.
6848 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6849 finalized is a function body, insert the cleanup code before the final
6850 return statement, to prevent spurious warnings.
6851 * s-pooglo.ads: add overriding indicator.
6853 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6855 * sem_ch4.adb (Operator_Check): improve error message when both a
6856 with_clause and a use_clause are needed to make operator usage legal.
6857 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6858 determine whether a compilation unit is visible within an other,
6859 either through a with_clause in the current unit, or a with_clause in
6860 its library unit or one one of its parents.
6862 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6864 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6865 over an arbitrary expression of an array or container type.
6866 * lib-xref.adb: clarify comment.
6868 2011-08-01 Bob Duff <duff@adacore.com>
6870 * einfo.ads: Minor reformatting.
6871 * debug.adb: Minor comment improvement.
6873 2011-08-01 Javier Miranda <miranda@adacore.com>
6875 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6876 consider hidden subprograms as valid candidates.
6878 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6880 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6882 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6884 * gnat_ugn.texi: Fix typo.
6886 2011-08-01 Robert Dewar <dewar@adacore.com>
6888 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6889 lib-xref.adb: Minor reformatting
6891 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6893 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6894 when to generate a call to Move_Final_List.
6895 (Has_Controlled_Parts): Remove this function.
6897 2011-08-01 Geert Bosch <bosch@adacore.com>
6899 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6902 2011-08-01 Thomas Quinot <quinot@adacore.com>
6904 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6905 explicit raise of a predefined exception as Comes_From_Source if the
6906 original N_Raise_Statement comes from source.
6908 2011-08-01 Robert Dewar <dewar@adacore.com>
6910 * sinfo.ads: Add comment.
6911 * sem_ch6.adb: Minor reformatting.
6913 2011-08-01 Robert Dewar <dewar@adacore.com>
6915 * freeze.adb (Freeze_Entity): Refine check for bad component size
6916 clause to avoid rejecting confirming clause when atomic/aliased present.
6918 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6920 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6921 better determine whether an entity reference is a write.
6922 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6924 * lib-xref.adb (Output_References): Do no suppress a read reference at
6925 the same location as an immediately preceeding modify-reference, to
6926 handle properly in-out actuals.
6928 2011-08-01 Tristan Gingold <gingold@adacore.com>
6930 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6932 2011-08-01 Quentin Ochem <ochem@adacore.com>
6934 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6935 heap to compute the result.
6937 2011-08-01 Robert Dewar <dewar@adacore.com>
6939 * atree.ads: Minor reformatting.
6941 2011-08-01 Emmanuel Briot <briot@adacore.com>
6943 * g-expect.adb (Get_Command_Output): Fix memory leak.
6945 2011-08-01 Geert Bosch <bosch@adacore.com>
6947 * cstand.adb (P_Float_Type): New procedure to print the definition of
6948 predefined fpt types.
6949 (P_Mixed_Name): New procedure to print a name using mixed case
6950 (Print_Standard): Use P_Float_Type for printing floating point types
6951 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6952 precision IEEE float.
6954 2011-08-01 Thomas Quinot <quinot@adacore.com>
6956 * sem_ch3.adb: Minor reformatting.
6958 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6960 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6961 the completion of a generic function, insert the new body rather than
6962 rewriting the original.
6964 2011-08-01 Yannick Moy <moy@adacore.com>
6966 * sinfo.ads, errout.ads: Typos in comments.
6968 2011-08-01 Robert Dewar <dewar@adacore.com>
6970 * par-endh.adb: Minor reformatting.
6972 2011-08-01 Robert Dewar <dewar@adacore.com>
6974 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6975 (Pre_Post_Aspects): New subtype.
6976 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6977 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6978 * par-ch7.adb (P_Package): Remove Decl parameter
6979 (P_Package): Handle new syntax for aspects (before IS)
6980 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6982 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6983 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6984 (P_Package): Remove Decl parameter
6985 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6987 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6989 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6990 * sinfo.ads: Document new syntax for aspects in packages etc.
6991 * sprint.adb: Handle new syntax of aspects before IS in package
6993 2011-08-01 Thomas Quinot <quinot@adacore.com>
6995 * atree.ads: Minor reformatting.
6996 * sem_prag.adb: Minor reformatting.
6998 2011-08-01 Robert Dewar <dewar@adacore.com>
7000 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7001 case expr alternative.
7003 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7005 * sem_ch12.adb: Fix typo.
7007 2011-08-01 Geert Bosch <bosch@adacore.com>
7009 * sem_prag.adb (Check_No_Link_Name): New procedure.
7010 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7011 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7012 instead of Standard_Long_Long_Float_Size global. Preparation for
7013 eventual removal of per type constants.
7014 * exp_util.ads (Get_Stream_Size): New function returning the stream
7015 size value of subtype E.
7016 * exp_util.adb (Get_Stream_Size): Implement new function.
7017 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7019 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7021 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7023 2011-08-01 Geert Bosch <bosch@adacore.com>
7025 * cstand.adb: Fix comments.
7026 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7029 2011-08-01 Robert Dewar <dewar@adacore.com>
7031 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7033 2011-08-01 Geert Bosch <bosch@adacore.com>
7035 * atree.ads: Fix comment.
7037 2011-08-01 Robert Dewar <dewar@adacore.com>
7039 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7040 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7041 * par.adb: Add with for Namet.Sp.
7042 * par-tchk.adb: Minor reformatting.
7044 2011-08-01 Vincent Celier <celier@adacore.com>
7046 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7047 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7048 of the init procedure of a SAL.
7049 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7052 2011-08-01 Thomas Quinot <quinot@adacore.com>
7054 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7057 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7059 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7061 2011-08-01 Thomas Quinot <quinot@adacore.com>
7063 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7064 conformant with its spec (return True only for types that have
7065 an overriding Initialize primitive operation that prevents them from
7066 having preelaborable initialization).
7067 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7068 initialization for controlled types in Ada 2005 or later mode.
7070 2011-08-01 Robert Dewar <dewar@adacore.com>
7072 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7074 (Same_Aspect): New function.
7075 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7076 Type_Invariant, Precondition, Postcondition.
7077 * snames.ads-tmpl: Add Name_Type_Invariant.
7079 2011-08-01 Robert Dewar <dewar@adacore.com>
7081 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7083 (Freeze_All_Ent): Fix error in handling inherited aspects.
7084 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7085 already analyzed, but don't skip entire processing of a declaration,
7086 that's wrong in some cases of declarations being rewritten.
7087 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7088 Don't delay for integer, string literals
7089 Treat predicates in usual manner for delay, remove special case code,
7091 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7092 (Build_Predicate_Function): Update saved expression in aspect
7093 (Build_Invariant_Procedure): Update saved expression in aspect
7094 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7095 of replacement of discriminant references if the reference is simple.
7097 2011-08-01 Robert Dewar <dewar@adacore.com>
7099 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7100 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7101 Static_Predicate and Dynamic_Predicate.
7102 (Build_Predicate_Function): Add processing for Static_Predicate
7103 and Dynamic_Predicate.
7104 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7105 (From_Static_Predicate): New flag
7106 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7108 2011-08-01 Robert Dewar <dewar@adacore.com>
7110 * usage.adb: Documentation cleanup for Ada version modes in usage.
7111 * expander.adb: Minor reformatting.
7113 2011-08-01 Robert Dewar <dewar@adacore.com>
7115 * atree.ads: Minor comment fix.
7116 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7117 a-witeio.ads, sem_prag.adb: Minor reformatting.
7119 2011-08-01 Doug Rupp <rupp@adacore.com>
7121 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7122 pointers. Use descrip.h header file for convenience. Add some
7125 2011-08-01 Robert Dewar <dewar@adacore.com>
7127 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7128 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7129 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7131 (Check_Aspect_At_End_Of_Declarations): New procedure
7132 (Analye_Aspect_Specification): Minor changes for above procedures
7133 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7134 specification node as well.
7136 2011-08-01 Pascal Obry <obry@adacore.com>
7138 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7139 Windows files. Use GetFilesAttributes() in this case to check for file
7140 existence instead of returning with an error code.
7142 2011-08-01 Vincent Celier <celier@adacore.com>
7144 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7145 High is above Source length.
7147 2011-08-01 Robert Dewar <dewar@adacore.com>
7149 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7151 2011-08-01 Robert Dewar <dewar@adacore.com>
7153 * aspects.ads (Boolean_Aspects): New subtype.
7154 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7155 for derived types in cases where the parent type and derived type have
7157 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7158 with aspects when parent type also has aspects.
7159 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7160 boolean expression at this point).
7161 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7162 accordance with final decision on the Ada 2012 feature.
7163 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7165 2011-08-01 Matthew Heaney <heaney@adacore.com>
7167 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7169 2011-08-01 Pascal Obry <obry@adacore.com>
7171 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7172 Fix Replace_Slice when High is above current string size.
7173 (Replace_Slice): Fix DL computation when High is above current
7176 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7178 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7180 2011-08-01 Matthew Heaney <heaney@adacore.com>
7182 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7185 2011-08-01 Pascal Obry <obry@adacore.com>
7187 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7190 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7192 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7193 access to protected subprograms in generic bodies.
7194 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7195 protected type, indicate that the convention of the subprogram is
7196 Convention_Protected, because it may be used in subsequent declarations
7197 within the protected declaration.
7199 2011-08-01 Vincent Celier <celier@adacore.com>
7201 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7202 and "final" procedures when the name of the library is "ada", to avoid
7203 duplicate symbols "adainit" and "adafinal" in executables.
7205 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7207 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7208 quantified expression that appears within a postcondition and uses the
7209 Ada2012 'Result attribute.
7211 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7213 * init.c (__gnat_error_handler): Cast reason to int.
7214 (__gnat_install_handler): Explain sa_sigaction use.
7216 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7218 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7219 subprogram has copy-in copy-out parameters, try to promote the mode of
7220 the return type if it is passed in registers.
7222 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7224 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7225 left operand as addressable.
7227 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7229 * gcc-interface/gigi.h (build_function_stub): Remove.
7230 (build_return_expr): Likewise.
7231 (convert_vms_descriptor): Declare.
7232 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7233 (build_function_stub): Move to...
7234 * gcc-interface/utils2.c (build_return_expr): Move to...
7235 * gcc-interface/trans.c (build_function_stub): ...here.
7236 (build_return_expr): ...here.
7237 (Subprogram_Body_to_gnu): Add local variable for language_function.
7238 Disconnect the parameter attributes cache, if any, once done with it.
7239 Call end_subprog_body only after setting the end_locus.
7240 Build the stub associated with the function, if any, at the very end.
7241 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7242 variables and streamline control flow.
7244 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7247 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7250 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7253 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7254 Assign to act.sa_sigaction.
7255 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7256 current->return_address to char * before arithmetic.
7258 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7260 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7261 Correct argument types.
7262 Extract code from reason.
7263 (__gnat_install_handler): Assign to act.sa_sigaction.
7265 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7267 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7268 (GNAT1_OBJS): ...here.
7270 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7273 * g-socthi-mingw.adb (Fill): Fix formatting.
7275 * gcc-interface/gigi.h: Move around comment.
7277 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7280 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7282 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7285 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7287 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7289 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7290 range comparison if Pmode is SImode.
7292 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7293 Eric Botcazou <ebotcazou@adacore.com>
7295 * adadecode.c: Wrap up in extern "C" block.
7296 * adadecode.h: Likewise.
7297 * adaint.c: Likewise. Remove 'const' keyword.
7298 * adaint.h: Likewise.
7300 * atree.h: Likewise.
7302 * cstreams.c: Likewise.
7306 * final.c: Likewise.
7308 * initialize.c: Likewise.
7310 * namet.h: Likewise.
7311 * nlists.h: Likewise.
7312 * raise.c: Likewise.
7313 * raise.h: Likewise.
7314 * repinfo.h: Likewise.
7315 * seh_init.c: Likewise.
7316 * targext.c: Likewise.
7317 * tracebak.c: Likewise.
7318 * uintp.h: Likewise.
7319 * urealp.h: Likewise.
7320 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7321 * xsinfo.adb: Likewise.
7322 * xsnamest.adb: Likewise.
7323 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7324 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7325 * gcc-interface/misc.c: Likewise.
7326 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7327 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7328 ada/targext.o here...
7329 (GNAT_ADA_OBJS): ...and not here.
7330 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7331 (GNATBIND_OBJS): Reorder.
7333 2011-07-07 Richard Henderson <rth@redhat.com>
7335 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7336 dwarf2out_frame_init.
7338 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7340 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7342 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7345 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7347 2011-07-06 Richard Guenther <rguenther@suse.de>
7349 * gcc-interface/misc.c (gnat_init): Merge calls to
7350 build_common_tree_nodes and build_common_tree_nodes_2.
7351 Re-initialize boolean_false_node.
7353 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7354 Olivier Hainque <hainque@adacore.com>
7355 Nicolas Setton <setton@adacore.com>
7357 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7358 the type according to the ARTIFICIAL_P parameter.
7359 (create_type_decl): Likewise.
7360 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7362 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7364 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7365 (gnatbind): Likewise.
7367 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7369 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7371 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7373 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7374 local variable throughout. Remove useless call to Base_Type.
7375 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7376 Take it also into account for the volatileness of the field. Set the
7377 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7379 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7381 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7382 on a dereference built for a by-ref object if it has an address clause.
7384 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7386 * einfo.ads (Address_Taken): Document use for the second argument of
7387 Asm_Input and Asm_Output attributes.
7388 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7389 argument is an entity name, then set Address_Taken on it.
7390 <Attribute_Asm_Output>: Likewise.
7391 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7392 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7393 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7394 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7396 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7399 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7401 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7403 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7404 (ada/utils.o): Update dependencies.
7405 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7406 ../../../libcpp/libcpp.a.
7407 * gcc-interface/utils.c: Include common/common-target.h.
7408 (process_attributes): Use targetm_common.have_named_sections.
7410 2011-06-07 Richard Guenther <rguenther@suse.de>
7412 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7415 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7417 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7418 TREE_THIS_NOTRAP flag.
7420 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7422 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7425 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7427 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7428 constants whose full view has discriminants specially.
7430 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7432 * gcc-interface/utils.c: Include diagnostic.h.
7433 (gnat_write_global_declarations): Output debug information for all
7434 global type declarations before finalizing the compilation unit.
7435 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7437 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7439 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7441 2011-05-25 Kai Tietz <ktietz@redhat.com>
7443 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7444 initialization instead of const/none-const pointer assignment.
7446 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7448 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7449 $(EXTRA_GNAT1_OBJS).
7450 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7451 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7452 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7453 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7454 libcommon-target.a instead of prefix.o.
7456 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7459 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7461 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7463 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7464 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7465 instead of version.o.
7467 2011-05-18 Kai Tietz <ktietz@redhat.com>
7469 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7470 boolean_false_node instead of integer_zero_node.
7471 (convert_with_check): Likewise.
7472 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7474 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7476 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7477 type of the parameter is an unconstrained array, convert the actual to
7478 the type of the formal in the In Out and Out cases as well.
7480 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7482 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7483 call build_function_type_array or build_varargs_function_type_array
7485 (create_subprog_type): Don't call build_function_type; call
7486 build_function_type_vec instead.
7488 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7490 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7491 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7492 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7494 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7496 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7498 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7499 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7501 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7503 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7505 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7507 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7508 instead of accessing TYPE_ARG_TYPES directly.
7509 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7511 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7514 * gcc-interface/gigi.h (get_variant_part): Declare.
7515 * gcc-interface/decl.c (get_variant_part): Make global.
7516 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7517 types have the same constant size, are record types and T1 has a
7518 variant part while T2 doesn't.
7520 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7522 * gcc-interface/utils.c (begin_subprog_body): Do not call
7524 (end_subprog_body): Likewise.
7526 2011-05-04 Richard Guenther <rguenther@suse.de>
7528 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7530 (pos_to_constructor): Likewise.
7532 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7533 Eric Botcazou <ebotcazou@adacore.com>
7535 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7536 of build_function_type. Adjust calls to...
7537 (build_raise_check): ...this. Do not take a void_tree parameter.
7538 Call build_function_type_list instead of build_function_type.
7539 Fix head comment and swap couple of conditional blocks.
7541 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7543 * gnatvsn.ads (Library_Version): Bump to 4.7.
7544 (Current_Year): Bump to 2011.
7546 2011-04-29 Michael Matz <matz@suse.de>
7548 * gcc-interface/misc.c (gnat_handle_option): Set
7549 warn_maybe_uninitialized.
7551 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7553 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7554 the Watson/McCabe paper.
7556 2011-04-23 Jim Meyering <meyering@redhat.com>
7558 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7560 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7562 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7565 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7567 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7569 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7570 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7571 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7572 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7573 <all>: Do not set flags on the reused DECL node coming from an alias.
7574 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7575 don't need debug info here...
7576 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7577 (gigi): Adjust calls to create_subprog_decl.
7578 (build_raise_check): Likewise.
7579 (establish_gnat_vms_condition_handler): Likewise.
7580 (Compilation_Unit_to_gnu): Likewise.
7581 (gnat_to_gnu): Likewise.
7583 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7585 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7586 (NO_REORDER_ADAFLAGS): New variable.
7587 (EXTRA_GNATTOOLS): Always define.
7588 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7589 Clean up and adjust list of files compiled with special options.
7590 * gcc-interface/Make-lang.in: Likewise.
7591 (ada/decl.o): Cosmetical change.
7592 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7594 2011-04-20 Jim Meyering <meyering@redhat.com>
7596 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7598 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7600 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7601 $(CFLAGS) on the link line.
7603 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7605 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7606 padded type built for the return type if it is unconstrained.
7608 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7610 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7612 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7614 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7615 before calling TREE_CHAIN.
7616 * gcc-interface/misc.c (gnat_init_ts): New function.
7617 (LANG_HOOKS_INIT_TS): Define.
7619 2011-04-12 Martin Jambor <mjambor@suse.cz>
7621 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7622 instead of cgraph_node.
7624 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7626 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7627 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7630 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7632 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7633 of aggregate types that contain a placeholder.
7635 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7637 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7639 (handle_type_generic_attribute): Likewise.
7641 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7644 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7646 2011-04-04 Kai Tietz <ktietz@redhat.com>
7649 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7652 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7654 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7655 type case, do not strip a padding type around the array type.
7657 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7659 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7662 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7664 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7665 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7666 code for -feliminate-unused-debug-types.
7667 (gnat_post_options): Likewise.
7669 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7671 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7672 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7675 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7677 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7678 DECL_ARTIFICIAL flag on enumeration types.
7680 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7682 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7683 fat pointer types artificial unconditionally.
7684 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7687 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7689 * gcc-interface/gigi.h (get_dummy_type): Declare.
7690 (build_dummy_unc_pointer_types): Likewise.
7691 (finish_fat_pointer_type): Likewise.
7692 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7693 fat pointer type has been built, complete it in place.
7694 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7695 and thin pointers. Remove useless variable.
7696 (finish_fat_pointer_type): Make global and move to...
7697 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7698 (get_dummy_type): New function.
7699 (build_dummy_unc_pointer_types): Likewise.
7700 (gnat_pushdecl): Propage the name to the anonymous variants only.
7701 (update_pointer_to): Only adjust the pointer types in the unconstrained
7704 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7706 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7707 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7708 if this is a Taft amendment type and the full declaration is available.
7709 * gcc-interface/trans.c (process_type): Likewise.
7710 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7711 (process_freeze_entity): Likewise.
7712 * gcc-interface/utils.c (dummy_global): New static variable.
7713 (gnat_write_global_declarations): If there are types declared as used
7714 at the global level, insert them in the global hash table.
7716 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7718 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7719 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7720 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7722 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7723 flag of the type accordingly.
7724 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7726 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7728 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7729 finalizing types when updating the pointers to the designated type.
7730 <all>: Finalize the deferred types even if we didn't defer processing
7731 of incomplete types in this invocation.
7733 2011-04-01 Olivier Hainque <hainque@adacore.com>
7734 Nicolas Setton <setton@adacore.com>
7735 Eric Botcazou <ebotcazou@adacore.com>
7737 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7738 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7740 2011-03-28 Kai Tietz <ktietz@redhat.com>
7742 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7744 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7745 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7747 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7749 2011-03-28 Tristan Gingold <gingold@adacore.com>
7752 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7753 Use ada output of gnatbind.
7754 (ada/b_gnatb.adb): Ditto.
7755 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7756 (ada.mostlyclean, ada.stage1)
7757 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7758 (ada.stagefeedback): Adjust.
7759 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7760 Use ada output of gnatbind.
7761 (b_gnatm.adb): Ditto.
7762 (b_gnatl.o, b_gnatm.o): New rules.
7764 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7766 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7767 for the padded type built to support a specified size or alignment.
7769 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7771 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7772 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7773 unconditionally to the end of the unit when the designated type is
7775 <all>: Rename local variable. Attempt to un-defer types only and do it
7776 for limited_with'ed types as well.
7777 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7778 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7779 consistently and remove redundant call to finalize_from_with_types.
7781 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7783 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7784 subprograms without a previous spec declared in the same unit.
7785 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7786 subprograms at the end of the unit instead of at the beginning.
7787 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7788 isn't public for the special handling of non-inline functions nested
7789 inside inline external functions.
7791 2011-03-25 Jeff Law <law@redhat.com>
7793 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7795 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7797 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7798 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7799 to compute Set_Size_Depends_On_Discriminant.
7800 (Layout_Type): Call it on array types in back-end layout mode.
7801 * sem_util.adb (Requires_Transient_Scope): Return true for array
7802 types only if the size depends on the value of discriminants.
7803 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7804 type if the RHS is a call to a function that returns an unconstrained
7805 type with default discriminant.
7807 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7809 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7810 non-conversion to the nominal result type at the end.
7812 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7814 * gcc-interface/trans.c (create_temporary): New function taken from...
7815 (create_init_temporary): ...here. Call it.
7816 (call_to_gnu): Create the temporary for the return value early, if any.
7817 Create it for a function with copy-in/copy-out parameters if there is
7818 no target; in other cases of copy-in/copy-out, use another temporary.
7819 Push the new binding level lazily. Add and rename local variables.
7821 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7823 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7825 (set_rm_size): Likewise.
7827 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7829 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7830 for the padded type built in order to support a specified alignment.
7831 Fix incorrect formatting.
7833 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7836 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7838 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7840 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7841 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7842 to the end of the list. Adjust recursive call. Rename local variable.
7843 If REORDER is true, reorder components of the record type.
7844 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7845 components_to_record and adjust the parameter list.
7847 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7849 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7850 disabled, use the variable for bounds of loop iteration scheme.
7852 2011-03-21 Kai Tietz <ktietz@redhat.com>
7855 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7857 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7859 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7860 out whether the expression is read-only. Short-circuit placeholder
7861 case and rename a couple of local variables.
7863 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7865 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7866 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7867 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7868 (convert): Deal with conversions from a smaller form type specially.
7870 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7872 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7873 its argument, except for the special -I- switch.
7875 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7877 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7880 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7882 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7884 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7886 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7888 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7889 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7890 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7891 Do not generate the check directly, instead instantiate the template
7892 check present in the descriptor.
7893 (make_descriptor_field): Move around.
7894 (build_vms_descriptor32): Build a template check in the POINTER field.
7895 (build_vms_descriptor): Remove useless suffixes.
7896 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7898 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7901 * targext.c: Include target files if IN_RTS is defined.
7903 2011-01-26 Richard Guenther <rguenther@suse.de>
7906 * targext.c: Include config.h.
7907 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7910 2011-01-04 Pascal Obry <obry@adacore.com>
7911 Eric Botcazou <ebotcazou@adacore.com>
7913 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7915 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7917 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7918 end-of-case on the end label and its associated gotos, if any.
7920 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7922 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7923 expressions of the parameter cache within the statement group of
7926 2011-01-04 Olivier Hainque <hainque@adacore.com>
7927 Eric Botcazou <ebotcazou@adacore.com>
7929 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7930 (set_end_locus_from_node): New function.
7931 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7932 make and the function end_locus.
7933 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7934 for the elaboration subprogram.
7935 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7936 set the end_locus of the expression as well.
7938 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7941 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7942 variables that are referenced in exception handlers volatile.
7946 Copyright (C) 2011 Free Software Foundation, Inc.
7948 Copying and distribution of this file, with or without modification,
7949 are permitted in any medium without royalty provided the copyright
7950 notice and this notice are preserved.
7952 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7953 - fix bugs in the description of Source_Trace;
7954 - get rid of UNIT_NAME;
7956 2011-08-02 Javier Miranda <miranda@adacore.com>
7959 (Build_Dispatching_Requeue): Adding support for VM targets
7960 since we cannot directly reference the Tag entity.
7961 * exp_sel.adb (Build_K): Adding support for VM targets.
7962 (Build_S_Assignment): Adding support for VM targets.
7964 (Default_Prim_Op_Position): In VM targets do not restrict availability
7965 of predefined interface primitives to compiling in Ada 2005 mode.
7966 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7967 restricted to compiling in Ada 2005 mode.
7968 (Make_VM_TSD): Generate code that declares and initializes the OSD
7969 record. Needed to support dispatching calls through synchronized
7972 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7973 primitives associated with synchronized interfaces.
7974 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7975 primitives associated with synchronized interfaces.
7977 2011-08-02 Yannick Moy <moy@adacore.com>
7979 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7980 statements hidden in SPARK if preceded by the HIDE directive
7981 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7982 exception handlers as hidden in SPARK if preceded by the HIDE directive
7983 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7984 if starting with the HIDE directive
7985 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7986 starting with the HIDE directive; mark the declarations in a private
7987 part as hidden in SPARK if the private part starts with the HIDE
7989 * restrict.adb, restrict.ads
7990 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7991 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7992 argument node belongs to a part which is hidden in SPARK
7993 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7994 parts in SPARK; protect the possibly costly call to
7995 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7996 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7997 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7998 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8000 (Scan): recognize special comment starting with '#' and followed by
8001 SPARK keyword "hide" as a HIDE directive.
8003 2011-08-02 Yannick Moy <moy@adacore.com>
8005 * types.ads, erroutc.ads: Minor reformatting.
8007 2011-08-02 Vincent Celier <celier@adacore.com>
8009 * link.c: Add response file support for cross platforms.
8011 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8013 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8014 in an association, set parent field of copy before partial analysis.
8015 * sem_res.adb (Resolve_Slice): create reference to itype only when
8016 expansion is enabled.
8018 2011-08-02 Yannick Moy <moy@adacore.com>
8020 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8021 for new flag denoting which subprogram bodies are in ALFA
8022 * restrict.adb, sem_ch7.adb: Update comment
8023 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8024 sem_ch9.adb, sem_res.adb: Add calls to
8025 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8026 * sem_ch6.adb (Analyze_Function_Return): add calls to
8027 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8028 middle of the body, and extended return.
8029 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8030 False when missing return.
8031 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8032 to True for subprograms whose spec is in ALFA. Remove later on the flag
8033 on the entity used for a subprogram body when there exists a separate
8035 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8036 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8037 False, otherwise do nothing.
8039 2011-08-02 Robert Dewar <dewar@adacore.com>
8041 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8043 2011-08-02 Yannick Moy <moy@adacore.com>
8045 * sem_ch4.ads: minor formatting.
8047 2011-08-02 Yannick Moy <moy@adacore.com>
8049 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8050 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8051 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8052 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8053 opt.ads: cleanup of SPARK mode
8055 2011-08-02 Yannick Moy <moy@adacore.com>
8057 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8059 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8060 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8062 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8063 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8064 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8065 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8067 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8069 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8070 functions whose return type is not in ALFA.
8071 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8073 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8074 parameter's type is not in ALFA.
8075 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8078 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8080 * sem_ch6 (Analyze_Expression_Function): treat the function as
8081 Inline_Always, and introduce a subprogram declaration for it when it is
8083 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8084 expression functions, so that the back-end can determine whether they
8085 can in fact be inlined.
8086 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8087 a function body comes from an expression function.
8089 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8091 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8092 null exclusions to test Can_Never_Be_Null on the anonymous access types
8093 of the formals rather than testing the formals themselves. Exclude this
8094 check in cases where the Old_Formal is marked as a controlling formal,
8095 to avoid issuing spurious errors for bodies completing dispatching
8096 operations (due to the flag not getting set on controlling access
8097 formals in body specs).
8098 (Find_Corresponding_Spec): When checking full and subtype conformance of
8099 subprogram bodies in instances, pass Designated and E in that order, for
8100 consistency with the expected order of the formals (New_Id followed by
8103 2011-08-02 Robert Dewar <dewar@adacore.com>
8105 * sem_ch8.adb: Minor reformatting.
8107 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8109 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8110 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8111 primitive operations of class-wide actuals.
8113 2011-08-02 Javier Miranda <miranda@adacore.com>
8115 * exp_atag.ads, exp_atag.adb
8116 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8117 since its value is implicitly passed in argument Typ.
8118 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8119 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8120 Build_Common_Dispatching_Select_Statements.
8122 2011-08-02 Robert Dewar <dewar@adacore.com>
8124 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8125 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8128 2011-08-02 Robert Dewar <dewar@adacore.com>
8130 * sem_res.adb: Minor reformatting.
8131 * sem_prag.adb: Minor reformatting.
8133 2011-08-02 Javier Miranda <miranda@adacore.com>
8135 * exp_atag.adb, exp_atags.ads
8136 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8137 by the tagged type Entity. Required to use this routine in the VM
8138 targets since we do not have available the Tag entity in the VM
8141 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8142 Ada.Tags has not been previously loaded.
8144 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8145 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8147 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8148 view of enclosing scopes. Required to handle enclosing scopes that
8149 are synchronized types whose full view is a task type.
8151 (Build_VM_TSDs): Minor code improvement to avoid generating and
8152 analyzing lists with empty nodes.
8153 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8154 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8155 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8156 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8157 (Make_Select_Specific_Data_Table): Add support for VM targets.
8158 (Make_VM_TSD): Generate code to initialize the SSD structure of
8161 2011-08-02 Yannick Moy <moy@adacore.com>
8163 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8164 cross-references section in ALI.
8165 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8166 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8168 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8169 subprogram or package entity of a node
8170 (Is_Local_Reference_Type): new function returns True for references
8171 selected in local cross-references.
8172 (Lt): function extracted from Lt in Output_References
8173 (Write_Entity_Name): function extracted from Output_References
8174 (Generate_Definition): generate reference with type 'D' for definition
8175 of objects (object declaration and parameter specification), with
8176 appropriate locations and units, for use in local cross-references.
8177 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8178 references of type 'I' for initialization in object definition.
8179 (Output_References): move part of function Lt and procedure
8180 Write_Entity_Name outside of the body. Ignore references of types 'D'
8181 and 'I' introduced for local cross-references.
8182 (Output_Local_References): new procedure to output the local
8183 cross-references sections.
8184 (Lref_Entity_Status): new array defining whether an entity is a local
8185 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8186 with 'I' type when initialization expression is present.
8187 * get_scos.adb, get_scos.ads: Correct comments and typos
8189 2011-08-02 Javier Miranda <miranda@adacore.com>
8191 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8193 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8195 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8198 2011-08-02 Vincent Celier <celier@adacore.com>
8200 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8201 (No_Space_Img): New function
8202 (Find_Excluded_Sources): When reading from a file, record the file name
8203 and the line number for each excluded source.
8204 (Mark_Excluded_Sources): When reporting an error, if the excluded
8205 sources were read from a file, include file name and line number in
8208 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8210 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8212 2011-08-02 Robert Dewar <dewar@adacore.com>
8214 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8216 2011-08-02 Javier Miranda <miranda@adacore.com>
8218 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8219 generation of TSDs to the DOTNET compiler.
8220 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8221 generation of TSDs to the DOTNET compiler.
8223 2011-08-02 Javier Miranda <miranda@adacore.com>
8225 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8226 record of all the tagged types declared inside library level package
8227 declarations, library level package bodies or library level subprograms.
8228 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8229 associated with a given tagged type.
8230 (Build_VM_TSDs): New subprogram.
8231 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8232 compilation units that are subprograms.
8233 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8234 compilation units that are package bodies.
8235 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8236 units that are a package declaration or a package instantiation.
8237 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8238 reorganization to improve the error generated by the frontend when the
8239 function Ada.Tags.Secondary_Tag is not available.
8240 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8241 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8243 2011-08-02 Javier Miranda <miranda@adacore.com>
8245 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8247 2011-08-02 Robert Dewar <dewar@adacore.com>
8249 * s-imenne.ads: Minor reformatting.
8251 2011-08-02 Robert Dewar <dewar@adacore.com>
8253 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8254 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8255 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8257 2011-08-02 Robert Dewar <dewar@adacore.com>
8259 * einfo.ads (Materialize_Entity): Document this is only for renamings
8260 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8261 required debug information in the case where we transform the object
8262 declaration into a renaming declaration.
8263 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8265 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8268 2011-08-02 Robert Dewar <dewar@adacore.com>
8270 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8271 Suppress_Init_Procs.
8272 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8273 Suppress_Initialization/Initialization_Suppressed.
8274 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8275 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8276 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8277 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8279 2011-08-02 Robert Dewar <dewar@adacore.com>
8281 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8286 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8287 only have inheritable classwide pre/postconditions.
8289 2011-08-02 Javier Miranda <miranda@adacore.com>
8291 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8292 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8293 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8294 checks if the external tag of a type is the same as the external tag
8295 of some other declaration.
8297 2011-08-02 Thomas Quinot <quinot@adacore.com>
8299 * s-taskin.ads: Minor reformatting.
8301 2011-08-02 Emmanuel Briot <briot@adacore.com>
8303 * g-comlin.adb (Display_Help): swap the order in which it prints the
8304 short help and the general usage.
8306 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8308 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8309 the aspect declarations and attach them to the generic copy for
8310 subsequent analysis.
8311 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8312 declarations of the generic tree to the new subprogram declarations.
8313 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8314 conditions that apply to a subprogram instance.
8316 2011-08-02 Robert Dewar <dewar@adacore.com>
8318 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8322 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8323 private type with a tagged full view is not derived in the immediate
8324 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8326 2011-08-02 Robert Dewar <dewar@adacore.com>
8328 * exp_ch4.adb: Minor reformatting.
8330 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8332 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8333 Ada2012 iterator, the loop will be rewritten during expansion into a
8334 while loop with a cursor and an element declaration. Do not analyze the
8335 body in this case, because if the container is for indefinite types the
8336 actual subtype of the elements will only be determined when the cursor
8337 declaration is analyzed.
8339 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8341 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8342 size/alignment related attributes in CodePeer_Mode.
8344 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8346 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8347 Prepend_Element, since this can result in the operation getting the
8348 wrong slot in the full type's dispatch table if the full type has
8349 inherited operations. The incomplete type's operation will get added
8350 to the proper position in the full type's primitives
8351 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8352 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8353 dispatching operations, since there are cases where nonprimitive
8354 subprograms can get added to the list of incomplete dependents (such
8355 as subprograms in nested packages).
8356 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8357 private part when determining whether to add a primitive with a
8358 parameter of a tagged incomplete type to the Private_Dependents list.
8359 Such primitives can also occur in the visible part, and should not have
8360 been excluded from being private dependents.
8361 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8362 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8363 list of a Taft-amendment incomplete type is a primitive before issuing
8364 an error that the full type must appear in the same unit. There are
8365 cases where nonprimitives can be in the list (such as subprograms in
8367 * sem_disp.adb (Derives_From): Use correct condition for checking that
8368 a formal's type is derived from the type of the corresponding formal in
8369 the parent subprogram (the condition was completely wrong). Add
8370 checking that was missing for controlling result types being derived
8371 from the result type of the parent operation.
8373 2011-08-02 Yannick Moy <moy@adacore.com>
8375 * errout.adb (First_Node): minor renaming
8376 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8379 2011-08-02 Yannick Moy <moy@adacore.com>
8381 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8382 before accessing operands.
8383 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8384 decide whether an initialization expression respects SPARK rules, as
8385 the plain node is the expanded one. This allows for more valid warnings
8387 * gnat_rm.texi: Minor update.
8389 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8391 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8394 2011-08-02 Robert Dewar <dewar@adacore.com>
8396 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8398 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8400 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8401 loop statements and the element renaming declaration with a block when
8402 the element type is controlled.
8404 2011-08-02 Yannick Moy <moy@adacore.com>
8406 * sinfo.ads: Minor formatting.
8408 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8410 * sem_aggr.adb (Add_Association): if the association has a box and no
8411 expression, use the Sloc of the aggregate itself for the new
8413 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8416 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8418 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8419 When a container is provided via a function call, generate a renaming
8420 of the function result. This avoids the creation of a transient scope
8421 and the premature finalization of the container.
8422 * exp_ch7.adb (Is_Container_Cursor): Removed.
8423 (Wrap_Transient_Declaration): Remove the supression of the finalization
8424 of the list controller when the declaration denotes a container cursor,
8427 2011-08-02 Yannick Moy <moy@adacore.com>
8429 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8430 node is from source, instead of the original node being from source.
8432 (Resolve_Array_Aggregate): refine the check for a static expression, to
8433 recognize also static ranges
8434 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8435 Array_Type_Declaration): postpone the test for the type being a subtype
8436 mark after the type has been resolved, so that component-selection and
8437 expanded-name are discriminated.
8438 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8439 to distinguish the case of an iteration scheme, so that an error is
8440 issed on a non-static range in SPARK except in an iteration scheme.
8441 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8442 In_Iter_Schm = True.
8443 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8444 user-defined operators so that they are allowed in renaming
8446 (Find_Selected_Component): refine the check for prefixing of operators
8447 so that they are allowed in renaming. Move the checks for restrictions
8448 on selector name after analysis discriminated between
8449 component-selection and expanded-name.
8450 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8451 concatenation argument of string type if it is static.
8452 * sem_util.adb, sem_util.ads
8453 (Check_Later_Vs_Basic_Declarations): add a new function
8454 Is_Later_Declarative_Item to decice which declarations are allowed as
8455 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8456 mode, add that renamings are considered as later items.
8457 (Enclosing_Package): new function to return the enclosing package
8458 (Enter_Name): correct the rule for homonyms in SPARK
8459 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8460 from source (result of expansion) to avoid issuing wrong warnings.
8462 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8464 * errout.adb: On anything but an expression First_Node returns its
8467 2011-08-02 Pascal Obry <obry@adacore.com>
8469 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8471 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8473 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8474 Set the associated loop as the related expression of internally
8476 * exp_ch7.adb (Is_Container_Cursor): New routine.
8477 (Wrap_Transient_Declaration): Supress the finalization of the list
8478 controller when the declaration denotes a container cursor.
8480 2011-08-02 Yannick Moy <moy@adacore.com>
8482 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8484 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8485 expression is a simple expression. This check cannot be performed in
8486 the semantics, so just drop it.
8487 (P_Index_Or_Discriminant_Constraint): move check that the index or
8488 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8489 semantics. Other cases were previously checked in the semantics.
8490 * par-ch4.adb (P_Name): move checks that a selector name is not
8491 character literal or an operator symbol to Find_Selected_Component in
8493 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8494 declarations are not placed after later declarations in a separate
8495 procedure in Sem_Util (possibly not the best choice?), to be used both
8496 during parsing, for Ada 83 mode, and during semantic analysis, for
8498 * par-endh.adb (Check_End): move check that end label is not missing
8499 to Process_End_Label in the semantics
8500 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8501 the special case for SPARK restriction
8502 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8503 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8504 parameter Force to issue the error message even on internal node (used
8505 for generated end label). Call Check_Restriction to check when an error
8506 must be issued. In SPARK mode, issue an error message even if the
8507 restriction is not set.
8508 (Check_Restriction): new procedure with an additional out parameter to
8509 inform the caller that a message has been issued
8510 * sem_aggr.adb: Minor modification of message
8511 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8512 instead of issuing an error message directly
8513 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8514 declarations are not placed after later declarations, by calling
8515 Check_Later_Vs_Basic_Declarations
8516 (Analyze_Subtype_Declaration): move here the check that an index or
8517 discriminant constraint must be a subtype mark. Change the check that
8518 a subtype of String must start at one so that it works on subtype marks.
8519 * sem_ch4.adb (Analyze_Call): move here the check that a named
8520 association cannot follow a positional one in a call
8521 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8522 instead of issuing an error message directly
8523 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8524 selector name is not a character literal or an operator symbol. Move
8525 here the check that the prefix of an expanded name cannot be a
8526 subprogram or a loop statement.
8527 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8528 procedure called from parsing and semantics to check that basic
8529 declarations are not placed after later declarations
8530 (Process_End_Label): move here the check that end label is not missing
8532 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8534 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8535 representation clause in codepeer mode, since it confuses CodePeer and
8536 does not bring useful info.
8538 2011-08-02 Ed Falis <falis@adacore.com>
8540 * init.c: initialize fp hw on MILS.
8542 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8544 * errout.adb (First_Node): for bodies, return the node itself (small
8545 optimization). For other nodes, do not check source_unit if the node
8546 comes from Standard.
8548 2011-08-02 Robert Dewar <dewar@adacore.com>
8550 * exp_ch3.adb: Minor comment additions.
8551 * sem_ch13.adb: Minor reformatting.
8553 2011-08-02 Pascal Obry <obry@adacore.com>
8555 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8557 2011-08-02 Robert Dewar <dewar@adacore.com>
8559 * sem_attr.adb: Minor reformatting.
8561 2011-08-02 Robert Dewar <dewar@adacore.com>
8563 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8564 (Has_Default_Component_Value): Removed
8565 * einfo.ads Comment updates
8566 (Has_Default_Aspect): Replaces Has_Default_Value
8567 (Has_Default_Component_Value): Removed
8569 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8571 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8572 (Get_Simple_Init_Val): Handle Default_Value aspect
8573 (Needs_Simple_Initialization): Handle Default_Value aspect
8574 * exp_ch3.ads: Needs_Simple_Initialization
8575 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8576 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8578 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8579 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8580 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8582 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8584 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8585 package containing iteration primitives.
8586 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8588 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8590 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8591 "of", pre-analyze expression in case it is a function call with
8592 finalization actions that must be placed ahead of the loop.
8593 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8594 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8596 2011-08-02 Geert Bosch <bosch@adacore.com>
8598 * cstand.adb (Create_Float_Types): Only consider C's long double for
8599 Long_Long_Float, in addition to double.
8601 2011-08-02 Robert Dewar <dewar@adacore.com>
8603 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8604 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8605 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8608 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8610 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8613 2011-08-02 Javier Miranda <miranda@adacore.com>
8615 * einfo.ads, einfo.adb
8616 (Original_Access_Type): Move this attribute to Node26 since there was
8617 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8618 which causes conflicts and breaks the generation of the .NET compiler.
8619 (Interface_Name): Add missing documentation on JGNAT only uses of
8622 2011-08-02 Geert Bosch <bosch@adacore.com>
8624 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8625 (Find_Back_End_Float_Type): Likewise
8626 (Create_Back_End_Float_Types): Likewise
8627 (Create_Float_Types): Likewise
8628 (Register_Float_Type): Likewise
8629 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8630 Nlist and split out type selection in new local Find_Base_Type function.
8631 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8633 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8635 2011-08-02 Robert Dewar <dewar@adacore.com>
8637 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8639 * opt.ads: Minor comment change.
8640 * sem_ch12.adb: Minor code reorganization.
8642 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8644 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8645 subtype's list of rep items to the list on the full subtype in the case
8646 where the lists are the same.
8648 2011-08-02 Geert Bosch <bosch@adacore.com>
8650 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8651 using the one from System.Strings, which also deallocates all strings.
8653 2011-08-02 Geert Bosch <bosch@adacore.com>
8655 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8657 * gcc-interface/Make-lang.in: Update dependencies.
8659 2011-08-02 Olivier Hainque <hainque@adacore.com>
8661 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8664 2011-08-02 Javier Miranda <miranda@adacore.com>
8666 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8667 associated with anonymous access to subprograms.
8669 2011-08-02 Geert Bosch <bosch@adacore.com>
8672 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8673 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8674 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8675 (Add_Symbol_Definition): Move to switch-c.adb
8676 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8677 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8678 (Add_Symbol_Definition): Move to switch-c.adb.
8679 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8681 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8683 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8684 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8686 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8687 (Add_Symbol_Definition): Moved from Prepcomp.
8688 * switch-c.ads: Update copyright notice. Use String_List instead of
8689 Argument_List, removing dependency on System.OS_Lib.
8691 2011-08-02 Yannick Moy <moy@adacore.com>
8693 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8694 mode on initialization expression which does not respect SPARK
8696 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8697 if the tree referenced by its argument represents an initialization
8698 expression in SPARK, suitable for initializing an object in an object
8701 2011-08-02 Javier Miranda <miranda@adacore.com>
8703 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8704 internally generated access to subprogram with its associated protected
8706 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8708 2011-08-02 Geert Bosch <bosch@adacore.com>
8710 * cstand.adb (Register_Float_Type): Print information about type to
8711 register, if the Debug_Flag_Dot_B is set.
8712 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8713 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8714 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8715 with a requested precision of more than Max_Digits digits and no more
8716 than Max_Base_Digits digits, if a range specification is present and the
8717 Predefined_Float_Types list has a suitable type to derive from.
8718 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8719 case of type completion with pragma Import
8721 (Process_Import_Predefined_Type): Processing to complete a type
8722 with pragma Import. Currently supports floating point types only.
8723 (Set_Convention_From_Pragma): Do nothing without underlying type.
8724 (Process_Convention): Guard against absence of underlying type,
8725 which may happen when importing incomplete types.
8726 (Process_Import_Or_Interface): Handle case of importing predefined
8727 types. Tweak error message.
8729 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8731 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8732 functions to previous change. Reorganize code slightly.
8734 2011-08-02 Geert Bosch <bosch@adacore.com>
8736 * back_end.ads (Register_Type_Proc): New call back procedure type for
8737 allowing the back end to provide information about available types.
8738 (Register_Back_End_Types): New procedure to register back end types.
8739 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8741 * cstand.adb (Back_End_Float_Types): New list for floating point types
8742 supported by the back end.
8743 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8744 (Copy_Float_Type): New procedure to make new copies of predefined types.
8745 (Register_Float_Type): New call back procedure to populate the BEFT list
8746 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8747 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8748 (Create_Float_Types): New procedure to create entities for floating
8749 point types predefined in Standard, and put these and any remaining
8750 BEFTs on the Predefined_Float_Types list.
8751 * stand.ads (Predefined_Float_Types): New list for predefined floating
8752 point types that do not have declarations in package Standard.
8754 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8756 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8757 entity node for the unit containing the parameter.
8758 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8759 (Add_Inlined_Subprogram): Likewise.
8760 * gcc-interface/Make-lang.in: Update dependencies.
8762 2011-08-02 Thomas Quinot <quinot@adacore.com>
8764 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8767 2011-08-02 Geert Bosch <bosch@adacore.com>
8769 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8771 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8773 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8774 computed value of Base_Type.
8776 2011-08-02 Yannick Moy <moy@adacore.com>
8778 * restrict.adb (Check_Restriction): issue an error for any use of
8779 class-wide, even if the No_Dispatch restriction is not set.
8780 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8781 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8782 when completing a private extension, the type named in the private part
8783 is not the same as that named in the visible part.
8784 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8785 of an inherited primitive operations of a tagged type or type extension
8786 that returns the tagged type.
8787 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8788 function which returns True for an implicit operation inherited by the
8789 derived type declaration for the argument type.
8790 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8793 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8795 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8796 Process_Bounds, to perform analysis with expansion of a range or an
8797 expression that is the iteration scheme for a loop.
8798 (Analyze_Iterator_Specification): If domain of iteration is given by a
8799 function call with a controlled result, as is the case if call returns
8800 a predefined container, ensure that finalization actions are properly
8802 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8804 2011-08-02 Javier Miranda <miranda@adacore.com>
8806 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8807 * gcc-interface/Make-lang.in: Update dependencies.
8809 2011-08-02 Javier Miranda <miranda@adacore.com>
8811 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8812 determine if the analysis is performed using N or Original_Node (N).
8813 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8814 functionality of routine Is_Variable avoids code duplication.
8815 * checks.adb (Determine_Range): Handle temporaries generated by
8816 Remove_Side_Effects.
8818 2011-08-02 Javier Miranda <miranda@adacore.com>
8820 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8821 expansion of the condition. Required since the previous analysis was
8822 done with expansion disabled (see Resolve_Quantified_Expression) and
8823 hence checks were not inserted and record comparisons have not been
8826 2011-08-02 Ed Falis <falis@adacore.com>
8828 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8831 2011-08-02 Bob Duff <duff@adacore.com>
8833 * opt.ads: Minor comment fix.
8835 2011-08-02 Bob Duff <duff@adacore.com>
8837 * sem_ch12.adb (Analyze_Package_Instantiation,
8838 Analyze_Subprogram_Instantiation): Turn off style checking while
8839 analyzing an instance. Whatever style checks that apply to the generic
8840 unit should apply, so it makes no sense to apply them in an instance.
8841 This was causing trouble when compiling an instance of a runtime
8842 unit that violates the -gnatyO switch.
8843 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8844 one of the two case statements, causing spurious errors.
8846 2011-08-02 Robert Dewar <dewar@adacore.com>
8848 * uname.adb: Minor reformatting.
8849 * gnatcmd.adb: Minor reformatting.
8850 * exp_attr.adb: Minor reformatting.
8852 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8854 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8855 No_Dispatching_Calls, do not look for the Assign primitive, because
8856 predefined primitives are not created in this case.
8858 2011-08-02 Bob Duff <duff@adacore.com>
8860 * stylesw.ads: Minor comment fixes.
8862 2011-08-02 Robert Dewar <dewar@adacore.com>
8864 * freeze.adb (Add_To_Result): New procedure.
8866 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8868 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8869 time, if the specific run-time routines for handling streams of strings
8870 are not available, use the default mechanism.
8872 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8874 * s-regpat.ads: Fix typo.
8876 2011-08-02 Vincent Celier <celier@adacore.com>
8878 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8879 not null, call it to create the in memory config project file without
8880 parsing an existing default config project file.
8882 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8884 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8886 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8888 * sem_elim.adb: an abstract subprogram does not need an eliminate
8889 pragma for its descendant to be eliminable.
8891 2011-08-02 Ed Falis <falis@adacore.com>
8893 * init.c: revert to handling before previous checkin for VxWorks
8894 * s-intman-vxworks.adb: delete unnecessary declarations related to
8895 using Ada interrupt facilities for handling signals.
8896 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8897 * s-intman-vxworks.ads: Import __gnat_install_handler as
8898 Initialize_Interrupts.
8899 * s-taprop-vxworks.adb: Delete Signal_Mask.
8900 (Abort_Handler): change construction of mask to unblock exception
8903 2011-08-02 Jerome Guitton <guitton@adacore.com>
8905 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8906 Debug_Raise_Exception before propagation starts.
8908 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8910 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8911 to Restriction_Check_Required.
8912 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8913 * sem_res.adb (Resolve_Call): Likewise.
8914 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8916 2011-08-02 Bob Duff <duff@adacore.com>
8918 * stylesw.ads: Update comment.
8919 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8920 * errout.ads: Remove obsolete comment.
8922 2011-08-02 Javier Miranda <miranda@adacore.com>
8924 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8925 (Set_Is_Safe_To_Reevaluate): new procedure.
8926 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8927 assignment is allowed on safe-to-reevaluate variables.
8928 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8929 temporary created to remove side effects in expressions that use
8930 the secondary stack as safe-to-reevaluate.
8931 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8932 variables that are not true constants.
8934 2011-08-02 Robert Dewar <dewar@adacore.com>
8936 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8937 sem_res.adb, sem_ch6.adb: Minor reformatting.
8939 2011-08-02 Jerome Guitton <guitton@adacore.com>
8941 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8943 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8945 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8946 not set Overridden_Operation if subprogram is an initialization
8949 2011-08-02 Yannick Moy <moy@adacore.com>
8951 * par-ch6.adb: Correct obsolete name in comments
8952 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8953 which takes two message arguments (existing function takes one), with
8954 second message used for continuation.
8955 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8956 block statements that originate from a source block statement, not
8957 generated block statements
8958 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8959 symmetry with procedure case
8960 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8961 function to issue an error in formal mode if a package specification
8962 contains more than one tagged type or type extension.
8963 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8964 parameters matching formals of tagged types are objects (or ancestor
8965 type conversions of objects), not general expressions. Issue an error
8966 on view conversions that are not involving ancestor conversion of an
8968 (Resolve_Type_Conversion): in formal mode, issue an error on the
8969 operand of an ancestor type conversion which is not an object
8970 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8971 procedure so that it works also for actuals of function calls
8972 (Is_Actual_Tagged_Parameter): new function which determines if its
8973 argument is an actual parameter of a formal of tagged type in a
8975 (Is_SPARK_Object_Reference): new function which determines if the tree
8976 referenced by its argument represents an object in SPARK
8978 2011-08-02 Robert Dewar <dewar@adacore.com>
8980 * sem_ch3.adb: Minor reformatting
8981 Minor comment addition
8982 Minor error msg text change
8984 2011-08-02 Javier Miranda <miranda@adacore.com>
8986 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8987 function. Used to be more precise when we generate a variable plus one
8988 assignment to remove side effects in the evaluation of the Bound
8990 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8991 of the bound expression to force its re-analysis and thus expand the
8992 associated transient scope (if required). Code cleanup replacing the
8993 previous code that declared the constant entity by an invocation to
8994 routine Force_Evaluation which centralizes this work in the frontend.
8996 2011-08-02 Robert Dewar <dewar@adacore.com>
8998 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8999 (Base_Type): Now uses improved Is_Base_Type function
9000 * einfo.ads (Base_Type): Inline this function
9002 2011-08-02 Robert Dewar <dewar@adacore.com>
9004 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9005 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9007 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9009 * gcc-interface/Make-lang.in: Update dependencies.
9010 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9013 2011-08-02 Yannick Moy <moy@adacore.com>
9015 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9016 non-simple expression used in delta constraint
9017 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9018 index constraint which is not a subtype mark
9019 * par.adb: With and use Restrict
9020 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9021 mode on component type which is not a subtype mark and default
9022 expression on component
9023 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9024 of string which does not have a lower index bound equal to 1
9025 (Array_Type_Declaration): issue an error in formal mode on index or
9026 component type which is not a subtype mark, and on aliased keyword on
9028 (Derived_Type_Declaration): issue an error in formal mode on interface,
9029 limited or abstract type
9030 (Record_Type_Declaration): issue an error in formal mode on interface
9031 (Record_Type_Definition): issue an error in formal mode on tagged types
9032 and type extensions not declared in the specification of a library unit
9033 package; on null non-tagged record; on variant part
9035 2011-08-02 Vincent Celier <celier@adacore.com>
9037 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9038 not declared for qualified library project when Library_Name is not
9039 declared, but Library_Dir is.
9041 2011-08-02 Robert Dewar <dewar@adacore.com>
9043 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9044 pragmas (affects aspects [Component_]Default_Value
9045 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9046 component type for the resolution
9048 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9050 * einfo.adb (Base_Type): Tune implementation for speed.
9052 2011-08-02 Robert Dewar <dewar@adacore.com>
9054 * freeze.adb: Minor reformatting.
9056 2011-08-02 Thomas Quinot <quinot@adacore.com>
9058 * scos.ads: Update comments.
9060 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9062 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9063 base type, because the parent may be a subtype of a private type whose
9064 convention is established in a private part.
9066 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9068 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9069 statement in a block when the expansion of the return expression has
9070 created a finalization chain.
9071 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9072 with the parent node.
9073 Add N_Extended_Return_Statement to handle the case where a transient
9074 object declaration appears in the Return_Object_Declarations list of
9075 an extended return statement.
9077 2011-08-02 Matthew Gingell <gingell@adacore.com>
9079 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9080 unused parameter 'name'.
9082 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9084 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9085 inherited operation, check whether its alias, which is the source
9086 operastion that it renames, has been marked eliminated.
9088 2011-08-02 Javier Miranda <miranda@adacore.com>
9090 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9091 in-mode parameter whose type is an access type since it can be used to
9092 modify its designated object. Enforce code that handles as safe an
9093 access type that is not access-to-constant but it is the result of a
9094 previous removal of side-effects.
9095 (Remove_Side_Effects): Minor code reorganization of cases which require
9096 no action. Done to incorporate documentation on new cases uncovered
9097 working in this ticket: no action needed if this routine was invoked
9098 too early and the nodes are not yet decorated.
9099 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9100 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9101 were issued with actuals that are implicitly provided by
9104 2011-08-02 Robert Dewar <dewar@adacore.com>
9106 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9108 2011-08-02 Yannick Moy <moy@adacore.com>
9110 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9111 to issue an error in formal mode on attribute not supported in this mode
9112 (Analyze_Attribute): issue errors on standard attributes not supported
9114 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9115 comment, and issue error in formal mode on modulus which is not a power
9117 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9119 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9121 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9122 operator on modular type (except 'not').
9124 2011-08-02 Robert Dewar <dewar@adacore.com>
9126 * gnat_rm.texi: Minor reformatting.
9128 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9130 * s-osinte-linux.ads: Minor comment update and reformatting.
9131 * i-cexten.ads: Make this unit pure, as for its parent.
9132 Will allow its usage in more contexts if needed.
9134 2011-08-02 Robert Dewar <dewar@adacore.com>
9136 * s-utf_32.ads: Minor comment fix.
9138 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9140 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9141 operation of a tagged synchronized type, handle the case where the
9142 controlling argument is overloaded.
9144 2011-08-02 Yannick Moy <moy@adacore.com>
9146 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9147 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9148 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9149 SPARK mode and formal verification mode on processing SPARK restriction
9150 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9151 requiring consistency checking.
9153 2011-08-02 Robert Dewar <dewar@adacore.com>
9155 * sem_res.adb: Minor reformatting.
9157 2011-08-02 Robert Dewar <dewar@adacore.com>
9159 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9160 a-cforse.ads: Remove unneeded with of Ada.Containers
9161 Remove commented out pragma Inline's
9162 Move specifications of new subprograms to the actual specs
9164 2011-08-02 Yannick Moy <moy@adacore.com>
9166 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9167 a-cforse.ads: Update comments.
9169 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9171 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9173 2011-08-02 Robert Dewar <dewar@adacore.com>
9175 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9176 a-cforse.ads, a-cofove.ads: Minor reformatting.
9178 2011-08-02 Claire Dross <dross@adacore.com>
9180 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9181 a-cofove.ads: Add comments.
9183 2011-08-02 Yannick Moy <moy@adacore.com>
9185 * gnat_rm.texi: Document formal containers.
9187 2011-08-02 Emmanuel Briot <briot@adacore.com>
9189 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9192 2011-08-02 Robert Dewar <dewar@adacore.com>
9194 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9197 2011-08-02 Robert Dewar <dewar@adacore.com>
9199 * aspects.adb: New aspects Default_Value and Default_Component_Value
9200 New format of Aspect_Names table checks for omitted entries
9201 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9202 handling of boolean aspects for derived types.
9203 New aspects Default_Value and Default_Component_Value
9204 New format of Aspect_Names table checks for omitted entries
9205 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9206 (Has_Default_Value): New flag
9207 (Has_Default_Component_Value): New flag
9208 (Has_Default_Value): New flag
9209 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9211 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9212 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9213 Default_Value and Default_Component_Value
9214 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9215 New aspects Default_Value and Default_Component_Value
9216 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9217 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9219 2011-08-02 Vincent Celier <celier@adacore.com>
9221 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9222 inherit library kind.
9224 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9226 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9229 2011-08-02 Robert Dewar <dewar@adacore.com>
9231 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9233 2011-08-02 Yannick Moy <moy@adacore.com>
9235 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9237 2011-08-02 Robert Dewar <dewar@adacore.com>
9239 * impunit.adb: Add comment.
9241 2011-08-02 Yannick Moy <moy@adacore.com>
9243 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9244 qualification of aggregates in formal mode
9245 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9247 (Resolve_Aggregate): complete the test that an aggregate is adequately
9248 qualified in formal mode
9250 2011-08-02 Pascal Obry <obry@adacore.com>
9252 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9253 * mlib-prj.adb: Supress warning when compiling binder generated file.
9254 (Build_Library): Supress all warnings when compiling the binder
9257 2011-08-02 Yannick Moy <moy@adacore.com>
9259 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9261 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9262 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9263 Add with/use clauses to make Check_Formal_Restriction visible
9265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9267 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9268 in-parameters when type of the generic formal is private in the generic
9269 spec and non-private in the body.
9271 2011-08-02 Claire Dross <dross@adacore.com>
9273 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9274 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9275 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9276 * impunit.adb, Makefile.rtl: Take new files into account.
9278 2011-08-02 Robert Dewar <dewar@adacore.com>
9280 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9281 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9283 2011-08-02 Yannick Moy <moy@adacore.com>
9285 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9287 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9288 matching static array bounds, taking into account the special case of
9290 * sem_ch3.adb: Typo in comment.
9292 2011-08-02 Yannick Moy <moy@adacore.com>
9294 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9295 which issues an error in formal mode if its argument node is originally
9297 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9298 has a discriminant specification so that it does not include the case
9300 (Derived_Type_Declaration): move here the test that a derived type has a
9301 discriminant specification
9302 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9303 first element of a component association before accessing its choices
9304 (presence of component association is not enough)
9305 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9306 declaration is a library item before accessing the next element in a
9307 list, as library items are not member of lists
9308 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9309 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9310 Check_Formal_Restriction whenever possible.
9312 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9314 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9315 reference when needed.
9317 2011-08-02 Bob Duff <duff@adacore.com>
9319 * gnat_ugn.texi: Fix typo.
9321 2011-08-02 Vincent Celier <celier@adacore.com>
9323 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9324 archive file name. Do not use the full path name of archives for Open
9327 2011-08-02 Robert Dewar <dewar@adacore.com>
9329 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9330 Analyze_Aspect_Specifications
9332 (Analyze_Aspect_Specifications): New handling for boolean aspects
9333 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9334 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9335 sequence for Analyze_Aspect_Specifications
9336 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9337 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9339 2011-08-02 Robert Dewar <dewar@adacore.com>
9341 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9342 aspects, since these no longer exist.
9344 2011-08-02 Robert Dewar <dewar@adacore.com>
9346 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9347 semicolon, do not try to see if there are aspects following it.
9348 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9351 2011-08-02 Robert Dewar <dewar@adacore.com>
9353 * sem_ch8.adb, aspects.ads: Minor reformatting.
9355 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9357 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9358 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9360 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9362 2011-08-02 Yannick Moy <moy@adacore.com>
9364 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9365 mode on subprogram declaration outside of package specification, unless
9366 it is followed by a pragma Import
9367 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9368 Access_Type_Declaration): issue error in formal mode on access type
9369 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9371 (Analyze_Object_Declaration): issue error in formal mode on object
9372 declaration which does not respect SPARK restrictions
9373 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9374 declaration which does not respect SPARK restrictions
9375 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9376 error in formal mode on digits or delta constraint
9377 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9378 decimal fixed point type
9379 (Derived_Type_Declaration): issue error in formal mode on derived type
9380 other than type extensions of tagged record types
9381 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9382 with check on access definition
9383 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9384 mode on protected definition.
9385 (Analyze_Task_Definition): issue error in formal mode on task definition
9387 2011-08-02 Robert Dewar <dewar@adacore.com>
9389 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9391 2011-08-02 Javier Miranda <miranda@adacore.com>
9393 * sem_ch6.adb (Can_Override_Operator): New function.
9394 (Verify_Overriding_Indicator): Add missing code to check overriding
9395 indicator in operators. Fixes regression.
9396 (Check_Overriding_Indicator): Minor reformating after replacing the
9397 code that evaluates if the subprogram can override an operator by
9398 invocations to the above new function.
9400 (Write_Field26_Name): Add missing code to ensure that, following
9401 the documentation in einfo.ads, this field is not shown as attribute
9402 "Static_Initialization" on non-dispatching functions.
9404 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9406 * sem_res.adb (Resolve_Call): A call to
9407 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9408 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9409 i.e., when the second parameter is of type Time_Span.
9411 2011-08-02 Vincent Celier <celier@adacore.com>
9413 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9414 with an archive instead of -L<library dir> -l<library name>.
9416 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9418 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9419 mark the base types In_Use in addition to making the operations
9422 2011-08-02 Ed Falis <falis@adacore.com>
9424 * init.c: add and setup __gnat_signal_mask for the exception signals
9425 * s-inmaop-vxworks.adb: new file.
9426 * s-intman-vxworks.adb: remove unnecessary initializations and
9428 * s-intman-vxworks.ads: remove unnecessary variable
9429 * s-taprop-vxworks.adb: simplify signal initialization
9431 2011-08-02 Robert Dewar <dewar@adacore.com>
9433 * sem_ch8.adb: Minor code reorganization, comment updates.
9435 2011-08-02 Robert Dewar <dewar@adacore.com>
9437 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9438 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9440 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9441 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9443 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9445 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9446 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9447 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9448 use_type_clauses, to handle more efficiently use_type and use_all_type
9450 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9451 Ada2012 Use_All_Type clause.
9452 (Use_Class_Wide_Operations): new procedure.
9454 2011-08-02 Robert Dewar <dewar@adacore.com>
9456 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9457 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9458 expression to expression function.
9460 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9462 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9463 if types are compatible.
9465 2011-08-02 Yannick Moy <moy@adacore.com>
9467 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9468 returns True if its argument array types have same dimension and same
9469 static bounds at each index.
9470 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9471 OUT or IN OUT paramaters which are not view conversions in SPARK.
9472 (Resolve_Arithmetic_Op): issue an error in formal mode on
9473 multiplication or division with operands of fixed point types which are
9474 not qualified or explicitly converted.
9475 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9476 Boolean or array type (except String) operands.
9477 (Resolve_Equality_Op): issue an error in formal mode on equality
9478 operators for array types other than String with non-matching static
9480 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9481 for array types with non-matching static bounds. Factorize the code in
9482 Matching_Static_Array_Bounds.
9483 (Resolve_Qualified_Expression): issue an error in formal mode on
9484 qualified expressions for array types with non-matching static bounds.
9485 (Resolve_Type_Conversion): issue an error in formal mode on type
9486 conversion for array types with non-matching static bounds
9488 2011-08-02 Robert Dewar <dewar@adacore.com>
9490 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9492 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9494 * par-ch9.adb: save location of entry for proper error message.
9496 2011-08-02 Javier Miranda <miranda@adacore.com>
9498 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9499 (Use_Full_View) which permits this routine to climb through the
9500 ancestors using the full-view of private parents.
9501 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9502 Use_Full_View to true in calls to Is_Ancestor.
9503 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9504 true in call to Is_Ancestor.
9505 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9506 Use_Full_View to true in call to Is_Ancestor.
9507 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9508 call to Is_Ancestor.
9509 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9510 Use_Full_View to true in calls to Is_Ancestor.
9511 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9512 Make_Select_Specific_Data_Table, Register_Primitive,
9513 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9514 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9515 to true in call to Is_Ancestor.
9516 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9517 Use_Full_View to true in calls to Is_Ancestor.
9519 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9520 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9522 2011-08-02 Robert Dewar <dewar@adacore.com>
9524 * gnat_rm.texi: Minor reformatting.
9525 * sem_prag.adb: Minor reformatting.
9527 2011-08-02 Tristan Gingold <gingold@adacore.com>
9529 * vms_data.ads: Add VMS qualifier for -gnateP.
9531 2011-08-02 Robert Dewar <dewar@adacore.com>
9533 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9534 * par-ch7.adb (P_Package): Proper placement of aspects for package
9536 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9537 (End_Statements): Add Is_Sloc parameterr
9538 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9539 (Check_End): Ad Is_Sloc parameter
9540 (End_Statements): Add Is_Sloc parameterr
9542 2011-08-02 Vincent Celier <celier@adacore.com>
9544 * ug_words: Add VMS qualifier equivalent to -gnateP:
9545 /SYMBOL_PREPROCESSING.
9547 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9549 * gnat-style.texi: For hexadecimal numeric literals the typical
9550 grouping of digits is 4 to represent 2 bytes.
9551 A procedure spec which is split into several lines is indented two
9554 2011-08-02 Yannick Moy <moy@adacore.com>
9556 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9557 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9558 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9560 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9561 choice in array aggregate
9562 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9564 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9565 positional and named aggregate for record, or others in record
9566 aggregate, or multiple choice in record aggregate
9567 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9568 array operands to logical operations AND, OR and XOR do not have the
9569 same static lower and higher bounds
9570 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9572 2011-08-01 Robert Dewar <dewar@adacore.com>
9574 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9575 Replaces Last_Source_Node_In_Sequence.
9576 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9577 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9578 parens and blank in string (this was inconsistently implemented).
9580 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9581 blank in string (this was inconsistently implemented).
9583 (Set_Global_Switches): Set formal mode switches appropriately
9584 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9586 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9587 call Set_Error_Msg_Lang to set "spark" as language name.
9588 * par.adb: Remove unnecessary call to set formal language for errout
9589 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9590 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9592 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9593 calls to it, moved after resolution so that types are known
9594 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9595 result of concatenation is not of type String
9596 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9597 concatenation is not properly restricted
9598 * gnat_rm.texi: Add doc on pragma Spark_95.
9599 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9600 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9601 * gcc-interface/Make-lang.in: Update dependencies.
9603 2011-08-01 Javier Miranda <miranda@adacore.com>
9605 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9606 condition that detects if the overridden operation must replace an
9609 2011-08-01 Javier Miranda <miranda@adacore.com>
9611 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9612 code declarations inserted by Insert_Actions in each alternative of the
9613 N_Case_Expression node.
9615 2011-08-01 Robert Dewar <dewar@adacore.com>
9617 * sem_ch6.adb: Minor code reorganization.
9618 * sem_util.adb: Minor reformatting.
9620 2011-08-01 Pascal Obry <obry@adacore.com>
9622 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9623 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9625 2011-08-01 Yannick Moy <moy@adacore.com>
9627 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9628 literal or operator symbol which is prefixed
9629 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9630 mode on access attributes.
9631 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9632 that concatenation operands are properly restricted in formal mode
9633 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9634 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9635 result of the concatenation has a type different from String.
9636 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9637 Analyze_Quantified_Expression, Analyze_Slice,
9638 Analyze_Null): issue an error in formal mode on unsupported constructs
9640 (Analyze_Block_Statement): only issue error on source block statement
9641 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9642 function which returns the last node in a list of nodes for which
9643 Comes_From_Source returns True, if any
9644 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9645 Last_Source_Node_In_Sequence
9646 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9647 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9648 mode on unsupported constructs
9649 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9650 rest of the actions may be needed later on since the error is marked as
9652 * sinfo.ads: Typos in comments.
9654 2011-08-01 Pascal Obry <obry@adacore.com>
9656 * projects.texi: Minor editing.
9658 2011-08-01 Yannick Moy <moy@adacore.com>
9660 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9661 insertion character ~~
9662 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9663 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9664 with insertion character ~~
9665 (Set_Msg_Text): treat insertion character ~~
9666 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9667 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9668 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9669 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9670 errors related to the formal language restriction not serious
9671 (insertion character |).
9672 * par.adb (Par): set formal language for error messages if needed
9673 * sem_ch6.adb (Check_Missing_Return): take into account possible
9674 generated statements at the end of the function
9675 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9676 enumeration value to define a new pragma SPARK_95
9677 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9678 SPARK_Version): new type and variables to store the SPARK version
9680 (SPARK_Mode): return True when SPARK_Version is set
9681 * par-prag.adb: Correct indentation
9682 (Prag): take Pragma_SPARK_95 into account
9683 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9686 2011-08-01 Robert Dewar <dewar@adacore.com>
9688 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9689 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9690 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9692 2011-08-01 Pascal Obry <obry@adacore.com>
9694 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9695 Target_Name to Get_Path call.
9696 (Parse_Single_Project): Likewise.
9697 (Post_Parse_Context_Clause): Likewise.
9698 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9699 Call Initialise_Project_Path with the proper Target_Name.
9700 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9702 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9703 with the proper Target_Name.
9704 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9706 (Parse_Project_And_Apply_Config): Likewise.
9707 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9708 This is fine as this part of the code is supporting only native
9710 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9711 is fine as this part of the code is supporting only native compilation.
9713 2011-08-01 Yannick Moy <moy@adacore.com>
9715 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9716 of homonym, unless the homonym is one of the cases allowed in SPARK
9717 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9718 package declaration occurring after a body.
9720 2011-08-01 Robert Dewar <dewar@adacore.com>
9722 * checks.adb, exp_ch4.adb: Minor reformatting.
9724 2011-08-01 Javier Miranda <miranda@adacore.com>
9726 * einfo.ads (Access_Disp_Table): Fix documentation.
9727 (Dispatch_Table_Wrappers): Fix documentation.
9729 2011-08-01 Pascal Obry <obry@adacore.com>
9731 * prj-env.adb, prj-env.ads: Minor reformatting.
9733 2011-08-01 Yannick Moy <moy@adacore.com>
9735 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9736 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9737 procedures out of these packages.
9738 * errout.ads, errout.adb
9739 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9740 procedures in of this package
9741 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9742 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9743 on misplaced later vs initial declarations, like in Ada 83
9744 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9745 formal mode on attribute of private type whose full type declaration
9747 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9748 package declaration inside a package specification
9749 (Analyze_Full_Type_Declaration): issue error in formal mode on
9750 controlled type or discriminant type
9751 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9752 user-defined operator means that it should come from the source
9753 (New_Overloaded_Entity): issue error in formal mode on overloaded
9755 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9757 2011-08-01 Thomas Quinot <quinot@adacore.com>
9759 * atree.adb: Minor reformatting.
9760 * checks.adb: Minor reformatting.
9762 2011-08-01 Vincent Celier <celier@adacore.com>
9764 * s-parame-vms-ia64.ads: Fix typo in comment
9766 * s-parame-vms-restrict.ads: Removed, unused.
9768 2011-08-01 Javier Miranda <miranda@adacore.com>
9771 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9773 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9774 * sem_ch3.ads, sem_ch3.adb
9775 (Is_Constant_Bound): New extended version of the subprogram that was
9776 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9777 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9778 * sem_aux.ads (Constant_Value): Fix typo in comment.
9779 * checks.adb (Generate_Index_Checks): New implementation which, for
9780 array objects with constant bounds, generates the runtime check
9781 referencing the bounds of the array type. For other cases this routine
9782 provides its previous behavior obtaining such values from the array
9784 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9786 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9787 we cannot have semantic interpretations of the new node.
9789 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9791 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9794 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9796 * sem_ch8.adb: Minor code editing.
9797 * s-vxwext.adb: Remove trailing space.
9798 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9799 consistency with other files.
9801 2011-08-01 Thomas Quinot <quinot@adacore.com>
9803 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9805 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9807 * par-ch10.adb: reject parameterized expressions as compilation unit.
9808 * sem_ch4.adb: handle properly conditional expression with overloaded
9809 then_clause and no else_clause.
9811 2011-08-01 Tristan Gingold <gingold@adacore.com>
9813 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9814 like done by System.Aux_DEC.
9815 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9817 2011-08-01 Yannick Moy <moy@adacore.com>
9819 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9820 missing label at end of declaration (subprogram or package)
9821 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9822 of positional and named parameter association
9823 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9824 Error_Msg_SP which adds a prefix to the error message giving the name
9825 of the formal language analyzed
9826 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9827 access result type in subprogram, unconstrained array as result type,.
9828 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9830 * sem_ch8.adb: Code clean up.
9832 2011-08-01 Javier Miranda <miranda@adacore.com>
9834 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9835 * einfo.ads (Access_Disp_Table): Fix documentation.
9836 (Dispatch_Table_Wrappers): Fix documentation.
9837 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9838 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9839 to enforce the documentation of this attribute.
9840 (Set_Is_Interface): Cleanup the assertion.
9841 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9842 the Underlying_Type entity before reading attribute Access_Disp_Table.
9843 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9844 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9845 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9846 the Underlying_Type entity before reading attribute Access_Disp_Table.
9847 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9848 Locate the Underlying_Type entity before reading attribute
9851 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9853 * s-poosiz.ads: Additional overriding indicators.
9855 2011-08-01 Yannick Moy <moy@adacore.com>
9857 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9859 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9860 parameter specification does not include a subtype mark.
9861 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9862 formal mode on abstract subprogram.
9863 (Analyze_Subprogram_Specification): issue error in formal mode on
9864 user-defined operator.
9865 (Process_Formals): issue error in formal mode on access parameter and
9867 * sem_ch9.adb (Analyze_Abort_Statement,
9868 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9869 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9870 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9871 Analyze_Requeue, Analyze_Selective_Accept,
9872 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9873 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9874 issue error in formal mode on user-defined raise statement.
9876 2011-08-01 Thomas Quinot <quinot@adacore.com>
9878 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9879 declaration being hidden when overriding an implicit inherited
9881 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9882 (-gnats), do not complain about a source file that contains only a
9885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9887 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9888 variable if already set.
9890 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9892 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9893 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9894 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9895 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9896 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9897 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9898 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9899 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9900 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9901 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9902 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9903 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9904 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9905 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9906 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9907 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9908 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9909 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9910 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9911 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9912 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9913 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9914 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9915 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9916 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9917 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9918 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9919 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9920 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9921 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9922 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9923 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9924 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9925 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9926 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9927 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9928 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9929 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9930 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9931 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9932 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9933 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9934 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9935 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9936 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9937 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9938 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9939 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9940 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9941 Use GNAT instead of GNARL.
9943 2011-08-01 Bob Duff <duff@adacore.com>
9945 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9946 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9947 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9950 2011-08-01 Yannick Moy <moy@adacore.com>
9952 * debug.adb (d.D) reverve flag for the SPARK mode
9953 (d.E) reverve flag for SPARK generation mode
9954 (d.F) reverve flag for Why generation mode
9955 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9956 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9957 functions which return True when the corresponding modes are set
9958 (Formal_Language): return "spark" or "alfa" when in formal verification
9960 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9961 Error_Msg to prefix the error message with a tag giving the formal
9963 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9964 message with a tag giving the formal language
9965 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9967 (Analyze_Case_Statement): issue error in formal mode on case statement
9968 with a single "others" case alternative
9969 (Analyze_Exit_Statement): issue errors in formal mode on exit
9970 statements which do not respect SPARK restrictions
9971 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9972 (Check_Unreachable_Code): always issue an error (not a warning) in
9973 formal mode on unreachable code (concerns both code after an infinite
9974 loop and after an unconditional jump, both not allowed in SPARK)
9975 * sem_ch6.adb (Analyze_Return_Statement): add call to
9976 Set_Return_Present for a procedure containing a return statement
9977 (already done for functions in Analyze_Function_Return)
9978 (Analyze_Function_Return): issue error in formal mode on extended
9979 return or if return is not last statement in function
9980 (Check_Missing_Return): issue error in formal mode if function does
9981 not end with return or if procedure contains a return
9982 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9983 function to detect if there is an inner scope of its parameter S which
9986 2011-08-01 Thomas Quinot <quinot@adacore.com>
9988 * sem_ch6.ads: Minor reformatting.
9990 2011-08-01 Javier Miranda <miranda@adacore.com>
9992 * sem_util.adb (Abstract_Interface_List): Complete condition when
9993 processing private type declarations to avoid reading unavailable
9995 (Is_Synchronized_Tagged_Type): Complete condition when processing
9996 private extension declaration nodes to avoid reading unavailable
9999 2011-08-01 Thomas Quinot <quinot@adacore.com>
10001 * sem_ch3.adb: Minor reformatting.
10003 2011-08-01 Thomas Quinot <quinot@adacore.com>
10005 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10006 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10007 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10008 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10009 for VMS, instead parametrize the common implementation with
10010 System.Parameters declarations.
10012 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10014 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10016 2011-08-01 Tristan Gingold <gingold@adacore.com>
10018 * seh_init.c: Fix SEH handler installation on win64.
10020 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10022 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10023 double analysis of an anonymous access to subprogram, because it can
10024 lead to improper sharing of profiles and a back-end crash.
10026 2011-08-01 Robert Dewar <dewar@adacore.com>
10028 * make.adb, sem_ch4.adb: Minor reformatting.
10029 * gcc-interface/Make-lang.in: Update dependencies.
10030 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10032 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10034 * gnat_rm.texi: Fix definition of Long_Integer.
10036 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10038 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10039 to prevent storage exhaustion.
10040 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10041 finalized is a function body, insert the cleanup code before the final
10042 return statement, to prevent spurious warnings.
10043 * s-pooglo.ads: add overriding indicator.
10045 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10047 * sem_ch4.adb (Operator_Check): improve error message when both a
10048 with_clause and a use_clause are needed to make operator usage legal.
10049 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10050 determine whether a compilation unit is visible within an other,
10051 either through a with_clause in the current unit, or a with_clause in
10052 its library unit or one one of its parents.
10054 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10056 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10057 over an arbitrary expression of an array or container type.
10058 * lib-xref.adb: clarify comment.
10060 2011-08-01 Bob Duff <duff@adacore.com>
10062 * einfo.ads: Minor reformatting.
10063 * debug.adb: Minor comment improvement.
10065 2011-08-01 Javier Miranda <miranda@adacore.com>
10067 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10068 consider hidden subprograms as valid candidates.
10070 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10072 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10074 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10076 * gnat_ugn.texi: Fix typo.
10078 2011-08-01 Robert Dewar <dewar@adacore.com>
10080 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10081 lib-xref.adb: Minor reformatting
10083 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10085 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10086 when to generate a call to Move_Final_List.
10087 (Has_Controlled_Parts): Remove this function.
10089 2011-08-01 Geert Bosch <bosch@adacore.com>
10091 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10092 "," in choice list.
10094 2011-08-01 Thomas Quinot <quinot@adacore.com>
10096 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10097 explicit raise of a predefined exception as Comes_From_Source if the
10098 original N_Raise_Statement comes from source.
10100 2011-08-01 Robert Dewar <dewar@adacore.com>
10102 * sinfo.ads: Add comment.
10103 * sem_ch6.adb: Minor reformatting.
10105 2011-08-01 Robert Dewar <dewar@adacore.com>
10107 * freeze.adb (Freeze_Entity): Refine check for bad component size
10108 clause to avoid rejecting confirming clause when atomic/aliased present.
10110 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10112 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10113 better determine whether an entity reference is a write.
10114 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10116 * lib-xref.adb (Output_References): Do no suppress a read reference at
10117 the same location as an immediately preceeding modify-reference, to
10118 handle properly in-out actuals.
10120 2011-08-01 Tristan Gingold <gingold@adacore.com>
10122 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10124 2011-08-01 Quentin Ochem <ochem@adacore.com>
10126 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10127 heap to compute the result.
10129 2011-08-01 Robert Dewar <dewar@adacore.com>
10131 * atree.ads: Minor reformatting.
10133 2011-08-01 Emmanuel Briot <briot@adacore.com>
10135 * g-expect.adb (Get_Command_Output): Fix memory leak.
10137 2011-08-01 Geert Bosch <bosch@adacore.com>
10139 * cstand.adb (P_Float_Type): New procedure to print the definition of
10140 predefined fpt types.
10141 (P_Mixed_Name): New procedure to print a name using mixed case
10142 (Print_Standard): Use P_Float_Type for printing floating point types
10143 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10144 precision IEEE float.
10146 2011-08-01 Thomas Quinot <quinot@adacore.com>
10148 * sem_ch3.adb: Minor reformatting.
10150 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10152 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10153 the completion of a generic function, insert the new body rather than
10154 rewriting the original.
10156 2011-08-01 Yannick Moy <moy@adacore.com>
10158 * sinfo.ads, errout.ads: Typos in comments.
10160 2011-08-01 Robert Dewar <dewar@adacore.com>
10162 * par-endh.adb: Minor reformatting.
10164 2011-08-01 Robert Dewar <dewar@adacore.com>
10166 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10167 (Pre_Post_Aspects): New subtype.
10168 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10169 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10170 * par-ch7.adb (P_Package): Remove Decl parameter
10171 (P_Package): Handle new syntax for aspects (before IS)
10172 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10174 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10175 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10176 (P_Package): Remove Decl parameter
10177 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10179 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10181 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10182 * sinfo.ads: Document new syntax for aspects in packages etc.
10183 * sprint.adb: Handle new syntax of aspects before IS in package
10185 2011-08-01 Thomas Quinot <quinot@adacore.com>
10187 * atree.ads: Minor reformatting.
10188 * sem_prag.adb: Minor reformatting.
10190 2011-08-01 Robert Dewar <dewar@adacore.com>
10192 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10193 case expr alternative.
10195 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10197 * sem_ch12.adb: Fix typo.
10199 2011-08-01 Geert Bosch <bosch@adacore.com>
10201 * sem_prag.adb (Check_No_Link_Name): New procedure.
10202 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10203 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10204 instead of Standard_Long_Long_Float_Size global. Preparation for
10205 eventual removal of per type constants.
10206 * exp_util.ads (Get_Stream_Size): New function returning the stream
10207 size value of subtype E.
10208 * exp_util.adb (Get_Stream_Size): Implement new function.
10209 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10211 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10213 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10215 2011-08-01 Geert Bosch <bosch@adacore.com>
10217 * cstand.adb: Fix comments.
10218 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10219 count of arguments.
10221 2011-08-01 Robert Dewar <dewar@adacore.com>
10223 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10225 2011-08-01 Geert Bosch <bosch@adacore.com>
10227 * atree.ads: Fix comment.
10229 2011-08-01 Robert Dewar <dewar@adacore.com>
10231 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10232 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10233 * par.adb: Add with for Namet.Sp.
10234 * par-tchk.adb: Minor reformatting.
10236 2011-08-01 Vincent Celier <celier@adacore.com>
10238 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10239 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10240 of the init procedure of a SAL.
10241 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10244 2011-08-01 Thomas Quinot <quinot@adacore.com>
10246 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10249 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10251 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10253 2011-08-01 Thomas Quinot <quinot@adacore.com>
10255 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10256 conformant with its spec (return True only for types that have
10257 an overriding Initialize primitive operation that prevents them from
10258 having preelaborable initialization).
10259 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10260 initialization for controlled types in Ada 2005 or later mode.
10262 2011-08-01 Robert Dewar <dewar@adacore.com>
10264 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10266 (Same_Aspect): New function.
10267 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10268 Type_Invariant, Precondition, Postcondition.
10269 * snames.ads-tmpl: Add Name_Type_Invariant.
10271 2011-08-01 Robert Dewar <dewar@adacore.com>
10273 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10275 (Freeze_All_Ent): Fix error in handling inherited aspects.
10276 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10277 already analyzed, but don't skip entire processing of a declaration,
10278 that's wrong in some cases of declarations being rewritten.
10279 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10280 Don't delay for integer, string literals
10281 Treat predicates in usual manner for delay, remove special case code,
10283 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10284 (Build_Predicate_Function): Update saved expression in aspect
10285 (Build_Invariant_Procedure): Update saved expression in aspect
10286 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10287 of replacement of discriminant references if the reference is simple.
10289 2011-08-01 Robert Dewar <dewar@adacore.com>
10291 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10292 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10293 Static_Predicate and Dynamic_Predicate.
10294 (Build_Predicate_Function): Add processing for Static_Predicate
10295 and Dynamic_Predicate.
10296 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10297 (From_Static_Predicate): New flag
10298 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10300 2011-08-01 Robert Dewar <dewar@adacore.com>
10302 * usage.adb: Documentation cleanup for Ada version modes in usage.
10303 * expander.adb: Minor reformatting.
10305 2011-08-01 Robert Dewar <dewar@adacore.com>
10307 * atree.ads: Minor comment fix.
10308 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10309 a-witeio.ads, sem_prag.adb: Minor reformatting.
10311 2011-08-01 Doug Rupp <rupp@adacore.com>
10313 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10314 pointers. Use descrip.h header file for convenience. Add some
10317 2011-08-01 Robert Dewar <dewar@adacore.com>
10319 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10320 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10321 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10323 (Check_Aspect_At_End_Of_Declarations): New procedure
10324 (Analye_Aspect_Specification): Minor changes for above procedures
10325 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10326 specification node as well.
10328 2011-08-01 Pascal Obry <obry@adacore.com>
10330 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10331 Windows files. Use GetFilesAttributes() in this case to check for file
10332 existence instead of returning with an error code.
10334 2011-08-01 Vincent Celier <celier@adacore.com>
10336 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10337 High is above Source length.
10339 2011-08-01 Robert Dewar <dewar@adacore.com>
10341 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10343 2011-08-01 Robert Dewar <dewar@adacore.com>
10345 * aspects.ads (Boolean_Aspects): New subtype.
10346 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10347 for derived types in cases where the parent type and derived type have
10349 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10350 with aspects when parent type also has aspects.
10351 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10352 boolean expression at this point).
10353 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10354 accordance with final decision on the Ada 2012 feature.
10355 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10357 2011-08-01 Matthew Heaney <heaney@adacore.com>
10359 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10361 2011-08-01 Pascal Obry <obry@adacore.com>
10363 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10364 Fix Replace_Slice when High is above current string size.
10365 (Replace_Slice): Fix DL computation when High is above current
10368 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10370 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10372 2011-08-01 Matthew Heaney <heaney@adacore.com>
10374 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10377 2011-08-01 Pascal Obry <obry@adacore.com>
10379 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10382 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10384 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10385 access to protected subprograms in generic bodies.
10386 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10387 protected type, indicate that the convention of the subprogram is
10388 Convention_Protected, because it may be used in subsequent declarations
10389 within the protected declaration.
10391 2011-08-01 Vincent Celier <celier@adacore.com>
10393 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10394 and "final" procedures when the name of the library is "ada", to avoid
10395 duplicate symbols "adainit" and "adafinal" in executables.
10397 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10399 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10400 quantified expression that appears within a postcondition and uses the
10401 Ada2012 'Result attribute.
10403 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10405 * init.c (__gnat_error_handler): Cast reason to int.
10406 (__gnat_install_handler): Explain sa_sigaction use.
10408 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10410 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10411 subprogram has copy-in copy-out parameters, try to promote the mode of
10412 the return type if it is passed in registers.
10414 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10416 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10417 left operand as addressable.
10419 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10421 * gcc-interface/gigi.h (build_function_stub): Remove.
10422 (build_return_expr): Likewise.
10423 (convert_vms_descriptor): Declare.
10424 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10425 (build_function_stub): Move to...
10426 * gcc-interface/utils2.c (build_return_expr): Move to...
10427 * gcc-interface/trans.c (build_function_stub): ...here.
10428 (build_return_expr): ...here.
10429 (Subprogram_Body_to_gnu): Add local variable for language_function.
10430 Disconnect the parameter attributes cache, if any, once done with it.
10431 Call end_subprog_body only after setting the end_locus.
10432 Build the stub associated with the function, if any, at the very end.
10433 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10434 variables and streamline control flow.
10436 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10439 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10440 g-trasym-dwarf.adb.
10442 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10445 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10446 Assign to act.sa_sigaction.
10447 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10448 current->return_address to char * before arithmetic.
10450 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10452 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10453 Correct argument types.
10454 Extract code from reason.
10455 (__gnat_install_handler): Assign to act.sa_sigaction.
10457 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10459 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10460 (GNAT1_OBJS): ...here.
10462 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10465 * g-socthi-mingw.adb (Fill): Fix formatting.
10467 * gcc-interface/gigi.h: Move around comment.
10469 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10472 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10474 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10477 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10479 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10481 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10482 range comparison if Pmode is SImode.
10484 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10485 Eric Botcazou <ebotcazou@adacore.com>
10487 * adadecode.c: Wrap up in extern "C" block.
10488 * adadecode.h: Likewise.
10489 * adaint.c: Likewise. Remove 'const' keyword.
10490 * adaint.h: Likewise.
10491 * argv.c: Likewise.
10492 * atree.h: Likewise.
10494 * cstreams.c: Likewise.
10496 * exit.c: Likewise.
10498 * final.c: Likewise.
10499 * init.c: Likewise.
10500 * initialize.c: Likewise.
10501 * link.c: Likewise.
10502 * namet.h: Likewise.
10503 * nlists.h: Likewise.
10504 * raise.c: Likewise.
10505 * raise.h: Likewise.
10506 * repinfo.h: Likewise.
10507 * seh_init.c: Likewise.
10508 * targext.c: Likewise.
10509 * tracebak.c: Likewise.
10510 * uintp.h: Likewise.
10511 * urealp.h: Likewise.
10512 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10513 * xsinfo.adb: Likewise.
10514 * xsnamest.adb: Likewise.
10515 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10516 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10517 * gcc-interface/misc.c: Likewise.
10518 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10519 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10520 ada/targext.o here...
10521 (GNAT_ADA_OBJS): ...and not here.
10522 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10523 (GNATBIND_OBJS): Reorder.
10525 2011-07-07 Richard Henderson <rth@redhat.com>
10527 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10528 dwarf2out_frame_init.
10530 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10532 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10534 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10537 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10539 2011-07-06 Richard Guenther <rguenther@suse.de>
10541 * gcc-interface/misc.c (gnat_init): Merge calls to
10542 build_common_tree_nodes and build_common_tree_nodes_2.
10543 Re-initialize boolean_false_node.
10545 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10546 Olivier Hainque <hainque@adacore.com>
10547 Nicolas Setton <setton@adacore.com>
10549 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10550 the type according to the ARTIFICIAL_P parameter.
10551 (create_type_decl): Likewise.
10552 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10554 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10556 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10557 (gnatbind): Likewise.
10559 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10561 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10563 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10565 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10566 local variable throughout. Remove useless call to Base_Type.
10567 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10568 Take it also into account for the volatileness of the field. Set the
10569 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10571 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10573 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10574 on a dereference built for a by-ref object if it has an address clause.
10576 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10578 * einfo.ads (Address_Taken): Document use for the second argument of
10579 Asm_Input and Asm_Output attributes.
10580 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10581 argument is an entity name, then set Address_Taken on it.
10582 <Attribute_Asm_Output>: Likewise.
10583 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10584 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10585 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10586 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10588 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10590 PR middle-end/46500
10591 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10593 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10595 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10596 (ada/utils.o): Update dependencies.
10597 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10598 ../../../libcpp/libcpp.a.
10599 * gcc-interface/utils.c: Include common/common-target.h.
10600 (process_attributes): Use targetm_common.have_named_sections.
10602 2011-06-07 Richard Guenther <rguenther@suse.de>
10604 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10607 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10609 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10610 TREE_THIS_NOTRAP flag.
10612 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10614 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10617 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10619 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10620 constants whose full view has discriminants specially.
10622 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10624 * gcc-interface/utils.c: Include diagnostic.h.
10625 (gnat_write_global_declarations): Output debug information for all
10626 global type declarations before finalizing the compilation unit.
10627 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10629 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10631 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10633 2011-05-25 Kai Tietz <ktietz@redhat.com>
10635 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10636 initialization instead of const/none-const pointer assignment.
10638 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10640 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10641 $(EXTRA_GNAT1_OBJS).
10642 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10643 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10644 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10645 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10646 libcommon-target.a instead of prefix.o.
10648 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10651 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10653 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10655 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10656 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10657 instead of version.o.
10659 2011-05-18 Kai Tietz <ktietz@redhat.com>
10661 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10662 boolean_false_node instead of integer_zero_node.
10663 (convert_with_check): Likewise.
10664 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10666 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10668 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10669 type of the parameter is an unconstrained array, convert the actual to
10670 the type of the formal in the In Out and Out cases as well.
10672 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10674 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10675 call build_function_type_array or build_varargs_function_type_array
10677 (create_subprog_type): Don't call build_function_type; call
10678 build_function_type_vec instead.
10680 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10682 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10683 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10684 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10686 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10688 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10690 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10691 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10693 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10695 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10697 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10699 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10700 instead of accessing TYPE_ARG_TYPES directly.
10701 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10703 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10706 * gcc-interface/gigi.h (get_variant_part): Declare.
10707 * gcc-interface/decl.c (get_variant_part): Make global.
10708 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10709 types have the same constant size, are record types and T1 has a
10710 variant part while T2 doesn't.
10712 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10714 * gcc-interface/utils.c (begin_subprog_body): Do not call
10716 (end_subprog_body): Likewise.
10718 2011-05-04 Richard Guenther <rguenther@suse.de>
10720 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10722 (pos_to_constructor): Likewise.
10724 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10725 Eric Botcazou <ebotcazou@adacore.com>
10727 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10728 of build_function_type. Adjust calls to...
10729 (build_raise_check): ...this. Do not take a void_tree parameter.
10730 Call build_function_type_list instead of build_function_type.
10731 Fix head comment and swap couple of conditional blocks.
10733 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10735 * gnatvsn.ads (Library_Version): Bump to 4.7.
10736 (Current_Year): Bump to 2011.
10738 2011-04-29 Michael Matz <matz@suse.de>
10740 * gcc-interface/misc.c (gnat_handle_option): Set
10741 warn_maybe_uninitialized.
10743 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10745 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10746 the Watson/McCabe paper.
10748 2011-04-23 Jim Meyering <meyering@redhat.com>
10750 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10752 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10754 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10757 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10759 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10761 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10762 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10763 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10764 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10765 <all>: Do not set flags on the reused DECL node coming from an alias.
10766 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10767 don't need debug info here...
10768 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10769 (gigi): Adjust calls to create_subprog_decl.
10770 (build_raise_check): Likewise.
10771 (establish_gnat_vms_condition_handler): Likewise.
10772 (Compilation_Unit_to_gnu): Likewise.
10773 (gnat_to_gnu): Likewise.
10775 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10777 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10778 (NO_REORDER_ADAFLAGS): New variable.
10779 (EXTRA_GNATTOOLS): Always define.
10780 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10781 Clean up and adjust list of files compiled with special options.
10782 * gcc-interface/Make-lang.in: Likewise.
10783 (ada/decl.o): Cosmetical change.
10784 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10786 2011-04-20 Jim Meyering <meyering@redhat.com>
10788 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10790 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10792 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10793 $(CFLAGS) on the link line.
10795 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10797 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10798 padded type built for the return type if it is unconstrained.
10800 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10802 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10804 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10806 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10807 before calling TREE_CHAIN.
10808 * gcc-interface/misc.c (gnat_init_ts): New function.
10809 (LANG_HOOKS_INIT_TS): Define.
10811 2011-04-12 Martin Jambor <mjambor@suse.cz>
10813 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10814 instead of cgraph_node.
10816 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10818 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10819 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10822 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10824 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10825 of aggregate types that contain a placeholder.
10827 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10829 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10831 (handle_type_generic_attribute): Likewise.
10833 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10836 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10838 2011-04-04 Kai Tietz <ktietz@redhat.com>
10841 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10844 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10846 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10847 type case, do not strip a padding type around the array type.
10849 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10851 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10854 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10856 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10857 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10858 code for -feliminate-unused-debug-types.
10859 (gnat_post_options): Likewise.
10861 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10863 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10864 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10867 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10869 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10870 DECL_ARTIFICIAL flag on enumeration types.
10872 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10874 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10875 fat pointer types artificial unconditionally.
10876 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10879 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10881 * gcc-interface/gigi.h (get_dummy_type): Declare.
10882 (build_dummy_unc_pointer_types): Likewise.
10883 (finish_fat_pointer_type): Likewise.
10884 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10885 fat pointer type has been built, complete it in place.
10886 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10887 and thin pointers. Remove useless variable.
10888 (finish_fat_pointer_type): Make global and move to...
10889 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10890 (get_dummy_type): New function.
10891 (build_dummy_unc_pointer_types): Likewise.
10892 (gnat_pushdecl): Propage the name to the anonymous variants only.
10893 (update_pointer_to): Only adjust the pointer types in the unconstrained
10896 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10898 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10899 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10900 if this is a Taft amendment type and the full declaration is available.
10901 * gcc-interface/trans.c (process_type): Likewise.
10902 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10903 (process_freeze_entity): Likewise.
10904 * gcc-interface/utils.c (dummy_global): New static variable.
10905 (gnat_write_global_declarations): If there are types declared as used
10906 at the global level, insert them in the global hash table.
10908 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10910 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10911 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10912 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10914 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10915 flag of the type accordingly.
10916 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10918 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10920 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10921 finalizing types when updating the pointers to the designated type.
10922 <all>: Finalize the deferred types even if we didn't defer processing
10923 of incomplete types in this invocation.
10925 2011-04-01 Olivier Hainque <hainque@adacore.com>
10926 Nicolas Setton <setton@adacore.com>
10927 Eric Botcazou <ebotcazou@adacore.com>
10929 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10930 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10932 2011-03-28 Kai Tietz <ktietz@redhat.com>
10934 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10936 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10937 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10939 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10941 2011-03-28 Tristan Gingold <gingold@adacore.com>
10944 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10945 Use ada output of gnatbind.
10946 (ada/b_gnatb.adb): Ditto.
10947 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10948 (ada.mostlyclean, ada.stage1)
10949 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10950 (ada.stagefeedback): Adjust.
10951 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10952 Use ada output of gnatbind.
10953 (b_gnatm.adb): Ditto.
10954 (b_gnatl.o, b_gnatm.o): New rules.
10956 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10958 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10959 for the padded type built to support a specified size or alignment.
10961 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10963 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10964 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10965 unconditionally to the end of the unit when the designated type is
10967 <all>: Rename local variable. Attempt to un-defer types only and do it
10968 for limited_with'ed types as well.
10969 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10970 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10971 consistently and remove redundant call to finalize_from_with_types.
10973 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10975 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10976 subprograms without a previous spec declared in the same unit.
10977 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10978 subprograms at the end of the unit instead of at the beginning.
10979 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10980 isn't public for the special handling of non-inline functions nested
10981 inside inline external functions.
10983 2011-03-25 Jeff Law <law@redhat.com>
10985 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10987 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10989 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10990 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10991 to compute Set_Size_Depends_On_Discriminant.
10992 (Layout_Type): Call it on array types in back-end layout mode.
10993 * sem_util.adb (Requires_Transient_Scope): Return true for array
10994 types only if the size depends on the value of discriminants.
10995 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10996 type if the RHS is a call to a function that returns an unconstrained
10997 type with default discriminant.
10999 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11001 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11002 non-conversion to the nominal result type at the end.
11004 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11006 * gcc-interface/trans.c (create_temporary): New function taken from...
11007 (create_init_temporary): ...here. Call it.
11008 (call_to_gnu): Create the temporary for the return value early, if any.
11009 Create it for a function with copy-in/copy-out parameters if there is
11010 no target; in other cases of copy-in/copy-out, use another temporary.
11011 Push the new binding level lazily. Add and rename local variables.
11013 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11015 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11017 (set_rm_size): Likewise.
11019 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11021 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11022 for the padded type built in order to support a specified alignment.
11023 Fix incorrect formatting.
11025 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11028 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11030 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11032 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11033 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11034 to the end of the list. Adjust recursive call. Rename local variable.
11035 If REORDER is true, reorder components of the record type.
11036 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11037 components_to_record and adjust the parameter list.
11039 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11041 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11042 disabled, use the variable for bounds of loop iteration scheme.
11044 2011-03-21 Kai Tietz <ktietz@redhat.com>
11047 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11049 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11051 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11052 out whether the expression is read-only. Short-circuit placeholder
11053 case and rename a couple of local variables.
11055 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11057 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11058 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11059 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11060 (convert): Deal with conversions from a smaller form type specially.
11062 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11064 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11065 its argument, except for the special -I- switch.
11067 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11069 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11072 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11074 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11076 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11078 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11080 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11081 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11082 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11083 Do not generate the check directly, instead instantiate the template
11084 check present in the descriptor.
11085 (make_descriptor_field): Move around.
11086 (build_vms_descriptor32): Build a template check in the POINTER field.
11087 (build_vms_descriptor): Remove useless suffixes.
11088 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11090 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11093 * targext.c: Include target files if IN_RTS is defined.
11095 2011-01-26 Richard Guenther <rguenther@suse.de>
11098 * targext.c: Include config.h.
11099 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11102 2011-01-04 Pascal Obry <obry@adacore.com>
11103 Eric Botcazou <ebotcazou@adacore.com>
11105 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11107 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11109 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11110 end-of-case on the end label and its associated gotos, if any.
11112 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11114 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11115 expressions of the parameter cache within the statement group of
11116 the CICO mechanism.
11118 2011-01-04 Olivier Hainque <hainque@adacore.com>
11119 Eric Botcazou <ebotcazou@adacore.com>
11121 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11122 (set_end_locus_from_node): New function.
11123 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11124 make and the function end_locus.
11125 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11126 for the elaboration subprogram.
11127 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11128 set the end_locus of the expression as well.
11130 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11133 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11134 variables that are referenced in exception handlers volatile.
11138 Copyright (C) 2011 Free Software Foundation, Inc.
11140 Copying and distribution of this file, with or without modification,
11141 are permitted in any medium without royalty provided the copyright
11142 notice and this notice are preserved.