1 2011-08-29 Robert Dewar <dewar@adacore.com>
3 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4 a-synbar-posix.ads: Minor reformatting.
6 2011-08-29 Yannick Moy <moy@adacore.com>
8 * snames.ads-tmpl: Add name Force.
10 2011-08-29 Pascal Obry <obry@adacore.com>
12 * prj-nmsc.adb: Minor reformatting.
14 2011-08-29 Jose Ruiz <ruiz@adacore.com>
16 * a-exetim.ads (Interrupt_Clocks_Supported,
17 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
18 definitions to be compliant with AI-0171.
20 2011-08-29 Robert Dewar <dewar@adacore.com>
22 * a-ngelfu.adb: Add comments.
24 2011-08-29 Geert Bosch <bosch@adacore.com>
26 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
27 the closest machine number to Pi / 2.0.
29 2011-08-29 Jose Ruiz <ruiz@adacore.com>
31 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
32 package Ada.Synchronous_Barriers.
33 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
34 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
35 default implementation using protected objects and another one
36 a-synbar-posix using POSIX barriers as the underlying support.
37 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
38 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
39 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
40 Clean up dependencies.
41 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
43 2011-08-29 Robert Dewar <dewar@adacore.com>
45 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
46 exp_dist.adb: Minor code reorganization.
49 2011-08-29 Thomas Quinot <quinot@adacore.com>
51 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
52 primitive operation must support external streaming if it is not a
53 controlling access result.
55 2011-08-29 Thomas Quinot <quinot@adacore.com>
57 * sinfo.ads, sem_ch7.adb: Minor reformatting.
59 2011-08-29 Bob Duff <duff@adacore.com>
61 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
62 restriction on allocators, as required by AI05-0013-1.
63 * restrict.ads: Minor comment fix.
65 2011-08-29 Tristan Gingold <gingold@adacore.com>
67 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
68 (To_Jmpbuf_Address): Ditto
69 (builtin_longjmp): Ditto
71 2011-08-29 Thomas Quinot <quinot@adacore.com>
73 * sem_res.adb: Minor reformatting.
75 2011-08-29 Vincent Celier <celier@adacore.com>
77 * make.adb (Gnatmake): Move special processing for VM targets after the
78 call to Get_Target_Parameters.
80 2011-08-29 Thomas Quinot <quinot@adacore.com>
82 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
84 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
86 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
87 where an anonymous access discriminant of a limited designated type
88 appears in a non-immutably limited discriminated type and issue an
89 error message. Add local variable Desig_T and replace all occurrences
92 2011-08-29 Jose Ruiz <ruiz@adacore.com>
94 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
95 implementation is compliant to RM D.15(15/2) after the modification
96 imposed by AI05-0094-1 (binding interpretation).
98 2011-08-29 Robert Dewar <dewar@adacore.com>
100 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
101 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
103 2011-08-29 Thomas Quinot <quinot@adacore.com>
105 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
106 the scope name, do not report a missing label as a style violation (it
107 will be diagnosed as an illegality).
108 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
109 variant records: Get_Enum_Lit_From_Pos already returns a usage
110 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
111 on Expr in Integer_Literal case so that it can be used by
114 2011-08-29 Tristan Gingold <gingold@adacore.com>
116 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
118 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
119 (Build_Abort_Block_Handler): New function to build an Abort_Signal
121 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
122 Build_Abort_Block_Handler to build the exception handler. Do not
123 undefer aborts for the Abort_Signal exception handler if back-end
125 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
126 back_end exceptions for all others and abort_signal.
127 * s-except.ads (ZCX_By_Default): New constant.
128 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
129 (Raise_Exception_Always): Ditto.
130 (Raise_From_Signal_Handler): Ditto.
131 (Raise_With_Location_And_Msg): Ditto.
132 (Raise_With_Msg): Ditto.
134 (Reraise_Occurence): Ditto.
135 (Reraise_Occurrence_Always): Ditto.
136 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
137 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
139 2011-08-29 Thomas Quinot <quinot@adacore.com>
141 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
143 2011-08-29 Robert Dewar <dewar@adacore.com>
145 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
146 Minor code reorganization.
148 2011-08-29 Bob Duff <duff@adacore.com>
150 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
151 2012, not just Ada 2005.
153 2011-08-29 Vincent Celier <celier@adacore.com>
155 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
156 with a project file or with gprbuid, if -gnatep= is specified, the
157 builder may need to be invoked with -x.
159 2011-08-29 Tristan Gingold <gingold@adacore.com>
161 * a-exexpr-gcc.adb: Minor comment fix.
163 2011-08-29 Robert Dewar <dewar@adacore.com>
165 * sem_ch8.adb: Minor reformatting.
167 2011-08-29 Bob Duff <duff@adacore.com>
169 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
170 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
171 treating "some" as unreserved in earlier Ada versions. This is now
172 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
173 rather than Name_Some, since Tok_Some is now recognized as reserved.
174 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
176 * scans.ads: Minor comment fixes.
177 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
178 for other language versions.
179 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
180 treating "some" as unreserved in earlier Ada versions. This is now
181 handled in Snames.Is_Keyword_Name.
182 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
184 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
185 unreserved in earlier Ada versions. This is now handled in
186 Snames.Is_Keyword_Name.
187 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
188 words as for other language versions.
189 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
190 Ada 2012, not just Ada 2005.
192 2011-08-29 Ed Schonberg <schonberg@adacore.com>
194 * sem_ch13.adb: Additional semantic checks for aspects involved in
197 2011-08-29 Matthew Heaney <heaney@adacore.com>
199 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
200 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
202 (Ancestor_Find): ditto.
204 2011-08-29 Thomas Quinot <quinot@adacore.com>
206 * par-endh.adb: Minor reformatting.
208 2011-08-29 Tristan Gingold <gingold@adacore.com>
210 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
211 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
212 (Adjust_N_CLeanups_For): Remove.
213 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
215 (Propgate_Exception): Adjust.
216 * raise-gcc.c: Add a few static/const.
217 (Adjust_N_Cleanups_For): Remove declaration.
218 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
220 2011-08-29 Ed Schonberg <schonberg@adacore.com>
222 * sem_ch8.adb: Use type of function return when rewriting as object
225 2011-08-29 Gary Dismukes <dismukes@adacore.com>
227 * sem_type.adb: Minor reformatting.
229 2011-08-29 Robert Dewar <dewar@adacore.com>
231 * makeutl.adb: Minor reformatting.
233 2011-08-29 Ed Schonberg <schonberg@adacore.com>
235 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
236 function call of a limited type, the expansion of the renaming is
237 complicated by the presence of various temporaries and subtypes that
238 capture constraints of the renamed object.
239 Rewrite node as an object declaration, whose expansion is simpler.
240 Given that the object is limited there is no copy involved and no
243 2011-08-29 Robert Dewar <dewar@adacore.com>
245 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
246 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
248 2011-08-29 Tristan Gingold <gingold@adacore.com>
250 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
251 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
252 system-linux-hppa.ads, system-linux-s390.ads,
253 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
254 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
255 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
256 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
257 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
258 system-solaris-sparc.ads, system-lynxos-x86.ads,
259 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
260 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
261 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
262 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
263 system-vxworks-x86.ads: Remove GCC_ZCX_Support
264 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
265 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
266 * opt.ads: Adjust comment.
267 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
268 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
269 * system.ads: Move GCC_ZCX_Support to obsolete entries.
271 2011-08-29 Emmanuel Briot <briot@adacore.com>
273 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
274 file name is specified on the gnatmake or gprbuild command line, and
275 before we search for that file in the project.
277 2011-08-29 Ed Schonberg <schonberg@adacore.com>
279 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
280 used to determine whether a possible interpretation for an overloadable
281 entity is declared within the current instantiation and should be
282 included in the candidate set.
284 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
286 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
288 2011-08-29 Ed Schonberg <schonberg@adacore.com>
290 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
291 access subtype is access_to_subprogram, when applying checks for
294 2011-08-29 Matthew Heaney <heaney@adacore.com>
296 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
297 for sibling when common parent.
299 2011-08-29 Thomas Quinot <quinot@adacore.com>
301 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
304 2011-08-29 Ed Schonberg <schonberg@adacore.com>
306 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
307 for the return type when in ASIS mode.
309 2011-08-29 Vincent Celier <celier@adacore.com>
311 * make.adb (Gnatmake): Get the default search dirs, then the target
312 parameters after getting the Builder switches, as the Builder switches
313 may include --RTS= and that could change the default search dirs.
315 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
317 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
318 Make_Final_Call. Move the processing for class-wide types before the
319 processing for derivations from [Limited_]Controlled.
320 (Make_Final_Call): Move the processing for class-wide types before the
321 processing for derivations from [Limited_]Controlled.
322 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
323 Add code to account for alignments larger than the list header. Add a
324 comment illustrating the structure of the allocated object + padding +
326 (Deallocate_Any_Controlled): Add code to account for alignments larger
327 than the list header.
329 2011-08-29 Ed Schonberg <schonberg@adacore.com>
331 * sinfo.ads, sinfo.adb: New node kind
332 N_Formal_Incomplete_Type_Definition, related flags.
333 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
334 Parse formal incomplete types.
335 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
337 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
338 Formal incomplete types do not need completion.
339 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
340 Validate_Incomplete_Type_Instance): New procedures to handle formal
342 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
343 that corresponds to a formal incomplete type.
344 * sprint.adb: Handle formal incomplete type declarations.
345 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
348 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
350 * a-fihema.ads, a-fihema.adb: Unit removed.
351 * a-undesu.ads, a-undesu.adb: New unit implementing
352 Ada.Unchecked_Deallocate_Subpool.
353 * einfo.adb: Remove Associated_Collection from the node usage.
354 Add Finalization_Master to the node usage.
355 (Associated_Collection): Removed.
356 (Finalization_Master): New routine.
357 (Set_Associated_Collection): Removed.
358 (Set_Finalization_Master): New routine.
359 (Write_Field23_Name): Remove Associated_Collection from the output. Add
360 Finalization_Master to the output.
361 * einfo.ads: Remove attribute Associated_Collection and its uses in
363 Add new attribute Finalization_Master along with its uses in entitites.
364 (Associated_Collection): Removed along with its pragma import.
365 (Finalization_Master): New routine along with a pragma import.
366 (Set_Associated_Collection): Removed along with its pragma import.
367 (Set_Finalization_Master): New routine along with a pragma import.
368 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
369 Build_Finalization_Collection with Build_Finalization_Master.
370 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
371 before the bodies of the predefined routines. Add comment explaining
372 this. Replace call to Build_Finalization_Collection with
373 Build_Finalization_Master.
374 (Freeze_Type): Replace call to Build_Finalization_Collection with
375 Build_Finalization_Master.
376 (Make_Finalize_Address_Body): Comment reformatting.
377 (Make_Predefined_Primitive_Specs): Code reformatting.
378 (Stream_Operation_OK): Update comment mentioning finalization
379 collections. Replace RE_Finalization_Collection with
380 RE_Finalization_Master.
381 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
382 Associated_Collection with Finalization_Master. Replace call to
383 Build_Finalization_Collection with Build_Finalization_Master.
384 (Expand_Allocator_Expression): Replace call to Associated_Collection
385 with Finalization_Master. Replace call to Set_Associated_Collection with
386 Set_Finalization_Master. Remove the generation of
387 Set_Finalize_Address_Ptr.
388 (Expand_N_Allocator): Replace call to Associated_Collection with
389 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
390 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
391 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
392 comment on usage. Replace call to Needs_BIP_Collection with
393 Needs_BIP_Finalization_Master Remplace BIP_Collection with
394 BIP_Finalization_Master. Update all comments which mention finalization
395 collections. Replace Associated_Collection with
396 Finalization_Master. Replace Build_Finalization_Collection with
397 Build_Finalization_Master.
398 (BIP_Formal_Suffix): Update BIP_Collection's case.
399 (Build_Heap_Allocator): Update the related comment. Rename local
400 variable Collect to Fin_Mas_Id and update its occurrences. Update
401 comments which mention finalization collections. Replace
402 Set_Associated_Collection with Set_Finalization_Master.
403 (Expand_Call): Update the code which detects a special piece of library
405 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
406 Add_Collection_Actual_To_Build_In_Place_Call with
407 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
408 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
409 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
410 Add_Collection_Actual_To_Build_In_Place_Call with
411 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
412 (Make_Build_In_Place_Call_In_Assignment): Replace call to
413 Add_Collection_Actual_To_Build_In_Place_Call with
414 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
415 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
416 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
417 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
418 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
419 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
420 Replace call to Set_Associated_Collection with Set_Finalization_Master.
421 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
422 Replace the call to Associated_Collection with Finalization_Master.
423 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
424 Update the way finalization master names are generated. Update the
425 retrieval of the correct access type which will carry the pool and
427 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
428 (Make_Finalize_Address_Body): Abstract types do not need
429 Finalize_Address. Code reformatting.
430 (Make_Finalize_Address_Stmts): Update comment on usage.
431 (Make_Set_Finalize_Address_Ptr_Call): Removed.
432 (Process_Declarations): Update comments.
433 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
434 Build_Finalization_Master. Update associated comment.
435 (Make_Set_Finalize_Address_Ptr_Call): Removed.
436 * exp_ch13.adb: Update comments which mention finalization collections.
437 (Expand_N_Free_Statement): Replace the call to Associated_Collection
438 with Finalization_Master.
439 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
440 create calls to routines Allocate_Any_Controlled and
441 Deallocate_Any_Controlled.
442 (Find_Finalize_Address): New routine.
443 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
445 (Requires_Cleanup_Actions): Update the comment on freeze node
447 * exp_util.ads: Remove comment on generated code for
448 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
449 is better to simply look in the body.
450 * freeze.adb (Freeze_All): Update the comment of finalization
451 collections. Replace the call to Associated_Collection with
452 Finalization_Master. Replace the call to Build_Finalization_Collection
453 with Build_Finalization_Master.
454 * impunit.adb: Add a-undesu and s-stposu to the list of units.
455 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
457 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
458 Ada.Finalization. Add processing for children of System.Storage_Pools.
459 * rtsfind.ads: Remove the naming of second level children of
461 Remove Ada_Finalization_Heap_Management from the list of units.
462 Remove subtype Ada_Finalization_Child.
463 Remove the following subprogram entities:
467 RE_Finalization_Collection
468 RE_Finalization_Collection_Ptr
469 RE_Set_Finalize_Address_Ptr
471 Add the naming of second level children of System.Storage_Pools.
472 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
474 Add subtype System_Storage_Pools_Child.
475 Add the following subprogram entities to System.Finalization_Masters:
477 RE_Finalization_Master
478 RE_Finalization_Master_Ptr
480 Add the following subprogram entities to System.Storage_Pools.Subpools:
482 RE_Allocate_Any_Controlled
483 RE_Deallocate_Any_Controlled
484 RE_Root_Storage_Pool_With_Subpools
488 Move the following subprogram entities from
489 Ada.Finalization.Heap_Management to System.Finalization_Masters:
491 RE_Add_Offset_To_Address
496 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
497 Set_Associated_Collection with Set_Finalization_Master.
498 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
499 BIP_Finalization_Master is created.
500 * s-finmas.adb: New unit System.Finalization_Masters.
501 * s-finmas.ads: New unit System.Finalization_Masters.
502 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
503 * s-stposu.ads, s-stposu.adb: New unit implementing
504 System.Storage_Pools.Subpools.
506 2011-08-29 Bob Duff <duff@adacore.com>
508 * tbuild.adb: Add assertion.
510 2011-08-29 Thomas Quinot <quinot@adacore.com>
512 * s-pooglo.adb: Minor reformatting.
514 2011-08-29 Ed Schonberg <schonberg@adacore.com>
516 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
517 an indexed component of a packed array whose element type is a record
518 with a representation clause different from that of the right-hand
519 side, generate a temporary to minimuze the number of bit-field
520 operations generated.
522 2011-08-29 Ed Schonberg <schonberg@adacore.com>
524 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
525 declarations, and thus are likely insertion points for actions.
527 2011-08-29 Bob Duff <duff@adacore.com>
529 * einfo.ads: Minor comment fix.
531 2011-08-29 Robert Dewar <dewar@adacore.com>
533 * frontend.adb, gnat1drv.adb: Minor reformatting.
535 2011-08-29 Tristan Gingold <gingold@adacore.com>
537 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
538 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
539 space in front of the header.
541 2011-08-29 Johannes Kanig <kanig@adacore.com>
543 * frontend.adb (Frontend): Exit after creating Standard package when
545 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
548 2011-08-29 Robert Dewar <dewar@adacore.com>
550 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
551 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
552 snames.ads-tmpl: Minor reformatting.
554 2011-08-29 Philippe Gil <gil@adacore.com>
556 * prj.adb (Reset_Units_In_Table): New procedure.
557 Reset units to avoid access to freed memory.
559 2011-08-29 Thomas Quinot <quinot@adacore.com>
561 * get_scos.adb: When reading a P statement SCO without a pragma name
562 (from an older ALI file), ensure that the Pragma_Name component is set
563 to Unknown_Pragma (not left uninitialized).
565 2011-08-29 Vincent Celier <celier@adacore.com>
567 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
568 modified to compute correctly the object path of a SAL project that is
569 extending another library project.
570 (Write_Path_File): New procedure.
571 * makeutl.ads (Directories): New table moved from Buildgpr
572 (Get_Directories): New procedure moved from Buildgpr
573 (Write_Path_File): New procedure
574 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
575 paths before binding SALs, instead of Set_Ada_Paths.
576 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
578 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
579 (Current_Source_Path_File_Of): New function
580 (Set_Current_Object_Path_File_Of): New procedure
581 (Current_Source_Object_File_Of): New function
582 (Set_Current_Object_Path_File_Of): New procedure
583 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
584 (Current_Source_Path_File_Of): New function
585 (Set_Current_Object_Path_File_Of): New procedure
586 (Current_Source_Object_File_Of): New function
587 (Set_Current_Object_Path_File_Of): New procedure
589 2011-08-29 Ed Schonberg <schonberg@adacore.com>
591 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
592 packed entity, use a bit-field assignment only if there is no change of
595 2011-08-29 Thomas Quinot <quinot@adacore.com>
597 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
598 Is_RTU instead of using Chars comparisons.
600 2011-08-29 Thomas Quinot <quinot@adacore.com>
602 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
603 temporary object if the actual is constrained, and the discriminants
604 read from the stream don't match.
606 2011-08-29 Tristan Gingold <gingold@adacore.com>
608 * sem_attr.adb, exp_attr.adb: Add handling of
609 Attribute_System_Allocator_Alignment
610 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
611 Attribute_System_Allocator_Alignment.
612 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
613 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
614 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
615 get_target_system_allocator_alignment.
617 2011-08-29 Arnaud Charlet <charlet@adacore.com>
619 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
622 2011-08-29 Arnaud Charlet <charlet@adacore.com>
624 * exp_ch3.adb (In_Runtime): Fix typo.
626 2011-08-29 Bob Duff <duff@adacore.com>
628 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
630 2011-08-29 Ed Schonberg <schonberg@adacore.com>
632 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
633 and a separate tag assignment is generated, ensure that the tag
634 assignment is analyzed.
636 2011-08-29 Ed Schonberg <schonberg@adacore.com>
638 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
639 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
640 of statement lists that may contain local declarations.
641 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
642 duplicate the triggering statements needed for the expansion of this
643 construct, when the trigger is a dispatching call to a synchronized
646 2011-08-29 Arnaud Charlet <charlet@adacore.com>
648 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
649 * bindgen.adb: Add comments.
650 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
653 2011-08-29 Robert Dewar <dewar@adacore.com>
655 * exp_attr.adb: Minor reformatting.
656 Minor code reorganization and commenting.
657 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
660 2011-08-29 Thomas Quinot <quinot@adacore.com>
662 * get_scos.adb: Ignore chaining indicators not currently supported
665 2011-08-29 Arnaud Charlet <charlet@adacore.com>
667 * system.ads: Minor editing.
669 2011-08-29 Arnaud Charlet <charlet@adacore.com>
671 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
673 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
674 Attribute_Elab_Subp_Body.
675 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
676 * sem_util.adb: Update comments.
678 2011-08-29 Thomas Quinot <quinot@adacore.com>
680 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
681 pragma name for each SCO statement corresponding to a pragma.
683 2011-08-29 Arnaud Charlet <charlet@adacore.com>
685 * opt.ads: Minor editing.
687 2011-08-29 Yannick Moy <moy@adacore.com>
689 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
690 that only made sense for CodePeer mode.
692 2011-08-29 Jose Ruiz <ruiz@adacore.com>
694 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
695 which is no longer used.
696 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
697 handling of the 64-bit division check.
698 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
700 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
703 2011-08-29 Thomas Quinot <quinot@adacore.com>
705 * get_scos.adb: Minor reformatting.
707 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
709 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
710 statement list is wrapped in a block, the block is explicitly analyzed
711 in order to properly redecorate the entities and create a servicing
714 2011-08-29 Tristan Gingold <gingold@adacore.com>
716 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
717 (Set_Zero_Cost_Handling): Remove.
719 2011-08-29 Thomas Quinot <quinot@adacore.com>
721 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
723 2011-08-29 Geert Bosch <bosch@adacore.com>
725 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
726 instruction, as the latter may produce -0.0, which is not a valid VAX
728 (Neg_G): Likewise for VAX F float.
730 2011-08-29 Robert Dewar <dewar@adacore.com>
732 * exp_util.adb: Minor reformatting.
734 2011-08-29 Yannick Moy <moy@adacore.com>
736 * sem_ch3.adb: Minor comment update.
738 2011-08-29 Thomas Quinot <quinot@adacore.com>
740 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
743 2011-08-29 Thomas Quinot <quinot@adacore.com>
745 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
746 current statement sequence on a generic instantiation or a subprogram
749 2011-08-29 Robert Dewar <dewar@adacore.com>
751 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
754 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
756 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
757 Correct the check which involves the freeze node of a controlled or
758 access-to-controlled type.
760 2011-08-29 Geert Bosch <bosch@adacore.com>
762 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
764 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
767 2011-08-29 Yannick Moy <moy@adacore.com>
769 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
770 for every index type and component type that is not a subtype_mark.
771 (Process_Subtype): Set Etype of subtype.
773 2011-08-29 Robert Dewar <dewar@adacore.com>
775 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
776 reorganization. Minor reformatting.
778 2011-08-29 Steve Baird <baird@adacore.com>
780 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
781 for CodePeer and ALFA modes.
783 2011-08-29 Ed Schonberg <schonberg@adacore.com>
785 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
786 that comes from an enclosing scope if it is not the renaming of an
787 actual, to handle properly a spurious ambiguity in an instance.
789 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
791 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
792 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
793 use it instead of the Esize of the first parameter.
794 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
796 <Size>: Likewise. Call it for composite types on the RM size.
798 2011-08-29 Yannick Moy <moy@adacore.com>
800 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
801 * sem_util.adb (Unique_Name): Correct behaviour for names of
804 2011-08-29 Yannick Moy <moy@adacore.com>
806 * sem_prag.adb (Check_Precondition_Postcondition): In formal
807 verification mode, analyze pragma expression for correctness, for
808 pre/post on library-level subprogram, as it is not expanded later.
810 2011-08-29 Yannick Moy <moy@adacore.com>
812 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
813 in formal verification.
815 2011-08-29 Thomas Quinot <quinot@adacore.com>
817 * sem_util.adb: Minor reformatting.
818 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
820 * par_sco.ads, par_sco.adb: Update comments.
822 2011-08-29 Yannick Moy <moy@adacore.com>
824 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
825 associated getter/setter.
826 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
828 2011-08-29 Vincent Celier <celier@adacore.com>
830 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
831 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
832 with declarations for Language_Kind and Dependency_Kind for Ada.
833 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
834 (Process_Compiler): Take into account the new attributes Dependency_Kind
836 (Check_Configuration): Check if language kind is unit based, not if the
837 language name is Ada.
838 (Process_Exceptions_Unit_Based): Ditto
839 (Add_Language): Remove default additions of language and dependency kind
840 * prj.ads: Minor comment change
841 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
843 2011-08-29 Johannes Kanig <kanig@adacore.com>
845 * debug.adb: Update comments.
847 2011-08-24 Joseph Myers <joseph@codesourcery.com>
849 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
850 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
851 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
852 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
853 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
855 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
857 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
858 (GNATLIBCFLAGS_FOR_C): Replace
859 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
860 (gnatlib-shared-default, gnatlib-shared-dual-win32)
861 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
862 (gnatlib-sjlj, gnatlib-zcx): Likewise.
864 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
866 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
868 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
870 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
872 2011-08-05 Nicolas Roche <roche@adacore.com>
874 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
875 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
877 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
879 2011-08-05 Matthew Heaney <heaney@adacore.com>
881 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
882 subprogram bodies declared out-of-order.
884 2011-08-05 Yannick Moy <moy@adacore.com>
886 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
887 entities directly in package Standard, otherwise skip the standard
890 2011-08-05 Robert Dewar <dewar@adacore.com>
892 * a-cbmutr.adb: Minor reformatting
893 (Allocate_Node): refactor node allocation algorithm
895 2011-08-05 Robert Dewar <dewar@adacore.com>
897 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
898 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
900 (Analyze_Pragma, case Check_Policy): Ditto.
901 * sem_prag.ads (Check_Disabled): New function
902 * snames.ads-tmpl: Add Name_Disable.
904 2011-08-05 Robert Dewar <dewar@adacore.com>
906 * gnat_rm.texi: Document implementation-defined policy DISABLE for
907 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
909 2011-08-05 Ed Schonberg <schonberg@adacore.com>
911 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
912 that appears in a generic formal part and applies to a formal
915 2011-08-05 Robert Dewar <dewar@adacore.com>
917 * a-cbmutr.ads: Minor reformatting.
919 2011-08-05 Matthew Heaney <heaney@adacore.com>
921 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
922 to check count, check sign of value instead.
923 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
924 (Copy_Subtree): allocate copy of source element
925 (Equal_Subtree): compare elements, not access objects
927 2011-08-05 Vincent Celier <celier@adacore.com>
929 * gnat_ugn.texi: Fix VMS alternative.
931 2011-08-05 Thomas Quinot <quinot@adacore.com>
933 * sem_ch11.adb: Add comment.
935 2011-08-05 Robert Dewar <dewar@adacore.com>
937 * exp_util.adb: Minor comment fix.
939 2011-08-05 Robert Dewar <dewar@adacore.com>
941 * scng.adb (Error_Unterminated_String): Improve flag position when
944 2011-08-05 Matthew Heaney <heaney@adacore.com>
946 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
948 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
949 multiway tree containers.
951 2011-08-05 Robert Dewar <dewar@adacore.com>
953 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
954 * stylesw.adb: Implement -gnatyC to control comment spacing
955 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
957 * usage.adb: Add line for -gnatyC.
959 2011-08-05 Robert Dewar <dewar@adacore.com>
961 * gnat_ugn.texi: Document -gnatyC.
962 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
963 synonym for COMMENTS2).
965 2011-08-05 Robert Dewar <dewar@adacore.com>
967 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
968 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
969 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
970 a-comutr.ads, lib-xref.adb: Minor reformatting.
972 2011-08-05 Robert Dewar <dewar@adacore.com>
974 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
975 warning if there is an exception handler present.
977 2011-08-05 Pascal Obry <obry@adacore.com>
979 * a-iteint.ads: Fix copyright year.
981 2011-08-05 Thomas Quinot <quinot@adacore.com>
983 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
984 statement SCO for a USE clause or a representation clause.
986 2011-08-05 Yannick Moy <moy@adacore.com>
988 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
989 between body and spec for stub.
990 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
991 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
992 pragma precondition or postcondition, for which the enclosing
993 subprogram or package in the AST is not the desired one, return empty.
995 2011-08-05 Thomas Quinot <quinot@adacore.com>
997 * g-expect.adb: Minor reformatting.
999 2011-08-05 Bob Duff <duff@adacore.com>
1001 * a-fihema.adb: Comment out OS_Lib.
1003 2011-08-05 Matthew Heaney <heaney@adacore.com>
1005 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
1006 (unbounded multiway tree containers) and a-iteint.ads.
1007 * a-comutr.ads, a-comutr.adb:
1008 This is the new Ada 2012 unit for unbounded multiway tree containers
1009 * a-cimutr.ads, a-cimutr.adb
1010 This is the new Ada 2012 unit for indefinite multiway tree containers
1011 * a-iteint.ads: New file.
1013 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1015 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1017 2011-08-05 Bob Duff <duff@adacore.com>
1019 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1021 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1023 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1025 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1026 general indexing aspects of Ada2012. Called when analyzing indexed
1027 components when other interpretations fail.
1028 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1029 in an expression context where overloading is meaningful. This excludes
1030 the occurrence in an aspect specification (efficiency only).
1031 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1032 related to iterators can be set by an attribute specification, but
1034 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1035 Constant_Indexing and Variable_Indexing.
1036 (Check_Indexing_Functions): New procedure to perform legality checks.
1037 Additional semantic checks at end of declarations.
1039 2011-08-05 Sergey Rybin <rybin@adacore.com>
1041 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1042 order of calling Tree_Write/Tree_Read routines made for aspects.
1044 2011-08-05 Bob Duff <duff@adacore.com>
1046 * a-fihema.adb (Finalize): Fix race condition.
1048 2011-08-05 Yannick Moy <moy@adacore.com>
1050 * sem_ch12.adb (Analyze_Package_Instantiation,
1051 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1054 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1056 * sem_type.adb (Specific_Type): in an instance, the type-specific
1057 operand of an equality check that involves null may have a private
1058 type. Use full view to determine legality of construct.
1060 2011-08-05 Vincent Celier <celier@adacore.com>
1062 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1063 delete or close the file when the call to gnatmake was successful.
1065 2011-08-05 Yannick Moy <moy@adacore.com>
1067 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1068 Global_Discard_Names.
1070 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1072 * sinfo.ads: comments on use of entity field for aspect specifications.
1074 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1076 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1077 node is not itself an entity but a selected component, it is a
1078 rewritten parameterless call to an en enclosing synchronized operation,
1079 and this expansion will be performed again in the instance, so there is
1080 no global information to preserve.
1082 2011-08-05 Javier Miranda <miranda@adacore.com>
1084 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1085 for renamings of predefined primitives.
1086 (In_Predef_Prims_DT): New subprogram.
1088 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1090 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1091 possible interpretation of name is a reference type, add an
1092 interpretation that is the designated type of the reference
1093 discriminant of that type.
1094 * sem_res.adb (resolve): If the interpretation imposed by context is an
1095 implicit dereference, rewrite the node as the deference of the
1096 reference discriminant.
1097 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1098 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1099 parent type or base type.
1100 * sem_ch4.adb (Process_Indexed_Component,
1101 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1102 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1103 Check for implicit dereference.
1104 (List_Operand_Interps): Indicate when an implicit dereference is
1106 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1108 2011-08-05 Thomas Quinot <quinot@adacore.com>
1110 * scos.ads: Update documentation of SCO table. Pragma statements can now
1111 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1112 * par_sco.ads, par_sco.adb: Implement the above change.
1113 (Process_Decisions_Defer): Generate a P decision for the first parameter
1114 of a dyadic pragma Debug.
1115 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1117 * put_scos.adb: Code simplification based on above change.
1119 2011-08-05 Robert Dewar <dewar@adacore.com>
1121 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1122 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1123 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1124 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1126 2011-08-05 Bob Duff <duff@adacore.com>
1128 * a-stunau.ads, g-spipat.adb: Update comments.
1130 2011-08-05 Bob Duff <duff@adacore.com>
1132 * a-fihema.ads: Minor comment fix.
1133 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1135 (Attach, Detach): Remove some unnecessary code.
1136 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1138 2011-08-05 Bob Duff <duff@adacore.com>
1140 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1141 allocation for Objects component. This simplifies the code somewhat. It
1142 is also a little more efficient in the not-so-unusual case where there
1143 are no controlled objects allocated.
1144 Make Finalization_Started flag atomic.
1145 (Finalize): Avoid unnecessary detachment of items from the list.
1146 (pcol): Minor cleanup.
1148 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1150 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1151 package whose name is the same as that of the generic unit, or its
1154 2011-08-05 Bob Duff <duff@adacore.com>
1156 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1157 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1158 Minor comment fixes.
1160 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1162 * make.adb (Linking_Phase): No longer need to set source search path
1163 before calling gnatlink in CodePeer mode.
1164 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1165 gcc in CodePeer mode, since the binder generated file no longer has a
1167 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1168 * switch-c.adb: Update comment.
1170 2011-08-05 Thomas Quinot <quinot@adacore.com>
1172 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1174 2011-08-05 Nicolas Roche <roche@adacore.com>
1176 * gnat_ugn.texi: Fix minor syntax error issue.
1178 2011-08-05 Vincent Celier <celier@adacore.com>
1180 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1181 delete or close the file when the call to gnatmake returns a non
1182 successful return code.
1184 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1186 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1187 check, indicate that the copy of the original node does not come from
1188 source, to prevent an infinite recursion of the expansion.
1190 2011-08-05 Johannes Kanig <kanig@adacore.com>
1192 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1193 VC generation for subprogram bodies.
1195 2011-08-05 Yannick Moy <moy@adacore.com>
1198 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1199 the base type with the smallest allowed base type.
1201 2011-08-05 Sergey Rybin <rybin@adacore.com>
1203 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1206 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1208 * sem_ch12.ads: minor comment updates.
1210 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1212 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1213 instantiation and a formal package the compiler generates a package
1214 renaming declaration so that the generic name within the declaration
1215 is interpreted as a renaming of the instance. At the end of a formal
1216 package declaration, this renaming must become invisible.
1218 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1220 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1221 comparison and rely on concrete entities instead.
1223 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1225 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1226 and discriminants, to indicate that the type has an access discriminant
1227 that supports implicit dereference.
1228 * snames.ads-tmpl: Add names of aspects and attributes related to
1229 Ada2012 iterators: constant_indexing, default_iterator,
1230 iterator_element, implicit_dereference, variable_indexing.
1231 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1232 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1233 iterator-related aspects.
1234 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1236 2011-08-05 Sergey Rybin <rybin@adacore.com>
1238 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1239 metrics in gnatmetric to cover new kinds of coupling mentrics.
1241 2011-08-05 Steve Baird <baird@adacore.com>
1243 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1244 of calling the user-defined main subprogram.
1245 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1246 is set) Call_Main_Subprogram ahead of, as opposed to
1248 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1249 generation of a "with" of the user-defined main subprogram.
1250 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1251 (which is now called from Gen_Main instead).
1253 2011-08-05 Emmanuel Briot <briot@adacore.com>
1255 * projects.texi: Added reference to the Makefile package.
1257 2011-08-05 Thomas Quinot <quinot@adacore.com>
1259 * exp_ch7.adb: Minor comment rewording.
1261 2011-08-05 Ed Falis <falis@adacore.com>
1263 * env.c: Fix comment.
1265 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1267 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1268 character comparison and rely on concrete entities instead.
1270 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1272 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1273 suggested by AI95-0068.
1275 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1277 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1278 the two potential initialization calls. This accounts for any
1279 access-before-elaboration checks which may precede the initialization
1281 (Next_Suitable_Statement): New routine. Returns the next real statement
1282 after the input node while skipping generated checks.
1283 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1284 with comment on usage.
1285 Do not generate Elaborate_All when the trigger is a finalization call
1286 coming from a type init proc.
1287 (Check_Elab_Call): Propagate the initialization procedure context to
1288 subsequent calls to Check_A_Call.
1289 (Check_Internal_Call_Continue): Propagate the initialization procedure
1290 context to subsequent calls to Check_Elab_Call.
1291 (Is_Finalization_Procedure): New routine. Returns True if the input
1292 entity denotes a [Deep_]Finalize routine.
1293 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1294 along with comment on usage.
1296 2011-08-05 Vadim Godunko <godunko@adacore.com>
1298 * s-atocou.ads: Add list of supported platforms.
1300 2011-08-05 Yannick Moy <moy@adacore.com>
1302 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1304 * opt.ads (Disable_ALI_File): new Boolean flag
1305 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1307 2011-08-05 Ed Falis <falis@adacore.com>
1309 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1310 environ is properly defined.
1312 2011-08-05 Vincent Celier <celier@adacore.com>
1314 * make.adb (Compilation_Phase): Exit immediately when all objects have
1315 been found up to date, to avoid multiple exit messages.
1316 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1317 same project for languages with no compiler.
1318 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1320 2011-08-05 Robert Dewar <dewar@adacore.com>
1322 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1323 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1324 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1325 s-atocou-builtin.adb: Minor reformatting.
1327 2011-08-05 Yannick Moy <moy@adacore.com>
1329 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1330 if the node to wrap is a pragma check, this node and enclosed
1331 expression are not expanded, so do not apply any transformations here.
1332 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1333 introducing transient scopes.
1335 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1337 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1338 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1339 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1340 routine is available, so we use the default implementation of these
1342 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1343 support for copying attributes on VxWorks 6.
1345 2011-08-05 Yannick Moy <moy@adacore.com>
1347 * debug.adb: Remove use of -gnatd.D.
1348 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1349 * opt.ads: Simplify variables for ALFA mode, to keep one only
1350 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1353 2011-08-05 Vincent Celier <celier@adacore.com>
1355 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1356 Builder'Default_Switches.
1358 2011-08-05 Vincent Celier <celier@adacore.com>
1360 * makeusg.adb: Add lines for --create-map-file switches.
1362 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1364 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1365 profile is incomplete and the full view is available, replace it with
1367 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1368 incomplete, freezing the subprogram is delayed until the full view is
1370 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1371 fixed-point multiplication operator and the predefined operator is
1372 resolved in favor of the user-defined one.
1374 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1376 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1379 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1381 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1382 whether a type lacks user-defined Read or Write operations, or has a
1383 component that lacks them.
1384 * sem_attr.adb (Check_Stream_Attribute): if restriction
1385 No_Default_Stream_Attributes is active, verify that all subcomponent
1386 types of the target have user-defined stream operations, and report
1388 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1389 * exp_strm.adb: Build_Elementary_Input_Call,
1390 Build_Elementary_Write_Call): remove checks for restriction
1391 No_Default_Stream_Attributes, now checked in semantics.
1393 2011-08-04 Vincent Celier <celier@adacore.com>
1395 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1396 switches on the command line, look for all valid --RTS switches in the
1397 Builder switches and for each language use the first runtime name found
1398 to invoke gprconfig.
1399 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1400 command line and there is no auto-configuration.
1401 (Runtime_Name_Set_For): New function.
1403 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1405 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1406 elaborate initialization expression for variable Abort when processing
1407 a package body or a declaration.
1408 (Create_Finalizer): Propagate the package context when creating the
1409 exception-related variables.
1410 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1411 For_Package along with usage comment.
1413 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1415 * gcc-interface/Makefile.in: Clean up targets.
1416 Enable new package for atomic counters and copy-on-write implementation
1417 of unbounded strings on x86 platforms.
1418 * gcc-interface/Make-lang.in: Update dependencies.
1420 2011-08-04 Robert Dewar <dewar@adacore.com>
1422 * exp_ch7.adb: Minor reformatting.
1424 2011-08-04 Robert Dewar <dewar@adacore.com>
1426 * exp_strm.adb: Minor reformatting.
1428 2011-08-04 Vadim Godunko <godunko@adacore.com>
1430 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1431 operations are not supported.
1432 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1433 * s-atocou-x86.adb: New file.
1434 * Makefile.rtl: Add s-atocou.o file
1436 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1438 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1439 (Compilation_Phase): ... here.
1440 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1442 2011-08-04 Thomas Quinot <quinot@adacore.com>
1444 * Make-generated.in: Fix minor typo in comment.
1446 2011-08-04 Thomas Quinot <quinot@adacore.com>
1448 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1451 2011-08-04 Robert Dewar <dewar@adacore.com>
1453 * a-coinho.adb: Minor reformatting.
1455 2011-08-04 Robert Dewar <dewar@adacore.com>
1457 * a-coinho.ads: Minor reformatting.
1459 2011-08-04 Vadim Godunko <godunko@adacore.com>
1461 * s-atocou.ads, s-atocou.adb: New files.
1462 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1463 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1464 direct use of GCC's atomic builtins and replace them by use of new
1465 atomic counter package.
1467 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1469 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1471 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1473 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1474 with a call to Get_External_Tag.
1475 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1476 subprogram usage. Remove the guard against package declarations and
1477 bodies since Build_Cleanup_Statements is no longer invoked in that
1479 (Build_Components): Initialize Tagged_Type_Stmts when the context
1480 contains at least one library-level tagged type.
1481 (Build_Finalizer): New local variables Has_Tagged_Types and
1482 Tagged_Type_Stmts along with associated comments on usage. Update the
1483 logic to include tagged type processing.
1484 (Create_Finalizer): Insert all library-level tagged type unregistration
1485 code before the jump block circuitry.
1486 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1487 (Expand_N_Package_Declaration): Remove the call to
1488 Build_Cleanup_Statements.
1489 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1490 unregister the external tag of a tagged type.
1491 (Processing_Actions): Reimplemented to handle tagged types.
1492 (Process_Declarations): Detect the declaration of a library-level
1493 tagged type and carry out the appropriate actions.
1494 (Unregister_Tagged_Types): Removed. The machinery has been directly
1495 merged with Build_Finalizer.
1497 2011-08-04 Robert Dewar <dewar@adacore.com>
1499 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1500 gnatls.adb, exp_ch3.adb: Minor reformatting.
1502 2011-08-04 Marc Sango <sango@adacore.com>
1504 * sem_attr.adb (Analyze_Attribute): Replace the message
1505 "invisible attribute of}" of the spark restriction violation in
1506 attribute reference by the simple message "invisible attribute of type".
1507 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1508 two insertion characters: '&' and '}'.
1510 2011-08-04 Vadim Godunko <godunko@adacore.com>
1512 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1513 * a-coinho.ads, a-coinho.adb: New file.
1514 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1516 2011-08-04 Nicolas Roche <roche@adacore.com>
1518 * alfa_test.adb: Not all ali files are containing alfa information even
1519 if compiled with -gnatd.F. So suppress warning about missing ALFA
1522 2011-08-04 Yannick Moy <moy@adacore.com>
1524 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1526 * put_alfa.adb: Check that scope name is not empty.
1528 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1530 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1531 Needs_Elementary_Stream_Operation, to determine whether user-defined
1532 Read and Write attributes are available for the elementary components
1533 of the given type. If only the predefined attributes are available,
1534 then when restriction No_Default_Stream_Attributes is active the
1535 predefined stream attributes for the composite type cannot be created.
1537 2011-08-04 Robert Dewar <dewar@adacore.com>
1539 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1540 Put routines in alpha order
1542 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1544 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1545 * gcc-interface/Make-lang.in: Update dependencies.
1547 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1549 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1550 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1553 2011-08-04 Robert Dewar <dewar@adacore.com>
1555 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1556 lib-xref-alfa.adb: Minor reformatting.
1558 2011-08-04 Marc Sango <sango@adacore.com>
1560 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1561 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1562 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1565 2011-08-04 Tristan Gingold <gingold@adacore.com>
1567 * bindgen.adb (Gen_Adainit_C): Remove.
1568 (Gen_Adafinal_C): Ditto.
1569 (Gen_Elab_Externals_C): Ditto.
1570 (Gen_Elab_Calls_C): Ditto.
1571 (Gen_Elab_Order_C): Ditto.
1572 (Gen_Elab_Defs_C): Ditto.
1573 (Gen_Finalize_Library_C): Ditto.
1574 (Gen_Finalize_Library_Defs_C): Ditto.
1575 (Gen_Main_C): Ditto.
1576 (Gen_Output_File_C): Ditto.
1577 (Gen_Restrictions_C): Ditto.
1578 (Gen_Versions_C): Ditto.
1579 (Write_Info_Ada_C): Ditto.
1580 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1581 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1582 Always call Gen_Output_File_Ada.
1583 * gnatlink.adb (Begin_Info): Now a constant.
1585 (Ada_Bind_File): Remove
1586 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1587 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1588 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1589 * opt.ads (Ada_Bind_File): Remove.
1591 2011-08-04 Thomas Quinot <quinot@adacore.com>
1593 * projects.texi: Document target-specific directory in default project
1596 2011-08-04 Thomas Quinot <quinot@adacore.com>
1598 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1601 2011-08-04 Yannick Moy <moy@adacore.com>
1603 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1604 opt.ads, lib-xref.ads: Code clean up.
1606 2011-08-04 Yannick Moy <moy@adacore.com>
1608 * gnat_rm.texi: Update description of Test_Case
1609 * gnat_ugn.texi: Typo.
1611 2011-08-04 Ed Falis <falis@adacore.com>
1613 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1615 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1617 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1618 it is of type Root_Controlled. This action eliminates fields Prev and
1619 Next from type equality.
1621 2011-08-04 Yannick Moy <moy@adacore.com>
1623 * lib-xref-alfa.adb: Correct typo.
1625 2011-08-04 Matthew Heaney <heaney@adacore.com>
1627 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1630 2011-08-04 Yannick Moy <moy@adacore.com>
1632 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1633 (Analyze_Pragma): allow static string expression for name of Test_Case,
1634 instead of simply string literals.
1635 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1638 2011-08-04 Vincent Celier <celier@adacore.com>
1640 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1641 case suffixes to find truncated main sources.
1643 2011-08-04 Tristan Gingold <gingold@adacore.com>
1645 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1646 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1647 (Compute_Current_Task): Ditto.
1649 2011-08-04 Tristan Gingold <gingold@adacore.com>
1651 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1653 2011-08-04 Yannick Moy <moy@adacore.com>
1655 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1656 library-level constant.
1657 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1658 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1659 used as selector of parameter association, in ALFA mode.
1661 2011-08-04 Robert Dewar <dewar@adacore.com>
1663 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1664 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1667 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1669 * make.adb (Linking_Phase): Set source search path before calling
1670 gnatlink in CodePeer mode.
1672 2011-08-04 Javier Miranda <miranda@adacore.com>
1674 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1675 Remove code which takes care of building TSDs.
1676 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1677 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1678 the accessibility check in VM targets.
1679 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1680 (Building_Static_DT): Now returns false for VM targets.
1681 (Build_VM_TSDs): Removed.
1682 (Expand_Interface_Conversion): Generate missing runtime check for
1683 conversions to interface types whose target type is unknown at compile
1685 (Make_VM_TSD): Add missing code to disable the generation of calls to
1686 Check_TSD if the tagged type is not defined at library level, or not
1687 has a representation clause specifying its external tag, or -gnatdQ is
1689 * exp_disp.ads (Build_VM_TSDs): Removed.
1690 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1691 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1692 register primitives in the dispatch tables in VM targets.
1693 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1694 initialization of class-wide interface objects in VM targets.
1695 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1698 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1700 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1701 when dotnet-ld cannot be found.
1703 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1705 * bindgen.adb: Simplify significantly generation of binder body file in
1707 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1708 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1711 2011-08-04 Yannick Moy <moy@adacore.com>
1713 * sem_prag.adb, sem.ads: Code cleanup.
1715 2011-08-04 Tristan Gingold <gingold@adacore.com>
1717 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1718 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1719 results if possible.
1720 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1721 * gnat_ugn.texi: Update dynamic stack usage section.
1723 2011-08-04 Steve Baird <baird@adacore.com>
1725 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1726 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1727 contains only a call to the user-defined main subprogram.
1728 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1729 call the "wrapper" subprogram instead of directly
1730 calling the user-defined main subprogram.
1732 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1734 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1735 alternatives of a case statement for controlled objects. Rename local
1736 variable A to Dead_Alt.
1737 (Expand_N_If_Statement): Check the then and else statements of an if
1738 statement for controlled objects. Check the then statements of all
1739 elsif parts of an if statement for controlled objects.
1740 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1742 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1743 detects a loop associated with the expansion of an array object.
1744 Augment the processing of the loop statements to account for a possible
1745 wrap done by Process_Statements_For_Controlled_Objects.
1746 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1747 statements and abortable part of an asynchronous select for controlled
1749 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1750 conditional entry call for controlled objects.
1751 (Expand_N_Selective_Accept): Check the alternatives of a selective
1752 accept for controlled objects.
1753 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1754 alternatives of a timed entry call for controlled objects.
1755 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1756 exception handler for controlled objects.
1757 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1758 Add formal parameter Nested_Constructs along with its associated
1760 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1761 Requires_Cleanup_Actions.
1762 (Process_Statements_For_Controlled_Objects): New routine.
1763 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1764 routine. Inspect a node which contains a non-handled sequence of
1765 statements for controlled objects. If such an object is found, the
1766 statements are wrapped in a block.
1768 2011-08-04 Bob Duff <duff@adacore.com>
1770 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1771 need to compare with Class_Wide_Type (T2), in order to get at the
1772 original class-wide type node.
1773 * sem_type.ads (Covers): Improve the comment.
1774 * einfo.ads (Class_Wide_Type): Improve the comment.
1775 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1776 the type of the Deref.
1778 2011-08-04 Yannick Moy <moy@adacore.com>
1780 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1781 separate declarations.
1782 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1783 check identifier of pragma argument.
1784 (Chain_TC): check that no other test case associated to the same entity
1785 share the same name.
1786 (Check_Test_Case): disallow test case inside subprogram body
1787 (Analyze_Pragma): correct call to check identifier and not argument
1788 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1789 function gets name from test case pragma.
1791 2011-08-04 Yannick Moy <moy@adacore.com>
1793 * gnat_rm.texi: Document new pragma and aspect.
1794 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1795 (No_Duplicates_Allowed): new constant array defining whether duplicates
1796 aspects of each kind can appear on the same declaration.
1797 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1798 field, which points to a node holding the previous Spec_PPC_List.
1799 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1800 through the indirection with Contract.
1801 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1802 * par-prag.adb (Prag): do nothing on Test_Case pragma
1803 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1805 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1806 component Ensures of Test_Case.
1807 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1808 (Analyze_Generic_Subprogram_Declaration,
1809 Analyze_Subprogram_Instantiation,
1810 Analyze_Abstract_Subprogram_Declaration,
1811 Analyze_Subprogram_Body_Helper,
1812 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1813 insert contract in subprogram node at point of definition
1815 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1816 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1817 corresponding pragma
1818 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1819 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1820 similar to the analysis of pre/post
1821 (Derive_Subprogram): insert contract in subprogram node at point of
1823 * sem_prag.adb, sem_prag.ads
1824 (Check_Arg_Is_String_Literal, Check_Identifier):
1825 new checking procedures to be called in treatment of pragmas
1826 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1827 pragma is well-formed. This does not check currently that 'Result is
1828 used only in the Ensures component of a Test_Case.
1829 (Analyze_Pragma): add case for Test_Case
1830 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1831 components of a Test_Case.
1832 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1833 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1834 pragma, treated as spec expressions.
1835 (Sig_Flags): add value -1 for Test_Case.
1836 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1837 Get_Requires_From_Test_Case_Pragma): getters for both expression
1838 components of a Test_Case.
1839 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1840 indirection between an entry or [generic] subprogram entity and its
1841 pre/post + test-cases.
1842 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1843 get/set for fields of an N_Contract node.
1844 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1845 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1846 names and pragma for Test_Case.
1847 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1849 2011-08-04 Vincent Celier <celier@adacore.com>
1851 * gnat_ugn.texi: Improve documentation of gnatmake switch
1852 --source-info-file=.
1854 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1856 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1857 type). Initialize Atyp to the appropriate type which is later checked
1858 for completion. Rewrite the assertion associated with private type
1861 2011-08-04 Ed Falis <falis@adacore.com>
1863 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1864 initialize the number of CPUs.
1866 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1868 * sem_type.adb (Disambiguate): New subsidiary routine
1869 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1870 equality on an anonymous access type whose designated type is private
1871 does not lead to an ambiguity with the universal access equality
1872 operator in the body or child units of the defining package. The same
1873 is true for a multiplication operator on a private type completed with
1876 2011-08-04 Javier Miranda <miranda@adacore.com>
1878 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1879 (Normalize_Scalars_Config): Removed.
1881 (Register_Opt_Config_Switches): Remove registering config values of
1882 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1883 (Restore_Opt_Config_Switches): Remove code which restores the values of
1884 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1885 Init_Or_Norm_Scalars.
1886 (Save_Opt_Config_Switches): Remove code which saves values of
1887 Init_Or_Norm_Scalars and Normalize_Scalars.
1888 (Set_Opt_Config_Switches): Remove code which restores config values of
1889 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1890 Init_Or_Norm_Scalars.
1892 2011-08-04 Yannick Moy <moy@adacore.com>
1894 * frontend.adb (Frontend): remove previous patch to avoid full
1895 qualification in ALFA mode.
1896 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1897 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1898 unique name for an entity, which could be used to identify the entity
1899 across compilation units.
1901 2011-08-04 Thomas Quinot <quinot@adacore.com>
1904 (Initialize_Default_Project_Path): Add target specific directory
1905 ($prefix/$target/lib/gnat) in front of project path in all cases
1906 (making gnatmake's behaviour consistent with gprbuild).
1907 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1908 Pass target name from Sdefault to project subsystem.
1909 * gnatls.adb: Show new target specific default project directory.
1911 2011-08-04 Johannes Kanig <kanig@adacore.com>
1913 * cstand.adb: Add Information to Identifier in Standard
1914 (Identifer_For): Set Entity to the corresponding entity
1916 2011-08-04 Sergey Rybin <rybin@adacore.com>
1918 * gnat_ugn.texi: Update doc on gnatcheck.
1920 2011-08-04 Yannick Moy <moy@adacore.com>
1922 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1925 2011-08-04 Yannick Moy <moy@adacore.com>
1927 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1928 performing expansion.
1929 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1930 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1931 it is not called in ALFA mode.
1933 2011-08-04 Emmanuel Briot <briot@adacore.com>
1935 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1936 after all, so removed.
1938 2011-08-04 Sergey Rybin <rybin@adacore.com>
1940 * vms_data.ads: Add missing VMS qualifiers.
1942 2011-08-04 Emmanuel Briot <briot@adacore.com>
1944 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1945 the list of files on the command line after processing it through
1948 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1950 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1951 processing for .NET/JVM. These targets can now benefit from
1952 Raise_From_Controlled_Operation and they share the same processing with
1954 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1955 These targets need transient scopes in order to properly finalize short
1956 lived controlled objects.
1957 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1958 NET/JVM. These targets can now benefit from
1959 Raise_From_Controlled_Operation and they share the same processing with
1962 2011-08-04 Geert Bosch <bosch@adacore.com>
1964 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1966 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1968 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1969 Expand_Record_Aggregate, to determine whether aggregate must be
1970 expanded into assignments. This is the case if the ancestor part is
1971 private, regarless of the setting of the flag Has_Private_Ancestor.
1973 2011-08-04 Ed Falis <falis@adacore.com>
1975 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1977 2011-08-04 Bob Duff <duff@adacore.com>
1979 * sinfo.ads: Fix comment.
1981 2011-08-04 Steve Baird <baird@adacore.com>
1983 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1984 choose a package name in much the same way as is
1985 done for JGNAT when VM_Target /= No_VM, except that
1986 a slightly more distinctive prefix string is used.
1988 2011-08-04 Emmanuel Briot <briot@adacore.com>
1990 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1991 gnatmake command line.
1992 This behavior was never documented (and was supported only because of
1993 an early bug in the code). This case might lead to ambiguous cases
1994 (between unit names and truncated base names without suffixes).
1996 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1998 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1999 Remove the external tag of a tagged type from the internal hash table.
2000 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
2001 expanded usage of the routine. Strenghten the check for Is_Master. Add
2002 processing for tagged types.
2003 (Build_Finalizer): Create all the necessary lists used in finalizer
2004 creation when the processed context is a package that may contain
2006 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
2007 Requires_Cleanup_Actions.
2008 (Expand_N_Package_Body): Package bodies may need clean up code
2009 depending on whether they contain tagged types.
2010 (Expand_N_Package_Declaration): Package declarations may need clean up
2011 code depending on whether they contain tagged types.
2012 (Unregister_Tagged_Types): New routine. Search through a list of
2013 declarations or statements, looking for non-abstract Ada tagged types.
2014 For each such type, generate code to unregister the external tag.
2015 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2016 Requires_Cleanup_Actions.
2017 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2018 through a list of declarations or statements looking for non-abstract
2019 Ada tagged types or controlled objects.
2020 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2021 Requires_Cleanup_Actions.
2022 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2023 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2026 2011-08-04 Vincent Celier <celier@adacore.com>
2028 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2029 has Ada sources, not project Project, because if the root project
2030 Project has no sources of its own, all projects will be deemed without
2033 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2035 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2036 of the No_Param_Proc acc-to-subp type used for initialization of
2037 __gnat_finalize_library_objects so that it's declared at library level
2038 rather than nested inside of the adainit routine.
2040 2011-08-04 Javier Miranda <miranda@adacore.com>
2042 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2043 if the tagged type has a representation clause which specifies its
2046 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2048 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2049 Remove previous procedure with that name.
2050 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2052 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2053 subtype mark, the ancestor cannot have unknown discriminants.
2054 (Resolve_Record_Aggregate): if the type has invisible components
2055 because of a private ancestor, the aggregate is illegal.
2057 2011-08-04 Vincent Celier <celier@adacore.com>
2059 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2060 account switches -gnat2005, -gnat12 and -gnat2012.
2062 2011-08-04 Bob Duff <duff@adacore.com>
2064 * s-tasdeb.ads: Minor comment fix.
2066 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2068 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2070 * switch.ads, switch.adb (Is_Language_Switch): New function.
2072 2011-08-04 Vincent Celier <celier@adacore.com>
2074 * switch-c.adb: Minor comment addition.
2076 2011-08-04 Vincent Celier <celier@adacore.com>
2078 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2079 ending with '=' is followed by a space (missing file name).
2081 2011-08-04 Pascal Obry <obry@adacore.com>
2083 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2085 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2087 * sem_ch12.adb (Analyze_Associations): New routine
2088 Check_Overloaded_Formal_Subprogram to reject a formal package when
2089 there is a named association or a box initialisation for an overloaded
2090 formal subprogram of the corresponding generic.
2092 2011-08-04 Yannick Moy <moy@adacore.com>
2094 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2095 * get_alfa.adb, put_alfa.adb: Read and write new component of
2097 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2099 2011-08-04 Pascal Obry <obry@adacore.com>
2101 * urealp.adb: Minor reformatting.
2103 2011-08-04 Tristan Gingold <gingold@adacore.com>
2105 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2106 Handle the case when Cleanup_Protected_Object returns Empty.
2108 2011-08-04 Yannick Moy <moy@adacore.com>
2110 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2112 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2114 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2115 call, ignore functions.
2117 2011-08-04 Geert Bosch <bosch@adacore.com>
2119 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2122 2011-08-04 Emmanuel Briot <briot@adacore.com>
2124 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2125 as an index for Builder'Switches. This conforms to the documentation.
2126 * make.adb (Insert_Project_Sources): avoid duplicate code
2128 2011-08-04 Emmanuel Briot <briot@adacore.com>
2130 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2131 name on the command line (for instance "../dummy"), never assume it can
2134 2011-08-04 Tristan Gingold <gingold@adacore.com>
2136 * bindgen.adb: Remove code the reference or create the
2137 Break_Start/__gnat_break_start procedure.
2138 * s-stalib.adb (Break_Start): Removed.
2140 2011-08-04 Emmanuel Briot <briot@adacore.com>
2142 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2143 shared with gprbuild.
2145 2011-08-04 Yannick Moy <moy@adacore.com>
2147 * par-ch4.adb (P_Primary): preferentially issue an error message about
2148 a missing parenthesis arount a conditional or case expression in Ada
2149 2012 mode, if we detect that the alignment is not correct for a
2152 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2154 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2155 tag-to-class-wide conversion as needing finalization actions.
2156 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2157 a tag-to-class-wide conversion as needing finalization actions.
2158 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2159 conversion does not need finalization actions.
2160 (Is_Tag_To_CW_Conversion): New routine.
2161 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2162 whether an object is the result of a tag-to-class-wide conversion.
2164 2011-08-04 Yannick Moy <moy@adacore.com>
2166 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2167 the left-hand-side and right-hand-side of a conjunct are inserted when
2168 translating a pre- or postcondition
2169 * sem_ch6.adb: Correct typo in comment
2171 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2173 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2174 Unchecked_Conversion and Unchecked_Deallocation.
2176 2011-08-04 Thomas Quinot <quinot@adacore.com>
2178 * make.adb: Minor reformatting.
2180 2011-08-04 Emmanuel Briot <briot@adacore.com>
2182 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2183 sources in the project and its imported projects, but not in the whole
2186 2011-08-04 Emmanuel Briot <briot@adacore.com>
2188 * make.adb: Remove debug trace.
2190 2011-08-04 Vincent Celier <celier@adacore.com>
2192 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2193 path in canonical form, to be able to compare path names on platforms
2194 such as Windows or Darwin.
2196 2011-08-04 Thomas Quinot <quinot@adacore.com>
2198 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2199 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2200 * scos.ads: Update documentation accordingly.
2201 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2204 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2206 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2207 attribute only if prefix type is scalar.
2209 2011-08-04 Emmanuel Briot <briot@adacore.com>
2211 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2212 in gnatmake for specifying mains on the command line that do not belong
2213 to the main project. These mains must currently all belong to the same
2215 (Ultimate_Extension_Of): removed, since duplicated
2216 Ultimate_Extending_Project.
2218 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2220 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2222 (CodePeer_Mode_String): New.
2223 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2225 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2226 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2227 mode, since no useful elaboration subprogram is needed by CodePeer.
2228 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2229 In this mode, compile binder file with -gnatC and do stop after this
2232 2011-08-04 Vincent Celier <celier@adacore.com>
2234 * exp_ch7.adb: Minor comment fix.
2236 2011-08-04 Robert Dewar <dewar@adacore.com>
2238 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2239 exp_ch4.adb, makeutl.adb: Minor reformatting.
2241 2011-08-04 Emmanuel Briot <briot@adacore.com>
2243 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2244 Create several new subprograms to move code out of Make. This makes the
2245 code more readable, removes code duplication, and is a preparation work
2246 for adding support for aggregate projects.
2248 2011-08-04 Tristan Gingold <gingold@adacore.com>
2250 * s-po32gl.ads, s-po32gl.adb: New files.
2251 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2252 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2253 (Build_Finalization_Collection): Use it.
2254 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2255 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2257 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2258 * gcc-interface/Make-lang.in: Update dependencies.
2260 2011-08-04 Emmanuel Briot <briot@adacore.com>
2262 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2265 2011-08-04 Emmanuel Briot <briot@adacore.com>
2267 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2268 command line is not a file name, also check whether it could be a unit
2271 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2273 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2274 the header of the finalization routine.
2275 If the unit has no finalizer but is a body whose spec has one, then
2276 generate the decrement of the elaboration entity only.
2277 If the unit has a finalizer and is a spec, then do not generate the
2278 decrement of the elaboration entity.
2279 (Gen_Finalize_Library_C): Likewise.
2281 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2283 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2284 (Bounds_Size_Expression): Removed.
2285 (Double_Alignment_Of): New subsidiary routine.
2286 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2287 for a hole in the dope vector of unconstrained arrays due to different
2288 index and element alignments.
2290 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2292 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2293 raise program_error because body has not been seen yet.
2295 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2297 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2300 2011-08-04 Vincent Celier <celier@adacore.com>
2302 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2304 2011-08-04 Yannick Moy <moy@adacore.com>
2306 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2307 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2309 2011-08-04 Thomas Quinot <quinot@adacore.com>
2311 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2312 instantiation in RCI.
2314 2011-08-04 Emmanuel Briot <briot@adacore.com>
2316 * make.adb: Share more code with gprbuild
2318 2011-08-04 Emmanuel Briot <briot@adacore.com>
2320 * projects.texi: Added documentation for the IDE'Gnat project file
2323 2011-08-04 Nicolas Roche <roche@adacore.com>
2325 * gnat_rm.texi: Minor editing.
2327 2011-08-04 Javier Miranda <miranda@adacore.com>
2329 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2330 and the library case for VM targets.
2331 (Gen_Adainit_Ada): Likewise.
2333 2011-08-04 Robert Dewar <dewar@adacore.com>
2335 * g-altive.ads: Minor comment updates.
2336 * prj-nmsc.adb: Minor reformatting.
2338 2011-08-04 Javier Miranda <miranda@adacore.com>
2341 (Normalize_Scalars_Config): Value of the configuration switch set by
2342 pragma Normalize_Scalars when it appears in the gnat.adc file.
2343 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2344 to save and restore settings of this pragma.
2346 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2347 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2349 2011-08-04 Vincent Celier <celier@adacore.com>
2351 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2353 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2355 * makeutl.adb: Minor reformatting.
2357 2011-08-04 Olivier Hainque <hainque@adacore.com>
2359 * g-altive.ads: Update comments to reflect that only the soft
2360 binding is available today.
2362 2011-08-04 Robert Dewar <dewar@adacore.com>
2364 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2365 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2366 * gcc-interface/Make-lang.in: Update dependencies.
2368 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2370 * prj-env.adb: Remove local debug traces.
2372 2011-08-04 Yannick Moy <moy@adacore.com>
2374 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2375 was used instead of Hi_OK, which could cause a read of an uninitialized
2376 value later on. Detected while working on the new warning.
2377 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2379 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2380 in more cases, in order to detect more unreferenced values.
2381 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2382 object for expression, if any.
2384 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2386 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2387 the operand types instead of the Esize.
2389 2011-08-04 Steve Baird <baird@adacore.com>
2391 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2392 enable CodePeer_Mode.
2393 * bindusg.adb (Display): Add help message describing -P binder switch.
2394 * gnat_ugn.texi: Document -P binder switch.
2395 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2396 user-defined main program directly.
2397 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2398 user-defined main program in the context clause of the package body.
2400 2011-08-04 Yannick Moy <moy@adacore.com>
2402 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2403 duplicate of Defining_Entity
2404 (Get_Unique_Entity_For_Decl): rename function into
2405 Unique_Defining_Entity
2406 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2407 (Formal_Proof_On): remove synthesized flag
2408 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2409 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2410 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2411 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2412 Annotate (Formal_Proof)
2414 2011-08-04 Emmanuel Briot <briot@adacore.com>
2416 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2417 source files with non-standard naming schemes, in imported projects
2419 2011-08-04 Emmanuel Briot <briot@adacore.com>
2421 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2422 specified on the gprbuild command line, we need to compile all units
2423 within that file, not just the first one we find
2424 Fix error message for mains that are not found.
2426 2011-08-04 Thomas Quinot <quinot@adacore.com>
2428 * sem_ch6.adb: Update comment.
2429 * sem_ch12.adb: Minor reformatting.
2431 2011-08-04 Bob Duff <duff@adacore.com>
2433 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2434 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2435 race condition whose symptom is to fail to lock Parent. That, in turn,
2436 causes Parent.Awake_Count to be accessed without locking Parent, which
2437 causes another race condition whose symptom is that Parent.Awake_Count
2438 can be off by 1 (either too high or too low). The solution is to lock
2439 Parent unconditionally, and then lock Acceptor, before reading
2440 Acceptor.Terminate_Alternative.
2442 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2444 * debug.adb: Update comment.
2446 2011-08-04 Robert Dewar <dewar@adacore.com>
2448 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2449 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2450 exp_ch6.adb: Minor reformatting.
2452 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2454 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2457 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2459 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2461 2011-08-04 Thomas Quinot <quinot@adacore.com>
2463 * sinfo.ads: Minor reformatting.
2465 2011-08-04 Emmanuel Briot <briot@adacore.com>
2467 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2468 even if there is no location.
2470 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2472 * sem_res.adb, sem_ch4.adb: move check for restriction
2473 No_Task_Hierarchy to resolve_allocator.
2475 2011-08-04 Thomas Quinot <quinot@adacore.com>
2477 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2478 This flag of N_Pragma nodes is not used, remove it as well as all of
2479 the associated circuitry.
2481 2011-08-04 Javier Miranda <miranda@adacore.com>
2483 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2484 runtime check on duplicated externa tags
2485 * debug.adb Document switch -gnatdQ.
2487 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2489 * a-fihema.ads: Minor typo fix.
2491 2011-08-04 Yannick Moy <moy@adacore.com>
2493 * sem_ch10.adb: Minor comment update.
2495 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2497 * einfo.adb: Update the node field usage to reflect the renaming of
2498 Return_Flag to Return_ Flag_Or_Transient_Decl.
2499 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2500 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2501 (Write_Field15_Name): Change Return_Flag to
2502 Return_Flag_Or_Transient_Decl.
2503 * einfo.ads: Rename node field Return_Flag to
2504 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2505 occurrences in entities.
2506 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2507 associated Inline pragma.
2508 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2509 associated Inline pragma.
2510 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2512 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2513 Return_Flag and Set_Return_Flag.
2514 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2515 objects generated for controlled transients declared inside an
2516 Exception_With_Actions. Update the calls to Return_Flag.
2517 (Process_Object_Declaration): Add code to add a null guard for hook
2518 objects generated for controlled transients declared inside an
2519 Exception_With_Actions. Update related comment.
2520 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2521 objects generated for controlled transients declared inside an
2522 Exception_With_Actions. Update the calls to Return_Flag.
2523 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2525 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2527 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2528 positional aggregate.
2530 2011-08-04 Vincent Celier <celier@adacore.com>
2532 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2533 SLOC only for pragmas.
2535 2011-08-04 Emmanuel Briot <briot@adacore.com>
2537 * projects.texi: Minor typo fix.
2539 2011-08-04 Emmanuel Briot <briot@adacore.com>
2541 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2542 on case-sensitive file systems.
2544 2011-08-04 Thomas Quinot <quinot@adacore.com>
2546 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2547 nested in a disabled pragma.
2548 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2549 enclosing pragma, if any, for X decisions.
2551 2011-08-04 Thomas Quinot <quinot@adacore.com>
2553 * sem_prag.adb: Minor reformatting.
2555 2011-08-04 Vincent Celier <celier@adacore.com>
2557 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2558 allowed in no run time mode.
2560 2011-08-04 Vincent Celier <celier@adacore.com>
2562 * make.adb (Check): When -gnatc is used, check for the source file
2563 inside the ALI file with a canonical case file name.
2565 2011-08-04 Emmanuel Briot <briot@adacore.com>
2567 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2568 overriding the separator.
2570 2011-08-04 Robert Dewar <dewar@adacore.com>
2572 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2573 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2575 2011-08-04 Robert Dewar <dewar@adacore.com>
2577 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2579 2011-08-04 Yannick Moy <moy@adacore.com>
2581 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2582 'Result only appears in postcondition of function.
2584 2011-08-04 Thomas Quinot <quinot@adacore.com>
2586 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2587 external tag, include the value of the external tag in the exception
2590 2011-08-04 Yannick Moy <moy@adacore.com>
2592 * sem_attr.adb (Result): modify error message for misplaced 'Result
2594 2011-08-04 Sergey Rybin <rybin@adacore.com>
2596 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2597 clear that the second argument must be an identifier.
2599 2011-08-04 Thomas Quinot <quinot@adacore.com>
2601 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2602 -fpreserve-control-flow, insert an IF statement on the barrier
2603 condition to ensure that a conditional branch instruction is generated.
2605 2011-08-04 Emmanuel Briot <briot@adacore.com>
2607 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2608 (Processing_Flags.Ignore_Missing_With): new flag.
2610 2011-08-04 Emmanuel Briot <briot@adacore.com>
2612 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2613 Source_List_File on case-insensitive systems where the file is actually
2614 on a case-sensitive file system (NFS,...).
2616 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2618 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2619 function return contains a controlled [extension] aggregate and the
2620 return statement is not part of a handled sequence of statements, wrap
2621 the return in a block. This ensures that all controlled temporaries
2622 generated during aggregate resolution will be picked up by the
2623 finalization machinery.
2625 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2627 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2628 components, freeze type before resolution, to ensure that default
2629 initializations are present for all components.
2630 * sem_res.adb (Resolve_Actuals): the designated object of an
2631 accces-to-constant type is a legal actual in a call to an
2632 initialization procedure.
2634 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2636 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2637 N_Unchecked_Type_Conversion to the possible containers of a renamed
2640 2011-08-04 Yannick Moy <moy@adacore.com>
2642 * par-ch13.adb (Aspect_Specifications_Present): recognize
2643 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2644 is issued in Strict mode.
2645 * par.adb: Fix typos in comments.
2647 2011-08-04 Yannick Moy <moy@adacore.com>
2649 * sem_attr.adb (Result): modify error message to take into account Post
2650 aspect when compiling Ada 2012 (or newer) code.
2652 2011-08-04 Nicolas Roche <roche@adacore.com>
2654 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2655 remove need for GCC exceptions.
2657 2011-08-04 Vincent Celier <celier@adacore.com>
2659 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2660 project, not the source file name.
2661 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2662 excluded, continue looking. This excluded source will only be returned
2663 if there is no other source with the same base name that is not locally
2666 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2668 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2669 private and one of the operands is a real literal, use a qualified
2670 expression rather than a conversion which is not meaningful to the
2673 2011-08-04 Yannick Moy <moy@adacore.com>
2675 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2676 corresponding aspect X'Class are allowed, proceed with analysis of the
2677 aspect instead of skipping it.
2679 2011-08-04 Tristan Gingold <gingold@adacore.com>
2681 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2682 This will allow to have an Ada implementation for the subprogram.
2684 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2686 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2687 completion and aspects are present, apply them to the entity for the
2688 type which is currently the partial view, but which is the one that
2690 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2691 applies to a partial view, indicate that the full view has predicates
2692 and delayed aspects.
2693 (Replace_Type_Reference): Handle properly predicates that apply to the
2694 full view of a private completion.
2696 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2698 * layout.adb (Layout_Type): For composite types, do not set Esize.
2699 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2701 (Size_Known): Look at the RM size of components instead of the Esize.
2702 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2703 issue warning and activate Implicit_Packing.
2704 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2705 if the Esize is not known.
2706 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2707 for elementary types only.
2708 (Analyze_Record_Representation_Clause): Look at the RM size instead
2709 of the Esize to issue errors.
2710 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2712 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2714 Look at the RM size instead of the Esize for types if the latter is
2716 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2718 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2720 * sem_type.adb: proper handling of equality not involving anonymous
2723 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2725 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2726 Vis_Decls. When creating a library-level finalizer for a package spec,
2727 both the declaration and body of the finalizer are inserted either in
2728 the visible or private declarations of the package spec.
2730 2011-08-04 Javier Miranda <miranda@adacore.com>
2732 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2733 use of the full-view of a type when invoking Is_Ancestor.
2734 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2735 the full-view of private parents is requested, then use also the
2736 full-view of the parent of the first derivation.
2738 2011-08-04 Tristan Gingold <gingold@adacore.com>
2740 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2741 instead of the locally imported procedure.
2742 * s-taprop-mingw.adb (Enter_Task): Ditto.
2743 * s-valrea.adb (Scan_Real): Ditto.
2744 * s-imgrea.adb (Set_Image_Real): Ditto.
2745 * s-flocon.ads: Make the package pure.
2747 2011-08-04 Thomas Quinot <quinot@adacore.com>
2749 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2750 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2751 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2752 New subprogram, moved here from...
2753 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2754 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2755 rewriting of the last argument into a procedure call statement here...
2756 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2759 2011-08-04 Thomas Quinot <quinot@adacore.com>
2761 * par_sco.adb: Minor reformatting.
2763 2011-08-04 Robert Dewar <dewar@adacore.com>
2765 * erroutc.adb: Minor reformatting.
2767 2011-08-04 Thomas Quinot <quinot@adacore.com>
2769 * par_sco.adb: Comment update.
2771 2011-08-04 Tristan Gingold <gingold@adacore.com>
2773 * s-flocon.ads: New file.
2774 * g-flocon.ads: Now a renaming of s-flocon.
2775 * Makefile.rtl: Add s-flocon.o
2777 2011-08-04 Javier Miranda <miranda@adacore.com>
2779 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2780 constrained, do not attempt to build a subtype of it.
2782 2011-08-04 Yannick Moy <moy@adacore.com>
2784 * errout.ads Change comments: remove 'R'M as an example where quotes
2785 are needed; add ALFA as another case where quotes are not needed
2786 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2787 case where quotes are not needed.
2788 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2789 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2790 Remove all occurrences of 'A'L'F'A
2792 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2794 * sem_ch13.adb: check legality of invariant pragma.
2796 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2798 * bindgen.adb: Add comments.
2800 2011-08-04 Yannick Moy <moy@adacore.com>
2802 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2804 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2805 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2807 2011-08-04 Robert Dewar <dewar@adacore.com>
2809 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2810 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2811 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2813 2011-08-04 Thomas Quinot <quinot@adacore.com>
2815 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2817 2011-08-04 Thomas Quinot <quinot@adacore.com>
2820 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2823 2011-08-04 Robert Dewar <dewar@adacore.com>
2825 * einfo.ads, exp_ch4.adb: Minor reformatting.
2827 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2829 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2831 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2833 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2834 type in all cases to compute list of primitive operations, because full
2835 view may be an itype that is not attached to the list of declarations.
2837 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2839 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2840 library has already been finalized.
2841 (Gen_Adafinal_C): Likewise.
2842 (Gen_Adainit_Ada): Generate an early return if the library has
2843 already been elaborated.
2844 (Gen_Adainit_C): Likewise.
2845 (Gen_Output_File_Ada): Generate an elaboration flag.
2846 (Gen_Output_File_C): Likewise.
2848 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2850 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2851 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2852 built in the first place.
2853 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2854 for CodePeer because Finalize_Address was not built to begin with.
2855 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2857 2011-08-04 Pascal Obry <obry@adacore.com>
2859 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2860 filenames, this ensures unicity of filenames across processes.
2862 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2864 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2865 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2866 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2867 Add False as the actual to From_Abort in the generated call to
2868 Raise_From_Controlled_Operation.
2870 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2872 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2873 so that the ali file name can be retrieved from outside of this package.
2874 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2875 doing nothing in the general case, but used to update the object file
2876 timestamp if directly generated by the backend.
2877 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2878 to a later time than the ali file one.
2880 2011-08-04 Yannick Moy <moy@adacore.com>
2882 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2883 entities whose body contains an Annotate pragma which forces formal
2885 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2886 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2887 Mark_Non_ALFA_Subprogram to pass in a message and node.
2888 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2889 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2890 surrounding subprogram.
2891 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2892 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2893 as not in ALFA is annotated with Formal_Proof being On, then an error
2894 is issued based on the additional parameters for message and node.
2895 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2896 * gcc-interface/Make-lang.in: Update dependencies.
2898 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2900 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2901 Finalize_Address when CodePeer is enabled.
2903 2011-08-04 Pascal Obry <obry@adacore.com>
2905 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2906 the latter returns a pointer to a static buffer which is deallocated
2907 at the end of the routine.
2909 2011-08-04 Yannick Moy <moy@adacore.com>
2911 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2912 after index creation; mark unconstrained base array type generated as
2913 being in/not in ALFA as well
2914 (Make_Index): mark subtype created as in/not in ALFA
2915 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2916 over a loop as in/not in ALFA, depending on its type and form of loop
2919 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2921 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2922 directly to False on .NET and JVM.
2924 2011-08-04 Yannick Moy <moy@adacore.com>
2926 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2927 constraint that subtype must come from source code to be in ALFA, so
2928 that anonymous subtypes can be in ALFA too.
2930 2011-08-04 Yannick Moy <moy@adacore.com>
2932 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2933 reference for ALFA mode.
2934 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2935 procedure public so as to use it from formal verification back-end.
2937 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2939 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2940 invalid checks of the Parameter, making Remove_Switch not working
2943 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2945 * targparm.ads: Update header: no run-time exception is needed on this
2948 2011-08-04 Vincent Celier <celier@adacore.com>
2950 * a-fihema.adb: Use System.IO instead of GNAT.IO
2952 2011-08-04 Thomas Quinot <quinot@adacore.com>
2954 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2955 are forbidden in Compiler_Unit mode.
2957 2011-08-04 Robert Dewar <dewar@adacore.com>
2959 * sem_util.adb: Minor reformatting.
2961 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2963 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2964 library-level finalizers.
2965 (Gen_Finalize_Library_C): Update the import string for library-level
2967 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2968 library-level finalizer.
2969 * exp_ch7.adb: Remove with and use clauses for Stringt.
2970 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2971 Spec_Decl. Add local variable Body_Id. The names of library-level
2972 finalizers are now manually fully qualified and are no longer external.
2973 A single name is now capable of servicing .NET, JVM and non-VM targets.
2974 Pragma Export is no longer required to provide visibility for the name.
2975 (Create_Finalizer_String): Removed.
2976 (New_Finalizer_Name): New routine which mimics New_..._Name.
2978 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2980 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2981 elaboration counter to Standard_Short_Integer.
2982 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2983 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2984 (Gen_Elab_Externals_C): Likewise.
2986 2011-08-04 Ed Falis <falis@adacore.com>
2988 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2989 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2990 system-vxworks-mips.ads, system-vxworks-x86.ads
2991 (Always_Compatible_Rep): set to False for all VxWorks targets.
2993 2011-08-04 Robert Dewar <dewar@adacore.com>
2995 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2996 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2997 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2998 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2999 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
3000 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
3001 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
3002 Minor reformatting and code reorganization.
3004 2011-08-04 Emmanuel Briot <briot@adacore.com>
3006 * projects.texi: Added doc for aggregate projects.
3008 2011-08-04 Emmanuel Briot <briot@adacore.com>
3010 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3011 Add support for overriding the Project_Path in aggregate projects.
3013 2011-08-04 Robert Dewar <dewar@adacore.com>
3015 * a-cofove.ads: Minor reformatting.
3017 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3019 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3020 on the generated code.
3021 (Build_Finalize_Statements): Update the comment on the generated code.
3022 (Build_Initialize_Statements): Update the comment on the generated code.
3023 (Build_Object_Declarations): Add local variable Result. The object
3024 declarations are now built in sequence.
3025 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3028 2011-08-04 Robert Dewar <dewar@adacore.com>
3030 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3032 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3034 * einfo.ads (Elaboration_Entity): Document new definition and use.
3035 (Elaboration_Entity_Required): Adjust to above change.
3036 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3037 * exp_ch12.adb: And with and use for Snames.
3038 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3039 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3040 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3041 <Check_Unit_Name>: Deal with N_Expanded_Name.
3042 <Attribute_Elaborated>: Extend to all unit names.
3043 * sem_elab.adb: And with and use for Uintp.
3044 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3045 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3046 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3047 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3048 from Gen_Adainit_Ada.
3049 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3050 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3051 case, do not call System.Standard_Library.Adafinal; instead call
3052 finalize_library if needed.
3053 (Gen_Adafinal_C): Likewise.
3054 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3055 non-main program case.
3056 (Gen_Adainit_C): Generate a couple of external declarations here.
3057 In the main program case, set SSL.Finalize_Library_Objects.
3058 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3059 (Gen_Elab_Calls_C): Likewise.
3060 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3061 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3062 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3064 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3065 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3067 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3068 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3069 of external declarations. Call Gen_Finalize_Library_C.
3071 2011-08-04 Emmanuel Briot <briot@adacore.com>
3073 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3074 Compute_Compilation_Phases): new subprogram.
3075 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3076 The number of mains as well as the various compilation phases that
3077 need to be run are now project tree specific, since various
3078 aggregated trees might have different requirements. In particular,
3079 they do not all require bind or link phases.
3081 2011-08-04 Emmanuel Briot <briot@adacore.com>
3083 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3084 (Project_Tree_Appdata): New type.
3085 It is now possible to associate application-specific data to a project
3086 tree. In particular, this is used in the gprbuild builder to avoid a
3087 number of global tables and htables, especially now that there can be
3088 several project trees loaded at once because of aggregate projects.
3089 (Debug_Name): new procedure.
3090 * projects.texi: Clarify syntax of "**" for Source_Dirs
3092 2011-08-03 Emmanuel Briot <briot@adacore.com>
3094 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3095 the "roots" for a main.
3096 (Fill_From_Project): add support for aggregate projects. Main units
3097 in aggregated projects are now automatically added in the list of
3098 files to build (although this fails later on in gprbuild, because
3099 these files are not using the root proejct tree, so this needs
3101 * gcc-interface/Make-lang.in: Update dependencies.
3103 2011-08-03 Yannick Moy <moy@adacore.com>
3105 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3106 conditional expression in ALFA.
3107 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3108 expressions as not in ALFA.
3110 2011-08-03 Robert Dewar <dewar@adacore.com>
3112 * a-cofove.adb: Minor reformatting.
3114 2011-08-03 Emmanuel Briot <briot@adacore.com>
3116 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3117 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3119 These packages are more logically placed in the Queue package, since
3120 they manipulate the queue. It is also likely that they can be adapted
3121 for gnatmake, thus sharing more code.
3122 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3123 that we could move the above.
3125 2011-08-03 Emmanuel Briot <briot@adacore.com>
3127 * errutil.adb (Finalize): clean up the list of error messages on exit.
3128 Calling this subprogram multiple times will no longer show duplicate
3129 error messages on stderr.
3131 2011-08-03 Emmanuel Briot <briot@adacore.com>
3133 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3134 Getopt_Switches when we have already define a command line
3137 2011-08-03 Yannick Moy <moy@adacore.com>
3139 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3140 in ALFA. Instead, they are considered as assertions to prove.
3141 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3142 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3143 if they have no ELSE part, or if they occur in pre- and postconditions,
3144 where the Condition cannot have side-effects in ALFA
3145 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3146 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3147 Instead, include type conversion between scalar types in ALFA.
3148 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3149 if-and-only-if its type is in ALFA.
3151 2011-08-03 Thomas Quinot <quinot@adacore.com>
3153 * scos.adb, get_scos.adb, put_scos.adb
3154 New code letter for decisions: G (entry guard)
3156 (Traverse_Subprogram_Body): Rename to...
3157 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3158 (Traverse_Protected_Body): New subprogram
3159 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3160 protected bodies and entry bodies.
3162 2011-08-03 Yannick Moy <moy@adacore.com>
3164 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3165 entities with get/set subprograms, which is set on procedure entities
3166 generated by the compiler for a postcondition.
3167 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3168 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3169 entity for a declaration
3170 (Get_Unique_Entity_For_Decl): new function returning an entity which
3171 represents a declaration, so that matching spec and body have the same
3174 2011-08-03 Robert Dewar <dewar@adacore.com>
3176 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3177 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3179 2011-08-03 Yannick Moy <moy@adacore.com>
3181 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3182 library-level because retriction No_Implicit_Dynamic_Code in the
3183 front-end prevents its definition as a local subprogram
3184 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3185 for reuse in other contexts
3186 (Traverse_Declarations_Or_Statements,
3187 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3188 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3189 procedures take a callback parameter to be called on all declarations
3191 (Traverse_All_Compilation_Units): new generic function to traverse a
3192 compilation unit and call a callback parameter on all declarations
3194 2011-08-03 Javier Miranda <miranda@adacore.com>
3196 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3197 in Java since they are always enclosed in a namespace that
3198 differentiates them, and overloaded entities are supported by the VM.
3200 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3202 * checks.adb (Determine_Range): If a computed bound of an operation is
3203 outside the range of the base type of the expression, and overflow
3204 checks are enabled, the result is unknown and cannot be used for any
3205 subsequent constant folding.
3206 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3207 unknown, so is the result of the comparison.
3209 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3211 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3212 From_Abort. When finalization was triggered by an abort, propagate
3213 Standard'Abort_Signal rather than Program_Error.
3214 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3216 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3217 From_Abort. When finalization was triggered by an abort, propagate
3218 Standard'Abort_Signal rather than Program_Error.
3219 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3221 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3222 Abort_Id. Update the calls to Build_Object_Declarations and
3223 Build_Raise_Statement to include Abort_Id.
3224 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3225 calls to Build_Object_Declarations and Build_Raise_Statement to include
3227 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3228 calls to Build_Object_Declarations and Build_Raise_Statement to include
3230 (Build_Components): Create an entity for Abort_Id when exceptions are
3231 allowed on the target.
3232 (Build_Finalizer): New local variable Abort_Id.
3233 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3234 calls to Build_Object_Declarations and Build_Raise_Statement to include
3236 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3237 declaration of flag Abort_Id to preserve the original abort status
3238 before finalization code is executed.
3239 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3240 runtime routine Raise_From_Controlled_Operation.
3241 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3242 Abort_Id. Update the call to Build_Object_Declarations to include
3243 Abort_Id. Update the layout of the finalizer body.
3244 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3245 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3246 clunky code to create all flags and objects related to
3247 exception propagation and replace it with a call to
3248 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3250 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3251 Add new formal Abort_Id and associated comment on its use.
3252 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3254 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3255 Remove the clunky code to create all flags and objects related to
3256 exception propagation and replace it with a call to
3257 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3259 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3261 * s-tassta.adb: Fix minor typos.
3263 2011-08-03 Robert Dewar <dewar@adacore.com>
3265 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3266 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3268 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3270 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3271 to packages. This ensures that the finalizer body will not end up
3272 inside the freeze node.
3273 (Process_Declarations): Add code to detect whether a freeze node has a
3274 nested finalization collection.
3276 2011-08-03 Pascal Obry <obry@adacore.com>
3278 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3279 (Current_Session): Return a not null access to Session_Type.
3280 (Default_Session): Likewise.
3282 2011-08-03 Robert Dewar <dewar@adacore.com>
3284 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3285 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3287 2011-08-03 Pascal Obry <obry@adacore.com>
3289 * g-awk.ads: Minor comment fix.
3291 2011-08-03 Sergey Rybin <rybin@adacore.com>
3293 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3294 the tree structure related to discriminant constraints.
3295 Original_Discriminant cannot be used any more for computing the
3296 defining name for the reference to a discriminant.
3298 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3300 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3301 function is not visibly tagged, this is not a dispatching call and
3302 therfore is not Tag_Indeterminate, even if the function is marked as
3303 dispatching on result.
3305 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3307 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3308 (Expand_N_Free_Statement): Add a guard to protect against run-times
3309 which do not support controlled types.
3310 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3311 against run-times which do not support controlled types.
3312 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3313 against run-times which do not support controlled types.
3314 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3315 against run-times which do not support controlled types.
3316 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3317 protect against run-times which do not support controlled types.
3319 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3321 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3322 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3324 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3326 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3327 modified in the source, to prevent spurious warnings when compiling
3330 2011-08-03 Thomas Quinot <quinot@adacore.com>
3332 * a-except-2005.adb: Minor reformatting.
3334 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3336 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3337 is a renaming declaration in the private part of a package, do not emit
3338 a warning that the with_clause could be moved because the renaming may
3339 be used in the body or in a child unit.
3341 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3343 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3344 Propagate the Comes_From_Source attribute from the original return
3345 object to the renaming.
3347 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3349 * exp_ch7.adb (Build_Raise_Statement): Do not call
3350 Raise_From_Controlled_Operation when this routine is not present in
3351 the run-time library.
3352 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3353 libraries (Ravenscar), tasks are non-terminating, and protected objects
3354 and tasks can only appear at library level, so we do not want
3355 finalization of protected objects nor tasks.
3356 * exp_intr.adb: Minor clarification in comment.
3357 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3358 Gen_Output_File_C): Remove references to finalization of library-level
3359 objects when using restricted run-time libraries.
3361 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3363 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3364 Original_Discriminant only if the parent type is a generic formal.
3366 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3368 * exp_ch13.adb: Add with and use clause for Targparm;
3369 (Expand_N_Free_Statement): Prevent the generation of a custom
3370 Deallocate on .NET/JVM targets since this requires pools and address
3372 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3373 .NET/JVM targets, attach the newly allocated object to the access
3374 type's finalization collection. Do not generate a call to
3375 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3376 exist in the runtime.
3377 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3378 create a custom Allocate for object that do not require initialization.
3379 Attach a newly allocated object to the access type's finalization
3380 collection on .NET/JVM.
3381 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3382 assignment of controlled types on .NET/JVM. The two hidden pointers
3383 Prev and Next and stored and later restored after the assignment takes
3385 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3386 kludge for .NET/JVM to recognize a particular piece of code coming from
3387 Heap_Management and change the call to Finalize into Deep_Finalize.
3388 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3389 finalization collections on .NET/JVM only for types derived from
3390 Controlled. Separate the association of storage pools with a collection
3391 and only allow it on non-.NET/JVM targets.
3392 (Make_Attach_Call): New routine.
3393 (Make_Detach_Call): New routine.
3394 (Process_Object_Declarations): Suppress the generation of
3395 build-in-place return object clean up code on .NET/JVM since it uses
3397 * exp_ch7.ads (Make_Attach_Call): New routine.
3398 (Make_Detach_Call): New routine.
3399 * exp_intr.adb Add with and use clause for Targparm.
3400 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3401 on .NET/JVM targets.
3402 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3403 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3404 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3405 names used in finalization.
3407 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3409 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3410 (Attach, Detach): Lock the current task when chaining an object onto a
3413 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3415 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3416 Rewritten to create the message strings when the exception is not
3417 raised by an abort during finalization.
3418 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3419 Raise_From_Controlled_Operation and update its associated comment.
3420 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3421 Ada.Finalization.Heap_Management provides key functionality
3422 associated with controlled objects on the heap, their creation,
3423 finalization and reclamation. Type Finalization_Collection is
3424 effectively a wrapper which sits ontop of a storage pool and performs
3425 all necessary bookkeeping for all the objects it contains. Each
3426 access-to-controlled or access-to-class-wide type receives a collection
3427 as part of its expansion. The compiler generates buffer code and
3428 invokes Allocate / Deallocate to create and destroy allocated
3430 * a-finali.adb ("="): Removed.
3431 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3432 fields Prev and Next.
3433 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3434 A library unit with at least one controlled object on the library level
3435 has a special finalizer which is invoked by the binder. To signal this,
3436 ali files carry field PF.
3437 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3438 associated comment on field usage.
3439 * a-tags.adb (Get_RC_Offset): Removed.
3440 (Needs_Finalization): New routine.
3441 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3442 Dispatch tables now carry field Needs_Finalization which provides
3443 runtime indication whether a type is controlled or has controlled
3444 components or both. Remove field RC_Offset.
3445 (Get_RC_Offset): Removed along with its associated pragma Export.
3446 Since tagged types with controlled components no longer carry hidden
3447 field _controller, the special mechanism to retrieve its location is no
3449 (Needs_Finalization): New routine.
3450 * atree.ads, atree.adb (Elist24): New routine.
3451 (Set_Elist24): New routine.
3452 * atree.h: Add a define clause for Elist24.
3453 * bindgen.adb New library-level variable Lib_Final_Built.
3454 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3455 presence of a VM target, the routine generates calls to the proper
3456 library finalization routine.
3457 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3458 targets. Set the correct library finalization routine depending on
3459 whether the library has controlled objects or this is a VM compilation.
3460 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3461 to library-level finalizers of compiled units in reverse order of
3462 elaboration. It also produces exception management code and reraises a
3463 potential exception after all units have been finalized.
3464 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3465 library-level finalizers of compiled units in reverse order of
3467 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3468 definitions of all library-level finalizers available to the compilation
3469 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3471 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3472 System.Standard_Library.Adafinal directly. If the library needs
3473 finalization actions, create the sequence of finalization calls.
3474 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3475 Generate a with clause for System.Soft_Links when compiling for a VM.
3476 Remove the code which imports System.Standard_Library.Adafinal as
3477 Do_Finalize. Generate the library finalization routine.
3478 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3479 If the library needs finalization actions, create all the definitions
3480 of library- level finalizers.
3481 (Has_Finalizer): New routine. Determines whether at least one compiled
3482 unit has a library-level finalizer.
3483 Add type Qualification_Mode.
3484 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3485 * einfo.adb: New usage of field 15 as Return_Flag.
3486 Remove Finalization_Chain_Entity from the usages of field 19.
3487 Remove Associated_Final_Chain from the usages of field 23.
3488 New usage of field 23 as Associated_Collection.
3489 New usage of field 24 as Finalizer.
3490 New usage of flag 252 as Is_Processed_Transient.
3491 (Associated_Final_Chain): Removed.
3492 (Associated_Collection): New routine.
3493 (Finalization_Chain_Entity): Removed.
3494 (Finalizer): New routine.
3495 (Is_Finalizer): New routine.
3496 (Is_Processed_Transient): New routine.
3497 (Return_Flag): New routine.
3498 (Set_Associated_Final_Chain): Removed.
3499 (Set_Associated_Collection): New routine.
3500 (Set_Finalization_Chain_Entity): Removed.
3501 (Set_Finalizer): New routine.
3502 (Set_Is_Processed_Transient): New routine.
3503 (Set_Return_Flag): New routine.
3504 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3506 (Write_Field8_Name): Alphabetize the output.
3507 (Write_Field11_Name): Alphabetize the output.
3508 (Write_Field12_Name): Alphabetize the output.
3509 (Write_Field13_Name): Alphabetize the output.
3510 (Write_Field14_Name): Alphabetize the output.
3511 (Write_Field15_Name): Alphabetize the output.
3512 (Write_Field16_Name): Alphabetize the output.
3513 (Write_Field17_Name): Alphabetize the output.
3514 (Write_Field18_Name): Alphabetize the output.
3515 (Write_Field19_Name): Alphabetize the output. Remove the output of
3516 Finalization_Chain_Entity.
3517 (Write_Field20_Name): Alphabetize the output.
3518 (Write_Field21_Name): Alphabetize the output.
3519 (Write_Field22_Name): Alphabetize the output.
3520 (Write_Field23_Name): Alphabetize the output. Remove the output of
3521 Associated_Final_Chain. Add output for Associated_Collection.
3522 (Write_Field24_Name): Alphabetize the output.
3523 (Write_Field25_Name): Add output for Finalizer.
3524 (Write_Field26_Name): Alphabetize the output.
3525 (Write_Field27_Name): Alphabetize the output.
3526 (Write_Field28_Name): Alphabetize the output.
3527 * einfo.ads: Add new field description for Associated_Collection and
3529 Remove Associated_Final_Chain and its uses in nodes.
3530 Remove Finalization_Chain_Entity and its uses in nodes.
3531 Add new field description for Finalizer and its uses in nodes.
3532 Add new synthesized attribute Is_Finalizer.
3533 Add new flag description for Is_Processed_Transient and its uses in
3535 Add new field description for Return_Flag and its uses in nodes.
3536 (Associated_Final_Chain): Removed along with its pragma Inline.
3537 (Associated_Collection): New routine and pragma Inline.
3538 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3539 (Finalizer): New routine and pragma Inline.
3540 (Is_Finalizer): New routine and pragma Inline.
3541 (Is_Processed_Transient): New routine and pragma Inline.
3542 (Return_Flag): New routine and pragma Inline.
3543 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3544 (Set_Associated_Collection): New routine and pragma Inline.
3545 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3546 (Set_Finalizer): New routine and pragma Inline.
3547 (Set_Is_Processed_Transient): New routine and pragma Inline.
3548 (Set_Return_Flag): New routine and pragma Inline.
3549 * exp_aggr.adb: Alphabetize subprograms.
3550 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3551 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3552 associated comments. Remove local variables External_Final_List and
3554 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3555 Ancestor. Remove the retrieval of finalization lists. Update the call to
3557 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3558 lists. Update the call to Late_Expansion.
3559 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3560 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3561 (Gen_Assign): Remove the retrieval of the finalization list used to
3562 build the assignment. Update the calls to Make_Init_Call and
3564 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3565 Remove the mechanism to determine attachment levels and finalization
3566 list retrieval. Remove the processing for coextensions.
3567 (Init_Controller): Removed. Controllers no longer exist.
3568 (Late_Expansion): Remove formals Flist and Obj along with their
3569 associated comments. Update the calls to Build_Record_Aggr_Code and
3570 Build_Array_Aggr_Code.
3571 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3572 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3573 appear in entry bodies, protected subprograms and task bodies.
3574 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3575 * exp_ch3.adb (Add_Final_Chain): Removed.
3576 (Build_Array_Init_Proc): Alphabetize local variables.
3577 (Build_Assignment): Alphabetize local variables. Update the call to
3579 (Build_Class_Wide_Master): Rename local variables to better reflect
3581 (Build_Discriminant_Assignments): Code reformatting.
3582 (Build_Init_Call_Thru): Code reformatting.
3583 (Build_Init_Procedure): Code reformatting. Generate a special version
3584 of Deep_Finalize which is capable of finalizing all initialized
3585 components and ignore the rest.
3586 (Build_Init_Statements): Rename local variables to better reflect their
3588 Reimplement the mechanism to include the creation and update of an index
3589 variable called a "counter". It is used as a bookmark for tracing
3590 initialized and non-initialized components.
3591 (Build_Initialization_Call): Remove local variable Controller_Typ.
3592 Alphabetize all local variables. Remove the initialization of the
3593 record controller and update the call to Make_Init_Call.
3594 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3595 New local variable Counter.
3596 (Constrain_Array): Alphabetize.
3597 (Expand_Freeze_Array_Type): Create a collection instead of a
3599 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3600 Finalize_Address which is used in conjunction with allocated controlled
3602 (Expand_N_Object_Declaration): Remove the creation of a finalization
3603 list for anonymous access types. Update the calls to Make_Init_Call and
3605 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3606 retrieval of finalization lists. Remove the expansion of the record
3607 controller. Create TSS primitive Finalize_Address used in conjunction
3608 with controlled objects on the heap. Create finalization collections
3609 for access-to-controlled record components.
3610 (Expand_Record_Controller): Removed.
3611 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3612 class-wide types now requires additional processing. Create
3613 finalization collections for access-to-controlled types.
3614 (Increment_Counter): New routine.
3615 (Make_Counter): New routine.
3616 (Make_Eq_If): Remove the mention of Name_uController.
3617 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3618 types coming from System.Finalization_Root.
3619 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3620 (Predefined_Primitive_Bodies): There is no longer need to skip types
3621 coming from System.Finalization_Root.
3622 (Stream_Operation_OK): Do not generate stream routines for
3623 type Ada.Finalization.Heap_Management.Finalization_Collection.
3624 * exp_ch3.ads: Alphabetize subprograms.
3625 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3626 Add with and use clause for Lib.
3627 (Complete_Coextension_Finalization): Removed.
3628 (Complete_Controlled_Allocation): New routine. Create a finalization
3629 collection for anonymous access-to-controlled types. Create a custom
3630 Allocate which interfaces with the back end and the machinery in
3632 (Expand_Allocator_Expression): Add necessary calls to
3633 Complete_Controlled_Allocation. Remove the retrieval of finalization
3634 lists. Update the calls to Make_Adjust_Call. Generate a call to
3635 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3636 the associated collection.
3637 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3638 Code clean up. Remove the retrieval of finalization lists and
3640 Update the call to Make_Init_Call. Generate a call to
3641 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3642 the associated collection.
3643 (Get_Allocator_Final_List): Removed. Finalization lists are not
3645 (Suitable_Element): Remove the mention of Name_uController.
3646 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3647 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3648 the left hand side, carry out the assignment and adjust the left hand
3650 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3651 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3652 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3653 BIP_Collection and BIPcollection.
3654 (Build_Heap_Allocator): New routine used to allocate the return object
3655 of a build-in-place function onto a collection.
3656 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3657 (Expand_Call): Do not replace direct calls to Deep routines with their
3659 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3660 and update their occurrences. Add a special return flag to monitor the
3661 [ab]normal execution of the function. The flag is set right before the
3663 Rewrite the mechanism used to allocate a build-in-place return object
3664 on the heap or on a storage pool.
3665 (Is_Direct_Deep_Call): New routine.
3666 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3667 build-in-place function call instead of a final list. Build a call to
3668 Set_Finalize_Address_Ptr to decorate the associated collection.
3669 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3670 order to name the build-in-place function call's result for later
3671 finalization. Add a collection to a build-in-place function call
3672 instead of a final list.
3673 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3674 build-in-place function call instead of a final list. Remove the code
3675 which moves one final list and transforms it into the actual in a
3676 nested build-in-place call.
3677 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3678 build-in-place function call instead of a final list.
3679 (Move_Final_List): Removed.
3680 (Needs_BIP_Collection): New routine.
3681 (Needs_BIP_Final_List): Removed.
3682 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3683 enumeration type BIP_Formal_Kind.
3684 Update the related comment.
3685 (Needs_BIP_Collection): New routine.
3686 (Needs_BIP_Final_List): Removed.
3687 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3688 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3689 majority of subprograms in this unit. Add Name_Finalize_Address to
3690 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3691 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3692 statements for an array type.
3693 (Build_Adjust_Statements): Create the adjust statements for a record
3695 (Build_Cleanup_Statements): New routine. A procedure which given any
3696 construct containing asynchronous calls, references to _master, or is a
3697 task body, a task allocation or a protected body produces the necessary
3698 runtime calls to clean up these constructs.
3699 (Build_Exception_Handler): New routine.
3700 (Build_Final_List): Removed.
3701 (Build_Finalization_Collection): New routine. A core procedure which
3702 creates a collection to service heap allocated controlled objects
3703 associated with an access-to-controlled type.
3704 (Build_Finalize_Statements): Create the finalization statements for a
3706 (Build_Finalizer): New routine. A core procedure which given any
3707 construct with declarations and/or statements detects all objects which
3708 need any type of clean up (controlled objects, protected objects) and
3709 generates all necessary code to clean up the said objects in the proper
3711 (Build_Finalizer_Call): New routine.
3712 (Build_Initialize_Statements): Create the initialization statements for
3713 an array type. The generated routine contains code to finalize partially
3715 (Build_Object_Declarations): New routine.
3716 (Build_Raise_Statement): New routine.
3717 (Clean_Simple_Protected_Objects): Removed.
3718 (Controller_Component): Removed.
3719 (Enclosing_Function): New routine.
3720 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3721 either declarations or statements or both.
3722 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3723 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3725 (Find_Final_List): Removed.
3726 (Global_Flist_Ref): Removed.
3727 (In_Finalization_Root): Removed.
3728 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3729 scope in terms of tree nodes. Process all transient variables within
3731 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3732 generated after the adjust.
3733 (Make_Attach_Call): Removed.
3734 (Make_Call): New routine.
3735 (Make_Clean): Removed.
3736 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3738 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3740 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3742 (Make_Final_Call): Modified to simply create a call to either
3743 Deep_Finalize or Finalize.
3744 (Make_Finalize_Address_Body): New routine.
3745 (Make_Finalize_Address_Stmts): New routine. A function which produces
3746 TSS primitive Finalize_Address used in conjunction with heap allocated
3748 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3749 (Make_Init_Call): Rewritten. There is no longer an attach call
3750 generated after initialization.
3751 (Make_Local_Deep_Finalize): New routine.
3752 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3753 (Make_Transient_Block): Remove the finalization list retrieval and
3755 (Needs_Finalization): Moved to Exp_Util.
3756 (Parent_Field_Type): New routine.
3757 (Preprocess_Components): New routine.
3758 (Process_Transient_Objects): New routine.
3759 (Wrap_HSS_In_Block): New routine.
3760 (Wrap_Transient_Declaration): Remove finalization list management and
3761 controller insertion.
3762 (Wrap_Transient_Expression): Code reformatting.
3763 (Wrap_Transient_Statement): Code reformatting.
3764 * exp_ch7.ads (Build_Final_List): Removed.
3765 (Build_Finalization_Collection): New routine.
3766 (Build_Raise_Statement): New routine.
3767 (Controller_Component): Removed.
3768 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3769 (Find_Final_List): Removed.
3770 (In_Finalization_Root): Removed.
3771 (Is_Simple_Protected_Type): Update related comment.
3772 (Make_Adjust_Call): New parameter profile and associated comments.
3773 (Make_Attach_Call): Removed.
3774 (Make_Final_Call): New parameter profile and associated comments.
3775 (Make_Finalize_Address_Body): New routine.
3776 (Make_Init_Call): New parameter profile and associated comments.
3777 (Make_Local_Deep_Finalize): New routine.
3778 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3779 (Needs_Finalization): Moved to Exp_Util.
3780 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3781 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3782 (Find_Protection_Type): Moved to Exp_Util.
3783 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3784 (Make_DT): Update sequence of dispatch table initialization. Remove the
3785 initialization of field RC_Offset. Add initialization of field Needs_
3787 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3788 Reimplement how an object is first finalized, then deallocated.
3789 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3791 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3792 Register TSS_Finalize_Address with type TSS_Names.
3793 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3794 procedure provides the interface between an allocation / deallocation
3795 and the support machinery in Ada.Finalization.Heap_Management.
3796 (Find_Init_Call): Code reformatting.
3797 (Find_Init_Call_In_List): Code reformatting.
3798 (Find_Protection_Type): Moved from Exp_Ch9.
3799 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3800 (Has_Controlled_Coextensions): Removed.
3801 (Has_Controlled_Objects): New routine.
3802 (In_Library_Level_Package_Body): New routine.
3803 (Insert_Action_After): New routine.
3804 (Is_Finalizable_Transient): New routine. This predicate determines
3805 whether an object declaration is one of the many variants of controlled
3807 (Is_Null_Access_BIP_Func_Call): New routine.
3808 (Is_Non_BIP_Func_Call): New routine.
3809 (Is_Related_To_Func_Return): New routine.
3810 (Needs_Finalization): Moved from Exp_Ch7.
3811 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3812 (Find_Protection_Type): Moved from Exp_Ch9.
3813 (Has_Controlled_Coextensions): Removed.
3814 (Has_Controlled_Objects): New routine.
3815 (In_Library_Level_Package_Body): New routine.
3816 (Insert_Action_After): New routine.
3817 (Is_Finalizable_Transient): New routine.
3818 (Is_Null_Access_BIP_Func_Call): New routine.
3819 (Is_Non_BIP_Func_Call): New routine.
3820 (Is_Related_To_Func_Return): New routine.
3821 (Needs_Finalization): Moved from Exp_ch7.
3822 * expander.adb (Expand): Add a case for N_Free_Statement.
3823 * freeze.adb (Freeze_All): Replace the generation of a finalization
3824 list with a collection for access-to-controlled types.
3825 (Freeze_Entity): Code reformatting.
3826 (Freeze_Record_Type): Remove the freezing of a record controller
3828 (Freeze_Subprogram): Code reformatting.
3829 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3831 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3832 has a library-level finalizer.
3833 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3834 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3835 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3836 files. Add a-fihema to the list of object files.
3838 Alphabetize the associations in type Is_Parameterless_Attribute.
3839 * rtsfind.ads: Ada.Finalization_List.Controller and
3840 System.Finalization_Implementation are no longer a GNAT unit.
3841 Update the range of type Ada_Finalization_Child. Remove the following
3842 recoverable entities:
3844 RE_Attach_To_Final_List
3848 RE_Finalizable_Ptr_Ptr
3849 RE_Global_Final_List
3850 RE_Limited_Record_Controller
3853 RE_Record_Controller
3854 RE_Simple_List_Controller
3856 Add the following recoverable entities:
3858 RE_Add_Offset_To_Address
3862 RE_Exception_Identity
3863 RE_Finalization_Collection
3864 RE_Finalization_Collection_Ptr
3865 RE_Needs_Finalization
3866 RE_Save_Library_Occurrence
3867 RE_Set_Finalize_Address_Ptr
3868 RE_Set_Storage_Pool_Ptr
3870 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3872 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3873 (First_Stored_Discriminant): Remove the mention of Name_uController.
3874 * sem_aux.ads: Comment reformatting.
3875 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3876 to redecorate an already existing class-wide type.
3877 (Decorate_Tagged_Type): New parameter profile and associated comment.
3878 Create a "shadow class-wide type" for a shadow entity.
3879 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3880 of the final chain along with the associated comment.
3881 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3882 Full_Desig and set it to the full view of the designated type.
3883 Initialize the finalization collection to empty.
3884 (Build_Derived_Record_Type): Alphabetize local variables. Code
3886 (Collect_Fixed_Components): Remove the mention of Name_uController.
3887 (Create_Constrained_Components): Remove the mention of Name_uController.
3888 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3889 class-wide type of a shadow entity.
3890 (Process_Full_View): Update the machinery which marks type
3891 Limited_Controlled's entity as limited.
3892 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3893 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3894 list, instead make a collection build-in-place formal.
3895 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3896 a designated type in order to establish a match between the renaming
3897 and the renamed entity.
3898 (Find_Selected_Component): Add guard to prevent spurious exceptions
3899 from being raised on .NET/JVM.
3900 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3901 to the list of primitive that need special processing. Update arrays
3902 C_Names and D_Names.
3903 (Replace_Types): Handle class-wide types.
3904 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3905 different parameter profile, look at the first formal.
3906 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3907 use clauses for Exp_Util.
3908 * sem_res.adb: Remove with and use clauses for Elists.
3909 (Propagate_Coextensions): Removed.
3910 (Resolve_Allocator): Do not propagate the list of coextensions from one
3911 allocator to another.
3912 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3913 Deaccessed_T to Desig_Typ.
3914 (Enter_Name): Remove the mention of Name_uController.
3915 (Gather_Components): Remove the mention of Name_uController.
3916 (Incomplete_Or_Private_View): New routine.
3917 (Is_Coextension_Root): Removed.
3918 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3919 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3920 (Is_Coextension_Root): Removed.
3921 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3922 Controlled types are now derived from a null tagged record. Remove
3923 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3924 * sinfo.adb (Coextensions): Removed.
3925 (Set_Coextensions): Removed.
3926 * sinfo.ads: Remove Coextensions from the explanation of node fields
3927 and its uses in nodes.
3928 Update the field usage of N_Allocator.
3929 (Coextensions): Removed along with its pragma Inline.
3930 (Set_Coextensions): Removed along with its pragma Inline.
3931 * snames.ads-tmpl: Remove names
3936 Name_uLocal_Final_List
3937 Name_Finalization_Root
3944 Name_Finalize_Address
3945 * s-pooglo.adb (Allocate): Add overriding indicator.
3946 (Deallocate): Add overriding indicator.
3947 (Storage_Size): Add overriding indicator.
3948 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3949 than Finalize_Global_List.
3950 (Null_Finalize_Global_List): Removed.
3951 (Save_Library_Occurrence): New routine.
3952 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3953 initialization. Add variable Finalize_Library_Objects along with its
3954 pragma Export. Add variables Library_Exception and
3955 Library_Exception_Set along with their pragma Export.
3956 (Null_Finalize_Global_List): Removed.
3957 (Save_Library_Occurrence): New routine.
3958 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3959 rather than Finalize_Global_List.
3960 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3961 of the constructed node.
3963 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3965 * link.c: Include "auto-host.h" before system headers.
3967 2011-08-03 Vincent Celier <celier@adacore.com>
3969 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3970 that are not extended. Do not check if a library project that is
3971 extended should be regenerated. Do not add to table Library_Paths the
3972 libraries that are in extended projects. Link only with libraries that
3973 are in libray projects that are not extended.
3974 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3975 for a library project that is extended.
3977 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3979 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3980 conforming subprogram renamings that appear to be completions if they
3981 are not fully conformant.
3982 Such renamings are homographs but not completions.
3983 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3984 names in a subprogram renaming that appears in an instance.
3986 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3988 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3989 not immutably limited, build actual subtype from expression to provide
3990 proper bounds to caller.
3992 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3994 * sem_ch8.adb: Minor comment correction.
3996 2011-08-03 Thomas Quinot <quinot@adacore.com>
3998 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3999 returning a limited array, use an extended return statement.
4001 2011-08-03 Vincent Celier <celier@adacore.com>
4003 * make.adb (Initialize): If --subdirs= is used, but no project file is
4004 specified, attempt to create the specify subdir if it does not already
4005 exist and use it as the object directory as if -D had been specified.
4007 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4009 * s-tpopsp-vms.adb: New file.
4010 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4011 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4013 2011-08-03 Emmanuel Briot <briot@adacore.com>
4015 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4018 2011-08-03 Yannick Moy <moy@adacore.com>
4020 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4021 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4022 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4023 detect that an array has static bounds.
4025 2011-08-03 Thomas Quinot <quinot@adacore.com>
4027 * exp_dist.adb: Minor reformatting.
4029 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4031 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4032 (ATCB_Key): Removed, not always used.
4034 2011-08-03 Emmanuel Briot <briot@adacore.com>
4036 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4037 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4038 most remaining global variables.
4040 2011-08-03 Robert Dewar <dewar@adacore.com>
4042 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4043 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4046 2011-08-03 Javier Miranda <miranda@adacore.com>
4048 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4049 that must be passed by copy in VM targets.
4051 2011-08-03 Emmanuel Briot <briot@adacore.com>
4053 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4054 duplicates a similar htable now in the project tree.
4056 2011-08-03 Claire Dross <dross@adacore.com>
4058 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4059 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4060 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4061 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4062 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4063 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4064 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4067 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4069 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4070 (ATCB_Key): Removed, not always used.
4071 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4073 * s-tpopsp-tls.adb: New file.
4074 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4075 x86/x64/ia64/powerpc/sparc Linux.
4077 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4079 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4080 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4082 2011-08-03 Thomas Quinot <quinot@adacore.com>
4084 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4085 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4086 Fix type selection for mapping integer types to PolyORB types.
4088 2011-08-03 Bob Duff <duff@adacore.com>
4090 * sem_ch7.adb: Minor comment clarification.
4092 2011-08-03 Bob Duff <duff@adacore.com>
4094 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4095 an error analyzing a choice, skip further processing. Further
4096 processing could cause a crash or cascade errors.
4098 2011-08-03 Emmanuel Briot <briot@adacore.com>
4100 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4101 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4102 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4103 prj-env.ads (Shared_Project_Tree_Data): new type
4104 An aggregate project and its aggregated trees need to share the common
4105 data structures used for lists of strings, packages,... This makes the
4106 code simpler since otherwise we have to pass the root tree (also used
4107 for the configuration file data) in addition to the current project
4108 tree. This also avoids ambiguities as to which tree should be used.
4109 And finally this saves a bit of memory.
4110 (For_Every_Project_Imported): new parameter Tree.
4111 Since aggregated projects are using a different tree, we need to let
4112 the caller know which tree to use to manipulate the returned project.
4114 2011-08-03 Robert Dewar <dewar@adacore.com>
4116 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4117 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4118 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4119 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4121 2011-08-03 Javier Miranda <miranda@adacore.com>
4123 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4124 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4126 2011-08-03 Bob Duff <duff@adacore.com>
4128 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4131 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4133 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4134 g-sehash.ads: Fix typo. Update header.
4136 2011-08-03 Thomas Quinot <quinot@adacore.com>
4138 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4141 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4143 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4144 prefixes of private types along with records, since the selector may be
4146 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4147 private types along with records, since the selector may be a
4150 2011-08-03 Emmanuel Briot <briot@adacore.com>
4152 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4154 2011-08-03 Javier Miranda <miranda@adacore.com>
4156 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4157 Tagged_Type_Expansion.
4159 2011-08-03 Yannick Moy <moy@adacore.com>
4161 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4162 violation when the argument of concatenation is the name of a
4165 2011-08-03 Emmanuel Briot <briot@adacore.com>
4167 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4168 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4169 (Process_Declarative_Items): new parameter Child_Env.
4171 2011-08-03 Yannick Moy <moy@adacore.com>
4173 * alfa.ads: Update format of ALFA section in ALI file in order to
4174 add a mapping from bodies to specs when both are present.
4175 (ALFA_Scope_Record): Add components for spec file/scope.
4176 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4178 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4179 collected, fill in the spec information when relevant.
4180 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4183 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4185 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4186 code unit to decide whether to add internally generated subprograms.
4188 2011-08-03 Javier Miranda <miranda@adacore.com>
4190 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4191 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4192 be handled by copy in VM targets.
4194 2011-08-03 Emmanuel Briot <briot@adacore.com>
4196 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4197 code with Makeutl.Get_Switches.
4198 * prj-tree.adb: Update comment.
4200 2011-08-03 Thomas Quinot <quinot@adacore.com>
4202 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4203 subprogram with a limited formal that does not support external
4206 2011-08-03 Yannick Moy <moy@adacore.com>
4208 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4210 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4211 not from current unit in two phases, because it is not possible to
4212 change the table while iterating over its content.
4213 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4215 2011-08-03 Sergey Rybin <rybin@adacore.com>
4217 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4218 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4220 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4222 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4223 and the component type is composite, this is ambiguous for predefined
4224 concatenation, but if the node is not overloaded and the entity is a use
4225 -defined function its profile can be used to resolve that aggregate.
4227 2011-08-03 Robert Dewar <dewar@adacore.com>
4229 * exp_ch4.adb: Minor code cleanup.
4231 2011-08-03 Thomas Quinot <quinot@adacore.com>
4233 * exp_dist.adb: Do not generate distribution stubs if serious errors
4234 have been diagnosed.
4236 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4238 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4239 the first formal of a primitive operation, go to the base type to
4240 handle properly an access to a derived type with constrained
4242 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4243 user-defined function that is only use-visible.
4245 2011-08-03 Robert Dewar <dewar@adacore.com>
4247 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4248 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4249 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4250 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4251 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4252 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4253 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4254 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4256 2011-08-03 Robert Dewar <dewar@adacore.com>
4258 * repinfo.adb (List_Mechanism): Add handling of
4259 Convention_Ada_Pass_By_XXX.
4260 * sem_mech.adb (Set_Mechanism): Ditto.
4261 * sem_prag.adb (Process_Convention): Add entries for
4262 Convention_Ada_Pass_By_XXX.
4263 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4265 2011-08-03 Pascal Obry <obry@adacore.com>
4267 * makeutl.adb: Minor reformatting.
4269 2011-08-03 Vincent Celier <celier@adacore.com>
4272 (Get_File_Name) If the file cannot be found when there are no config
4273 pragmas file and May_Fail is True, return No_File instead of the file
4274 name, to be consistent.
4276 2011-08-03 Pascal Obry <obry@adacore.com>
4278 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4281 2011-08-03 Javier Miranda <miranda@adacore.com>
4284 (Same_Representation): In VM targets the representation of arrays with
4285 aliased components differs from arrays with non-aliased components.
4287 2011-08-03 Emmanuel Briot <briot@adacore.com>
4289 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4290 not systematically lower case attribute indexes that contain no "."
4291 Fix definition of several Naming attributes, which take
4292 a unit name as index and therefore should be case insensitive.
4293 Minor refactoring (reduce length of variable names).
4295 2011-08-03 Emmanuel Briot <briot@adacore.com>
4297 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4299 2011-08-03 Emmanuel Briot <briot@adacore.com>
4301 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4302 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4303 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4304 prj-tree.ads (Prj.Tree.Environment): new type.
4306 2011-08-03 Emmanuel Briot <briot@adacore.com>
4308 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4309 prj-tree.adb, prj-tree.ads (Environment): new type.
4311 2011-08-03 Emmanuel Briot <briot@adacore.com>
4313 * prj-tree.ads: Remove unused variable.
4315 2011-08-03 Yannick Moy <moy@adacore.com>
4317 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4318 issuing messages related to SPARK restriction violation.
4320 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4322 * sem_ch6.adb: guard against error nodes in return statements.
4324 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4326 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4327 a warning can only appear on a configuration file, so emit warning
4328 without further checks.
4330 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4332 * s-interr.ads: add overriding keyword.
4334 2011-08-03 Geert Bosch <bosch@adacore.com>
4336 * exp_attr.adb: Fix minor typo.
4338 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4340 * par-ch4.adb: improve error recovery.
4342 2011-08-03 Emmanuel Briot <briot@adacore.com>
4344 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4345 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4348 2011-08-03 Emmanuel Briot <briot@adacore.com>
4350 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4351 "external" as an attribute name in aggregate projects.
4353 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4355 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4356 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4357 from 0, so we need to adjust.
4359 2011-08-03 Emmanuel Briot <briot@adacore.com>
4361 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4362 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4364 2011-08-03 Yannick Moy <moy@adacore.com>
4366 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4367 restriction on overloaded entity if the entity is not an operator.
4369 2011-08-03 Yannick Moy <moy@adacore.com>
4371 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4372 restrict.ads: Rename remaining Check_Formal_Restriction* into
4373 Check_SPARK_Restriction*.
4375 2011-08-03 Emmanuel Briot <briot@adacore.com>
4377 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4378 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4380 (Project_Empty): removed
4381 (Empty_Project): new parameter Qualifier
4382 This is used to have fields specific to aggregate projects, cleaner
4383 New field to store the list of aggregated projects.
4384 (Check_Aggregate_Project): removed
4385 (Process_Aggregated_Projects, Free): new subprograms.
4387 2011-08-03 Olivier Hainque <hainque@adacore.com>
4389 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4391 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4393 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4394 explicit dereference of an unconstrained type, create a constrained
4395 subtype for it, as is done for function calls that return an
4398 2011-08-03 Thomas Quinot <quinot@adacore.com>
4400 * g-pehage.adb (Finalize): Avoid possible double-free.
4402 2011-08-03 Steve Baird <baird@adacore.com>
4404 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4405 Elab_Spec/Body attrs in CodePeer_Mode.
4407 2011-08-03 Javier Miranda <miranda@adacore.com>
4409 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4410 low bound is not known at compile time but they have no others choice.
4411 Done because in this case the bounds can be obtained directly from the
4414 2011-08-03 Ed Falis <falis@adacore.com>
4416 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4417 on VxWorks SMP. Remove unusable constant ANY_CPU.
4419 2011-08-03 Emmanuel Briot <briot@adacore.com>
4421 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4422 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4423 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4424 Prj.Env.Initialize_Empty): new subprograms
4425 (Get_Env, Find_Project): remove parameter Target_Name.
4427 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4429 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4430 as a condition for the delayed call to Derived_Subprograms done for the
4431 case of the rewriting of a derived type that constrains the
4432 discriminants of its parent type.
4433 Avoids redundant subprogram derivations for private subtype derivations.
4435 2011-08-03 Javier Miranda <miranda@adacore.com>
4437 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4438 Build_Record_Aggr_Code.
4439 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4440 discriminants in extension aggregates.
4442 2011-08-03 Emmanuel Briot <briot@adacore.com>
4444 * prj-pp.adb (Print): also output project qualifiers, since in
4445 particular "aggregate" is mandatory in an aggregate project.
4447 2011-08-03 Emmanuel Briot <briot@adacore.com>
4449 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4450 (Debug_Output): new function.
4452 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4454 * gnat_ugn.texi: Document -Wstack-usage.
4455 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4457 2011-08-03 Thomas Quinot <quinot@adacore.com>
4459 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4460 have keyword LIMITED.
4462 2011-08-03 Yannick Moy <moy@adacore.com>
4464 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4465 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4466 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4467 section (does not happen in compiler, only if code directly calls
4469 * get_alfa.adb, get_alfa.ads: New files.
4470 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4472 * lib-xref-alfa.adb: New file.
4473 * lib-xref.adb, lib-xref.ads
4474 (Xref_Entry): redefine information needed in cross-references for ALFA.
4475 Push ALFA treatments in separated local package.
4476 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4477 identifiers. Return entity of package body instead of spec. Return
4478 Empty for a scope with no location.
4479 (Generate_Reference): adapt to new components for ALFA information.
4480 Remove the need for D references on definitions.
4481 (Is_Local_Reference): moved to ALFA local package
4482 (Output_References): extract subfunction as Extract_Source_Name
4483 (Output_Local_References): remove procedure, replaced by filtering of
4484 cross-references in package ALFA and printing in Put_ALFA.
4485 (Write_Entity_Name): remove procedure
4486 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4487 print exact name of entity as it appears in source file
4488 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4489 * put_alfa.adb, put_alfa.ads: New files.
4490 * xref_lib.adb (Search_Xref): protect read of cross-references against
4491 reading other sections of the ALI file, in gnatxref
4492 (Search): protect read of cross-references against reading other
4493 sections of the ALI file, in gnatfind.
4494 * gcc-interface/Make-lang.in: Update dependencies.
4496 2011-08-03 Thomas Quinot <quinot@adacore.com>
4498 * sem_ch3.adb: Minor reformatting.
4500 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4502 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4503 raising an exception.
4505 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4507 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4508 type, always use 1 as the lower bound or string, even if lower bound of
4509 context is not static, to handle properly null strings in a non-static
4512 2011-08-03 Bob Duff <duff@adacore.com>
4514 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4515 always legal on the right-hand side of an assignment statement; there
4516 is always an applicable index constraint in this case. Therefore, the
4517 check for Pkind = N_Assignment_Statement is now unconditional -- it
4518 doesn't depend on whether Is_Constrained (Typ).
4520 2011-08-03 Robert Dewar <dewar@adacore.com>
4522 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4524 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4526 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4527 for an itype created within a generic unit.
4529 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4531 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4532 suppresses all inlining.
4534 2011-08-03 Robert Dewar <dewar@adacore.com>
4536 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4537 exp_aggr.adb: Minor reformatting.
4539 2011-08-03 Thomas Quinot <quinot@adacore.com>
4541 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4542 tagged assignment when discriminant checks are suppressed. This is
4543 useless and extremely costly in terms of static stack usage.
4545 2011-08-03 Bob Duff <duff@adacore.com>
4547 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4548 of generics, because this leads to the wrong entity in the wrong scope,
4549 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4551 (Process_Interface_Name): Follow Alias for instances of generics, to
4552 correct for the above change.
4554 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4556 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4557 is an integer literal it is always safe to replace the reference. In
4558 addition, if the reference appears in the generated code for an object
4559 declaration it is necessary to copy because otherwise the reference
4560 might be to the uninitilized value of the discriminant of the object
4563 2011-08-03 Pascal Obry <obry@adacore.com>
4565 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4566 ACL used, in this case we want to check for ending .exe, not .exe
4567 anywhere in the path.
4569 2011-08-03 Sergey Rybin <rybin@adacore.com>
4571 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4572 the tree structure (semantic decoration of references to record
4575 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4577 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4578 choices of a named array aggregate, bail out when any choices are
4579 marked as Errors_Posted.
4581 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4583 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4584 in which entity is frozen, to handle properly loop variables in
4587 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4589 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4590 subtype is not static, compute the upper bound using attributes, to
4591 handle properly index types that are not integer types.
4593 2011-08-03 Bob Duff <duff@adacore.com>
4595 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4596 Update copyright notice.
4598 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4600 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4601 Original_Discriminant if within an instance.
4602 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4604 2011-08-03 Thomas Quinot <quinot@adacore.com>
4606 * einfo.ads: Minor reformatting.
4608 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4610 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4611 composite type with an unfrozen subcomponent, in the profile of a
4612 primitive operation.
4614 2011-08-03 Robert Dewar <dewar@adacore.com>
4616 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4618 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4620 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4621 unconstrained type with discriminants is initialized with an aggregate,
4622 use the constrained subtype of the aggregate as the type of the object,
4623 because it is immutable, and this allows the back-end to generate no
4624 code for the object declaration.
4626 2011-08-03 Robert Dewar <dewar@adacore.com>
4628 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4629 comparison operand is variable, and turns out to be zero or negative.
4631 2011-08-03 Javier Miranda <miranda@adacore.com>
4634 (Expand_Dispatching_Constructor_Call): Disable expansion of
4635 code required for native targets. Done to avoid generating
4636 references to unavailable runtime entities in VM targets.
4638 (Expand_N_Object_Declaration): Add missing support to handle
4639 the explicit initialization of class-wide interface objects.
4642 2011-08-03 Matthew Heaney <heaney@adacore.com>
4644 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4646 2011-08-03 Matthew Heaney <heaney@adacore.com>
4648 * a-cbdlli.adb (Splice): move source items from first to last
4650 2011-08-03 Yannick Moy <moy@adacore.com>
4652 * sem_util.ads: comment added.
4654 2011-08-03 Javier Miranda <miranda@adacore.com>
4657 (Expand_Record_Aggregate): In VM targets disable the expansion into
4658 assignments of aggregates whose type is not known at compile time.
4660 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4662 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4663 protected entries and task entries, to build the proper renaming
4664 declaration for entry formals, used in debugging.
4665 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4666 parameters in the same way.
4668 2011-08-02 Robert Dewar <dewar@adacore.com>
4670 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4671 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4672 code reorganization.
4674 2011-08-02 Robert Dewar <dewar@adacore.com>
4676 * debug.adb: Debug flag d.P to suppress length comparison optimization
4677 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4678 comparison of Length by comparing First/Last instead.
4680 2011-08-02 Matthew Heaney <heaney@adacore.com>
4682 * a-cobove.ads: Code clean up.
4684 2011-08-02 Vincent Celier <celier@adacore.com>
4686 * adaint.c (file_names_case_sensitive_cache): New static int.
4687 (__gnat_get_file_names_case_sensitive): Cache the return value in
4688 file_names_case_sensitive_cache at the first invocation, to avoid
4689 multiple calls to getenv.
4691 2011-08-02 Bob Duff <duff@adacore.com>
4693 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4695 2011-08-02 Yannick Moy <moy@adacore.com>
4697 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4698 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4699 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4700 indicate that we are in a precondition or postcondition. This is used in
4701 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4702 decide whether to flag the spec or body of the current subprogram as
4705 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4707 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4709 * a-extiin.ads: New file.
4711 2011-08-02 Bob Duff <duff@adacore.com>
4713 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4714 now raises Name_Error instead of Use_Error in certain cases. The other
4715 parts of this AI were already implemented properly.
4717 2011-08-02 Vincent Celier <celier@adacore.com>
4719 * link.c: Only import "auto-host.h" when building the gnattools.
4721 2011-08-02 Yannick Moy <moy@adacore.com>
4723 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4724 which calls a local subprogram, so extract subprogram
4725 from Mark_Non_ALFA_Subprogram_Body.
4727 2011-08-02 Javier Miranda <miranda@adacore.com>
4730 (Extract_Dispatching_Call): If the type of the dispatching object is an
4731 access type then return an explicit dereference in the Object out-mode
4734 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4736 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4737 compatibility checks for all indexes of an array subtype, not just the
4738 first. Reset Has_Dynamic_Range_Check on the subtype before each
4739 potential check to ensure that Insert_Range_Checks will not elide any
4740 of the dynamic checks.
4742 2011-08-02 Yannick Moy <moy@adacore.com>
4744 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4745 SPARK restriction at parsing time.
4746 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4747 directive only if the SPARK restriction is set for this unit.
4749 2011-08-02 Yannick Moy <moy@adacore.com>
4751 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4752 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4753 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4754 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4755 Mark_Non_ALFA_Subprogram_Body.
4756 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4759 2011-08-02 Yannick Moy <moy@adacore.com>
4761 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4764 2011-08-02 Robert Dewar <dewar@adacore.com>
4766 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4767 exp_ch3.adb: Minor reformatting.
4769 2011-08-02 Emmanuel Briot <briot@adacore.com>
4771 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4772 files, not any regular file.
4773 (__gnat_locate_file_with_predicate): new subprogram.
4775 2011-08-02 Yannick Moy <moy@adacore.com>
4777 * sinfo.adb, sinfo.ads: Restrict the use of flags
4778 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4779 nodes, plus N_Subtype_Declaration for the 2nd one.
4781 2011-08-02 Sergey Rybin <rybin@adacore.com>
4783 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4784 - fix bugs in the description of Source_Trace;
4785 - get rid of UNIT_NAME;
4787 2011-08-02 Javier Miranda <miranda@adacore.com>
4790 (Build_Dispatching_Requeue): Adding support for VM targets
4791 since we cannot directly reference the Tag entity.
4792 * exp_sel.adb (Build_K): Adding support for VM targets.
4793 (Build_S_Assignment): Adding support for VM targets.
4795 (Default_Prim_Op_Position): In VM targets do not restrict availability
4796 of predefined interface primitives to compiling in Ada 2005 mode.
4797 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4798 restricted to compiling in Ada 2005 mode.
4799 (Make_VM_TSD): Generate code that declares and initializes the OSD
4800 record. Needed to support dispatching calls through synchronized
4803 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4804 primitives associated with synchronized interfaces.
4805 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4806 primitives associated with synchronized interfaces.
4808 2011-08-02 Yannick Moy <moy@adacore.com>
4810 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4811 statements hidden in SPARK if preceded by the HIDE directive
4812 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4813 exception handlers as hidden in SPARK if preceded by the HIDE directive
4814 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4815 if starting with the HIDE directive
4816 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4817 starting with the HIDE directive; mark the declarations in a private
4818 part as hidden in SPARK if the private part starts with the HIDE
4820 * restrict.adb, restrict.ads
4821 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4822 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4823 argument node belongs to a part which is hidden in SPARK
4824 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4825 parts in SPARK; protect the possibly costly call to
4826 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4827 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4828 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4829 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4831 (Scan): recognize special comment starting with '#' and followed by
4832 SPARK keyword "hide" as a HIDE directive.
4834 2011-08-02 Yannick Moy <moy@adacore.com>
4836 * types.ads, erroutc.ads: Minor reformatting.
4838 2011-08-02 Vincent Celier <celier@adacore.com>
4840 * link.c: Add response file support for cross platforms.
4842 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4844 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4845 in an association, set parent field of copy before partial analysis.
4846 * sem_res.adb (Resolve_Slice): create reference to itype only when
4847 expansion is enabled.
4849 2011-08-02 Yannick Moy <moy@adacore.com>
4851 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4852 for new flag denoting which subprogram bodies are in ALFA
4853 * restrict.adb, sem_ch7.adb: Update comment
4854 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4855 sem_ch9.adb, sem_res.adb: Add calls to
4856 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4857 * sem_ch6.adb (Analyze_Function_Return): add calls to
4858 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4859 middle of the body, and extended return.
4860 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4861 False when missing return.
4862 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4863 to True for subprograms whose spec is in ALFA. Remove later on the flag
4864 on the entity used for a subprogram body when there exists a separate
4866 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4867 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4868 False, otherwise do nothing.
4870 2011-08-02 Robert Dewar <dewar@adacore.com>
4872 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4874 2011-08-02 Yannick Moy <moy@adacore.com>
4876 * sem_ch4.ads: minor formatting.
4878 2011-08-02 Yannick Moy <moy@adacore.com>
4880 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4881 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4882 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4883 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4884 opt.ads: cleanup of SPARK mode
4886 2011-08-02 Yannick Moy <moy@adacore.com>
4888 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4890 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4891 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4893 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4894 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4895 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4896 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4898 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4900 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4901 functions whose return type is not in ALFA.
4902 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4904 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4905 parameter's type is not in ALFA.
4906 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4909 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4911 * sem_ch6 (Analyze_Expression_Function): treat the function as
4912 Inline_Always, and introduce a subprogram declaration for it when it is
4914 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4915 expression functions, so that the back-end can determine whether they
4916 can in fact be inlined.
4917 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4918 a function body comes from an expression function.
4920 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4922 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4923 null exclusions to test Can_Never_Be_Null on the anonymous access types
4924 of the formals rather than testing the formals themselves. Exclude this
4925 check in cases where the Old_Formal is marked as a controlling formal,
4926 to avoid issuing spurious errors for bodies completing dispatching
4927 operations (due to the flag not getting set on controlling access
4928 formals in body specs).
4929 (Find_Corresponding_Spec): When checking full and subtype conformance of
4930 subprogram bodies in instances, pass Designated and E in that order, for
4931 consistency with the expected order of the formals (New_Id followed by
4934 2011-08-02 Robert Dewar <dewar@adacore.com>
4936 * sem_ch8.adb: Minor reformatting.
4938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4940 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4941 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4942 primitive operations of class-wide actuals.
4944 2011-08-02 Javier Miranda <miranda@adacore.com>
4946 * exp_atag.ads, exp_atag.adb
4947 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4948 since its value is implicitly passed in argument Typ.
4949 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4950 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4951 Build_Common_Dispatching_Select_Statements.
4953 2011-08-02 Robert Dewar <dewar@adacore.com>
4955 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4956 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4959 2011-08-02 Robert Dewar <dewar@adacore.com>
4961 * sem_res.adb: Minor reformatting.
4962 * sem_prag.adb: Minor reformatting.
4964 2011-08-02 Javier Miranda <miranda@adacore.com>
4966 * exp_atag.adb, exp_atags.ads
4967 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4968 by the tagged type Entity. Required to use this routine in the VM
4969 targets since we do not have available the Tag entity in the VM
4972 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4973 Ada.Tags has not been previously loaded.
4975 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4976 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4978 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4979 view of enclosing scopes. Required to handle enclosing scopes that
4980 are synchronized types whose full view is a task type.
4982 (Build_VM_TSDs): Minor code improvement to avoid generating and
4983 analyzing lists with empty nodes.
4984 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4985 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4986 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4987 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4988 (Make_Select_Specific_Data_Table): Add support for VM targets.
4989 (Make_VM_TSD): Generate code to initialize the SSD structure of
4992 2011-08-02 Yannick Moy <moy@adacore.com>
4994 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4995 cross-references section in ALI.
4996 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4997 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4999 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
5000 subprogram or package entity of a node
5001 (Is_Local_Reference_Type): new function returns True for references
5002 selected in local cross-references.
5003 (Lt): function extracted from Lt in Output_References
5004 (Write_Entity_Name): function extracted from Output_References
5005 (Generate_Definition): generate reference with type 'D' for definition
5006 of objects (object declaration and parameter specification), with
5007 appropriate locations and units, for use in local cross-references.
5008 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5009 references of type 'I' for initialization in object definition.
5010 (Output_References): move part of function Lt and procedure
5011 Write_Entity_Name outside of the body. Ignore references of types 'D'
5012 and 'I' introduced for local cross-references.
5013 (Output_Local_References): new procedure to output the local
5014 cross-references sections.
5015 (Lref_Entity_Status): new array defining whether an entity is a local
5016 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5017 with 'I' type when initialization expression is present.
5018 * get_scos.adb, get_scos.ads: Correct comments and typos
5020 2011-08-02 Javier Miranda <miranda@adacore.com>
5022 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5024 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5026 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5029 2011-08-02 Vincent Celier <celier@adacore.com>
5031 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5032 (No_Space_Img): New function
5033 (Find_Excluded_Sources): When reading from a file, record the file name
5034 and the line number for each excluded source.
5035 (Mark_Excluded_Sources): When reporting an error, if the excluded
5036 sources were read from a file, include file name and line number in
5039 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5041 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5043 2011-08-02 Robert Dewar <dewar@adacore.com>
5045 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5047 2011-08-02 Javier Miranda <miranda@adacore.com>
5049 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5050 generation of TSDs to the DOTNET compiler.
5051 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5052 generation of TSDs to the DOTNET compiler.
5054 2011-08-02 Javier Miranda <miranda@adacore.com>
5056 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5057 record of all the tagged types declared inside library level package
5058 declarations, library level package bodies or library level subprograms.
5059 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5060 associated with a given tagged type.
5061 (Build_VM_TSDs): New subprogram.
5062 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5063 compilation units that are subprograms.
5064 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5065 compilation units that are package bodies.
5066 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5067 units that are a package declaration or a package instantiation.
5068 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5069 reorganization to improve the error generated by the frontend when the
5070 function Ada.Tags.Secondary_Tag is not available.
5071 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5072 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5074 2011-08-02 Javier Miranda <miranda@adacore.com>
5076 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5078 2011-08-02 Robert Dewar <dewar@adacore.com>
5080 * s-imenne.ads: Minor reformatting.
5082 2011-08-02 Robert Dewar <dewar@adacore.com>
5084 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5085 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5086 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5088 2011-08-02 Robert Dewar <dewar@adacore.com>
5090 * einfo.ads (Materialize_Entity): Document this is only for renamings
5091 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5092 required debug information in the case where we transform the object
5093 declaration into a renaming declaration.
5094 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5096 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5099 2011-08-02 Robert Dewar <dewar@adacore.com>
5101 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5102 Suppress_Init_Procs.
5103 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5104 Suppress_Initialization/Initialization_Suppressed.
5105 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5106 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5107 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5108 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5110 2011-08-02 Robert Dewar <dewar@adacore.com>
5112 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5117 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5118 only have inheritable classwide pre/postconditions.
5120 2011-08-02 Javier Miranda <miranda@adacore.com>
5122 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5123 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5124 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5125 checks if the external tag of a type is the same as the external tag
5126 of some other declaration.
5128 2011-08-02 Thomas Quinot <quinot@adacore.com>
5130 * s-taskin.ads: Minor reformatting.
5132 2011-08-02 Emmanuel Briot <briot@adacore.com>
5134 * g-comlin.adb (Display_Help): swap the order in which it prints the
5135 short help and the general usage.
5137 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5139 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5140 the aspect declarations and attach them to the generic copy for
5141 subsequent analysis.
5142 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5143 declarations of the generic tree to the new subprogram declarations.
5144 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5145 conditions that apply to a subprogram instance.
5147 2011-08-02 Robert Dewar <dewar@adacore.com>
5149 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5151 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5153 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5154 private type with a tagged full view is not derived in the immediate
5155 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5157 2011-08-02 Robert Dewar <dewar@adacore.com>
5159 * exp_ch4.adb: Minor reformatting.
5161 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5163 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5164 Ada2012 iterator, the loop will be rewritten during expansion into a
5165 while loop with a cursor and an element declaration. Do not analyze the
5166 body in this case, because if the container is for indefinite types the
5167 actual subtype of the elements will only be determined when the cursor
5168 declaration is analyzed.
5170 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5172 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5173 size/alignment related attributes in CodePeer_Mode.
5175 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5177 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5178 Prepend_Element, since this can result in the operation getting the
5179 wrong slot in the full type's dispatch table if the full type has
5180 inherited operations. The incomplete type's operation will get added
5181 to the proper position in the full type's primitives
5182 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5183 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5184 dispatching operations, since there are cases where nonprimitive
5185 subprograms can get added to the list of incomplete dependents (such
5186 as subprograms in nested packages).
5187 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5188 private part when determining whether to add a primitive with a
5189 parameter of a tagged incomplete type to the Private_Dependents list.
5190 Such primitives can also occur in the visible part, and should not have
5191 been excluded from being private dependents.
5192 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5193 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5194 list of a Taft-amendment incomplete type is a primitive before issuing
5195 an error that the full type must appear in the same unit. There are
5196 cases where nonprimitives can be in the list (such as subprograms in
5198 * sem_disp.adb (Derives_From): Use correct condition for checking that
5199 a formal's type is derived from the type of the corresponding formal in
5200 the parent subprogram (the condition was completely wrong). Add
5201 checking that was missing for controlling result types being derived
5202 from the result type of the parent operation.
5204 2011-08-02 Yannick Moy <moy@adacore.com>
5206 * errout.adb (First_Node): minor renaming
5207 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5210 2011-08-02 Yannick Moy <moy@adacore.com>
5212 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5213 before accessing operands.
5214 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5215 decide whether an initialization expression respects SPARK rules, as
5216 the plain node is the expanded one. This allows for more valid warnings
5218 * gnat_rm.texi: Minor update.
5220 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5222 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5225 2011-08-02 Robert Dewar <dewar@adacore.com>
5227 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5229 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5231 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5232 loop statements and the element renaming declaration with a block when
5233 the element type is controlled.
5235 2011-08-02 Yannick Moy <moy@adacore.com>
5237 * sinfo.ads: Minor formatting.
5239 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5241 * sem_aggr.adb (Add_Association): if the association has a box and no
5242 expression, use the Sloc of the aggregate itself for the new
5244 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5247 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5249 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5250 When a container is provided via a function call, generate a renaming
5251 of the function result. This avoids the creation of a transient scope
5252 and the premature finalization of the container.
5253 * exp_ch7.adb (Is_Container_Cursor): Removed.
5254 (Wrap_Transient_Declaration): Remove the supression of the finalization
5255 of the list controller when the declaration denotes a container cursor,
5258 2011-08-02 Yannick Moy <moy@adacore.com>
5260 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5261 node is from source, instead of the original node being from source.
5263 (Resolve_Array_Aggregate): refine the check for a static expression, to
5264 recognize also static ranges
5265 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5266 Array_Type_Declaration): postpone the test for the type being a subtype
5267 mark after the type has been resolved, so that component-selection and
5268 expanded-name are discriminated.
5269 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5270 to distinguish the case of an iteration scheme, so that an error is
5271 issed on a non-static range in SPARK except in an iteration scheme.
5272 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5273 In_Iter_Schm = True.
5274 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5275 user-defined operators so that they are allowed in renaming
5277 (Find_Selected_Component): refine the check for prefixing of operators
5278 so that they are allowed in renaming. Move the checks for restrictions
5279 on selector name after analysis discriminated between
5280 component-selection and expanded-name.
5281 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5282 concatenation argument of string type if it is static.
5283 * sem_util.adb, sem_util.ads
5284 (Check_Later_Vs_Basic_Declarations): add a new function
5285 Is_Later_Declarative_Item to decice which declarations are allowed as
5286 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5287 mode, add that renamings are considered as later items.
5288 (Enclosing_Package): new function to return the enclosing package
5289 (Enter_Name): correct the rule for homonyms in SPARK
5290 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5291 from source (result of expansion) to avoid issuing wrong warnings.
5293 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5295 * errout.adb: On anything but an expression First_Node returns its
5298 2011-08-02 Pascal Obry <obry@adacore.com>
5300 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5302 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5304 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5305 Set the associated loop as the related expression of internally
5307 * exp_ch7.adb (Is_Container_Cursor): New routine.
5308 (Wrap_Transient_Declaration): Supress the finalization of the list
5309 controller when the declaration denotes a container cursor.
5311 2011-08-02 Yannick Moy <moy@adacore.com>
5313 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5315 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5316 expression is a simple expression. This check cannot be performed in
5317 the semantics, so just drop it.
5318 (P_Index_Or_Discriminant_Constraint): move check that the index or
5319 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5320 semantics. Other cases were previously checked in the semantics.
5321 * par-ch4.adb (P_Name): move checks that a selector name is not
5322 character literal or an operator symbol to Find_Selected_Component in
5324 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5325 declarations are not placed after later declarations in a separate
5326 procedure in Sem_Util (possibly not the best choice?), to be used both
5327 during parsing, for Ada 83 mode, and during semantic analysis, for
5329 * par-endh.adb (Check_End): move check that end label is not missing
5330 to Process_End_Label in the semantics
5331 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5332 the special case for SPARK restriction
5333 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5334 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5335 parameter Force to issue the error message even on internal node (used
5336 for generated end label). Call Check_Restriction to check when an error
5337 must be issued. In SPARK mode, issue an error message even if the
5338 restriction is not set.
5339 (Check_Restriction): new procedure with an additional out parameter to
5340 inform the caller that a message has been issued
5341 * sem_aggr.adb: Minor modification of message
5342 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5343 instead of issuing an error message directly
5344 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5345 declarations are not placed after later declarations, by calling
5346 Check_Later_Vs_Basic_Declarations
5347 (Analyze_Subtype_Declaration): move here the check that an index or
5348 discriminant constraint must be a subtype mark. Change the check that
5349 a subtype of String must start at one so that it works on subtype marks.
5350 * sem_ch4.adb (Analyze_Call): move here the check that a named
5351 association cannot follow a positional one in a call
5352 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5353 instead of issuing an error message directly
5354 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5355 selector name is not a character literal or an operator symbol. Move
5356 here the check that the prefix of an expanded name cannot be a
5357 subprogram or a loop statement.
5358 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5359 procedure called from parsing and semantics to check that basic
5360 declarations are not placed after later declarations
5361 (Process_End_Label): move here the check that end label is not missing
5363 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5365 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5366 representation clause in codepeer mode, since it confuses CodePeer and
5367 does not bring useful info.
5369 2011-08-02 Ed Falis <falis@adacore.com>
5371 * init.c: initialize fp hw on MILS.
5373 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5375 * errout.adb (First_Node): for bodies, return the node itself (small
5376 optimization). For other nodes, do not check source_unit if the node
5377 comes from Standard.
5379 2011-08-02 Robert Dewar <dewar@adacore.com>
5381 * exp_ch3.adb: Minor comment additions.
5382 * sem_ch13.adb: Minor reformatting.
5384 2011-08-02 Pascal Obry <obry@adacore.com>
5386 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5388 2011-08-02 Robert Dewar <dewar@adacore.com>
5390 * sem_attr.adb: Minor reformatting.
5392 2011-08-02 Robert Dewar <dewar@adacore.com>
5394 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5395 (Has_Default_Component_Value): Removed
5396 * einfo.ads Comment updates
5397 (Has_Default_Aspect): Replaces Has_Default_Value
5398 (Has_Default_Component_Value): Removed
5400 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5402 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5403 (Get_Simple_Init_Val): Handle Default_Value aspect
5404 (Needs_Simple_Initialization): Handle Default_Value aspect
5405 * exp_ch3.ads: Needs_Simple_Initialization
5406 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5407 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5409 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5410 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5411 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5413 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5415 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5416 package containing iteration primitives.
5417 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5421 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5422 "of", pre-analyze expression in case it is a function call with
5423 finalization actions that must be placed ahead of the loop.
5424 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5425 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5427 2011-08-02 Geert Bosch <bosch@adacore.com>
5429 * cstand.adb (Create_Float_Types): Only consider C's long double for
5430 Long_Long_Float, in addition to double.
5432 2011-08-02 Robert Dewar <dewar@adacore.com>
5434 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5435 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5436 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5439 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5441 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5444 2011-08-02 Javier Miranda <miranda@adacore.com>
5446 * einfo.ads, einfo.adb
5447 (Original_Access_Type): Move this attribute to Node26 since there was
5448 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5449 which causes conflicts and breaks the generation of the .NET compiler.
5450 (Interface_Name): Add missing documentation on JGNAT only uses of
5453 2011-08-02 Geert Bosch <bosch@adacore.com>
5455 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5456 (Find_Back_End_Float_Type): Likewise
5457 (Create_Back_End_Float_Types): Likewise
5458 (Create_Float_Types): Likewise
5459 (Register_Float_Type): Likewise
5460 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5461 Nlist and split out type selection in new local Find_Base_Type function.
5462 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5464 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5466 2011-08-02 Robert Dewar <dewar@adacore.com>
5468 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5470 * opt.ads: Minor comment change.
5471 * sem_ch12.adb: Minor code reorganization.
5473 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5475 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5476 subtype's list of rep items to the list on the full subtype in the case
5477 where the lists are the same.
5479 2011-08-02 Geert Bosch <bosch@adacore.com>
5481 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5482 using the one from System.Strings, which also deallocates all strings.
5484 2011-08-02 Geert Bosch <bosch@adacore.com>
5486 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5488 * gcc-interface/Make-lang.in: Update dependencies.
5490 2011-08-02 Olivier Hainque <hainque@adacore.com>
5492 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5495 2011-08-02 Javier Miranda <miranda@adacore.com>
5497 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5498 associated with anonymous access to subprograms.
5500 2011-08-02 Geert Bosch <bosch@adacore.com>
5503 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5504 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5505 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5506 (Add_Symbol_Definition): Move to switch-c.adb
5507 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5508 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5509 (Add_Symbol_Definition): Move to switch-c.adb.
5510 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5512 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5514 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5515 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5517 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5518 (Add_Symbol_Definition): Moved from Prepcomp.
5519 * switch-c.ads: Update copyright notice. Use String_List instead of
5520 Argument_List, removing dependency on System.OS_Lib.
5522 2011-08-02 Yannick Moy <moy@adacore.com>
5524 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5525 mode on initialization expression which does not respect SPARK
5527 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5528 if the tree referenced by its argument represents an initialization
5529 expression in SPARK, suitable for initializing an object in an object
5532 2011-08-02 Javier Miranda <miranda@adacore.com>
5534 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5535 internally generated access to subprogram with its associated protected
5537 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5539 2011-08-02 Geert Bosch <bosch@adacore.com>
5541 * cstand.adb (Register_Float_Type): Print information about type to
5542 register, if the Debug_Flag_Dot_B is set.
5543 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5544 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5545 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5546 with a requested precision of more than Max_Digits digits and no more
5547 than Max_Base_Digits digits, if a range specification is present and the
5548 Predefined_Float_Types list has a suitable type to derive from.
5549 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5550 case of type completion with pragma Import
5552 (Process_Import_Predefined_Type): Processing to complete a type
5553 with pragma Import. Currently supports floating point types only.
5554 (Set_Convention_From_Pragma): Do nothing without underlying type.
5555 (Process_Convention): Guard against absence of underlying type,
5556 which may happen when importing incomplete types.
5557 (Process_Import_Or_Interface): Handle case of importing predefined
5558 types. Tweak error message.
5560 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5562 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5563 functions to previous change. Reorganize code slightly.
5565 2011-08-02 Geert Bosch <bosch@adacore.com>
5567 * back_end.ads (Register_Type_Proc): New call back procedure type for
5568 allowing the back end to provide information about available types.
5569 (Register_Back_End_Types): New procedure to register back end types.
5570 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5572 * cstand.adb (Back_End_Float_Types): New list for floating point types
5573 supported by the back end.
5574 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5575 (Copy_Float_Type): New procedure to make new copies of predefined types.
5576 (Register_Float_Type): New call back procedure to populate the BEFT list
5577 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5578 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5579 (Create_Float_Types): New procedure to create entities for floating
5580 point types predefined in Standard, and put these and any remaining
5581 BEFTs on the Predefined_Float_Types list.
5582 * stand.ads (Predefined_Float_Types): New list for predefined floating
5583 point types that do not have declarations in package Standard.
5585 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5587 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5588 entity node for the unit containing the parameter.
5589 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5590 (Add_Inlined_Subprogram): Likewise.
5591 * gcc-interface/Make-lang.in: Update dependencies.
5593 2011-08-02 Thomas Quinot <quinot@adacore.com>
5595 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5598 2011-08-02 Geert Bosch <bosch@adacore.com>
5600 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5602 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5604 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5605 computed value of Base_Type.
5607 2011-08-02 Yannick Moy <moy@adacore.com>
5609 * restrict.adb (Check_Restriction): issue an error for any use of
5610 class-wide, even if the No_Dispatch restriction is not set.
5611 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5612 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5613 when completing a private extension, the type named in the private part
5614 is not the same as that named in the visible part.
5615 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5616 of an inherited primitive operations of a tagged type or type extension
5617 that returns the tagged type.
5618 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5619 function which returns True for an implicit operation inherited by the
5620 derived type declaration for the argument type.
5621 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5624 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5626 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5627 Process_Bounds, to perform analysis with expansion of a range or an
5628 expression that is the iteration scheme for a loop.
5629 (Analyze_Iterator_Specification): If domain of iteration is given by a
5630 function call with a controlled result, as is the case if call returns
5631 a predefined container, ensure that finalization actions are properly
5633 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5635 2011-08-02 Javier Miranda <miranda@adacore.com>
5637 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5638 * gcc-interface/Make-lang.in: Update dependencies.
5640 2011-08-02 Javier Miranda <miranda@adacore.com>
5642 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5643 determine if the analysis is performed using N or Original_Node (N).
5644 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5645 functionality of routine Is_Variable avoids code duplication.
5646 * checks.adb (Determine_Range): Handle temporaries generated by
5647 Remove_Side_Effects.
5649 2011-08-02 Javier Miranda <miranda@adacore.com>
5651 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5652 expansion of the condition. Required since the previous analysis was
5653 done with expansion disabled (see Resolve_Quantified_Expression) and
5654 hence checks were not inserted and record comparisons have not been
5657 2011-08-02 Ed Falis <falis@adacore.com>
5659 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5662 2011-08-02 Bob Duff <duff@adacore.com>
5664 * opt.ads: Minor comment fix.
5666 2011-08-02 Bob Duff <duff@adacore.com>
5668 * sem_ch12.adb (Analyze_Package_Instantiation,
5669 Analyze_Subprogram_Instantiation): Turn off style checking while
5670 analyzing an instance. Whatever style checks that apply to the generic
5671 unit should apply, so it makes no sense to apply them in an instance.
5672 This was causing trouble when compiling an instance of a runtime
5673 unit that violates the -gnatyO switch.
5674 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5675 one of the two case statements, causing spurious errors.
5677 2011-08-02 Robert Dewar <dewar@adacore.com>
5679 * uname.adb: Minor reformatting.
5680 * gnatcmd.adb: Minor reformatting.
5681 * exp_attr.adb: Minor reformatting.
5683 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5685 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5686 No_Dispatching_Calls, do not look for the Assign primitive, because
5687 predefined primitives are not created in this case.
5689 2011-08-02 Bob Duff <duff@adacore.com>
5691 * stylesw.ads: Minor comment fixes.
5693 2011-08-02 Robert Dewar <dewar@adacore.com>
5695 * freeze.adb (Add_To_Result): New procedure.
5697 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5699 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5700 time, if the specific run-time routines for handling streams of strings
5701 are not available, use the default mechanism.
5703 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5705 * s-regpat.ads: Fix typo.
5707 2011-08-02 Vincent Celier <celier@adacore.com>
5709 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5710 not null, call it to create the in memory config project file without
5711 parsing an existing default config project file.
5713 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5715 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5717 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5719 * sem_elim.adb: an abstract subprogram does not need an eliminate
5720 pragma for its descendant to be eliminable.
5722 2011-08-02 Ed Falis <falis@adacore.com>
5724 * init.c: revert to handling before previous checkin for VxWorks
5725 * s-intman-vxworks.adb: delete unnecessary declarations related to
5726 using Ada interrupt facilities for handling signals.
5727 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5728 * s-intman-vxworks.ads: Import __gnat_install_handler as
5729 Initialize_Interrupts.
5730 * s-taprop-vxworks.adb: Delete Signal_Mask.
5731 (Abort_Handler): change construction of mask to unblock exception
5734 2011-08-02 Jerome Guitton <guitton@adacore.com>
5736 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5737 Debug_Raise_Exception before propagation starts.
5739 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5741 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5742 to Restriction_Check_Required.
5743 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5744 * sem_res.adb (Resolve_Call): Likewise.
5745 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5747 2011-08-02 Bob Duff <duff@adacore.com>
5749 * stylesw.ads: Update comment.
5750 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5751 * errout.ads: Remove obsolete comment.
5753 2011-08-02 Javier Miranda <miranda@adacore.com>
5755 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5756 (Set_Is_Safe_To_Reevaluate): new procedure.
5757 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5758 assignment is allowed on safe-to-reevaluate variables.
5759 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5760 temporary created to remove side effects in expressions that use
5761 the secondary stack as safe-to-reevaluate.
5762 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5763 variables that are not true constants.
5765 2011-08-02 Robert Dewar <dewar@adacore.com>
5767 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5768 sem_res.adb, sem_ch6.adb: Minor reformatting.
5770 2011-08-02 Jerome Guitton <guitton@adacore.com>
5772 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5776 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5777 not set Overridden_Operation if subprogram is an initialization
5780 2011-08-02 Yannick Moy <moy@adacore.com>
5782 * par-ch6.adb: Correct obsolete name in comments
5783 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5784 which takes two message arguments (existing function takes one), with
5785 second message used for continuation.
5786 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5787 block statements that originate from a source block statement, not
5788 generated block statements
5789 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5790 symmetry with procedure case
5791 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5792 function to issue an error in formal mode if a package specification
5793 contains more than one tagged type or type extension.
5794 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5795 parameters matching formals of tagged types are objects (or ancestor
5796 type conversions of objects), not general expressions. Issue an error
5797 on view conversions that are not involving ancestor conversion of an
5799 (Resolve_Type_Conversion): in formal mode, issue an error on the
5800 operand of an ancestor type conversion which is not an object
5801 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5802 procedure so that it works also for actuals of function calls
5803 (Is_Actual_Tagged_Parameter): new function which determines if its
5804 argument is an actual parameter of a formal of tagged type in a
5806 (Is_SPARK_Object_Reference): new function which determines if the tree
5807 referenced by its argument represents an object in SPARK
5809 2011-08-02 Robert Dewar <dewar@adacore.com>
5811 * sem_ch3.adb: Minor reformatting
5812 Minor comment addition
5813 Minor error msg text change
5815 2011-08-02 Javier Miranda <miranda@adacore.com>
5817 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5818 function. Used to be more precise when we generate a variable plus one
5819 assignment to remove side effects in the evaluation of the Bound
5821 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5822 of the bound expression to force its re-analysis and thus expand the
5823 associated transient scope (if required). Code cleanup replacing the
5824 previous code that declared the constant entity by an invocation to
5825 routine Force_Evaluation which centralizes this work in the frontend.
5827 2011-08-02 Robert Dewar <dewar@adacore.com>
5829 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5830 (Base_Type): Now uses improved Is_Base_Type function
5831 * einfo.ads (Base_Type): Inline this function
5833 2011-08-02 Robert Dewar <dewar@adacore.com>
5835 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5836 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5838 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5840 * gcc-interface/Make-lang.in: Update dependencies.
5841 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5844 2011-08-02 Yannick Moy <moy@adacore.com>
5846 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5847 non-simple expression used in delta constraint
5848 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5849 index constraint which is not a subtype mark
5850 * par.adb: With and use Restrict
5851 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5852 mode on component type which is not a subtype mark and default
5853 expression on component
5854 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5855 of string which does not have a lower index bound equal to 1
5856 (Array_Type_Declaration): issue an error in formal mode on index or
5857 component type which is not a subtype mark, and on aliased keyword on
5859 (Derived_Type_Declaration): issue an error in formal mode on interface,
5860 limited or abstract type
5861 (Record_Type_Declaration): issue an error in formal mode on interface
5862 (Record_Type_Definition): issue an error in formal mode on tagged types
5863 and type extensions not declared in the specification of a library unit
5864 package; on null non-tagged record; on variant part
5866 2011-08-02 Vincent Celier <celier@adacore.com>
5868 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5869 not declared for qualified library project when Library_Name is not
5870 declared, but Library_Dir is.
5872 2011-08-02 Robert Dewar <dewar@adacore.com>
5874 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5875 pragmas (affects aspects [Component_]Default_Value
5876 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5877 component type for the resolution
5879 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5881 * einfo.adb (Base_Type): Tune implementation for speed.
5883 2011-08-02 Robert Dewar <dewar@adacore.com>
5885 * freeze.adb: Minor reformatting.
5887 2011-08-02 Thomas Quinot <quinot@adacore.com>
5889 * scos.ads: Update comments.
5891 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5893 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5894 base type, because the parent may be a subtype of a private type whose
5895 convention is established in a private part.
5897 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5899 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5900 statement in a block when the expansion of the return expression has
5901 created a finalization chain.
5902 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5903 with the parent node.
5904 Add N_Extended_Return_Statement to handle the case where a transient
5905 object declaration appears in the Return_Object_Declarations list of
5906 an extended return statement.
5908 2011-08-02 Matthew Gingell <gingell@adacore.com>
5910 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5911 unused parameter 'name'.
5913 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5915 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5916 inherited operation, check whether its alias, which is the source
5917 operastion that it renames, has been marked eliminated.
5919 2011-08-02 Javier Miranda <miranda@adacore.com>
5921 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5922 in-mode parameter whose type is an access type since it can be used to
5923 modify its designated object. Enforce code that handles as safe an
5924 access type that is not access-to-constant but it is the result of a
5925 previous removal of side-effects.
5926 (Remove_Side_Effects): Minor code reorganization of cases which require
5927 no action. Done to incorporate documentation on new cases uncovered
5928 working in this ticket: no action needed if this routine was invoked
5929 too early and the nodes are not yet decorated.
5930 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5931 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5932 were issued with actuals that are implicitly provided by
5935 2011-08-02 Robert Dewar <dewar@adacore.com>
5937 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5939 2011-08-02 Yannick Moy <moy@adacore.com>
5941 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5942 to issue an error in formal mode on attribute not supported in this mode
5943 (Analyze_Attribute): issue errors on standard attributes not supported
5945 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5946 comment, and issue error in formal mode on modulus which is not a power
5948 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5950 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5952 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5953 operator on modular type (except 'not').
5955 2011-08-02 Robert Dewar <dewar@adacore.com>
5957 * gnat_rm.texi: Minor reformatting.
5959 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5961 * s-osinte-linux.ads: Minor comment update and reformatting.
5962 * i-cexten.ads: Make this unit pure, as for its parent.
5963 Will allow its usage in more contexts if needed.
5965 2011-08-02 Robert Dewar <dewar@adacore.com>
5967 * s-utf_32.ads: Minor comment fix.
5969 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5971 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5972 operation of a tagged synchronized type, handle the case where the
5973 controlling argument is overloaded.
5975 2011-08-02 Yannick Moy <moy@adacore.com>
5977 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5978 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5979 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5980 SPARK mode and formal verification mode on processing SPARK restriction
5981 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5982 requiring consistency checking.
5984 2011-08-02 Robert Dewar <dewar@adacore.com>
5986 * sem_res.adb: Minor reformatting.
5988 2011-08-02 Robert Dewar <dewar@adacore.com>
5990 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5991 a-cforse.ads: Remove unneeded with of Ada.Containers
5992 Remove commented out pragma Inline's
5993 Move specifications of new subprograms to the actual specs
5995 2011-08-02 Yannick Moy <moy@adacore.com>
5997 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5998 a-cforse.ads: Update comments.
6000 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6002 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
6004 2011-08-02 Robert Dewar <dewar@adacore.com>
6006 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6007 a-cforse.ads, a-cofove.ads: Minor reformatting.
6009 2011-08-02 Claire Dross <dross@adacore.com>
6011 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6012 a-cofove.ads: Add comments.
6014 2011-08-02 Yannick Moy <moy@adacore.com>
6016 * gnat_rm.texi: Document formal containers.
6018 2011-08-02 Emmanuel Briot <briot@adacore.com>
6020 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6023 2011-08-02 Robert Dewar <dewar@adacore.com>
6025 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6028 2011-08-02 Robert Dewar <dewar@adacore.com>
6030 * aspects.adb: New aspects Default_Value and Default_Component_Value
6031 New format of Aspect_Names table checks for omitted entries
6032 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6033 handling of boolean aspects for derived types.
6034 New aspects Default_Value and Default_Component_Value
6035 New format of Aspect_Names table checks for omitted entries
6036 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6037 (Has_Default_Value): New flag
6038 (Has_Default_Component_Value): New flag
6039 (Has_Default_Value): New flag
6040 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6042 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6043 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6044 Default_Value and Default_Component_Value
6045 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6046 New aspects Default_Value and Default_Component_Value
6047 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6048 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6050 2011-08-02 Vincent Celier <celier@adacore.com>
6052 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6053 inherit library kind.
6055 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6057 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6060 2011-08-02 Robert Dewar <dewar@adacore.com>
6062 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6064 2011-08-02 Yannick Moy <moy@adacore.com>
6066 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6068 2011-08-02 Robert Dewar <dewar@adacore.com>
6070 * impunit.adb: Add comment.
6072 2011-08-02 Yannick Moy <moy@adacore.com>
6074 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6075 qualification of aggregates in formal mode
6076 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6078 (Resolve_Aggregate): complete the test that an aggregate is adequately
6079 qualified in formal mode
6081 2011-08-02 Pascal Obry <obry@adacore.com>
6083 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6084 * mlib-prj.adb: Supress warning when compiling binder generated file.
6085 (Build_Library): Supress all warnings when compiling the binder
6088 2011-08-02 Yannick Moy <moy@adacore.com>
6090 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6092 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6093 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6094 Add with/use clauses to make Check_Formal_Restriction visible
6096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6098 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6099 in-parameters when type of the generic formal is private in the generic
6100 spec and non-private in the body.
6102 2011-08-02 Claire Dross <dross@adacore.com>
6104 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6105 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6106 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6107 * impunit.adb, Makefile.rtl: Take new files into account.
6109 2011-08-02 Robert Dewar <dewar@adacore.com>
6111 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6112 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6114 2011-08-02 Yannick Moy <moy@adacore.com>
6116 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6118 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6119 matching static array bounds, taking into account the special case of
6121 * sem_ch3.adb: Typo in comment.
6123 2011-08-02 Yannick Moy <moy@adacore.com>
6125 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6126 which issues an error in formal mode if its argument node is originally
6128 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6129 has a discriminant specification so that it does not include the case
6131 (Derived_Type_Declaration): move here the test that a derived type has a
6132 discriminant specification
6133 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6134 first element of a component association before accessing its choices
6135 (presence of component association is not enough)
6136 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6137 declaration is a library item before accessing the next element in a
6138 list, as library items are not member of lists
6139 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6140 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6141 Check_Formal_Restriction whenever possible.
6143 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6145 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6146 reference when needed.
6148 2011-08-02 Bob Duff <duff@adacore.com>
6150 * gnat_ugn.texi: Fix typo.
6152 2011-08-02 Vincent Celier <celier@adacore.com>
6154 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6155 archive file name. Do not use the full path name of archives for Open
6158 2011-08-02 Robert Dewar <dewar@adacore.com>
6160 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6161 Analyze_Aspect_Specifications
6163 (Analyze_Aspect_Specifications): New handling for boolean aspects
6164 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6165 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6166 sequence for Analyze_Aspect_Specifications
6167 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6168 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6170 2011-08-02 Robert Dewar <dewar@adacore.com>
6172 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6173 aspects, since these no longer exist.
6175 2011-08-02 Robert Dewar <dewar@adacore.com>
6177 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6178 semicolon, do not try to see if there are aspects following it.
6179 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6182 2011-08-02 Robert Dewar <dewar@adacore.com>
6184 * sem_ch8.adb, aspects.ads: Minor reformatting.
6186 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6188 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6189 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6191 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6193 2011-08-02 Yannick Moy <moy@adacore.com>
6195 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6196 mode on subprogram declaration outside of package specification, unless
6197 it is followed by a pragma Import
6198 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6199 Access_Type_Declaration): issue error in formal mode on access type
6200 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6202 (Analyze_Object_Declaration): issue error in formal mode on object
6203 declaration which does not respect SPARK restrictions
6204 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6205 declaration which does not respect SPARK restrictions
6206 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6207 error in formal mode on digits or delta constraint
6208 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6209 decimal fixed point type
6210 (Derived_Type_Declaration): issue error in formal mode on derived type
6211 other than type extensions of tagged record types
6212 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6213 with check on access definition
6214 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6215 mode on protected definition.
6216 (Analyze_Task_Definition): issue error in formal mode on task definition
6218 2011-08-02 Robert Dewar <dewar@adacore.com>
6220 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6222 2011-08-02 Javier Miranda <miranda@adacore.com>
6224 * sem_ch6.adb (Can_Override_Operator): New function.
6225 (Verify_Overriding_Indicator): Add missing code to check overriding
6226 indicator in operators. Fixes regression.
6227 (Check_Overriding_Indicator): Minor reformating after replacing the
6228 code that evaluates if the subprogram can override an operator by
6229 invocations to the above new function.
6231 (Write_Field26_Name): Add missing code to ensure that, following
6232 the documentation in einfo.ads, this field is not shown as attribute
6233 "Static_Initialization" on non-dispatching functions.
6235 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6237 * sem_res.adb (Resolve_Call): A call to
6238 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6239 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6240 i.e., when the second parameter is of type Time_Span.
6242 2011-08-02 Vincent Celier <celier@adacore.com>
6244 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6245 with an archive instead of -L<library dir> -l<library name>.
6247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6249 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6250 mark the base types In_Use in addition to making the operations
6253 2011-08-02 Ed Falis <falis@adacore.com>
6255 * init.c: add and setup __gnat_signal_mask for the exception signals
6256 * s-inmaop-vxworks.adb: new file.
6257 * s-intman-vxworks.adb: remove unnecessary initializations and
6259 * s-intman-vxworks.ads: remove unnecessary variable
6260 * s-taprop-vxworks.adb: simplify signal initialization
6262 2011-08-02 Robert Dewar <dewar@adacore.com>
6264 * sem_ch8.adb: Minor code reorganization, comment updates.
6266 2011-08-02 Robert Dewar <dewar@adacore.com>
6268 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6269 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6271 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6272 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6274 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6276 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6277 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6278 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6279 use_type_clauses, to handle more efficiently use_type and use_all_type
6281 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6282 Ada2012 Use_All_Type clause.
6283 (Use_Class_Wide_Operations): new procedure.
6285 2011-08-02 Robert Dewar <dewar@adacore.com>
6287 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6288 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6289 expression to expression function.
6291 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6293 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6294 if types are compatible.
6296 2011-08-02 Yannick Moy <moy@adacore.com>
6298 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6299 returns True if its argument array types have same dimension and same
6300 static bounds at each index.
6301 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6302 OUT or IN OUT paramaters which are not view conversions in SPARK.
6303 (Resolve_Arithmetic_Op): issue an error in formal mode on
6304 multiplication or division with operands of fixed point types which are
6305 not qualified or explicitly converted.
6306 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6307 Boolean or array type (except String) operands.
6308 (Resolve_Equality_Op): issue an error in formal mode on equality
6309 operators for array types other than String with non-matching static
6311 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6312 for array types with non-matching static bounds. Factorize the code in
6313 Matching_Static_Array_Bounds.
6314 (Resolve_Qualified_Expression): issue an error in formal mode on
6315 qualified expressions for array types with non-matching static bounds.
6316 (Resolve_Type_Conversion): issue an error in formal mode on type
6317 conversion for array types with non-matching static bounds
6319 2011-08-02 Robert Dewar <dewar@adacore.com>
6321 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6323 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6325 * par-ch9.adb: save location of entry for proper error message.
6327 2011-08-02 Javier Miranda <miranda@adacore.com>
6329 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6330 (Use_Full_View) which permits this routine to climb through the
6331 ancestors using the full-view of private parents.
6332 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6333 Use_Full_View to true in calls to Is_Ancestor.
6334 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6335 true in call to Is_Ancestor.
6336 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6337 Use_Full_View to true in call to Is_Ancestor.
6338 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6339 call to Is_Ancestor.
6340 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6341 Use_Full_View to true in calls to Is_Ancestor.
6342 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6343 Make_Select_Specific_Data_Table, Register_Primitive,
6344 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6345 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6346 to true in call to Is_Ancestor.
6347 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6348 Use_Full_View to true in calls to Is_Ancestor.
6350 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6351 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6353 2011-08-02 Robert Dewar <dewar@adacore.com>
6355 * gnat_rm.texi: Minor reformatting.
6356 * sem_prag.adb: Minor reformatting.
6358 2011-08-02 Tristan Gingold <gingold@adacore.com>
6360 * vms_data.ads: Add VMS qualifier for -gnateP.
6362 2011-08-02 Robert Dewar <dewar@adacore.com>
6364 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6365 * par-ch7.adb (P_Package): Proper placement of aspects for package
6367 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6368 (End_Statements): Add Is_Sloc parameterr
6369 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6370 (Check_End): Ad Is_Sloc parameter
6371 (End_Statements): Add Is_Sloc parameterr
6373 2011-08-02 Vincent Celier <celier@adacore.com>
6375 * ug_words: Add VMS qualifier equivalent to -gnateP:
6376 /SYMBOL_PREPROCESSING.
6378 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6380 * gnat-style.texi: For hexadecimal numeric literals the typical
6381 grouping of digits is 4 to represent 2 bytes.
6382 A procedure spec which is split into several lines is indented two
6385 2011-08-02 Yannick Moy <moy@adacore.com>
6387 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6388 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6389 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6391 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6392 choice in array aggregate
6393 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6395 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6396 positional and named aggregate for record, or others in record
6397 aggregate, or multiple choice in record aggregate
6398 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6399 array operands to logical operations AND, OR and XOR do not have the
6400 same static lower and higher bounds
6401 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6403 2011-08-01 Robert Dewar <dewar@adacore.com>
6405 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6406 Replaces Last_Source_Node_In_Sequence.
6407 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6408 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6409 parens and blank in string (this was inconsistently implemented).
6411 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6412 blank in string (this was inconsistently implemented).
6414 (Set_Global_Switches): Set formal mode switches appropriately
6415 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6417 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6418 call Set_Error_Msg_Lang to set "spark" as language name.
6419 * par.adb: Remove unnecessary call to set formal language for errout
6420 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6421 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6423 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6424 calls to it, moved after resolution so that types are known
6425 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6426 result of concatenation is not of type String
6427 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6428 concatenation is not properly restricted
6429 * gnat_rm.texi: Add doc on pragma Spark_95.
6430 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6431 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6432 * gcc-interface/Make-lang.in: Update dependencies.
6434 2011-08-01 Javier Miranda <miranda@adacore.com>
6436 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6437 condition that detects if the overridden operation must replace an
6440 2011-08-01 Javier Miranda <miranda@adacore.com>
6442 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6443 code declarations inserted by Insert_Actions in each alternative of the
6444 N_Case_Expression node.
6446 2011-08-01 Robert Dewar <dewar@adacore.com>
6448 * sem_ch6.adb: Minor code reorganization.
6449 * sem_util.adb: Minor reformatting.
6451 2011-08-01 Pascal Obry <obry@adacore.com>
6453 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6454 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6456 2011-08-01 Yannick Moy <moy@adacore.com>
6458 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6459 literal or operator symbol which is prefixed
6460 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6461 mode on access attributes.
6462 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6463 that concatenation operands are properly restricted in formal mode
6464 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6465 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6466 result of the concatenation has a type different from String.
6467 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6468 Analyze_Quantified_Expression, Analyze_Slice,
6469 Analyze_Null): issue an error in formal mode on unsupported constructs
6471 (Analyze_Block_Statement): only issue error on source block statement
6472 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6473 function which returns the last node in a list of nodes for which
6474 Comes_From_Source returns True, if any
6475 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6476 Last_Source_Node_In_Sequence
6477 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6478 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6479 mode on unsupported constructs
6480 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6481 rest of the actions may be needed later on since the error is marked as
6483 * sinfo.ads: Typos in comments.
6485 2011-08-01 Pascal Obry <obry@adacore.com>
6487 * projects.texi: Minor editing.
6489 2011-08-01 Yannick Moy <moy@adacore.com>
6491 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6492 insertion character ~~
6493 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6494 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6495 with insertion character ~~
6496 (Set_Msg_Text): treat insertion character ~~
6497 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6498 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6499 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6500 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6501 errors related to the formal language restriction not serious
6502 (insertion character |).
6503 * par.adb (Par): set formal language for error messages if needed
6504 * sem_ch6.adb (Check_Missing_Return): take into account possible
6505 generated statements at the end of the function
6506 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6507 enumeration value to define a new pragma SPARK_95
6508 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6509 SPARK_Version): new type and variables to store the SPARK version
6511 (SPARK_Mode): return True when SPARK_Version is set
6512 * par-prag.adb: Correct indentation
6513 (Prag): take Pragma_SPARK_95 into account
6514 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6517 2011-08-01 Robert Dewar <dewar@adacore.com>
6519 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6520 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6521 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6523 2011-08-01 Pascal Obry <obry@adacore.com>
6525 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6526 Target_Name to Get_Path call.
6527 (Parse_Single_Project): Likewise.
6528 (Post_Parse_Context_Clause): Likewise.
6529 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6530 Call Initialise_Project_Path with the proper Target_Name.
6531 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6533 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6534 with the proper Target_Name.
6535 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6537 (Parse_Project_And_Apply_Config): Likewise.
6538 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6539 This is fine as this part of the code is supporting only native
6541 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6542 is fine as this part of the code is supporting only native compilation.
6544 2011-08-01 Yannick Moy <moy@adacore.com>
6546 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6547 of homonym, unless the homonym is one of the cases allowed in SPARK
6548 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6549 package declaration occurring after a body.
6551 2011-08-01 Robert Dewar <dewar@adacore.com>
6553 * checks.adb, exp_ch4.adb: Minor reformatting.
6555 2011-08-01 Javier Miranda <miranda@adacore.com>
6557 * einfo.ads (Access_Disp_Table): Fix documentation.
6558 (Dispatch_Table_Wrappers): Fix documentation.
6560 2011-08-01 Pascal Obry <obry@adacore.com>
6562 * prj-env.adb, prj-env.ads: Minor reformatting.
6564 2011-08-01 Yannick Moy <moy@adacore.com>
6566 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6567 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6568 procedures out of these packages.
6569 * errout.ads, errout.adb
6570 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6571 procedures in of this package
6572 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6573 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6574 on misplaced later vs initial declarations, like in Ada 83
6575 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6576 formal mode on attribute of private type whose full type declaration
6578 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6579 package declaration inside a package specification
6580 (Analyze_Full_Type_Declaration): issue error in formal mode on
6581 controlled type or discriminant type
6582 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6583 user-defined operator means that it should come from the source
6584 (New_Overloaded_Entity): issue error in formal mode on overloaded
6586 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6588 2011-08-01 Thomas Quinot <quinot@adacore.com>
6590 * atree.adb: Minor reformatting.
6591 * checks.adb: Minor reformatting.
6593 2011-08-01 Vincent Celier <celier@adacore.com>
6595 * s-parame-vms-ia64.ads: Fix typo in comment
6597 * s-parame-vms-restrict.ads: Removed, unused.
6599 2011-08-01 Javier Miranda <miranda@adacore.com>
6602 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6604 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6605 * sem_ch3.ads, sem_ch3.adb
6606 (Is_Constant_Bound): New extended version of the subprogram that was
6607 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6608 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6609 * sem_aux.ads (Constant_Value): Fix typo in comment.
6610 * checks.adb (Generate_Index_Checks): New implementation which, for
6611 array objects with constant bounds, generates the runtime check
6612 referencing the bounds of the array type. For other cases this routine
6613 provides its previous behavior obtaining such values from the array
6615 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6617 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6618 we cannot have semantic interpretations of the new node.
6620 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6622 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6625 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6627 * sem_ch8.adb: Minor code editing.
6628 * s-vxwext.adb: Remove trailing space.
6629 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6630 consistency with other files.
6632 2011-08-01 Thomas Quinot <quinot@adacore.com>
6634 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6636 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6638 * par-ch10.adb: reject parameterized expressions as compilation unit.
6639 * sem_ch4.adb: handle properly conditional expression with overloaded
6640 then_clause and no else_clause.
6642 2011-08-01 Tristan Gingold <gingold@adacore.com>
6644 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6645 like done by System.Aux_DEC.
6646 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6648 2011-08-01 Yannick Moy <moy@adacore.com>
6650 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6651 missing label at end of declaration (subprogram or package)
6652 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6653 of positional and named parameter association
6654 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6655 Error_Msg_SP which adds a prefix to the error message giving the name
6656 of the formal language analyzed
6657 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6658 access result type in subprogram, unconstrained array as result type,.
6659 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6661 * sem_ch8.adb: Code clean up.
6663 2011-08-01 Javier Miranda <miranda@adacore.com>
6665 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6666 * einfo.ads (Access_Disp_Table): Fix documentation.
6667 (Dispatch_Table_Wrappers): Fix documentation.
6668 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6669 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6670 to enforce the documentation of this attribute.
6671 (Set_Is_Interface): Cleanup the assertion.
6672 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6673 the Underlying_Type entity before reading attribute Access_Disp_Table.
6674 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6675 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6676 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6677 the Underlying_Type entity before reading attribute Access_Disp_Table.
6678 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6679 Locate the Underlying_Type entity before reading attribute
6682 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6684 * s-poosiz.ads: Additional overriding indicators.
6686 2011-08-01 Yannick Moy <moy@adacore.com>
6688 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6690 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6691 parameter specification does not include a subtype mark.
6692 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6693 formal mode on abstract subprogram.
6694 (Analyze_Subprogram_Specification): issue error in formal mode on
6695 user-defined operator.
6696 (Process_Formals): issue error in formal mode on access parameter and
6698 * sem_ch9.adb (Analyze_Abort_Statement,
6699 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6700 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6701 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6702 Analyze_Requeue, Analyze_Selective_Accept,
6703 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6704 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6705 issue error in formal mode on user-defined raise statement.
6707 2011-08-01 Thomas Quinot <quinot@adacore.com>
6709 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6710 declaration being hidden when overriding an implicit inherited
6712 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6713 (-gnats), do not complain about a source file that contains only a
6716 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6718 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6719 variable if already set.
6721 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6723 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6724 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6725 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6726 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6727 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6728 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6729 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6730 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6731 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6732 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6733 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6734 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6735 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6736 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6737 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6738 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6739 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6740 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6741 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6742 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6743 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6744 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6745 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6746 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6747 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6748 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6749 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6750 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6751 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6752 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6753 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6754 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6755 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6756 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6757 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6758 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6759 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6760 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6761 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6762 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6763 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6764 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6765 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6766 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6767 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6768 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6769 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6770 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6771 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6772 Use GNAT instead of GNARL.
6774 2011-08-01 Bob Duff <duff@adacore.com>
6776 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6777 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6778 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6781 2011-08-01 Yannick Moy <moy@adacore.com>
6783 * debug.adb (d.D) reverve flag for the SPARK mode
6784 (d.E) reverve flag for SPARK generation mode
6785 (d.F) reverve flag for Why generation mode
6786 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6787 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6788 functions which return True when the corresponding modes are set
6789 (Formal_Language): return "spark" or "alfa" when in formal verification
6791 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6792 Error_Msg to prefix the error message with a tag giving the formal
6794 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6795 message with a tag giving the formal language
6796 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6798 (Analyze_Case_Statement): issue error in formal mode on case statement
6799 with a single "others" case alternative
6800 (Analyze_Exit_Statement): issue errors in formal mode on exit
6801 statements which do not respect SPARK restrictions
6802 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6803 (Check_Unreachable_Code): always issue an error (not a warning) in
6804 formal mode on unreachable code (concerns both code after an infinite
6805 loop and after an unconditional jump, both not allowed in SPARK)
6806 * sem_ch6.adb (Analyze_Return_Statement): add call to
6807 Set_Return_Present for a procedure containing a return statement
6808 (already done for functions in Analyze_Function_Return)
6809 (Analyze_Function_Return): issue error in formal mode on extended
6810 return or if return is not last statement in function
6811 (Check_Missing_Return): issue error in formal mode if function does
6812 not end with return or if procedure contains a return
6813 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6814 function to detect if there is an inner scope of its parameter S which
6817 2011-08-01 Thomas Quinot <quinot@adacore.com>
6819 * sem_ch6.ads: Minor reformatting.
6821 2011-08-01 Javier Miranda <miranda@adacore.com>
6823 * sem_util.adb (Abstract_Interface_List): Complete condition when
6824 processing private type declarations to avoid reading unavailable
6826 (Is_Synchronized_Tagged_Type): Complete condition when processing
6827 private extension declaration nodes to avoid reading unavailable
6830 2011-08-01 Thomas Quinot <quinot@adacore.com>
6832 * sem_ch3.adb: Minor reformatting.
6834 2011-08-01 Thomas Quinot <quinot@adacore.com>
6836 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6837 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6838 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6839 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6840 for VMS, instead parametrize the common implementation with
6841 System.Parameters declarations.
6843 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6845 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6847 2011-08-01 Tristan Gingold <gingold@adacore.com>
6849 * seh_init.c: Fix SEH handler installation on win64.
6851 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6853 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6854 double analysis of an anonymous access to subprogram, because it can
6855 lead to improper sharing of profiles and a back-end crash.
6857 2011-08-01 Robert Dewar <dewar@adacore.com>
6859 * make.adb, sem_ch4.adb: Minor reformatting.
6860 * gcc-interface/Make-lang.in: Update dependencies.
6861 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6863 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6865 * gnat_rm.texi: Fix definition of Long_Integer.
6867 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6869 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6870 to prevent storage exhaustion.
6871 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6872 finalized is a function body, insert the cleanup code before the final
6873 return statement, to prevent spurious warnings.
6874 * s-pooglo.ads: add overriding indicator.
6876 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6878 * sem_ch4.adb (Operator_Check): improve error message when both a
6879 with_clause and a use_clause are needed to make operator usage legal.
6880 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6881 determine whether a compilation unit is visible within an other,
6882 either through a with_clause in the current unit, or a with_clause in
6883 its library unit or one one of its parents.
6885 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6887 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6888 over an arbitrary expression of an array or container type.
6889 * lib-xref.adb: clarify comment.
6891 2011-08-01 Bob Duff <duff@adacore.com>
6893 * einfo.ads: Minor reformatting.
6894 * debug.adb: Minor comment improvement.
6896 2011-08-01 Javier Miranda <miranda@adacore.com>
6898 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6899 consider hidden subprograms as valid candidates.
6901 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6903 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6905 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6907 * gnat_ugn.texi: Fix typo.
6909 2011-08-01 Robert Dewar <dewar@adacore.com>
6911 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6912 lib-xref.adb: Minor reformatting
6914 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6916 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6917 when to generate a call to Move_Final_List.
6918 (Has_Controlled_Parts): Remove this function.
6920 2011-08-01 Geert Bosch <bosch@adacore.com>
6922 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6925 2011-08-01 Thomas Quinot <quinot@adacore.com>
6927 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6928 explicit raise of a predefined exception as Comes_From_Source if the
6929 original N_Raise_Statement comes from source.
6931 2011-08-01 Robert Dewar <dewar@adacore.com>
6933 * sinfo.ads: Add comment.
6934 * sem_ch6.adb: Minor reformatting.
6936 2011-08-01 Robert Dewar <dewar@adacore.com>
6938 * freeze.adb (Freeze_Entity): Refine check for bad component size
6939 clause to avoid rejecting confirming clause when atomic/aliased present.
6941 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6943 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6944 better determine whether an entity reference is a write.
6945 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6947 * lib-xref.adb (Output_References): Do no suppress a read reference at
6948 the same location as an immediately preceeding modify-reference, to
6949 handle properly in-out actuals.
6951 2011-08-01 Tristan Gingold <gingold@adacore.com>
6953 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6955 2011-08-01 Quentin Ochem <ochem@adacore.com>
6957 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6958 heap to compute the result.
6960 2011-08-01 Robert Dewar <dewar@adacore.com>
6962 * atree.ads: Minor reformatting.
6964 2011-08-01 Emmanuel Briot <briot@adacore.com>
6966 * g-expect.adb (Get_Command_Output): Fix memory leak.
6968 2011-08-01 Geert Bosch <bosch@adacore.com>
6970 * cstand.adb (P_Float_Type): New procedure to print the definition of
6971 predefined fpt types.
6972 (P_Mixed_Name): New procedure to print a name using mixed case
6973 (Print_Standard): Use P_Float_Type for printing floating point types
6974 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6975 precision IEEE float.
6977 2011-08-01 Thomas Quinot <quinot@adacore.com>
6979 * sem_ch3.adb: Minor reformatting.
6981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6983 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6984 the completion of a generic function, insert the new body rather than
6985 rewriting the original.
6987 2011-08-01 Yannick Moy <moy@adacore.com>
6989 * sinfo.ads, errout.ads: Typos in comments.
6991 2011-08-01 Robert Dewar <dewar@adacore.com>
6993 * par-endh.adb: Minor reformatting.
6995 2011-08-01 Robert Dewar <dewar@adacore.com>
6997 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6998 (Pre_Post_Aspects): New subtype.
6999 * par-ch12.adb (P_Generic): New syntax for aspects in packages
7000 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
7001 * par-ch7.adb (P_Package): Remove Decl parameter
7002 (P_Package): Handle new syntax for aspects (before IS)
7003 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
7005 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
7006 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
7007 (P_Package): Remove Decl parameter
7008 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7010 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7012 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7013 * sinfo.ads: Document new syntax for aspects in packages etc.
7014 * sprint.adb: Handle new syntax of aspects before IS in package
7016 2011-08-01 Thomas Quinot <quinot@adacore.com>
7018 * atree.ads: Minor reformatting.
7019 * sem_prag.adb: Minor reformatting.
7021 2011-08-01 Robert Dewar <dewar@adacore.com>
7023 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7024 case expr alternative.
7026 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7028 * sem_ch12.adb: Fix typo.
7030 2011-08-01 Geert Bosch <bosch@adacore.com>
7032 * sem_prag.adb (Check_No_Link_Name): New procedure.
7033 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7034 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7035 instead of Standard_Long_Long_Float_Size global. Preparation for
7036 eventual removal of per type constants.
7037 * exp_util.ads (Get_Stream_Size): New function returning the stream
7038 size value of subtype E.
7039 * exp_util.adb (Get_Stream_Size): Implement new function.
7040 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7042 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7044 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7046 2011-08-01 Geert Bosch <bosch@adacore.com>
7048 * cstand.adb: Fix comments.
7049 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7052 2011-08-01 Robert Dewar <dewar@adacore.com>
7054 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7056 2011-08-01 Geert Bosch <bosch@adacore.com>
7058 * atree.ads: Fix comment.
7060 2011-08-01 Robert Dewar <dewar@adacore.com>
7062 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7063 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7064 * par.adb: Add with for Namet.Sp.
7065 * par-tchk.adb: Minor reformatting.
7067 2011-08-01 Vincent Celier <celier@adacore.com>
7069 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7070 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7071 of the init procedure of a SAL.
7072 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7075 2011-08-01 Thomas Quinot <quinot@adacore.com>
7077 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7080 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7082 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7084 2011-08-01 Thomas Quinot <quinot@adacore.com>
7086 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7087 conformant with its spec (return True only for types that have
7088 an overriding Initialize primitive operation that prevents them from
7089 having preelaborable initialization).
7090 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7091 initialization for controlled types in Ada 2005 or later mode.
7093 2011-08-01 Robert Dewar <dewar@adacore.com>
7095 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7097 (Same_Aspect): New function.
7098 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7099 Type_Invariant, Precondition, Postcondition.
7100 * snames.ads-tmpl: Add Name_Type_Invariant.
7102 2011-08-01 Robert Dewar <dewar@adacore.com>
7104 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7106 (Freeze_All_Ent): Fix error in handling inherited aspects.
7107 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7108 already analyzed, but don't skip entire processing of a declaration,
7109 that's wrong in some cases of declarations being rewritten.
7110 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7111 Don't delay for integer, string literals
7112 Treat predicates in usual manner for delay, remove special case code,
7114 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7115 (Build_Predicate_Function): Update saved expression in aspect
7116 (Build_Invariant_Procedure): Update saved expression in aspect
7117 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7118 of replacement of discriminant references if the reference is simple.
7120 2011-08-01 Robert Dewar <dewar@adacore.com>
7122 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7123 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7124 Static_Predicate and Dynamic_Predicate.
7125 (Build_Predicate_Function): Add processing for Static_Predicate
7126 and Dynamic_Predicate.
7127 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7128 (From_Static_Predicate): New flag
7129 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7131 2011-08-01 Robert Dewar <dewar@adacore.com>
7133 * usage.adb: Documentation cleanup for Ada version modes in usage.
7134 * expander.adb: Minor reformatting.
7136 2011-08-01 Robert Dewar <dewar@adacore.com>
7138 * atree.ads: Minor comment fix.
7139 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7140 a-witeio.ads, sem_prag.adb: Minor reformatting.
7142 2011-08-01 Doug Rupp <rupp@adacore.com>
7144 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7145 pointers. Use descrip.h header file for convenience. Add some
7148 2011-08-01 Robert Dewar <dewar@adacore.com>
7150 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7151 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7152 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7154 (Check_Aspect_At_End_Of_Declarations): New procedure
7155 (Analye_Aspect_Specification): Minor changes for above procedures
7156 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7157 specification node as well.
7159 2011-08-01 Pascal Obry <obry@adacore.com>
7161 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7162 Windows files. Use GetFilesAttributes() in this case to check for file
7163 existence instead of returning with an error code.
7165 2011-08-01 Vincent Celier <celier@adacore.com>
7167 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7168 High is above Source length.
7170 2011-08-01 Robert Dewar <dewar@adacore.com>
7172 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7174 2011-08-01 Robert Dewar <dewar@adacore.com>
7176 * aspects.ads (Boolean_Aspects): New subtype.
7177 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7178 for derived types in cases where the parent type and derived type have
7180 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7181 with aspects when parent type also has aspects.
7182 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7183 boolean expression at this point).
7184 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7185 accordance with final decision on the Ada 2012 feature.
7186 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7188 2011-08-01 Matthew Heaney <heaney@adacore.com>
7190 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7192 2011-08-01 Pascal Obry <obry@adacore.com>
7194 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7195 Fix Replace_Slice when High is above current string size.
7196 (Replace_Slice): Fix DL computation when High is above current
7199 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7201 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7203 2011-08-01 Matthew Heaney <heaney@adacore.com>
7205 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7208 2011-08-01 Pascal Obry <obry@adacore.com>
7210 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7213 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7215 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7216 access to protected subprograms in generic bodies.
7217 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7218 protected type, indicate that the convention of the subprogram is
7219 Convention_Protected, because it may be used in subsequent declarations
7220 within the protected declaration.
7222 2011-08-01 Vincent Celier <celier@adacore.com>
7224 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7225 and "final" procedures when the name of the library is "ada", to avoid
7226 duplicate symbols "adainit" and "adafinal" in executables.
7228 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7230 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7231 quantified expression that appears within a postcondition and uses the
7232 Ada2012 'Result attribute.
7234 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7236 * init.c (__gnat_error_handler): Cast reason to int.
7237 (__gnat_install_handler): Explain sa_sigaction use.
7239 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7241 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7242 subprogram has copy-in copy-out parameters, try to promote the mode of
7243 the return type if it is passed in registers.
7245 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7247 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7248 left operand as addressable.
7250 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7252 * gcc-interface/gigi.h (build_function_stub): Remove.
7253 (build_return_expr): Likewise.
7254 (convert_vms_descriptor): Declare.
7255 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7256 (build_function_stub): Move to...
7257 * gcc-interface/utils2.c (build_return_expr): Move to...
7258 * gcc-interface/trans.c (build_function_stub): ...here.
7259 (build_return_expr): ...here.
7260 (Subprogram_Body_to_gnu): Add local variable for language_function.
7261 Disconnect the parameter attributes cache, if any, once done with it.
7262 Call end_subprog_body only after setting the end_locus.
7263 Build the stub associated with the function, if any, at the very end.
7264 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7265 variables and streamline control flow.
7267 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7270 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7273 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7276 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7277 Assign to act.sa_sigaction.
7278 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7279 current->return_address to char * before arithmetic.
7281 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7283 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7284 Correct argument types.
7285 Extract code from reason.
7286 (__gnat_install_handler): Assign to act.sa_sigaction.
7288 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7290 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7291 (GNAT1_OBJS): ...here.
7293 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7296 * g-socthi-mingw.adb (Fill): Fix formatting.
7298 * gcc-interface/gigi.h: Move around comment.
7300 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7303 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7305 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7308 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7310 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7312 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7313 range comparison if Pmode is SImode.
7315 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7316 Eric Botcazou <ebotcazou@adacore.com>
7318 * adadecode.c: Wrap up in extern "C" block.
7319 * adadecode.h: Likewise.
7320 * adaint.c: Likewise. Remove 'const' keyword.
7321 * adaint.h: Likewise.
7323 * atree.h: Likewise.
7325 * cstreams.c: Likewise.
7329 * final.c: Likewise.
7331 * initialize.c: Likewise.
7333 * namet.h: Likewise.
7334 * nlists.h: Likewise.
7335 * raise.c: Likewise.
7336 * raise.h: Likewise.
7337 * repinfo.h: Likewise.
7338 * seh_init.c: Likewise.
7339 * targext.c: Likewise.
7340 * tracebak.c: Likewise.
7341 * uintp.h: Likewise.
7342 * urealp.h: Likewise.
7343 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7344 * xsinfo.adb: Likewise.
7345 * xsnamest.adb: Likewise.
7346 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7347 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7348 * gcc-interface/misc.c: Likewise.
7349 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7350 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7351 ada/targext.o here...
7352 (GNAT_ADA_OBJS): ...and not here.
7353 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7354 (GNATBIND_OBJS): Reorder.
7356 2011-07-07 Richard Henderson <rth@redhat.com>
7358 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7359 dwarf2out_frame_init.
7361 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7363 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7365 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7368 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7370 2011-07-06 Richard Guenther <rguenther@suse.de>
7372 * gcc-interface/misc.c (gnat_init): Merge calls to
7373 build_common_tree_nodes and build_common_tree_nodes_2.
7374 Re-initialize boolean_false_node.
7376 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7377 Olivier Hainque <hainque@adacore.com>
7378 Nicolas Setton <setton@adacore.com>
7380 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7381 the type according to the ARTIFICIAL_P parameter.
7382 (create_type_decl): Likewise.
7383 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7385 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7387 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7388 (gnatbind): Likewise.
7390 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7392 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7394 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7396 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7397 local variable throughout. Remove useless call to Base_Type.
7398 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7399 Take it also into account for the volatileness of the field. Set the
7400 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7402 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7404 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7405 on a dereference built for a by-ref object if it has an address clause.
7407 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7409 * einfo.ads (Address_Taken): Document use for the second argument of
7410 Asm_Input and Asm_Output attributes.
7411 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7412 argument is an entity name, then set Address_Taken on it.
7413 <Attribute_Asm_Output>: Likewise.
7414 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7415 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7416 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7417 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7419 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7422 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7424 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7426 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7427 (ada/utils.o): Update dependencies.
7428 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7429 ../../../libcpp/libcpp.a.
7430 * gcc-interface/utils.c: Include common/common-target.h.
7431 (process_attributes): Use targetm_common.have_named_sections.
7433 2011-06-07 Richard Guenther <rguenther@suse.de>
7435 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7438 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7440 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7441 TREE_THIS_NOTRAP flag.
7443 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7445 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7448 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7450 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7451 constants whose full view has discriminants specially.
7453 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7455 * gcc-interface/utils.c: Include diagnostic.h.
7456 (gnat_write_global_declarations): Output debug information for all
7457 global type declarations before finalizing the compilation unit.
7458 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7460 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7462 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7464 2011-05-25 Kai Tietz <ktietz@redhat.com>
7466 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7467 initialization instead of const/none-const pointer assignment.
7469 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7471 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7472 $(EXTRA_GNAT1_OBJS).
7473 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7474 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7475 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7476 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7477 libcommon-target.a instead of prefix.o.
7479 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7482 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7484 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7486 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7487 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7488 instead of version.o.
7490 2011-05-18 Kai Tietz <ktietz@redhat.com>
7492 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7493 boolean_false_node instead of integer_zero_node.
7494 (convert_with_check): Likewise.
7495 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7497 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7499 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7500 type of the parameter is an unconstrained array, convert the actual to
7501 the type of the formal in the In Out and Out cases as well.
7503 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7505 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7506 call build_function_type_array or build_varargs_function_type_array
7508 (create_subprog_type): Don't call build_function_type; call
7509 build_function_type_vec instead.
7511 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7513 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7514 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7515 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7517 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7519 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7521 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7522 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7524 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7526 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7528 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7530 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7531 instead of accessing TYPE_ARG_TYPES directly.
7532 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7534 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7537 * gcc-interface/gigi.h (get_variant_part): Declare.
7538 * gcc-interface/decl.c (get_variant_part): Make global.
7539 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7540 types have the same constant size, are record types and T1 has a
7541 variant part while T2 doesn't.
7543 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7545 * gcc-interface/utils.c (begin_subprog_body): Do not call
7547 (end_subprog_body): Likewise.
7549 2011-05-04 Richard Guenther <rguenther@suse.de>
7551 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7553 (pos_to_constructor): Likewise.
7555 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7556 Eric Botcazou <ebotcazou@adacore.com>
7558 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7559 of build_function_type. Adjust calls to...
7560 (build_raise_check): ...this. Do not take a void_tree parameter.
7561 Call build_function_type_list instead of build_function_type.
7562 Fix head comment and swap couple of conditional blocks.
7564 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7566 * gnatvsn.ads (Library_Version): Bump to 4.7.
7567 (Current_Year): Bump to 2011.
7569 2011-04-29 Michael Matz <matz@suse.de>
7571 * gcc-interface/misc.c (gnat_handle_option): Set
7572 warn_maybe_uninitialized.
7574 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7576 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7577 the Watson/McCabe paper.
7579 2011-04-23 Jim Meyering <meyering@redhat.com>
7581 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7583 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7585 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7588 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7590 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7592 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7593 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7594 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7595 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7596 <all>: Do not set flags on the reused DECL node coming from an alias.
7597 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7598 don't need debug info here...
7599 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7600 (gigi): Adjust calls to create_subprog_decl.
7601 (build_raise_check): Likewise.
7602 (establish_gnat_vms_condition_handler): Likewise.
7603 (Compilation_Unit_to_gnu): Likewise.
7604 (gnat_to_gnu): Likewise.
7606 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7608 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7609 (NO_REORDER_ADAFLAGS): New variable.
7610 (EXTRA_GNATTOOLS): Always define.
7611 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7612 Clean up and adjust list of files compiled with special options.
7613 * gcc-interface/Make-lang.in: Likewise.
7614 (ada/decl.o): Cosmetical change.
7615 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7617 2011-04-20 Jim Meyering <meyering@redhat.com>
7619 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7621 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7623 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7624 $(CFLAGS) on the link line.
7626 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7628 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7629 padded type built for the return type if it is unconstrained.
7631 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7633 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7635 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7637 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7638 before calling TREE_CHAIN.
7639 * gcc-interface/misc.c (gnat_init_ts): New function.
7640 (LANG_HOOKS_INIT_TS): Define.
7642 2011-04-12 Martin Jambor <mjambor@suse.cz>
7644 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7645 instead of cgraph_node.
7647 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7649 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7650 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7653 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7655 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7656 of aggregate types that contain a placeholder.
7658 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7660 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7662 (handle_type_generic_attribute): Likewise.
7664 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7667 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7669 2011-04-04 Kai Tietz <ktietz@redhat.com>
7672 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7675 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7677 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7678 type case, do not strip a padding type around the array type.
7680 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7682 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7685 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7687 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7688 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7689 code for -feliminate-unused-debug-types.
7690 (gnat_post_options): Likewise.
7692 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7694 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7695 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7698 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7700 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7701 DECL_ARTIFICIAL flag on enumeration types.
7703 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7705 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7706 fat pointer types artificial unconditionally.
7707 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7710 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7712 * gcc-interface/gigi.h (get_dummy_type): Declare.
7713 (build_dummy_unc_pointer_types): Likewise.
7714 (finish_fat_pointer_type): Likewise.
7715 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7716 fat pointer type has been built, complete it in place.
7717 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7718 and thin pointers. Remove useless variable.
7719 (finish_fat_pointer_type): Make global and move to...
7720 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7721 (get_dummy_type): New function.
7722 (build_dummy_unc_pointer_types): Likewise.
7723 (gnat_pushdecl): Propage the name to the anonymous variants only.
7724 (update_pointer_to): Only adjust the pointer types in the unconstrained
7727 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7729 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7730 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7731 if this is a Taft amendment type and the full declaration is available.
7732 * gcc-interface/trans.c (process_type): Likewise.
7733 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7734 (process_freeze_entity): Likewise.
7735 * gcc-interface/utils.c (dummy_global): New static variable.
7736 (gnat_write_global_declarations): If there are types declared as used
7737 at the global level, insert them in the global hash table.
7739 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7741 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7742 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7743 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7745 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7746 flag of the type accordingly.
7747 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7749 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7751 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7752 finalizing types when updating the pointers to the designated type.
7753 <all>: Finalize the deferred types even if we didn't defer processing
7754 of incomplete types in this invocation.
7756 2011-04-01 Olivier Hainque <hainque@adacore.com>
7757 Nicolas Setton <setton@adacore.com>
7758 Eric Botcazou <ebotcazou@adacore.com>
7760 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7761 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7763 2011-03-28 Kai Tietz <ktietz@redhat.com>
7765 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7767 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7768 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7770 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7772 2011-03-28 Tristan Gingold <gingold@adacore.com>
7775 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7776 Use ada output of gnatbind.
7777 (ada/b_gnatb.adb): Ditto.
7778 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7779 (ada.mostlyclean, ada.stage1)
7780 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7781 (ada.stagefeedback): Adjust.
7782 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7783 Use ada output of gnatbind.
7784 (b_gnatm.adb): Ditto.
7785 (b_gnatl.o, b_gnatm.o): New rules.
7787 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7789 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7790 for the padded type built to support a specified size or alignment.
7792 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7794 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7795 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7796 unconditionally to the end of the unit when the designated type is
7798 <all>: Rename local variable. Attempt to un-defer types only and do it
7799 for limited_with'ed types as well.
7800 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7801 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7802 consistently and remove redundant call to finalize_from_with_types.
7804 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7806 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7807 subprograms without a previous spec declared in the same unit.
7808 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7809 subprograms at the end of the unit instead of at the beginning.
7810 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7811 isn't public for the special handling of non-inline functions nested
7812 inside inline external functions.
7814 2011-03-25 Jeff Law <law@redhat.com>
7816 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7818 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7820 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7821 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7822 to compute Set_Size_Depends_On_Discriminant.
7823 (Layout_Type): Call it on array types in back-end layout mode.
7824 * sem_util.adb (Requires_Transient_Scope): Return true for array
7825 types only if the size depends on the value of discriminants.
7826 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7827 type if the RHS is a call to a function that returns an unconstrained
7828 type with default discriminant.
7830 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7832 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7833 non-conversion to the nominal result type at the end.
7835 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7837 * gcc-interface/trans.c (create_temporary): New function taken from...
7838 (create_init_temporary): ...here. Call it.
7839 (call_to_gnu): Create the temporary for the return value early, if any.
7840 Create it for a function with copy-in/copy-out parameters if there is
7841 no target; in other cases of copy-in/copy-out, use another temporary.
7842 Push the new binding level lazily. Add and rename local variables.
7844 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7846 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7848 (set_rm_size): Likewise.
7850 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7852 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7853 for the padded type built in order to support a specified alignment.
7854 Fix incorrect formatting.
7856 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7859 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7861 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7863 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7864 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7865 to the end of the list. Adjust recursive call. Rename local variable.
7866 If REORDER is true, reorder components of the record type.
7867 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7868 components_to_record and adjust the parameter list.
7870 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7872 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7873 disabled, use the variable for bounds of loop iteration scheme.
7875 2011-03-21 Kai Tietz <ktietz@redhat.com>
7878 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7880 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7882 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7883 out whether the expression is read-only. Short-circuit placeholder
7884 case and rename a couple of local variables.
7886 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7888 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7889 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7890 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7891 (convert): Deal with conversions from a smaller form type specially.
7893 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7895 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7896 its argument, except for the special -I- switch.
7898 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7900 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7903 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7905 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7907 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7909 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7911 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7912 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7913 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7914 Do not generate the check directly, instead instantiate the template
7915 check present in the descriptor.
7916 (make_descriptor_field): Move around.
7917 (build_vms_descriptor32): Build a template check in the POINTER field.
7918 (build_vms_descriptor): Remove useless suffixes.
7919 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7921 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7924 * targext.c: Include target files if IN_RTS is defined.
7926 2011-01-26 Richard Guenther <rguenther@suse.de>
7929 * targext.c: Include config.h.
7930 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7933 2011-01-04 Pascal Obry <obry@adacore.com>
7934 Eric Botcazou <ebotcazou@adacore.com>
7936 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7938 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7940 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7941 end-of-case on the end label and its associated gotos, if any.
7943 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7945 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7946 expressions of the parameter cache within the statement group of
7949 2011-01-04 Olivier Hainque <hainque@adacore.com>
7950 Eric Botcazou <ebotcazou@adacore.com>
7952 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7953 (set_end_locus_from_node): New function.
7954 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7955 make and the function end_locus.
7956 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7957 for the elaboration subprogram.
7958 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7959 set the end_locus of the expression as well.
7961 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7964 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7965 variables that are referenced in exception handlers volatile.
7969 Copyright (C) 2011 Free Software Foundation, Inc.
7971 Copying and distribution of this file, with or without modification,
7972 are permitted in any medium without royalty provided the copyright
7973 notice and this notice are preserved.
7975 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7976 - fix bugs in the description of Source_Trace;
7977 - get rid of UNIT_NAME;
7979 2011-08-02 Javier Miranda <miranda@adacore.com>
7982 (Build_Dispatching_Requeue): Adding support for VM targets
7983 since we cannot directly reference the Tag entity.
7984 * exp_sel.adb (Build_K): Adding support for VM targets.
7985 (Build_S_Assignment): Adding support for VM targets.
7987 (Default_Prim_Op_Position): In VM targets do not restrict availability
7988 of predefined interface primitives to compiling in Ada 2005 mode.
7989 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7990 restricted to compiling in Ada 2005 mode.
7991 (Make_VM_TSD): Generate code that declares and initializes the OSD
7992 record. Needed to support dispatching calls through synchronized
7995 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7996 primitives associated with synchronized interfaces.
7997 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7998 primitives associated with synchronized interfaces.
8000 2011-08-02 Yannick Moy <moy@adacore.com>
8002 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8003 statements hidden in SPARK if preceded by the HIDE directive
8004 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8005 exception handlers as hidden in SPARK if preceded by the HIDE directive
8006 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8007 if starting with the HIDE directive
8008 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8009 starting with the HIDE directive; mark the declarations in a private
8010 part as hidden in SPARK if the private part starts with the HIDE
8012 * restrict.adb, restrict.ads
8013 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8014 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8015 argument node belongs to a part which is hidden in SPARK
8016 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8017 parts in SPARK; protect the possibly costly call to
8018 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8019 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8020 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8021 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8023 (Scan): recognize special comment starting with '#' and followed by
8024 SPARK keyword "hide" as a HIDE directive.
8026 2011-08-02 Yannick Moy <moy@adacore.com>
8028 * types.ads, erroutc.ads: Minor reformatting.
8030 2011-08-02 Vincent Celier <celier@adacore.com>
8032 * link.c: Add response file support for cross platforms.
8034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8036 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8037 in an association, set parent field of copy before partial analysis.
8038 * sem_res.adb (Resolve_Slice): create reference to itype only when
8039 expansion is enabled.
8041 2011-08-02 Yannick Moy <moy@adacore.com>
8043 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8044 for new flag denoting which subprogram bodies are in ALFA
8045 * restrict.adb, sem_ch7.adb: Update comment
8046 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8047 sem_ch9.adb, sem_res.adb: Add calls to
8048 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8049 * sem_ch6.adb (Analyze_Function_Return): add calls to
8050 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8051 middle of the body, and extended return.
8052 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8053 False when missing return.
8054 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8055 to True for subprograms whose spec is in ALFA. Remove later on the flag
8056 on the entity used for a subprogram body when there exists a separate
8058 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8059 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8060 False, otherwise do nothing.
8062 2011-08-02 Robert Dewar <dewar@adacore.com>
8064 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8066 2011-08-02 Yannick Moy <moy@adacore.com>
8068 * sem_ch4.ads: minor formatting.
8070 2011-08-02 Yannick Moy <moy@adacore.com>
8072 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8073 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8074 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8075 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8076 opt.ads: cleanup of SPARK mode
8078 2011-08-02 Yannick Moy <moy@adacore.com>
8080 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8082 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8083 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8085 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8086 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8087 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8088 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8090 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8092 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8093 functions whose return type is not in ALFA.
8094 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8096 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8097 parameter's type is not in ALFA.
8098 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8101 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8103 * sem_ch6 (Analyze_Expression_Function): treat the function as
8104 Inline_Always, and introduce a subprogram declaration for it when it is
8106 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8107 expression functions, so that the back-end can determine whether they
8108 can in fact be inlined.
8109 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8110 a function body comes from an expression function.
8112 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8114 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8115 null exclusions to test Can_Never_Be_Null on the anonymous access types
8116 of the formals rather than testing the formals themselves. Exclude this
8117 check in cases where the Old_Formal is marked as a controlling formal,
8118 to avoid issuing spurious errors for bodies completing dispatching
8119 operations (due to the flag not getting set on controlling access
8120 formals in body specs).
8121 (Find_Corresponding_Spec): When checking full and subtype conformance of
8122 subprogram bodies in instances, pass Designated and E in that order, for
8123 consistency with the expected order of the formals (New_Id followed by
8126 2011-08-02 Robert Dewar <dewar@adacore.com>
8128 * sem_ch8.adb: Minor reformatting.
8130 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8132 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8133 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8134 primitive operations of class-wide actuals.
8136 2011-08-02 Javier Miranda <miranda@adacore.com>
8138 * exp_atag.ads, exp_atag.adb
8139 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8140 since its value is implicitly passed in argument Typ.
8141 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8142 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8143 Build_Common_Dispatching_Select_Statements.
8145 2011-08-02 Robert Dewar <dewar@adacore.com>
8147 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8148 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8151 2011-08-02 Robert Dewar <dewar@adacore.com>
8153 * sem_res.adb: Minor reformatting.
8154 * sem_prag.adb: Minor reformatting.
8156 2011-08-02 Javier Miranda <miranda@adacore.com>
8158 * exp_atag.adb, exp_atags.ads
8159 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8160 by the tagged type Entity. Required to use this routine in the VM
8161 targets since we do not have available the Tag entity in the VM
8164 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8165 Ada.Tags has not been previously loaded.
8167 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8168 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8170 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8171 view of enclosing scopes. Required to handle enclosing scopes that
8172 are synchronized types whose full view is a task type.
8174 (Build_VM_TSDs): Minor code improvement to avoid generating and
8175 analyzing lists with empty nodes.
8176 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8177 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8178 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8179 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8180 (Make_Select_Specific_Data_Table): Add support for VM targets.
8181 (Make_VM_TSD): Generate code to initialize the SSD structure of
8184 2011-08-02 Yannick Moy <moy@adacore.com>
8186 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8187 cross-references section in ALI.
8188 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8189 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8191 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8192 subprogram or package entity of a node
8193 (Is_Local_Reference_Type): new function returns True for references
8194 selected in local cross-references.
8195 (Lt): function extracted from Lt in Output_References
8196 (Write_Entity_Name): function extracted from Output_References
8197 (Generate_Definition): generate reference with type 'D' for definition
8198 of objects (object declaration and parameter specification), with
8199 appropriate locations and units, for use in local cross-references.
8200 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8201 references of type 'I' for initialization in object definition.
8202 (Output_References): move part of function Lt and procedure
8203 Write_Entity_Name outside of the body. Ignore references of types 'D'
8204 and 'I' introduced for local cross-references.
8205 (Output_Local_References): new procedure to output the local
8206 cross-references sections.
8207 (Lref_Entity_Status): new array defining whether an entity is a local
8208 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8209 with 'I' type when initialization expression is present.
8210 * get_scos.adb, get_scos.ads: Correct comments and typos
8212 2011-08-02 Javier Miranda <miranda@adacore.com>
8214 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8216 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8218 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8221 2011-08-02 Vincent Celier <celier@adacore.com>
8223 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8224 (No_Space_Img): New function
8225 (Find_Excluded_Sources): When reading from a file, record the file name
8226 and the line number for each excluded source.
8227 (Mark_Excluded_Sources): When reporting an error, if the excluded
8228 sources were read from a file, include file name and line number in
8231 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8233 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8235 2011-08-02 Robert Dewar <dewar@adacore.com>
8237 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8239 2011-08-02 Javier Miranda <miranda@adacore.com>
8241 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8242 generation of TSDs to the DOTNET compiler.
8243 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8244 generation of TSDs to the DOTNET compiler.
8246 2011-08-02 Javier Miranda <miranda@adacore.com>
8248 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8249 record of all the tagged types declared inside library level package
8250 declarations, library level package bodies or library level subprograms.
8251 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8252 associated with a given tagged type.
8253 (Build_VM_TSDs): New subprogram.
8254 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8255 compilation units that are subprograms.
8256 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8257 compilation units that are package bodies.
8258 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8259 units that are a package declaration or a package instantiation.
8260 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8261 reorganization to improve the error generated by the frontend when the
8262 function Ada.Tags.Secondary_Tag is not available.
8263 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8264 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8266 2011-08-02 Javier Miranda <miranda@adacore.com>
8268 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8270 2011-08-02 Robert Dewar <dewar@adacore.com>
8272 * s-imenne.ads: Minor reformatting.
8274 2011-08-02 Robert Dewar <dewar@adacore.com>
8276 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8277 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8278 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8280 2011-08-02 Robert Dewar <dewar@adacore.com>
8282 * einfo.ads (Materialize_Entity): Document this is only for renamings
8283 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8284 required debug information in the case where we transform the object
8285 declaration into a renaming declaration.
8286 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8288 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8291 2011-08-02 Robert Dewar <dewar@adacore.com>
8293 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8294 Suppress_Init_Procs.
8295 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8296 Suppress_Initialization/Initialization_Suppressed.
8297 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8298 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8299 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8300 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8302 2011-08-02 Robert Dewar <dewar@adacore.com>
8304 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8307 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8309 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8310 only have inheritable classwide pre/postconditions.
8312 2011-08-02 Javier Miranda <miranda@adacore.com>
8314 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8315 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8316 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8317 checks if the external tag of a type is the same as the external tag
8318 of some other declaration.
8320 2011-08-02 Thomas Quinot <quinot@adacore.com>
8322 * s-taskin.ads: Minor reformatting.
8324 2011-08-02 Emmanuel Briot <briot@adacore.com>
8326 * g-comlin.adb (Display_Help): swap the order in which it prints the
8327 short help and the general usage.
8329 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8331 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8332 the aspect declarations and attach them to the generic copy for
8333 subsequent analysis.
8334 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8335 declarations of the generic tree to the new subprogram declarations.
8336 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8337 conditions that apply to a subprogram instance.
8339 2011-08-02 Robert Dewar <dewar@adacore.com>
8341 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8343 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8345 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8346 private type with a tagged full view is not derived in the immediate
8347 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8349 2011-08-02 Robert Dewar <dewar@adacore.com>
8351 * exp_ch4.adb: Minor reformatting.
8353 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8355 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8356 Ada2012 iterator, the loop will be rewritten during expansion into a
8357 while loop with a cursor and an element declaration. Do not analyze the
8358 body in this case, because if the container is for indefinite types the
8359 actual subtype of the elements will only be determined when the cursor
8360 declaration is analyzed.
8362 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8364 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8365 size/alignment related attributes in CodePeer_Mode.
8367 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8369 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8370 Prepend_Element, since this can result in the operation getting the
8371 wrong slot in the full type's dispatch table if the full type has
8372 inherited operations. The incomplete type's operation will get added
8373 to the proper position in the full type's primitives
8374 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8375 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8376 dispatching operations, since there are cases where nonprimitive
8377 subprograms can get added to the list of incomplete dependents (such
8378 as subprograms in nested packages).
8379 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8380 private part when determining whether to add a primitive with a
8381 parameter of a tagged incomplete type to the Private_Dependents list.
8382 Such primitives can also occur in the visible part, and should not have
8383 been excluded from being private dependents.
8384 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8385 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8386 list of a Taft-amendment incomplete type is a primitive before issuing
8387 an error that the full type must appear in the same unit. There are
8388 cases where nonprimitives can be in the list (such as subprograms in
8390 * sem_disp.adb (Derives_From): Use correct condition for checking that
8391 a formal's type is derived from the type of the corresponding formal in
8392 the parent subprogram (the condition was completely wrong). Add
8393 checking that was missing for controlling result types being derived
8394 from the result type of the parent operation.
8396 2011-08-02 Yannick Moy <moy@adacore.com>
8398 * errout.adb (First_Node): minor renaming
8399 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8402 2011-08-02 Yannick Moy <moy@adacore.com>
8404 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8405 before accessing operands.
8406 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8407 decide whether an initialization expression respects SPARK rules, as
8408 the plain node is the expanded one. This allows for more valid warnings
8410 * gnat_rm.texi: Minor update.
8412 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8414 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8417 2011-08-02 Robert Dewar <dewar@adacore.com>
8419 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8421 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8423 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8424 loop statements and the element renaming declaration with a block when
8425 the element type is controlled.
8427 2011-08-02 Yannick Moy <moy@adacore.com>
8429 * sinfo.ads: Minor formatting.
8431 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8433 * sem_aggr.adb (Add_Association): if the association has a box and no
8434 expression, use the Sloc of the aggregate itself for the new
8436 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8439 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8441 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8442 When a container is provided via a function call, generate a renaming
8443 of the function result. This avoids the creation of a transient scope
8444 and the premature finalization of the container.
8445 * exp_ch7.adb (Is_Container_Cursor): Removed.
8446 (Wrap_Transient_Declaration): Remove the supression of the finalization
8447 of the list controller when the declaration denotes a container cursor,
8450 2011-08-02 Yannick Moy <moy@adacore.com>
8452 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8453 node is from source, instead of the original node being from source.
8455 (Resolve_Array_Aggregate): refine the check for a static expression, to
8456 recognize also static ranges
8457 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8458 Array_Type_Declaration): postpone the test for the type being a subtype
8459 mark after the type has been resolved, so that component-selection and
8460 expanded-name are discriminated.
8461 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8462 to distinguish the case of an iteration scheme, so that an error is
8463 issed on a non-static range in SPARK except in an iteration scheme.
8464 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8465 In_Iter_Schm = True.
8466 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8467 user-defined operators so that they are allowed in renaming
8469 (Find_Selected_Component): refine the check for prefixing of operators
8470 so that they are allowed in renaming. Move the checks for restrictions
8471 on selector name after analysis discriminated between
8472 component-selection and expanded-name.
8473 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8474 concatenation argument of string type if it is static.
8475 * sem_util.adb, sem_util.ads
8476 (Check_Later_Vs_Basic_Declarations): add a new function
8477 Is_Later_Declarative_Item to decice which declarations are allowed as
8478 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8479 mode, add that renamings are considered as later items.
8480 (Enclosing_Package): new function to return the enclosing package
8481 (Enter_Name): correct the rule for homonyms in SPARK
8482 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8483 from source (result of expansion) to avoid issuing wrong warnings.
8485 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8487 * errout.adb: On anything but an expression First_Node returns its
8490 2011-08-02 Pascal Obry <obry@adacore.com>
8492 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8494 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8496 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8497 Set the associated loop as the related expression of internally
8499 * exp_ch7.adb (Is_Container_Cursor): New routine.
8500 (Wrap_Transient_Declaration): Supress the finalization of the list
8501 controller when the declaration denotes a container cursor.
8503 2011-08-02 Yannick Moy <moy@adacore.com>
8505 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8507 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8508 expression is a simple expression. This check cannot be performed in
8509 the semantics, so just drop it.
8510 (P_Index_Or_Discriminant_Constraint): move check that the index or
8511 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8512 semantics. Other cases were previously checked in the semantics.
8513 * par-ch4.adb (P_Name): move checks that a selector name is not
8514 character literal or an operator symbol to Find_Selected_Component in
8516 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8517 declarations are not placed after later declarations in a separate
8518 procedure in Sem_Util (possibly not the best choice?), to be used both
8519 during parsing, for Ada 83 mode, and during semantic analysis, for
8521 * par-endh.adb (Check_End): move check that end label is not missing
8522 to Process_End_Label in the semantics
8523 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8524 the special case for SPARK restriction
8525 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8526 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8527 parameter Force to issue the error message even on internal node (used
8528 for generated end label). Call Check_Restriction to check when an error
8529 must be issued. In SPARK mode, issue an error message even if the
8530 restriction is not set.
8531 (Check_Restriction): new procedure with an additional out parameter to
8532 inform the caller that a message has been issued
8533 * sem_aggr.adb: Minor modification of message
8534 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8535 instead of issuing an error message directly
8536 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8537 declarations are not placed after later declarations, by calling
8538 Check_Later_Vs_Basic_Declarations
8539 (Analyze_Subtype_Declaration): move here the check that an index or
8540 discriminant constraint must be a subtype mark. Change the check that
8541 a subtype of String must start at one so that it works on subtype marks.
8542 * sem_ch4.adb (Analyze_Call): move here the check that a named
8543 association cannot follow a positional one in a call
8544 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8545 instead of issuing an error message directly
8546 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8547 selector name is not a character literal or an operator symbol. Move
8548 here the check that the prefix of an expanded name cannot be a
8549 subprogram or a loop statement.
8550 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8551 procedure called from parsing and semantics to check that basic
8552 declarations are not placed after later declarations
8553 (Process_End_Label): move here the check that end label is not missing
8555 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8557 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8558 representation clause in codepeer mode, since it confuses CodePeer and
8559 does not bring useful info.
8561 2011-08-02 Ed Falis <falis@adacore.com>
8563 * init.c: initialize fp hw on MILS.
8565 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8567 * errout.adb (First_Node): for bodies, return the node itself (small
8568 optimization). For other nodes, do not check source_unit if the node
8569 comes from Standard.
8571 2011-08-02 Robert Dewar <dewar@adacore.com>
8573 * exp_ch3.adb: Minor comment additions.
8574 * sem_ch13.adb: Minor reformatting.
8576 2011-08-02 Pascal Obry <obry@adacore.com>
8578 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8580 2011-08-02 Robert Dewar <dewar@adacore.com>
8582 * sem_attr.adb: Minor reformatting.
8584 2011-08-02 Robert Dewar <dewar@adacore.com>
8586 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8587 (Has_Default_Component_Value): Removed
8588 * einfo.ads Comment updates
8589 (Has_Default_Aspect): Replaces Has_Default_Value
8590 (Has_Default_Component_Value): Removed
8592 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8594 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8595 (Get_Simple_Init_Val): Handle Default_Value aspect
8596 (Needs_Simple_Initialization): Handle Default_Value aspect
8597 * exp_ch3.ads: Needs_Simple_Initialization
8598 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8599 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8601 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8602 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8603 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8605 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8607 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8608 package containing iteration primitives.
8609 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8611 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8613 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8614 "of", pre-analyze expression in case it is a function call with
8615 finalization actions that must be placed ahead of the loop.
8616 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8617 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8619 2011-08-02 Geert Bosch <bosch@adacore.com>
8621 * cstand.adb (Create_Float_Types): Only consider C's long double for
8622 Long_Long_Float, in addition to double.
8624 2011-08-02 Robert Dewar <dewar@adacore.com>
8626 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8627 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8628 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8631 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8633 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8636 2011-08-02 Javier Miranda <miranda@adacore.com>
8638 * einfo.ads, einfo.adb
8639 (Original_Access_Type): Move this attribute to Node26 since there was
8640 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8641 which causes conflicts and breaks the generation of the .NET compiler.
8642 (Interface_Name): Add missing documentation on JGNAT only uses of
8645 2011-08-02 Geert Bosch <bosch@adacore.com>
8647 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8648 (Find_Back_End_Float_Type): Likewise
8649 (Create_Back_End_Float_Types): Likewise
8650 (Create_Float_Types): Likewise
8651 (Register_Float_Type): Likewise
8652 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8653 Nlist and split out type selection in new local Find_Base_Type function.
8654 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8656 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8658 2011-08-02 Robert Dewar <dewar@adacore.com>
8660 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8662 * opt.ads: Minor comment change.
8663 * sem_ch12.adb: Minor code reorganization.
8665 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8667 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8668 subtype's list of rep items to the list on the full subtype in the case
8669 where the lists are the same.
8671 2011-08-02 Geert Bosch <bosch@adacore.com>
8673 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8674 using the one from System.Strings, which also deallocates all strings.
8676 2011-08-02 Geert Bosch <bosch@adacore.com>
8678 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8680 * gcc-interface/Make-lang.in: Update dependencies.
8682 2011-08-02 Olivier Hainque <hainque@adacore.com>
8684 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8687 2011-08-02 Javier Miranda <miranda@adacore.com>
8689 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8690 associated with anonymous access to subprograms.
8692 2011-08-02 Geert Bosch <bosch@adacore.com>
8695 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8696 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8697 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8698 (Add_Symbol_Definition): Move to switch-c.adb
8699 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8700 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8701 (Add_Symbol_Definition): Move to switch-c.adb.
8702 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8704 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8706 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8707 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8709 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8710 (Add_Symbol_Definition): Moved from Prepcomp.
8711 * switch-c.ads: Update copyright notice. Use String_List instead of
8712 Argument_List, removing dependency on System.OS_Lib.
8714 2011-08-02 Yannick Moy <moy@adacore.com>
8716 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8717 mode on initialization expression which does not respect SPARK
8719 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8720 if the tree referenced by its argument represents an initialization
8721 expression in SPARK, suitable for initializing an object in an object
8724 2011-08-02 Javier Miranda <miranda@adacore.com>
8726 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8727 internally generated access to subprogram with its associated protected
8729 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8731 2011-08-02 Geert Bosch <bosch@adacore.com>
8733 * cstand.adb (Register_Float_Type): Print information about type to
8734 register, if the Debug_Flag_Dot_B is set.
8735 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8736 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8737 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8738 with a requested precision of more than Max_Digits digits and no more
8739 than Max_Base_Digits digits, if a range specification is present and the
8740 Predefined_Float_Types list has a suitable type to derive from.
8741 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8742 case of type completion with pragma Import
8744 (Process_Import_Predefined_Type): Processing to complete a type
8745 with pragma Import. Currently supports floating point types only.
8746 (Set_Convention_From_Pragma): Do nothing without underlying type.
8747 (Process_Convention): Guard against absence of underlying type,
8748 which may happen when importing incomplete types.
8749 (Process_Import_Or_Interface): Handle case of importing predefined
8750 types. Tweak error message.
8752 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8754 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8755 functions to previous change. Reorganize code slightly.
8757 2011-08-02 Geert Bosch <bosch@adacore.com>
8759 * back_end.ads (Register_Type_Proc): New call back procedure type for
8760 allowing the back end to provide information about available types.
8761 (Register_Back_End_Types): New procedure to register back end types.
8762 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8764 * cstand.adb (Back_End_Float_Types): New list for floating point types
8765 supported by the back end.
8766 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8767 (Copy_Float_Type): New procedure to make new copies of predefined types.
8768 (Register_Float_Type): New call back procedure to populate the BEFT list
8769 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8770 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8771 (Create_Float_Types): New procedure to create entities for floating
8772 point types predefined in Standard, and put these and any remaining
8773 BEFTs on the Predefined_Float_Types list.
8774 * stand.ads (Predefined_Float_Types): New list for predefined floating
8775 point types that do not have declarations in package Standard.
8777 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8779 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8780 entity node for the unit containing the parameter.
8781 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8782 (Add_Inlined_Subprogram): Likewise.
8783 * gcc-interface/Make-lang.in: Update dependencies.
8785 2011-08-02 Thomas Quinot <quinot@adacore.com>
8787 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8790 2011-08-02 Geert Bosch <bosch@adacore.com>
8792 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8794 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8796 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8797 computed value of Base_Type.
8799 2011-08-02 Yannick Moy <moy@adacore.com>
8801 * restrict.adb (Check_Restriction): issue an error for any use of
8802 class-wide, even if the No_Dispatch restriction is not set.
8803 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8804 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8805 when completing a private extension, the type named in the private part
8806 is not the same as that named in the visible part.
8807 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8808 of an inherited primitive operations of a tagged type or type extension
8809 that returns the tagged type.
8810 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8811 function which returns True for an implicit operation inherited by the
8812 derived type declaration for the argument type.
8813 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8816 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8818 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8819 Process_Bounds, to perform analysis with expansion of a range or an
8820 expression that is the iteration scheme for a loop.
8821 (Analyze_Iterator_Specification): If domain of iteration is given by a
8822 function call with a controlled result, as is the case if call returns
8823 a predefined container, ensure that finalization actions are properly
8825 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8827 2011-08-02 Javier Miranda <miranda@adacore.com>
8829 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8830 * gcc-interface/Make-lang.in: Update dependencies.
8832 2011-08-02 Javier Miranda <miranda@adacore.com>
8834 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8835 determine if the analysis is performed using N or Original_Node (N).
8836 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8837 functionality of routine Is_Variable avoids code duplication.
8838 * checks.adb (Determine_Range): Handle temporaries generated by
8839 Remove_Side_Effects.
8841 2011-08-02 Javier Miranda <miranda@adacore.com>
8843 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8844 expansion of the condition. Required since the previous analysis was
8845 done with expansion disabled (see Resolve_Quantified_Expression) and
8846 hence checks were not inserted and record comparisons have not been
8849 2011-08-02 Ed Falis <falis@adacore.com>
8851 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8854 2011-08-02 Bob Duff <duff@adacore.com>
8856 * opt.ads: Minor comment fix.
8858 2011-08-02 Bob Duff <duff@adacore.com>
8860 * sem_ch12.adb (Analyze_Package_Instantiation,
8861 Analyze_Subprogram_Instantiation): Turn off style checking while
8862 analyzing an instance. Whatever style checks that apply to the generic
8863 unit should apply, so it makes no sense to apply them in an instance.
8864 This was causing trouble when compiling an instance of a runtime
8865 unit that violates the -gnatyO switch.
8866 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8867 one of the two case statements, causing spurious errors.
8869 2011-08-02 Robert Dewar <dewar@adacore.com>
8871 * uname.adb: Minor reformatting.
8872 * gnatcmd.adb: Minor reformatting.
8873 * exp_attr.adb: Minor reformatting.
8875 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8877 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8878 No_Dispatching_Calls, do not look for the Assign primitive, because
8879 predefined primitives are not created in this case.
8881 2011-08-02 Bob Duff <duff@adacore.com>
8883 * stylesw.ads: Minor comment fixes.
8885 2011-08-02 Robert Dewar <dewar@adacore.com>
8887 * freeze.adb (Add_To_Result): New procedure.
8889 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8891 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8892 time, if the specific run-time routines for handling streams of strings
8893 are not available, use the default mechanism.
8895 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8897 * s-regpat.ads: Fix typo.
8899 2011-08-02 Vincent Celier <celier@adacore.com>
8901 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8902 not null, call it to create the in memory config project file without
8903 parsing an existing default config project file.
8905 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8907 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8909 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8911 * sem_elim.adb: an abstract subprogram does not need an eliminate
8912 pragma for its descendant to be eliminable.
8914 2011-08-02 Ed Falis <falis@adacore.com>
8916 * init.c: revert to handling before previous checkin for VxWorks
8917 * s-intman-vxworks.adb: delete unnecessary declarations related to
8918 using Ada interrupt facilities for handling signals.
8919 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8920 * s-intman-vxworks.ads: Import __gnat_install_handler as
8921 Initialize_Interrupts.
8922 * s-taprop-vxworks.adb: Delete Signal_Mask.
8923 (Abort_Handler): change construction of mask to unblock exception
8926 2011-08-02 Jerome Guitton <guitton@adacore.com>
8928 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8929 Debug_Raise_Exception before propagation starts.
8931 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8933 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8934 to Restriction_Check_Required.
8935 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8936 * sem_res.adb (Resolve_Call): Likewise.
8937 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8939 2011-08-02 Bob Duff <duff@adacore.com>
8941 * stylesw.ads: Update comment.
8942 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8943 * errout.ads: Remove obsolete comment.
8945 2011-08-02 Javier Miranda <miranda@adacore.com>
8947 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8948 (Set_Is_Safe_To_Reevaluate): new procedure.
8949 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8950 assignment is allowed on safe-to-reevaluate variables.
8951 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8952 temporary created to remove side effects in expressions that use
8953 the secondary stack as safe-to-reevaluate.
8954 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8955 variables that are not true constants.
8957 2011-08-02 Robert Dewar <dewar@adacore.com>
8959 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8960 sem_res.adb, sem_ch6.adb: Minor reformatting.
8962 2011-08-02 Jerome Guitton <guitton@adacore.com>
8964 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8966 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8968 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8969 not set Overridden_Operation if subprogram is an initialization
8972 2011-08-02 Yannick Moy <moy@adacore.com>
8974 * par-ch6.adb: Correct obsolete name in comments
8975 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8976 which takes two message arguments (existing function takes one), with
8977 second message used for continuation.
8978 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8979 block statements that originate from a source block statement, not
8980 generated block statements
8981 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8982 symmetry with procedure case
8983 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8984 function to issue an error in formal mode if a package specification
8985 contains more than one tagged type or type extension.
8986 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8987 parameters matching formals of tagged types are objects (or ancestor
8988 type conversions of objects), not general expressions. Issue an error
8989 on view conversions that are not involving ancestor conversion of an
8991 (Resolve_Type_Conversion): in formal mode, issue an error on the
8992 operand of an ancestor type conversion which is not an object
8993 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8994 procedure so that it works also for actuals of function calls
8995 (Is_Actual_Tagged_Parameter): new function which determines if its
8996 argument is an actual parameter of a formal of tagged type in a
8998 (Is_SPARK_Object_Reference): new function which determines if the tree
8999 referenced by its argument represents an object in SPARK
9001 2011-08-02 Robert Dewar <dewar@adacore.com>
9003 * sem_ch3.adb: Minor reformatting
9004 Minor comment addition
9005 Minor error msg text change
9007 2011-08-02 Javier Miranda <miranda@adacore.com>
9009 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9010 function. Used to be more precise when we generate a variable plus one
9011 assignment to remove side effects in the evaluation of the Bound
9013 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9014 of the bound expression to force its re-analysis and thus expand the
9015 associated transient scope (if required). Code cleanup replacing the
9016 previous code that declared the constant entity by an invocation to
9017 routine Force_Evaluation which centralizes this work in the frontend.
9019 2011-08-02 Robert Dewar <dewar@adacore.com>
9021 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9022 (Base_Type): Now uses improved Is_Base_Type function
9023 * einfo.ads (Base_Type): Inline this function
9025 2011-08-02 Robert Dewar <dewar@adacore.com>
9027 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9028 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9030 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9032 * gcc-interface/Make-lang.in: Update dependencies.
9033 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9036 2011-08-02 Yannick Moy <moy@adacore.com>
9038 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9039 non-simple expression used in delta constraint
9040 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9041 index constraint which is not a subtype mark
9042 * par.adb: With and use Restrict
9043 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9044 mode on component type which is not a subtype mark and default
9045 expression on component
9046 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9047 of string which does not have a lower index bound equal to 1
9048 (Array_Type_Declaration): issue an error in formal mode on index or
9049 component type which is not a subtype mark, and on aliased keyword on
9051 (Derived_Type_Declaration): issue an error in formal mode on interface,
9052 limited or abstract type
9053 (Record_Type_Declaration): issue an error in formal mode on interface
9054 (Record_Type_Definition): issue an error in formal mode on tagged types
9055 and type extensions not declared in the specification of a library unit
9056 package; on null non-tagged record; on variant part
9058 2011-08-02 Vincent Celier <celier@adacore.com>
9060 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9061 not declared for qualified library project when Library_Name is not
9062 declared, but Library_Dir is.
9064 2011-08-02 Robert Dewar <dewar@adacore.com>
9066 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9067 pragmas (affects aspects [Component_]Default_Value
9068 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9069 component type for the resolution
9071 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9073 * einfo.adb (Base_Type): Tune implementation for speed.
9075 2011-08-02 Robert Dewar <dewar@adacore.com>
9077 * freeze.adb: Minor reformatting.
9079 2011-08-02 Thomas Quinot <quinot@adacore.com>
9081 * scos.ads: Update comments.
9083 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9085 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9086 base type, because the parent may be a subtype of a private type whose
9087 convention is established in a private part.
9089 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9091 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9092 statement in a block when the expansion of the return expression has
9093 created a finalization chain.
9094 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9095 with the parent node.
9096 Add N_Extended_Return_Statement to handle the case where a transient
9097 object declaration appears in the Return_Object_Declarations list of
9098 an extended return statement.
9100 2011-08-02 Matthew Gingell <gingell@adacore.com>
9102 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9103 unused parameter 'name'.
9105 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9107 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9108 inherited operation, check whether its alias, which is the source
9109 operastion that it renames, has been marked eliminated.
9111 2011-08-02 Javier Miranda <miranda@adacore.com>
9113 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9114 in-mode parameter whose type is an access type since it can be used to
9115 modify its designated object. Enforce code that handles as safe an
9116 access type that is not access-to-constant but it is the result of a
9117 previous removal of side-effects.
9118 (Remove_Side_Effects): Minor code reorganization of cases which require
9119 no action. Done to incorporate documentation on new cases uncovered
9120 working in this ticket: no action needed if this routine was invoked
9121 too early and the nodes are not yet decorated.
9122 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9123 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9124 were issued with actuals that are implicitly provided by
9127 2011-08-02 Robert Dewar <dewar@adacore.com>
9129 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9131 2011-08-02 Yannick Moy <moy@adacore.com>
9133 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9134 to issue an error in formal mode on attribute not supported in this mode
9135 (Analyze_Attribute): issue errors on standard attributes not supported
9137 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9138 comment, and issue error in formal mode on modulus which is not a power
9140 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9142 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9144 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9145 operator on modular type (except 'not').
9147 2011-08-02 Robert Dewar <dewar@adacore.com>
9149 * gnat_rm.texi: Minor reformatting.
9151 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9153 * s-osinte-linux.ads: Minor comment update and reformatting.
9154 * i-cexten.ads: Make this unit pure, as for its parent.
9155 Will allow its usage in more contexts if needed.
9157 2011-08-02 Robert Dewar <dewar@adacore.com>
9159 * s-utf_32.ads: Minor comment fix.
9161 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9163 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9164 operation of a tagged synchronized type, handle the case where the
9165 controlling argument is overloaded.
9167 2011-08-02 Yannick Moy <moy@adacore.com>
9169 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9170 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9171 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9172 SPARK mode and formal verification mode on processing SPARK restriction
9173 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9174 requiring consistency checking.
9176 2011-08-02 Robert Dewar <dewar@adacore.com>
9178 * sem_res.adb: Minor reformatting.
9180 2011-08-02 Robert Dewar <dewar@adacore.com>
9182 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9183 a-cforse.ads: Remove unneeded with of Ada.Containers
9184 Remove commented out pragma Inline's
9185 Move specifications of new subprograms to the actual specs
9187 2011-08-02 Yannick Moy <moy@adacore.com>
9189 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9190 a-cforse.ads: Update comments.
9192 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9194 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9196 2011-08-02 Robert Dewar <dewar@adacore.com>
9198 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9199 a-cforse.ads, a-cofove.ads: Minor reformatting.
9201 2011-08-02 Claire Dross <dross@adacore.com>
9203 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9204 a-cofove.ads: Add comments.
9206 2011-08-02 Yannick Moy <moy@adacore.com>
9208 * gnat_rm.texi: Document formal containers.
9210 2011-08-02 Emmanuel Briot <briot@adacore.com>
9212 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9215 2011-08-02 Robert Dewar <dewar@adacore.com>
9217 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9220 2011-08-02 Robert Dewar <dewar@adacore.com>
9222 * aspects.adb: New aspects Default_Value and Default_Component_Value
9223 New format of Aspect_Names table checks for omitted entries
9224 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9225 handling of boolean aspects for derived types.
9226 New aspects Default_Value and Default_Component_Value
9227 New format of Aspect_Names table checks for omitted entries
9228 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9229 (Has_Default_Value): New flag
9230 (Has_Default_Component_Value): New flag
9231 (Has_Default_Value): New flag
9232 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9234 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9235 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9236 Default_Value and Default_Component_Value
9237 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9238 New aspects Default_Value and Default_Component_Value
9239 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9240 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9242 2011-08-02 Vincent Celier <celier@adacore.com>
9244 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9245 inherit library kind.
9247 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9249 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9252 2011-08-02 Robert Dewar <dewar@adacore.com>
9254 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9256 2011-08-02 Yannick Moy <moy@adacore.com>
9258 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9260 2011-08-02 Robert Dewar <dewar@adacore.com>
9262 * impunit.adb: Add comment.
9264 2011-08-02 Yannick Moy <moy@adacore.com>
9266 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9267 qualification of aggregates in formal mode
9268 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9270 (Resolve_Aggregate): complete the test that an aggregate is adequately
9271 qualified in formal mode
9273 2011-08-02 Pascal Obry <obry@adacore.com>
9275 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9276 * mlib-prj.adb: Supress warning when compiling binder generated file.
9277 (Build_Library): Supress all warnings when compiling the binder
9280 2011-08-02 Yannick Moy <moy@adacore.com>
9282 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9284 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9285 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9286 Add with/use clauses to make Check_Formal_Restriction visible
9288 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9290 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9291 in-parameters when type of the generic formal is private in the generic
9292 spec and non-private in the body.
9294 2011-08-02 Claire Dross <dross@adacore.com>
9296 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9297 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9298 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9299 * impunit.adb, Makefile.rtl: Take new files into account.
9301 2011-08-02 Robert Dewar <dewar@adacore.com>
9303 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9304 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9306 2011-08-02 Yannick Moy <moy@adacore.com>
9308 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9310 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9311 matching static array bounds, taking into account the special case of
9313 * sem_ch3.adb: Typo in comment.
9315 2011-08-02 Yannick Moy <moy@adacore.com>
9317 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9318 which issues an error in formal mode if its argument node is originally
9320 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9321 has a discriminant specification so that it does not include the case
9323 (Derived_Type_Declaration): move here the test that a derived type has a
9324 discriminant specification
9325 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9326 first element of a component association before accessing its choices
9327 (presence of component association is not enough)
9328 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9329 declaration is a library item before accessing the next element in a
9330 list, as library items are not member of lists
9331 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9332 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9333 Check_Formal_Restriction whenever possible.
9335 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9337 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9338 reference when needed.
9340 2011-08-02 Bob Duff <duff@adacore.com>
9342 * gnat_ugn.texi: Fix typo.
9344 2011-08-02 Vincent Celier <celier@adacore.com>
9346 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9347 archive file name. Do not use the full path name of archives for Open
9350 2011-08-02 Robert Dewar <dewar@adacore.com>
9352 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9353 Analyze_Aspect_Specifications
9355 (Analyze_Aspect_Specifications): New handling for boolean aspects
9356 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9357 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9358 sequence for Analyze_Aspect_Specifications
9359 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9360 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9362 2011-08-02 Robert Dewar <dewar@adacore.com>
9364 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9365 aspects, since these no longer exist.
9367 2011-08-02 Robert Dewar <dewar@adacore.com>
9369 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9370 semicolon, do not try to see if there are aspects following it.
9371 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9374 2011-08-02 Robert Dewar <dewar@adacore.com>
9376 * sem_ch8.adb, aspects.ads: Minor reformatting.
9378 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9380 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9381 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9383 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9385 2011-08-02 Yannick Moy <moy@adacore.com>
9387 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9388 mode on subprogram declaration outside of package specification, unless
9389 it is followed by a pragma Import
9390 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9391 Access_Type_Declaration): issue error in formal mode on access type
9392 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9394 (Analyze_Object_Declaration): issue error in formal mode on object
9395 declaration which does not respect SPARK restrictions
9396 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9397 declaration which does not respect SPARK restrictions
9398 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9399 error in formal mode on digits or delta constraint
9400 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9401 decimal fixed point type
9402 (Derived_Type_Declaration): issue error in formal mode on derived type
9403 other than type extensions of tagged record types
9404 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9405 with check on access definition
9406 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9407 mode on protected definition.
9408 (Analyze_Task_Definition): issue error in formal mode on task definition
9410 2011-08-02 Robert Dewar <dewar@adacore.com>
9412 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9414 2011-08-02 Javier Miranda <miranda@adacore.com>
9416 * sem_ch6.adb (Can_Override_Operator): New function.
9417 (Verify_Overriding_Indicator): Add missing code to check overriding
9418 indicator in operators. Fixes regression.
9419 (Check_Overriding_Indicator): Minor reformating after replacing the
9420 code that evaluates if the subprogram can override an operator by
9421 invocations to the above new function.
9423 (Write_Field26_Name): Add missing code to ensure that, following
9424 the documentation in einfo.ads, this field is not shown as attribute
9425 "Static_Initialization" on non-dispatching functions.
9427 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9429 * sem_res.adb (Resolve_Call): A call to
9430 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9431 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9432 i.e., when the second parameter is of type Time_Span.
9434 2011-08-02 Vincent Celier <celier@adacore.com>
9436 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9437 with an archive instead of -L<library dir> -l<library name>.
9439 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9441 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9442 mark the base types In_Use in addition to making the operations
9445 2011-08-02 Ed Falis <falis@adacore.com>
9447 * init.c: add and setup __gnat_signal_mask for the exception signals
9448 * s-inmaop-vxworks.adb: new file.
9449 * s-intman-vxworks.adb: remove unnecessary initializations and
9451 * s-intman-vxworks.ads: remove unnecessary variable
9452 * s-taprop-vxworks.adb: simplify signal initialization
9454 2011-08-02 Robert Dewar <dewar@adacore.com>
9456 * sem_ch8.adb: Minor code reorganization, comment updates.
9458 2011-08-02 Robert Dewar <dewar@adacore.com>
9460 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9461 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9463 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9464 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9466 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9468 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9469 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9470 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9471 use_type_clauses, to handle more efficiently use_type and use_all_type
9473 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9474 Ada2012 Use_All_Type clause.
9475 (Use_Class_Wide_Operations): new procedure.
9477 2011-08-02 Robert Dewar <dewar@adacore.com>
9479 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9480 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9481 expression to expression function.
9483 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9485 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9486 if types are compatible.
9488 2011-08-02 Yannick Moy <moy@adacore.com>
9490 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9491 returns True if its argument array types have same dimension and same
9492 static bounds at each index.
9493 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9494 OUT or IN OUT paramaters which are not view conversions in SPARK.
9495 (Resolve_Arithmetic_Op): issue an error in formal mode on
9496 multiplication or division with operands of fixed point types which are
9497 not qualified or explicitly converted.
9498 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9499 Boolean or array type (except String) operands.
9500 (Resolve_Equality_Op): issue an error in formal mode on equality
9501 operators for array types other than String with non-matching static
9503 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9504 for array types with non-matching static bounds. Factorize the code in
9505 Matching_Static_Array_Bounds.
9506 (Resolve_Qualified_Expression): issue an error in formal mode on
9507 qualified expressions for array types with non-matching static bounds.
9508 (Resolve_Type_Conversion): issue an error in formal mode on type
9509 conversion for array types with non-matching static bounds
9511 2011-08-02 Robert Dewar <dewar@adacore.com>
9513 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9515 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9517 * par-ch9.adb: save location of entry for proper error message.
9519 2011-08-02 Javier Miranda <miranda@adacore.com>
9521 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9522 (Use_Full_View) which permits this routine to climb through the
9523 ancestors using the full-view of private parents.
9524 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9525 Use_Full_View to true in calls to Is_Ancestor.
9526 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9527 true in call to Is_Ancestor.
9528 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9529 Use_Full_View to true in call to Is_Ancestor.
9530 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9531 call to Is_Ancestor.
9532 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9533 Use_Full_View to true in calls to Is_Ancestor.
9534 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9535 Make_Select_Specific_Data_Table, Register_Primitive,
9536 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9537 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9538 to true in call to Is_Ancestor.
9539 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9540 Use_Full_View to true in calls to Is_Ancestor.
9542 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9543 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9545 2011-08-02 Robert Dewar <dewar@adacore.com>
9547 * gnat_rm.texi: Minor reformatting.
9548 * sem_prag.adb: Minor reformatting.
9550 2011-08-02 Tristan Gingold <gingold@adacore.com>
9552 * vms_data.ads: Add VMS qualifier for -gnateP.
9554 2011-08-02 Robert Dewar <dewar@adacore.com>
9556 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9557 * par-ch7.adb (P_Package): Proper placement of aspects for package
9559 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9560 (End_Statements): Add Is_Sloc parameterr
9561 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9562 (Check_End): Ad Is_Sloc parameter
9563 (End_Statements): Add Is_Sloc parameterr
9565 2011-08-02 Vincent Celier <celier@adacore.com>
9567 * ug_words: Add VMS qualifier equivalent to -gnateP:
9568 /SYMBOL_PREPROCESSING.
9570 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9572 * gnat-style.texi: For hexadecimal numeric literals the typical
9573 grouping of digits is 4 to represent 2 bytes.
9574 A procedure spec which is split into several lines is indented two
9577 2011-08-02 Yannick Moy <moy@adacore.com>
9579 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9580 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9581 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9583 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9584 choice in array aggregate
9585 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9587 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9588 positional and named aggregate for record, or others in record
9589 aggregate, or multiple choice in record aggregate
9590 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9591 array operands to logical operations AND, OR and XOR do not have the
9592 same static lower and higher bounds
9593 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9595 2011-08-01 Robert Dewar <dewar@adacore.com>
9597 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9598 Replaces Last_Source_Node_In_Sequence.
9599 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9600 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9601 parens and blank in string (this was inconsistently implemented).
9603 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9604 blank in string (this was inconsistently implemented).
9606 (Set_Global_Switches): Set formal mode switches appropriately
9607 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9609 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9610 call Set_Error_Msg_Lang to set "spark" as language name.
9611 * par.adb: Remove unnecessary call to set formal language for errout
9612 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9613 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9615 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9616 calls to it, moved after resolution so that types are known
9617 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9618 result of concatenation is not of type String
9619 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9620 concatenation is not properly restricted
9621 * gnat_rm.texi: Add doc on pragma Spark_95.
9622 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9623 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9624 * gcc-interface/Make-lang.in: Update dependencies.
9626 2011-08-01 Javier Miranda <miranda@adacore.com>
9628 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9629 condition that detects if the overridden operation must replace an
9632 2011-08-01 Javier Miranda <miranda@adacore.com>
9634 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9635 code declarations inserted by Insert_Actions in each alternative of the
9636 N_Case_Expression node.
9638 2011-08-01 Robert Dewar <dewar@adacore.com>
9640 * sem_ch6.adb: Minor code reorganization.
9641 * sem_util.adb: Minor reformatting.
9643 2011-08-01 Pascal Obry <obry@adacore.com>
9645 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9646 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9648 2011-08-01 Yannick Moy <moy@adacore.com>
9650 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9651 literal or operator symbol which is prefixed
9652 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9653 mode on access attributes.
9654 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9655 that concatenation operands are properly restricted in formal mode
9656 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9657 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9658 result of the concatenation has a type different from String.
9659 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9660 Analyze_Quantified_Expression, Analyze_Slice,
9661 Analyze_Null): issue an error in formal mode on unsupported constructs
9663 (Analyze_Block_Statement): only issue error on source block statement
9664 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9665 function which returns the last node in a list of nodes for which
9666 Comes_From_Source returns True, if any
9667 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9668 Last_Source_Node_In_Sequence
9669 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9670 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9671 mode on unsupported constructs
9672 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9673 rest of the actions may be needed later on since the error is marked as
9675 * sinfo.ads: Typos in comments.
9677 2011-08-01 Pascal Obry <obry@adacore.com>
9679 * projects.texi: Minor editing.
9681 2011-08-01 Yannick Moy <moy@adacore.com>
9683 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9684 insertion character ~~
9685 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9686 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9687 with insertion character ~~
9688 (Set_Msg_Text): treat insertion character ~~
9689 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9690 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9691 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9692 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9693 errors related to the formal language restriction not serious
9694 (insertion character |).
9695 * par.adb (Par): set formal language for error messages if needed
9696 * sem_ch6.adb (Check_Missing_Return): take into account possible
9697 generated statements at the end of the function
9698 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9699 enumeration value to define a new pragma SPARK_95
9700 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9701 SPARK_Version): new type and variables to store the SPARK version
9703 (SPARK_Mode): return True when SPARK_Version is set
9704 * par-prag.adb: Correct indentation
9705 (Prag): take Pragma_SPARK_95 into account
9706 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9709 2011-08-01 Robert Dewar <dewar@adacore.com>
9711 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9712 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9713 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9715 2011-08-01 Pascal Obry <obry@adacore.com>
9717 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9718 Target_Name to Get_Path call.
9719 (Parse_Single_Project): Likewise.
9720 (Post_Parse_Context_Clause): Likewise.
9721 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9722 Call Initialise_Project_Path with the proper Target_Name.
9723 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9725 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9726 with the proper Target_Name.
9727 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9729 (Parse_Project_And_Apply_Config): Likewise.
9730 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9731 This is fine as this part of the code is supporting only native
9733 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9734 is fine as this part of the code is supporting only native compilation.
9736 2011-08-01 Yannick Moy <moy@adacore.com>
9738 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9739 of homonym, unless the homonym is one of the cases allowed in SPARK
9740 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9741 package declaration occurring after a body.
9743 2011-08-01 Robert Dewar <dewar@adacore.com>
9745 * checks.adb, exp_ch4.adb: Minor reformatting.
9747 2011-08-01 Javier Miranda <miranda@adacore.com>
9749 * einfo.ads (Access_Disp_Table): Fix documentation.
9750 (Dispatch_Table_Wrappers): Fix documentation.
9752 2011-08-01 Pascal Obry <obry@adacore.com>
9754 * prj-env.adb, prj-env.ads: Minor reformatting.
9756 2011-08-01 Yannick Moy <moy@adacore.com>
9758 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9759 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9760 procedures out of these packages.
9761 * errout.ads, errout.adb
9762 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9763 procedures in of this package
9764 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9765 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9766 on misplaced later vs initial declarations, like in Ada 83
9767 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9768 formal mode on attribute of private type whose full type declaration
9770 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9771 package declaration inside a package specification
9772 (Analyze_Full_Type_Declaration): issue error in formal mode on
9773 controlled type or discriminant type
9774 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9775 user-defined operator means that it should come from the source
9776 (New_Overloaded_Entity): issue error in formal mode on overloaded
9778 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9780 2011-08-01 Thomas Quinot <quinot@adacore.com>
9782 * atree.adb: Minor reformatting.
9783 * checks.adb: Minor reformatting.
9785 2011-08-01 Vincent Celier <celier@adacore.com>
9787 * s-parame-vms-ia64.ads: Fix typo in comment
9789 * s-parame-vms-restrict.ads: Removed, unused.
9791 2011-08-01 Javier Miranda <miranda@adacore.com>
9794 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9796 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9797 * sem_ch3.ads, sem_ch3.adb
9798 (Is_Constant_Bound): New extended version of the subprogram that was
9799 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9800 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9801 * sem_aux.ads (Constant_Value): Fix typo in comment.
9802 * checks.adb (Generate_Index_Checks): New implementation which, for
9803 array objects with constant bounds, generates the runtime check
9804 referencing the bounds of the array type. For other cases this routine
9805 provides its previous behavior obtaining such values from the array
9807 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9809 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9810 we cannot have semantic interpretations of the new node.
9812 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9814 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9817 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9819 * sem_ch8.adb: Minor code editing.
9820 * s-vxwext.adb: Remove trailing space.
9821 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9822 consistency with other files.
9824 2011-08-01 Thomas Quinot <quinot@adacore.com>
9826 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9828 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9830 * par-ch10.adb: reject parameterized expressions as compilation unit.
9831 * sem_ch4.adb: handle properly conditional expression with overloaded
9832 then_clause and no else_clause.
9834 2011-08-01 Tristan Gingold <gingold@adacore.com>
9836 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9837 like done by System.Aux_DEC.
9838 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9840 2011-08-01 Yannick Moy <moy@adacore.com>
9842 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9843 missing label at end of declaration (subprogram or package)
9844 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9845 of positional and named parameter association
9846 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9847 Error_Msg_SP which adds a prefix to the error message giving the name
9848 of the formal language analyzed
9849 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9850 access result type in subprogram, unconstrained array as result type,.
9851 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9853 * sem_ch8.adb: Code clean up.
9855 2011-08-01 Javier Miranda <miranda@adacore.com>
9857 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9858 * einfo.ads (Access_Disp_Table): Fix documentation.
9859 (Dispatch_Table_Wrappers): Fix documentation.
9860 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9861 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9862 to enforce the documentation of this attribute.
9863 (Set_Is_Interface): Cleanup the assertion.
9864 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9865 the Underlying_Type entity before reading attribute Access_Disp_Table.
9866 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9867 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9868 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9869 the Underlying_Type entity before reading attribute Access_Disp_Table.
9870 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9871 Locate the Underlying_Type entity before reading attribute
9874 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9876 * s-poosiz.ads: Additional overriding indicators.
9878 2011-08-01 Yannick Moy <moy@adacore.com>
9880 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9882 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9883 parameter specification does not include a subtype mark.
9884 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9885 formal mode on abstract subprogram.
9886 (Analyze_Subprogram_Specification): issue error in formal mode on
9887 user-defined operator.
9888 (Process_Formals): issue error in formal mode on access parameter and
9890 * sem_ch9.adb (Analyze_Abort_Statement,
9891 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9892 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9893 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9894 Analyze_Requeue, Analyze_Selective_Accept,
9895 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9896 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9897 issue error in formal mode on user-defined raise statement.
9899 2011-08-01 Thomas Quinot <quinot@adacore.com>
9901 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9902 declaration being hidden when overriding an implicit inherited
9904 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9905 (-gnats), do not complain about a source file that contains only a
9908 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9910 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9911 variable if already set.
9913 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9915 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9916 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9917 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9918 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9919 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9920 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9921 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9922 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9923 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9924 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9925 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9926 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9927 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9928 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9929 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9930 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9931 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9932 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9933 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9934 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9935 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9936 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9937 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9938 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9939 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9940 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9941 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9942 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9943 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9944 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9945 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9946 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9947 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9948 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9949 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9950 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9951 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9952 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9953 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9954 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9955 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9956 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9957 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9958 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9959 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9960 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9961 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9962 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9963 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9964 Use GNAT instead of GNARL.
9966 2011-08-01 Bob Duff <duff@adacore.com>
9968 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9969 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9970 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9973 2011-08-01 Yannick Moy <moy@adacore.com>
9975 * debug.adb (d.D) reverve flag for the SPARK mode
9976 (d.E) reverve flag for SPARK generation mode
9977 (d.F) reverve flag for Why generation mode
9978 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9979 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9980 functions which return True when the corresponding modes are set
9981 (Formal_Language): return "spark" or "alfa" when in formal verification
9983 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9984 Error_Msg to prefix the error message with a tag giving the formal
9986 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9987 message with a tag giving the formal language
9988 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9990 (Analyze_Case_Statement): issue error in formal mode on case statement
9991 with a single "others" case alternative
9992 (Analyze_Exit_Statement): issue errors in formal mode on exit
9993 statements which do not respect SPARK restrictions
9994 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9995 (Check_Unreachable_Code): always issue an error (not a warning) in
9996 formal mode on unreachable code (concerns both code after an infinite
9997 loop and after an unconditional jump, both not allowed in SPARK)
9998 * sem_ch6.adb (Analyze_Return_Statement): add call to
9999 Set_Return_Present for a procedure containing a return statement
10000 (already done for functions in Analyze_Function_Return)
10001 (Analyze_Function_Return): issue error in formal mode on extended
10002 return or if return is not last statement in function
10003 (Check_Missing_Return): issue error in formal mode if function does
10004 not end with return or if procedure contains a return
10005 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10006 function to detect if there is an inner scope of its parameter S which
10009 2011-08-01 Thomas Quinot <quinot@adacore.com>
10011 * sem_ch6.ads: Minor reformatting.
10013 2011-08-01 Javier Miranda <miranda@adacore.com>
10015 * sem_util.adb (Abstract_Interface_List): Complete condition when
10016 processing private type declarations to avoid reading unavailable
10018 (Is_Synchronized_Tagged_Type): Complete condition when processing
10019 private extension declaration nodes to avoid reading unavailable
10022 2011-08-01 Thomas Quinot <quinot@adacore.com>
10024 * sem_ch3.adb: Minor reformatting.
10026 2011-08-01 Thomas Quinot <quinot@adacore.com>
10028 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10029 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10030 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10031 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10032 for VMS, instead parametrize the common implementation with
10033 System.Parameters declarations.
10035 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10037 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10039 2011-08-01 Tristan Gingold <gingold@adacore.com>
10041 * seh_init.c: Fix SEH handler installation on win64.
10043 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10045 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10046 double analysis of an anonymous access to subprogram, because it can
10047 lead to improper sharing of profiles and a back-end crash.
10049 2011-08-01 Robert Dewar <dewar@adacore.com>
10051 * make.adb, sem_ch4.adb: Minor reformatting.
10052 * gcc-interface/Make-lang.in: Update dependencies.
10053 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10055 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10057 * gnat_rm.texi: Fix definition of Long_Integer.
10059 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10061 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10062 to prevent storage exhaustion.
10063 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10064 finalized is a function body, insert the cleanup code before the final
10065 return statement, to prevent spurious warnings.
10066 * s-pooglo.ads: add overriding indicator.
10068 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10070 * sem_ch4.adb (Operator_Check): improve error message when both a
10071 with_clause and a use_clause are needed to make operator usage legal.
10072 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10073 determine whether a compilation unit is visible within an other,
10074 either through a with_clause in the current unit, or a with_clause in
10075 its library unit or one one of its parents.
10077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10079 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10080 over an arbitrary expression of an array or container type.
10081 * lib-xref.adb: clarify comment.
10083 2011-08-01 Bob Duff <duff@adacore.com>
10085 * einfo.ads: Minor reformatting.
10086 * debug.adb: Minor comment improvement.
10088 2011-08-01 Javier Miranda <miranda@adacore.com>
10090 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10091 consider hidden subprograms as valid candidates.
10093 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10095 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10097 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10099 * gnat_ugn.texi: Fix typo.
10101 2011-08-01 Robert Dewar <dewar@adacore.com>
10103 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10104 lib-xref.adb: Minor reformatting
10106 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10108 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10109 when to generate a call to Move_Final_List.
10110 (Has_Controlled_Parts): Remove this function.
10112 2011-08-01 Geert Bosch <bosch@adacore.com>
10114 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10115 "," in choice list.
10117 2011-08-01 Thomas Quinot <quinot@adacore.com>
10119 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10120 explicit raise of a predefined exception as Comes_From_Source if the
10121 original N_Raise_Statement comes from source.
10123 2011-08-01 Robert Dewar <dewar@adacore.com>
10125 * sinfo.ads: Add comment.
10126 * sem_ch6.adb: Minor reformatting.
10128 2011-08-01 Robert Dewar <dewar@adacore.com>
10130 * freeze.adb (Freeze_Entity): Refine check for bad component size
10131 clause to avoid rejecting confirming clause when atomic/aliased present.
10133 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10135 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10136 better determine whether an entity reference is a write.
10137 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10139 * lib-xref.adb (Output_References): Do no suppress a read reference at
10140 the same location as an immediately preceeding modify-reference, to
10141 handle properly in-out actuals.
10143 2011-08-01 Tristan Gingold <gingold@adacore.com>
10145 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10147 2011-08-01 Quentin Ochem <ochem@adacore.com>
10149 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10150 heap to compute the result.
10152 2011-08-01 Robert Dewar <dewar@adacore.com>
10154 * atree.ads: Minor reformatting.
10156 2011-08-01 Emmanuel Briot <briot@adacore.com>
10158 * g-expect.adb (Get_Command_Output): Fix memory leak.
10160 2011-08-01 Geert Bosch <bosch@adacore.com>
10162 * cstand.adb (P_Float_Type): New procedure to print the definition of
10163 predefined fpt types.
10164 (P_Mixed_Name): New procedure to print a name using mixed case
10165 (Print_Standard): Use P_Float_Type for printing floating point types
10166 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10167 precision IEEE float.
10169 2011-08-01 Thomas Quinot <quinot@adacore.com>
10171 * sem_ch3.adb: Minor reformatting.
10173 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10175 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10176 the completion of a generic function, insert the new body rather than
10177 rewriting the original.
10179 2011-08-01 Yannick Moy <moy@adacore.com>
10181 * sinfo.ads, errout.ads: Typos in comments.
10183 2011-08-01 Robert Dewar <dewar@adacore.com>
10185 * par-endh.adb: Minor reformatting.
10187 2011-08-01 Robert Dewar <dewar@adacore.com>
10189 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10190 (Pre_Post_Aspects): New subtype.
10191 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10192 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10193 * par-ch7.adb (P_Package): Remove Decl parameter
10194 (P_Package): Handle new syntax for aspects (before IS)
10195 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10197 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10198 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10199 (P_Package): Remove Decl parameter
10200 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10202 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10204 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10205 * sinfo.ads: Document new syntax for aspects in packages etc.
10206 * sprint.adb: Handle new syntax of aspects before IS in package
10208 2011-08-01 Thomas Quinot <quinot@adacore.com>
10210 * atree.ads: Minor reformatting.
10211 * sem_prag.adb: Minor reformatting.
10213 2011-08-01 Robert Dewar <dewar@adacore.com>
10215 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10216 case expr alternative.
10218 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10220 * sem_ch12.adb: Fix typo.
10222 2011-08-01 Geert Bosch <bosch@adacore.com>
10224 * sem_prag.adb (Check_No_Link_Name): New procedure.
10225 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10226 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10227 instead of Standard_Long_Long_Float_Size global. Preparation for
10228 eventual removal of per type constants.
10229 * exp_util.ads (Get_Stream_Size): New function returning the stream
10230 size value of subtype E.
10231 * exp_util.adb (Get_Stream_Size): Implement new function.
10232 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10234 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10236 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10238 2011-08-01 Geert Bosch <bosch@adacore.com>
10240 * cstand.adb: Fix comments.
10241 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10242 count of arguments.
10244 2011-08-01 Robert Dewar <dewar@adacore.com>
10246 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10248 2011-08-01 Geert Bosch <bosch@adacore.com>
10250 * atree.ads: Fix comment.
10252 2011-08-01 Robert Dewar <dewar@adacore.com>
10254 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10255 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10256 * par.adb: Add with for Namet.Sp.
10257 * par-tchk.adb: Minor reformatting.
10259 2011-08-01 Vincent Celier <celier@adacore.com>
10261 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10262 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10263 of the init procedure of a SAL.
10264 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10267 2011-08-01 Thomas Quinot <quinot@adacore.com>
10269 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10272 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10274 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10276 2011-08-01 Thomas Quinot <quinot@adacore.com>
10278 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10279 conformant with its spec (return True only for types that have
10280 an overriding Initialize primitive operation that prevents them from
10281 having preelaborable initialization).
10282 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10283 initialization for controlled types in Ada 2005 or later mode.
10285 2011-08-01 Robert Dewar <dewar@adacore.com>
10287 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10289 (Same_Aspect): New function.
10290 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10291 Type_Invariant, Precondition, Postcondition.
10292 * snames.ads-tmpl: Add Name_Type_Invariant.
10294 2011-08-01 Robert Dewar <dewar@adacore.com>
10296 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10298 (Freeze_All_Ent): Fix error in handling inherited aspects.
10299 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10300 already analyzed, but don't skip entire processing of a declaration,
10301 that's wrong in some cases of declarations being rewritten.
10302 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10303 Don't delay for integer, string literals
10304 Treat predicates in usual manner for delay, remove special case code,
10306 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10307 (Build_Predicate_Function): Update saved expression in aspect
10308 (Build_Invariant_Procedure): Update saved expression in aspect
10309 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10310 of replacement of discriminant references if the reference is simple.
10312 2011-08-01 Robert Dewar <dewar@adacore.com>
10314 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10315 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10316 Static_Predicate and Dynamic_Predicate.
10317 (Build_Predicate_Function): Add processing for Static_Predicate
10318 and Dynamic_Predicate.
10319 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10320 (From_Static_Predicate): New flag
10321 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10323 2011-08-01 Robert Dewar <dewar@adacore.com>
10325 * usage.adb: Documentation cleanup for Ada version modes in usage.
10326 * expander.adb: Minor reformatting.
10328 2011-08-01 Robert Dewar <dewar@adacore.com>
10330 * atree.ads: Minor comment fix.
10331 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10332 a-witeio.ads, sem_prag.adb: Minor reformatting.
10334 2011-08-01 Doug Rupp <rupp@adacore.com>
10336 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10337 pointers. Use descrip.h header file for convenience. Add some
10340 2011-08-01 Robert Dewar <dewar@adacore.com>
10342 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10343 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10344 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10346 (Check_Aspect_At_End_Of_Declarations): New procedure
10347 (Analye_Aspect_Specification): Minor changes for above procedures
10348 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10349 specification node as well.
10351 2011-08-01 Pascal Obry <obry@adacore.com>
10353 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10354 Windows files. Use GetFilesAttributes() in this case to check for file
10355 existence instead of returning with an error code.
10357 2011-08-01 Vincent Celier <celier@adacore.com>
10359 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10360 High is above Source length.
10362 2011-08-01 Robert Dewar <dewar@adacore.com>
10364 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10366 2011-08-01 Robert Dewar <dewar@adacore.com>
10368 * aspects.ads (Boolean_Aspects): New subtype.
10369 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10370 for derived types in cases where the parent type and derived type have
10372 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10373 with aspects when parent type also has aspects.
10374 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10375 boolean expression at this point).
10376 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10377 accordance with final decision on the Ada 2012 feature.
10378 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10380 2011-08-01 Matthew Heaney <heaney@adacore.com>
10382 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10384 2011-08-01 Pascal Obry <obry@adacore.com>
10386 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10387 Fix Replace_Slice when High is above current string size.
10388 (Replace_Slice): Fix DL computation when High is above current
10391 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10393 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10395 2011-08-01 Matthew Heaney <heaney@adacore.com>
10397 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10400 2011-08-01 Pascal Obry <obry@adacore.com>
10402 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10405 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10407 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10408 access to protected subprograms in generic bodies.
10409 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10410 protected type, indicate that the convention of the subprogram is
10411 Convention_Protected, because it may be used in subsequent declarations
10412 within the protected declaration.
10414 2011-08-01 Vincent Celier <celier@adacore.com>
10416 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10417 and "final" procedures when the name of the library is "ada", to avoid
10418 duplicate symbols "adainit" and "adafinal" in executables.
10420 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10422 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10423 quantified expression that appears within a postcondition and uses the
10424 Ada2012 'Result attribute.
10426 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10428 * init.c (__gnat_error_handler): Cast reason to int.
10429 (__gnat_install_handler): Explain sa_sigaction use.
10431 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10433 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10434 subprogram has copy-in copy-out parameters, try to promote the mode of
10435 the return type if it is passed in registers.
10437 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10439 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10440 left operand as addressable.
10442 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10444 * gcc-interface/gigi.h (build_function_stub): Remove.
10445 (build_return_expr): Likewise.
10446 (convert_vms_descriptor): Declare.
10447 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10448 (build_function_stub): Move to...
10449 * gcc-interface/utils2.c (build_return_expr): Move to...
10450 * gcc-interface/trans.c (build_function_stub): ...here.
10451 (build_return_expr): ...here.
10452 (Subprogram_Body_to_gnu): Add local variable for language_function.
10453 Disconnect the parameter attributes cache, if any, once done with it.
10454 Call end_subprog_body only after setting the end_locus.
10455 Build the stub associated with the function, if any, at the very end.
10456 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10457 variables and streamline control flow.
10459 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10462 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10463 g-trasym-dwarf.adb.
10465 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10468 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10469 Assign to act.sa_sigaction.
10470 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10471 current->return_address to char * before arithmetic.
10473 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10475 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10476 Correct argument types.
10477 Extract code from reason.
10478 (__gnat_install_handler): Assign to act.sa_sigaction.
10480 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10482 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10483 (GNAT1_OBJS): ...here.
10485 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10488 * g-socthi-mingw.adb (Fill): Fix formatting.
10490 * gcc-interface/gigi.h: Move around comment.
10492 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10495 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10497 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10500 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10502 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10504 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10505 range comparison if Pmode is SImode.
10507 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10508 Eric Botcazou <ebotcazou@adacore.com>
10510 * adadecode.c: Wrap up in extern "C" block.
10511 * adadecode.h: Likewise.
10512 * adaint.c: Likewise. Remove 'const' keyword.
10513 * adaint.h: Likewise.
10514 * argv.c: Likewise.
10515 * atree.h: Likewise.
10517 * cstreams.c: Likewise.
10519 * exit.c: Likewise.
10521 * final.c: Likewise.
10522 * init.c: Likewise.
10523 * initialize.c: Likewise.
10524 * link.c: Likewise.
10525 * namet.h: Likewise.
10526 * nlists.h: Likewise.
10527 * raise.c: Likewise.
10528 * raise.h: Likewise.
10529 * repinfo.h: Likewise.
10530 * seh_init.c: Likewise.
10531 * targext.c: Likewise.
10532 * tracebak.c: Likewise.
10533 * uintp.h: Likewise.
10534 * urealp.h: Likewise.
10535 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10536 * xsinfo.adb: Likewise.
10537 * xsnamest.adb: Likewise.
10538 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10539 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10540 * gcc-interface/misc.c: Likewise.
10541 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10542 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10543 ada/targext.o here...
10544 (GNAT_ADA_OBJS): ...and not here.
10545 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10546 (GNATBIND_OBJS): Reorder.
10548 2011-07-07 Richard Henderson <rth@redhat.com>
10550 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10551 dwarf2out_frame_init.
10553 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10555 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10557 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10560 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10562 2011-07-06 Richard Guenther <rguenther@suse.de>
10564 * gcc-interface/misc.c (gnat_init): Merge calls to
10565 build_common_tree_nodes and build_common_tree_nodes_2.
10566 Re-initialize boolean_false_node.
10568 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10569 Olivier Hainque <hainque@adacore.com>
10570 Nicolas Setton <setton@adacore.com>
10572 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10573 the type according to the ARTIFICIAL_P parameter.
10574 (create_type_decl): Likewise.
10575 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10577 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10579 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10580 (gnatbind): Likewise.
10582 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10584 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10586 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10588 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10589 local variable throughout. Remove useless call to Base_Type.
10590 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10591 Take it also into account for the volatileness of the field. Set the
10592 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10594 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10596 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10597 on a dereference built for a by-ref object if it has an address clause.
10599 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10601 * einfo.ads (Address_Taken): Document use for the second argument of
10602 Asm_Input and Asm_Output attributes.
10603 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10604 argument is an entity name, then set Address_Taken on it.
10605 <Attribute_Asm_Output>: Likewise.
10606 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10607 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10608 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10609 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10611 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10613 PR middle-end/46500
10614 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10616 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10618 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10619 (ada/utils.o): Update dependencies.
10620 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10621 ../../../libcpp/libcpp.a.
10622 * gcc-interface/utils.c: Include common/common-target.h.
10623 (process_attributes): Use targetm_common.have_named_sections.
10625 2011-06-07 Richard Guenther <rguenther@suse.de>
10627 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10630 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10632 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10633 TREE_THIS_NOTRAP flag.
10635 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10637 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10640 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10642 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10643 constants whose full view has discriminants specially.
10645 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10647 * gcc-interface/utils.c: Include diagnostic.h.
10648 (gnat_write_global_declarations): Output debug information for all
10649 global type declarations before finalizing the compilation unit.
10650 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10652 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10654 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10656 2011-05-25 Kai Tietz <ktietz@redhat.com>
10658 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10659 initialization instead of const/none-const pointer assignment.
10661 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10663 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10664 $(EXTRA_GNAT1_OBJS).
10665 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10666 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10667 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10668 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10669 libcommon-target.a instead of prefix.o.
10671 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10674 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10676 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10678 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10679 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10680 instead of version.o.
10682 2011-05-18 Kai Tietz <ktietz@redhat.com>
10684 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10685 boolean_false_node instead of integer_zero_node.
10686 (convert_with_check): Likewise.
10687 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10689 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10691 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10692 type of the parameter is an unconstrained array, convert the actual to
10693 the type of the formal in the In Out and Out cases as well.
10695 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10697 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10698 call build_function_type_array or build_varargs_function_type_array
10700 (create_subprog_type): Don't call build_function_type; call
10701 build_function_type_vec instead.
10703 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10705 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10706 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10707 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10709 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10711 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10713 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10714 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10716 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10718 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10720 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10722 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10723 instead of accessing TYPE_ARG_TYPES directly.
10724 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10726 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10729 * gcc-interface/gigi.h (get_variant_part): Declare.
10730 * gcc-interface/decl.c (get_variant_part): Make global.
10731 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10732 types have the same constant size, are record types and T1 has a
10733 variant part while T2 doesn't.
10735 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10737 * gcc-interface/utils.c (begin_subprog_body): Do not call
10739 (end_subprog_body): Likewise.
10741 2011-05-04 Richard Guenther <rguenther@suse.de>
10743 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10745 (pos_to_constructor): Likewise.
10747 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10748 Eric Botcazou <ebotcazou@adacore.com>
10750 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10751 of build_function_type. Adjust calls to...
10752 (build_raise_check): ...this. Do not take a void_tree parameter.
10753 Call build_function_type_list instead of build_function_type.
10754 Fix head comment and swap couple of conditional blocks.
10756 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10758 * gnatvsn.ads (Library_Version): Bump to 4.7.
10759 (Current_Year): Bump to 2011.
10761 2011-04-29 Michael Matz <matz@suse.de>
10763 * gcc-interface/misc.c (gnat_handle_option): Set
10764 warn_maybe_uninitialized.
10766 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10768 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10769 the Watson/McCabe paper.
10771 2011-04-23 Jim Meyering <meyering@redhat.com>
10773 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10775 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10777 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10780 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10782 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10784 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10785 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10786 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10787 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10788 <all>: Do not set flags on the reused DECL node coming from an alias.
10789 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10790 don't need debug info here...
10791 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10792 (gigi): Adjust calls to create_subprog_decl.
10793 (build_raise_check): Likewise.
10794 (establish_gnat_vms_condition_handler): Likewise.
10795 (Compilation_Unit_to_gnu): Likewise.
10796 (gnat_to_gnu): Likewise.
10798 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10800 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10801 (NO_REORDER_ADAFLAGS): New variable.
10802 (EXTRA_GNATTOOLS): Always define.
10803 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10804 Clean up and adjust list of files compiled with special options.
10805 * gcc-interface/Make-lang.in: Likewise.
10806 (ada/decl.o): Cosmetical change.
10807 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10809 2011-04-20 Jim Meyering <meyering@redhat.com>
10811 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10813 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10815 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10816 $(CFLAGS) on the link line.
10818 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10820 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10821 padded type built for the return type if it is unconstrained.
10823 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10825 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10827 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10829 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10830 before calling TREE_CHAIN.
10831 * gcc-interface/misc.c (gnat_init_ts): New function.
10832 (LANG_HOOKS_INIT_TS): Define.
10834 2011-04-12 Martin Jambor <mjambor@suse.cz>
10836 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10837 instead of cgraph_node.
10839 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10841 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10842 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10845 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10847 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10848 of aggregate types that contain a placeholder.
10850 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10852 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10854 (handle_type_generic_attribute): Likewise.
10856 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10859 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10861 2011-04-04 Kai Tietz <ktietz@redhat.com>
10864 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10867 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10869 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10870 type case, do not strip a padding type around the array type.
10872 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10874 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10877 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10879 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10880 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10881 code for -feliminate-unused-debug-types.
10882 (gnat_post_options): Likewise.
10884 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10886 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10887 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10890 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10892 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10893 DECL_ARTIFICIAL flag on enumeration types.
10895 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10897 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10898 fat pointer types artificial unconditionally.
10899 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10902 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10904 * gcc-interface/gigi.h (get_dummy_type): Declare.
10905 (build_dummy_unc_pointer_types): Likewise.
10906 (finish_fat_pointer_type): Likewise.
10907 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10908 fat pointer type has been built, complete it in place.
10909 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10910 and thin pointers. Remove useless variable.
10911 (finish_fat_pointer_type): Make global and move to...
10912 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10913 (get_dummy_type): New function.
10914 (build_dummy_unc_pointer_types): Likewise.
10915 (gnat_pushdecl): Propage the name to the anonymous variants only.
10916 (update_pointer_to): Only adjust the pointer types in the unconstrained
10919 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10921 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10922 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10923 if this is a Taft amendment type and the full declaration is available.
10924 * gcc-interface/trans.c (process_type): Likewise.
10925 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10926 (process_freeze_entity): Likewise.
10927 * gcc-interface/utils.c (dummy_global): New static variable.
10928 (gnat_write_global_declarations): If there are types declared as used
10929 at the global level, insert them in the global hash table.
10931 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10933 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10934 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10935 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10937 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10938 flag of the type accordingly.
10939 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10941 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10943 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10944 finalizing types when updating the pointers to the designated type.
10945 <all>: Finalize the deferred types even if we didn't defer processing
10946 of incomplete types in this invocation.
10948 2011-04-01 Olivier Hainque <hainque@adacore.com>
10949 Nicolas Setton <setton@adacore.com>
10950 Eric Botcazou <ebotcazou@adacore.com>
10952 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10953 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10955 2011-03-28 Kai Tietz <ktietz@redhat.com>
10957 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10959 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10960 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10962 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10964 2011-03-28 Tristan Gingold <gingold@adacore.com>
10967 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10968 Use ada output of gnatbind.
10969 (ada/b_gnatb.adb): Ditto.
10970 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10971 (ada.mostlyclean, ada.stage1)
10972 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10973 (ada.stagefeedback): Adjust.
10974 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10975 Use ada output of gnatbind.
10976 (b_gnatm.adb): Ditto.
10977 (b_gnatl.o, b_gnatm.o): New rules.
10979 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10981 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10982 for the padded type built to support a specified size or alignment.
10984 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10986 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10987 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10988 unconditionally to the end of the unit when the designated type is
10990 <all>: Rename local variable. Attempt to un-defer types only and do it
10991 for limited_with'ed types as well.
10992 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10993 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10994 consistently and remove redundant call to finalize_from_with_types.
10996 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10998 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10999 subprograms without a previous spec declared in the same unit.
11000 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11001 subprograms at the end of the unit instead of at the beginning.
11002 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11003 isn't public for the special handling of non-inline functions nested
11004 inside inline external functions.
11006 2011-03-25 Jeff Law <law@redhat.com>
11008 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11010 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11012 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11013 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11014 to compute Set_Size_Depends_On_Discriminant.
11015 (Layout_Type): Call it on array types in back-end layout mode.
11016 * sem_util.adb (Requires_Transient_Scope): Return true for array
11017 types only if the size depends on the value of discriminants.
11018 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11019 type if the RHS is a call to a function that returns an unconstrained
11020 type with default discriminant.
11022 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11024 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11025 non-conversion to the nominal result type at the end.
11027 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11029 * gcc-interface/trans.c (create_temporary): New function taken from...
11030 (create_init_temporary): ...here. Call it.
11031 (call_to_gnu): Create the temporary for the return value early, if any.
11032 Create it for a function with copy-in/copy-out parameters if there is
11033 no target; in other cases of copy-in/copy-out, use another temporary.
11034 Push the new binding level lazily. Add and rename local variables.
11036 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11038 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11040 (set_rm_size): Likewise.
11042 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11044 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11045 for the padded type built in order to support a specified alignment.
11046 Fix incorrect formatting.
11048 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11051 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11053 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11055 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11056 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11057 to the end of the list. Adjust recursive call. Rename local variable.
11058 If REORDER is true, reorder components of the record type.
11059 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11060 components_to_record and adjust the parameter list.
11062 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11064 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11065 disabled, use the variable for bounds of loop iteration scheme.
11067 2011-03-21 Kai Tietz <ktietz@redhat.com>
11070 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11072 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11074 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11075 out whether the expression is read-only. Short-circuit placeholder
11076 case and rename a couple of local variables.
11078 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11080 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11081 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11082 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11083 (convert): Deal with conversions from a smaller form type specially.
11085 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11087 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11088 its argument, except for the special -I- switch.
11090 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11092 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11095 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11097 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11099 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11101 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11103 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11104 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11105 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11106 Do not generate the check directly, instead instantiate the template
11107 check present in the descriptor.
11108 (make_descriptor_field): Move around.
11109 (build_vms_descriptor32): Build a template check in the POINTER field.
11110 (build_vms_descriptor): Remove useless suffixes.
11111 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11113 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11116 * targext.c: Include target files if IN_RTS is defined.
11118 2011-01-26 Richard Guenther <rguenther@suse.de>
11121 * targext.c: Include config.h.
11122 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11125 2011-01-04 Pascal Obry <obry@adacore.com>
11126 Eric Botcazou <ebotcazou@adacore.com>
11128 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11130 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11132 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11133 end-of-case on the end label and its associated gotos, if any.
11135 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11137 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11138 expressions of the parameter cache within the statement group of
11139 the CICO mechanism.
11141 2011-01-04 Olivier Hainque <hainque@adacore.com>
11142 Eric Botcazou <ebotcazou@adacore.com>
11144 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11145 (set_end_locus_from_node): New function.
11146 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11147 make and the function end_locus.
11148 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11149 for the elaboration subprogram.
11150 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11151 set the end_locus of the expression as well.
11153 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11156 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11157 variables that are referenced in exception handlers volatile.
11161 Copyright (C) 2011 Free Software Foundation, Inc.
11163 Copying and distribution of this file, with or without modification,
11164 are permitted in any medium without royalty provided the copyright
11165 notice and this notice are preserved.