1 2011-08-29 Pascal Obry <obry@adacore.com>
3 * prj-nmsc.adb: Minor reformatting.
5 2011-08-29 Jose Ruiz <ruiz@adacore.com>
7 * a-exetim.ads (Interrupt_Clocks_Supported,
8 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
9 definitions to be compliant with AI-0171.
11 2011-08-29 Robert Dewar <dewar@adacore.com>
13 * a-ngelfu.adb: Add comments.
15 2011-08-29 Geert Bosch <bosch@adacore.com>
17 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
18 the closest machine number to Pi / 2.0.
20 2011-08-29 Jose Ruiz <ruiz@adacore.com>
22 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
23 package Ada.Synchronous_Barriers.
24 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
25 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
26 default implementation using protected objects and another one
27 a-synbar-posix using POSIX barriers as the underlying support.
28 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
29 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
30 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
31 Clean up dependencies.
32 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
34 2011-08-29 Robert Dewar <dewar@adacore.com>
36 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
37 exp_dist.adb: Minor code reorganization.
40 2011-08-29 Thomas Quinot <quinot@adacore.com>
42 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
43 primitive operation must support external streaming if it is not a
44 controlling access result.
46 2011-08-29 Thomas Quinot <quinot@adacore.com>
48 * sinfo.ads, sem_ch7.adb: Minor reformatting.
50 2011-08-29 Bob Duff <duff@adacore.com>
52 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
53 restriction on allocators, as required by AI05-0013-1.
54 * restrict.ads: Minor comment fix.
56 2011-08-29 Tristan Gingold <gingold@adacore.com>
58 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
59 (To_Jmpbuf_Address): Ditto
60 (builtin_longjmp): Ditto
62 2011-08-29 Thomas Quinot <quinot@adacore.com>
64 * sem_res.adb: Minor reformatting.
66 2011-08-29 Vincent Celier <celier@adacore.com>
68 * make.adb (Gnatmake): Move special processing for VM targets after the
69 call to Get_Target_Parameters.
71 2011-08-29 Thomas Quinot <quinot@adacore.com>
73 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
75 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
77 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
78 where an anonymous access discriminant of a limited designated type
79 appears in a non-immutably limited discriminated type and issue an
80 error message. Add local variable Desig_T and replace all occurrences
83 2011-08-29 Jose Ruiz <ruiz@adacore.com>
85 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
86 implementation is compliant to RM D.15(15/2) after the modification
87 imposed by AI05-0094-1 (binding interpretation).
89 2011-08-29 Robert Dewar <dewar@adacore.com>
91 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
92 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
94 2011-08-29 Thomas Quinot <quinot@adacore.com>
96 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
97 the scope name, do not report a missing label as a style violation (it
98 will be diagnosed as an illegality).
99 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
100 variant records: Get_Enum_Lit_From_Pos already returns a usage
101 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
102 on Expr in Integer_Literal case so that it can be used by
105 2011-08-29 Tristan Gingold <gingold@adacore.com>
107 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
109 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
110 (Build_Abort_Block_Handler): New function to build an Abort_Signal
112 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
113 Build_Abort_Block_Handler to build the exception handler. Do not
114 undefer aborts for the Abort_Signal exception handler if back-end
116 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
117 back_end exceptions for all others and abort_signal.
118 * s-except.ads (ZCX_By_Default): New constant.
119 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
120 (Raise_Exception_Always): Ditto.
121 (Raise_From_Signal_Handler): Ditto.
122 (Raise_With_Location_And_Msg): Ditto.
123 (Raise_With_Msg): Ditto.
125 (Reraise_Occurence): Ditto.
126 (Reraise_Occurrence_Always): Ditto.
127 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
128 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
130 2011-08-29 Thomas Quinot <quinot@adacore.com>
132 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
134 2011-08-29 Robert Dewar <dewar@adacore.com>
136 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
137 Minor code reorganization.
139 2011-08-29 Bob Duff <duff@adacore.com>
141 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
142 2012, not just Ada 2005.
144 2011-08-29 Vincent Celier <celier@adacore.com>
146 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
147 with a project file or with gprbuid, if -gnatep= is specified, the
148 builder may need to be invoked with -x.
150 2011-08-29 Tristan Gingold <gingold@adacore.com>
152 * a-exexpr-gcc.adb: Minor comment fix.
154 2011-08-29 Robert Dewar <dewar@adacore.com>
156 * sem_ch8.adb: Minor reformatting.
158 2011-08-29 Bob Duff <duff@adacore.com>
160 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
161 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
162 treating "some" as unreserved in earlier Ada versions. This is now
163 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
164 rather than Name_Some, since Tok_Some is now recognized as reserved.
165 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
167 * scans.ads: Minor comment fixes.
168 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
169 for other language versions.
170 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
171 treating "some" as unreserved in earlier Ada versions. This is now
172 handled in Snames.Is_Keyword_Name.
173 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
175 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
176 unreserved in earlier Ada versions. This is now handled in
177 Snames.Is_Keyword_Name.
178 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
179 words as for other language versions.
180 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
181 Ada 2012, not just Ada 2005.
183 2011-08-29 Ed Schonberg <schonberg@adacore.com>
185 * sem_ch13.adb: Additional semantic checks for aspects involved in
188 2011-08-29 Matthew Heaney <heaney@adacore.com>
190 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
191 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
193 (Ancestor_Find): ditto.
195 2011-08-29 Thomas Quinot <quinot@adacore.com>
197 * par-endh.adb: Minor reformatting.
199 2011-08-29 Tristan Gingold <gingold@adacore.com>
201 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
202 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
203 (Adjust_N_CLeanups_For): Remove.
204 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
206 (Propgate_Exception): Adjust.
207 * raise-gcc.c: Add a few static/const.
208 (Adjust_N_Cleanups_For): Remove declaration.
209 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
211 2011-08-29 Ed Schonberg <schonberg@adacore.com>
213 * sem_ch8.adb: Use type of function return when rewriting as object
216 2011-08-29 Gary Dismukes <dismukes@adacore.com>
218 * sem_type.adb: Minor reformatting.
220 2011-08-29 Robert Dewar <dewar@adacore.com>
222 * makeutl.adb: Minor reformatting.
224 2011-08-29 Ed Schonberg <schonberg@adacore.com>
226 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
227 function call of a limited type, the expansion of the renaming is
228 complicated by the presence of various temporaries and subtypes that
229 capture constraints of the renamed object.
230 Rewrite node as an object declaration, whose expansion is simpler.
231 Given that the object is limited there is no copy involved and no
234 2011-08-29 Robert Dewar <dewar@adacore.com>
236 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
237 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
239 2011-08-29 Tristan Gingold <gingold@adacore.com>
241 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
242 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
243 system-linux-hppa.ads, system-linux-s390.ads,
244 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
245 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
246 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
247 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
248 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
249 system-solaris-sparc.ads, system-lynxos-x86.ads,
250 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
251 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
252 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
253 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
254 system-vxworks-x86.ads: Remove GCC_ZCX_Support
255 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
256 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
257 * opt.ads: Adjust comment.
258 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
259 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
260 * system.ads: Move GCC_ZCX_Support to obsolete entries.
262 2011-08-29 Emmanuel Briot <briot@adacore.com>
264 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
265 file name is specified on the gnatmake or gprbuild command line, and
266 before we search for that file in the project.
268 2011-08-29 Ed Schonberg <schonberg@adacore.com>
270 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
271 used to determine whether a possible interpretation for an overloadable
272 entity is declared within the current instantiation and should be
273 included in the candidate set.
275 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
277 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
279 2011-08-29 Ed Schonberg <schonberg@adacore.com>
281 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
282 access subtype is access_to_subprogram, when applying checks for
285 2011-08-29 Matthew Heaney <heaney@adacore.com>
287 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
288 for sibling when common parent.
290 2011-08-29 Thomas Quinot <quinot@adacore.com>
292 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
295 2011-08-29 Ed Schonberg <schonberg@adacore.com>
297 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
298 for the return type when in ASIS mode.
300 2011-08-29 Vincent Celier <celier@adacore.com>
302 * make.adb (Gnatmake): Get the default search dirs, then the target
303 parameters after getting the Builder switches, as the Builder switches
304 may include --RTS= and that could change the default search dirs.
306 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
308 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
309 Make_Final_Call. Move the processing for class-wide types before the
310 processing for derivations from [Limited_]Controlled.
311 (Make_Final_Call): Move the processing for class-wide types before the
312 processing for derivations from [Limited_]Controlled.
313 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
314 Add code to account for alignments larger than the list header. Add a
315 comment illustrating the structure of the allocated object + padding +
317 (Deallocate_Any_Controlled): Add code to account for alignments larger
318 than the list header.
320 2011-08-29 Ed Schonberg <schonberg@adacore.com>
322 * sinfo.ads, sinfo.adb: New node kind
323 N_Formal_Incomplete_Type_Definition, related flags.
324 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
325 Parse formal incomplete types.
326 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
328 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
329 Formal incomplete types do not need completion.
330 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
331 Validate_Incomplete_Type_Instance): New procedures to handle formal
333 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
334 that corresponds to a formal incomplete type.
335 * sprint.adb: Handle formal incomplete type declarations.
336 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
339 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
341 * a-fihema.ads, a-fihema.adb: Unit removed.
342 * a-undesu.ads, a-undesu.adb: New unit implementing
343 Ada.Unchecked_Deallocate_Subpool.
344 * einfo.adb: Remove Associated_Collection from the node usage.
345 Add Finalization_Master to the node usage.
346 (Associated_Collection): Removed.
347 (Finalization_Master): New routine.
348 (Set_Associated_Collection): Removed.
349 (Set_Finalization_Master): New routine.
350 (Write_Field23_Name): Remove Associated_Collection from the output. Add
351 Finalization_Master to the output.
352 * einfo.ads: Remove attribute Associated_Collection and its uses in
354 Add new attribute Finalization_Master along with its uses in entitites.
355 (Associated_Collection): Removed along with its pragma import.
356 (Finalization_Master): New routine along with a pragma import.
357 (Set_Associated_Collection): Removed along with its pragma import.
358 (Set_Finalization_Master): New routine along with a pragma import.
359 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
360 Build_Finalization_Collection with Build_Finalization_Master.
361 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
362 before the bodies of the predefined routines. Add comment explaining
363 this. Replace call to Build_Finalization_Collection with
364 Build_Finalization_Master.
365 (Freeze_Type): Replace call to Build_Finalization_Collection with
366 Build_Finalization_Master.
367 (Make_Finalize_Address_Body): Comment reformatting.
368 (Make_Predefined_Primitive_Specs): Code reformatting.
369 (Stream_Operation_OK): Update comment mentioning finalization
370 collections. Replace RE_Finalization_Collection with
371 RE_Finalization_Master.
372 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
373 Associated_Collection with Finalization_Master. Replace call to
374 Build_Finalization_Collection with Build_Finalization_Master.
375 (Expand_Allocator_Expression): Replace call to Associated_Collection
376 with Finalization_Master. Replace call to Set_Associated_Collection with
377 Set_Finalization_Master. Remove the generation of
378 Set_Finalize_Address_Ptr.
379 (Expand_N_Allocator): Replace call to Associated_Collection with
380 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
381 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
382 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
383 comment on usage. Replace call to Needs_BIP_Collection with
384 Needs_BIP_Finalization_Master Remplace BIP_Collection with
385 BIP_Finalization_Master. Update all comments which mention finalization
386 collections. Replace Associated_Collection with
387 Finalization_Master. Replace Build_Finalization_Collection with
388 Build_Finalization_Master.
389 (BIP_Formal_Suffix): Update BIP_Collection's case.
390 (Build_Heap_Allocator): Update the related comment. Rename local
391 variable Collect to Fin_Mas_Id and update its occurrences. Update
392 comments which mention finalization collections. Replace
393 Set_Associated_Collection with Set_Finalization_Master.
394 (Expand_Call): Update the code which detects a special piece of library
396 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
397 Add_Collection_Actual_To_Build_In_Place_Call with
398 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
399 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
400 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
401 Add_Collection_Actual_To_Build_In_Place_Call with
402 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
403 (Make_Build_In_Place_Call_In_Assignment): Replace call to
404 Add_Collection_Actual_To_Build_In_Place_Call with
405 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
406 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
407 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
408 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
409 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
410 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
411 Replace call to Set_Associated_Collection with Set_Finalization_Master.
412 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
413 Replace the call to Associated_Collection with Finalization_Master.
414 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
415 Update the way finalization master names are generated. Update the
416 retrieval of the correct access type which will carry the pool and
418 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
419 (Make_Finalize_Address_Body): Abstract types do not need
420 Finalize_Address. Code reformatting.
421 (Make_Finalize_Address_Stmts): Update comment on usage.
422 (Make_Set_Finalize_Address_Ptr_Call): Removed.
423 (Process_Declarations): Update comments.
424 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
425 Build_Finalization_Master. Update associated comment.
426 (Make_Set_Finalize_Address_Ptr_Call): Removed.
427 * exp_ch13.adb: Update comments which mention finalization collections.
428 (Expand_N_Free_Statement): Replace the call to Associated_Collection
429 with Finalization_Master.
430 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
431 create calls to routines Allocate_Any_Controlled and
432 Deallocate_Any_Controlled.
433 (Find_Finalize_Address): New routine.
434 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
436 (Requires_Cleanup_Actions): Update the comment on freeze node
438 * exp_util.ads: Remove comment on generated code for
439 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
440 is better to simply look in the body.
441 * freeze.adb (Freeze_All): Update the comment of finalization
442 collections. Replace the call to Associated_Collection with
443 Finalization_Master. Replace the call to Build_Finalization_Collection
444 with Build_Finalization_Master.
445 * impunit.adb: Add a-undesu and s-stposu to the list of units.
446 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
448 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
449 Ada.Finalization. Add processing for children of System.Storage_Pools.
450 * rtsfind.ads: Remove the naming of second level children of
452 Remove Ada_Finalization_Heap_Management from the list of units.
453 Remove subtype Ada_Finalization_Child.
454 Remove the following subprogram entities:
458 RE_Finalization_Collection
459 RE_Finalization_Collection_Ptr
460 RE_Set_Finalize_Address_Ptr
462 Add the naming of second level children of System.Storage_Pools.
463 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
465 Add subtype System_Storage_Pools_Child.
466 Add the following subprogram entities to System.Finalization_Masters:
468 RE_Finalization_Master
469 RE_Finalization_Master_Ptr
471 Add the following subprogram entities to System.Storage_Pools.Subpools:
473 RE_Allocate_Any_Controlled
474 RE_Deallocate_Any_Controlled
475 RE_Root_Storage_Pool_With_Subpools
479 Move the following subprogram entities from
480 Ada.Finalization.Heap_Management to System.Finalization_Masters:
482 RE_Add_Offset_To_Address
487 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
488 Set_Associated_Collection with Set_Finalization_Master.
489 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
490 BIP_Finalization_Master is created.
491 * s-finmas.adb: New unit System.Finalization_Masters.
492 * s-finmas.ads: New unit System.Finalization_Masters.
493 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
494 * s-stposu.ads, s-stposu.adb: New unit implementing
495 System.Storage_Pools.Subpools.
497 2011-08-29 Bob Duff <duff@adacore.com>
499 * tbuild.adb: Add assertion.
501 2011-08-29 Thomas Quinot <quinot@adacore.com>
503 * s-pooglo.adb: Minor reformatting.
505 2011-08-29 Ed Schonberg <schonberg@adacore.com>
507 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
508 an indexed component of a packed array whose element type is a record
509 with a representation clause different from that of the right-hand
510 side, generate a temporary to minimuze the number of bit-field
511 operations generated.
513 2011-08-29 Ed Schonberg <schonberg@adacore.com>
515 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
516 declarations, and thus are likely insertion points for actions.
518 2011-08-29 Bob Duff <duff@adacore.com>
520 * einfo.ads: Minor comment fix.
522 2011-08-29 Robert Dewar <dewar@adacore.com>
524 * frontend.adb, gnat1drv.adb: Minor reformatting.
526 2011-08-29 Tristan Gingold <gingold@adacore.com>
528 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
529 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
530 space in front of the header.
532 2011-08-29 Johannes Kanig <kanig@adacore.com>
534 * frontend.adb (Frontend): Exit after creating Standard package when
536 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
539 2011-08-29 Robert Dewar <dewar@adacore.com>
541 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
542 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
543 snames.ads-tmpl: Minor reformatting.
545 2011-08-29 Philippe Gil <gil@adacore.com>
547 * prj.adb (Reset_Units_In_Table): New procedure.
548 Reset units to avoid access to freed memory.
550 2011-08-29 Thomas Quinot <quinot@adacore.com>
552 * get_scos.adb: When reading a P statement SCO without a pragma name
553 (from an older ALI file), ensure that the Pragma_Name component is set
554 to Unknown_Pragma (not left uninitialized).
556 2011-08-29 Vincent Celier <celier@adacore.com>
558 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
559 modified to compute correctly the object path of a SAL project that is
560 extending another library project.
561 (Write_Path_File): New procedure.
562 * makeutl.ads (Directories): New table moved from Buildgpr
563 (Get_Directories): New procedure moved from Buildgpr
564 (Write_Path_File): New procedure
565 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
566 paths before binding SALs, instead of Set_Ada_Paths.
567 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
569 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
570 (Current_Source_Path_File_Of): New function
571 (Set_Current_Object_Path_File_Of): New procedure
572 (Current_Source_Object_File_Of): New function
573 (Set_Current_Object_Path_File_Of): New procedure
574 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
575 (Current_Source_Path_File_Of): New function
576 (Set_Current_Object_Path_File_Of): New procedure
577 (Current_Source_Object_File_Of): New function
578 (Set_Current_Object_Path_File_Of): New procedure
580 2011-08-29 Ed Schonberg <schonberg@adacore.com>
582 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
583 packed entity, use a bit-field assignment only if there is no change of
586 2011-08-29 Thomas Quinot <quinot@adacore.com>
588 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
589 Is_RTU instead of using Chars comparisons.
591 2011-08-29 Thomas Quinot <quinot@adacore.com>
593 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
594 temporary object if the actual is constrained, and the discriminants
595 read from the stream don't match.
597 2011-08-29 Tristan Gingold <gingold@adacore.com>
599 * sem_attr.adb, exp_attr.adb: Add handling of
600 Attribute_System_Allocator_Alignment
601 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
602 Attribute_System_Allocator_Alignment.
603 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
604 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
605 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
606 get_target_system_allocator_alignment.
608 2011-08-29 Arnaud Charlet <charlet@adacore.com>
610 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
613 2011-08-29 Arnaud Charlet <charlet@adacore.com>
615 * exp_ch3.adb (In_Runtime): Fix typo.
617 2011-08-29 Bob Duff <duff@adacore.com>
619 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
621 2011-08-29 Ed Schonberg <schonberg@adacore.com>
623 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
624 and a separate tag assignment is generated, ensure that the tag
625 assignment is analyzed.
627 2011-08-29 Ed Schonberg <schonberg@adacore.com>
629 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
630 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
631 of statement lists that may contain local declarations.
632 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
633 duplicate the triggering statements needed for the expansion of this
634 construct, when the trigger is a dispatching call to a synchronized
637 2011-08-29 Arnaud Charlet <charlet@adacore.com>
639 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
640 * bindgen.adb: Add comments.
641 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
644 2011-08-29 Robert Dewar <dewar@adacore.com>
646 * exp_attr.adb: Minor reformatting.
647 Minor code reorganization and commenting.
648 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
651 2011-08-29 Thomas Quinot <quinot@adacore.com>
653 * get_scos.adb: Ignore chaining indicators not currently supported
656 2011-08-29 Arnaud Charlet <charlet@adacore.com>
658 * system.ads: Minor editing.
660 2011-08-29 Arnaud Charlet <charlet@adacore.com>
662 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
664 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
665 Attribute_Elab_Subp_Body.
666 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
667 * sem_util.adb: Update comments.
669 2011-08-29 Thomas Quinot <quinot@adacore.com>
671 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
672 pragma name for each SCO statement corresponding to a pragma.
674 2011-08-29 Arnaud Charlet <charlet@adacore.com>
676 * opt.ads: Minor editing.
678 2011-08-29 Yannick Moy <moy@adacore.com>
680 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
681 that only made sense for CodePeer mode.
683 2011-08-29 Jose Ruiz <ruiz@adacore.com>
685 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
686 which is no longer used.
687 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
688 handling of the 64-bit division check.
689 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
691 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
694 2011-08-29 Thomas Quinot <quinot@adacore.com>
696 * get_scos.adb: Minor reformatting.
698 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
700 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
701 statement list is wrapped in a block, the block is explicitly analyzed
702 in order to properly redecorate the entities and create a servicing
705 2011-08-29 Tristan Gingold <gingold@adacore.com>
707 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
708 (Set_Zero_Cost_Handling): Remove.
710 2011-08-29 Thomas Quinot <quinot@adacore.com>
712 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
714 2011-08-29 Geert Bosch <bosch@adacore.com>
716 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
717 instruction, as the latter may produce -0.0, which is not a valid VAX
719 (Neg_G): Likewise for VAX F float.
721 2011-08-29 Robert Dewar <dewar@adacore.com>
723 * exp_util.adb: Minor reformatting.
725 2011-08-29 Yannick Moy <moy@adacore.com>
727 * sem_ch3.adb: Minor comment update.
729 2011-08-29 Thomas Quinot <quinot@adacore.com>
731 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
734 2011-08-29 Thomas Quinot <quinot@adacore.com>
736 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
737 current statement sequence on a generic instantiation or a subprogram
740 2011-08-29 Robert Dewar <dewar@adacore.com>
742 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
745 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
747 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
748 Correct the check which involves the freeze node of a controlled or
749 access-to-controlled type.
751 2011-08-29 Geert Bosch <bosch@adacore.com>
753 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
755 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
758 2011-08-29 Yannick Moy <moy@adacore.com>
760 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
761 for every index type and component type that is not a subtype_mark.
762 (Process_Subtype): Set Etype of subtype.
764 2011-08-29 Robert Dewar <dewar@adacore.com>
766 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
767 reorganization. Minor reformatting.
769 2011-08-29 Steve Baird <baird@adacore.com>
771 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
772 for CodePeer and ALFA modes.
774 2011-08-29 Ed Schonberg <schonberg@adacore.com>
776 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
777 that comes from an enclosing scope if it is not the renaming of an
778 actual, to handle properly a spurious ambiguity in an instance.
780 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
782 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
783 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
784 use it instead of the Esize of the first parameter.
785 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
787 <Size>: Likewise. Call it for composite types on the RM size.
789 2011-08-29 Yannick Moy <moy@adacore.com>
791 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
792 * sem_util.adb (Unique_Name): Correct behaviour for names of
795 2011-08-29 Yannick Moy <moy@adacore.com>
797 * sem_prag.adb (Check_Precondition_Postcondition): In formal
798 verification mode, analyze pragma expression for correctness, for
799 pre/post on library-level subprogram, as it is not expanded later.
801 2011-08-29 Yannick Moy <moy@adacore.com>
803 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
804 in formal verification.
806 2011-08-29 Thomas Quinot <quinot@adacore.com>
808 * sem_util.adb: Minor reformatting.
809 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
811 * par_sco.ads, par_sco.adb: Update comments.
813 2011-08-29 Yannick Moy <moy@adacore.com>
815 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
816 associated getter/setter.
817 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
819 2011-08-29 Vincent Celier <celier@adacore.com>
821 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
822 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
823 with declarations for Language_Kind and Dependency_Kind for Ada.
824 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
825 (Process_Compiler): Take into account the new attributes Dependency_Kind
827 (Check_Configuration): Check if language kind is unit based, not if the
828 language name is Ada.
829 (Process_Exceptions_Unit_Based): Ditto
830 (Add_Language): Remove default additions of language and dependency kind
831 * prj.ads: Minor comment change
832 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
834 2011-08-29 Johannes Kanig <kanig@adacore.com>
836 * debug.adb: Update comments.
838 2011-08-24 Joseph Myers <joseph@codesourcery.com>
840 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
841 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
842 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
843 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
844 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
846 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
848 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
849 (GNATLIBCFLAGS_FOR_C): Replace
850 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
851 (gnatlib-shared-default, gnatlib-shared-dual-win32)
852 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
853 (gnatlib-sjlj, gnatlib-zcx): Likewise.
855 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
857 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
859 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
861 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
863 2011-08-05 Nicolas Roche <roche@adacore.com>
865 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
866 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
868 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
870 2011-08-05 Matthew Heaney <heaney@adacore.com>
872 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
873 subprogram bodies declared out-of-order.
875 2011-08-05 Yannick Moy <moy@adacore.com>
877 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
878 entities directly in package Standard, otherwise skip the standard
881 2011-08-05 Robert Dewar <dewar@adacore.com>
883 * a-cbmutr.adb: Minor reformatting
884 (Allocate_Node): refactor node allocation algorithm
886 2011-08-05 Robert Dewar <dewar@adacore.com>
888 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
889 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
891 (Analyze_Pragma, case Check_Policy): Ditto.
892 * sem_prag.ads (Check_Disabled): New function
893 * snames.ads-tmpl: Add Name_Disable.
895 2011-08-05 Robert Dewar <dewar@adacore.com>
897 * gnat_rm.texi: Document implementation-defined policy DISABLE for
898 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
900 2011-08-05 Ed Schonberg <schonberg@adacore.com>
902 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
903 that appears in a generic formal part and applies to a formal
906 2011-08-05 Robert Dewar <dewar@adacore.com>
908 * a-cbmutr.ads: Minor reformatting.
910 2011-08-05 Matthew Heaney <heaney@adacore.com>
912 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
913 to check count, check sign of value instead.
914 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
915 (Copy_Subtree): allocate copy of source element
916 (Equal_Subtree): compare elements, not access objects
918 2011-08-05 Vincent Celier <celier@adacore.com>
920 * gnat_ugn.texi: Fix VMS alternative.
922 2011-08-05 Thomas Quinot <quinot@adacore.com>
924 * sem_ch11.adb: Add comment.
926 2011-08-05 Robert Dewar <dewar@adacore.com>
928 * exp_util.adb: Minor comment fix.
930 2011-08-05 Robert Dewar <dewar@adacore.com>
932 * scng.adb (Error_Unterminated_String): Improve flag position when
935 2011-08-05 Matthew Heaney <heaney@adacore.com>
937 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
939 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
940 multiway tree containers.
942 2011-08-05 Robert Dewar <dewar@adacore.com>
944 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
945 * stylesw.adb: Implement -gnatyC to control comment spacing
946 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
948 * usage.adb: Add line for -gnatyC.
950 2011-08-05 Robert Dewar <dewar@adacore.com>
952 * gnat_ugn.texi: Document -gnatyC.
953 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
954 synonym for COMMENTS2).
956 2011-08-05 Robert Dewar <dewar@adacore.com>
958 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
959 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
960 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
961 a-comutr.ads, lib-xref.adb: Minor reformatting.
963 2011-08-05 Robert Dewar <dewar@adacore.com>
965 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
966 warning if there is an exception handler present.
968 2011-08-05 Pascal Obry <obry@adacore.com>
970 * a-iteint.ads: Fix copyright year.
972 2011-08-05 Thomas Quinot <quinot@adacore.com>
974 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
975 statement SCO for a USE clause or a representation clause.
977 2011-08-05 Yannick Moy <moy@adacore.com>
979 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
980 between body and spec for stub.
981 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
982 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
983 pragma precondition or postcondition, for which the enclosing
984 subprogram or package in the AST is not the desired one, return empty.
986 2011-08-05 Thomas Quinot <quinot@adacore.com>
988 * g-expect.adb: Minor reformatting.
990 2011-08-05 Bob Duff <duff@adacore.com>
992 * a-fihema.adb: Comment out OS_Lib.
994 2011-08-05 Matthew Heaney <heaney@adacore.com>
996 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
997 (unbounded multiway tree containers) and a-iteint.ads.
998 * a-comutr.ads, a-comutr.adb:
999 This is the new Ada 2012 unit for unbounded multiway tree containers
1000 * a-cimutr.ads, a-cimutr.adb
1001 This is the new Ada 2012 unit for indefinite multiway tree containers
1002 * a-iteint.ads: New file.
1004 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1006 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
1008 2011-08-05 Bob Duff <duff@adacore.com>
1010 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
1012 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
1014 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1016 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
1017 general indexing aspects of Ada2012. Called when analyzing indexed
1018 components when other interpretations fail.
1019 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
1020 in an expression context where overloading is meaningful. This excludes
1021 the occurrence in an aspect specification (efficiency only).
1022 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
1023 related to iterators can be set by an attribute specification, but
1025 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
1026 Constant_Indexing and Variable_Indexing.
1027 (Check_Indexing_Functions): New procedure to perform legality checks.
1028 Additional semantic checks at end of declarations.
1030 2011-08-05 Sergey Rybin <rybin@adacore.com>
1032 * tree_io.ads: Update ASIS_Version_Number because of the change of the
1033 order of calling Tree_Write/Tree_Read routines made for aspects.
1035 2011-08-05 Bob Duff <duff@adacore.com>
1037 * a-fihema.adb (Finalize): Fix race condition.
1039 2011-08-05 Yannick Moy <moy@adacore.com>
1041 * sem_ch12.adb (Analyze_Package_Instantiation,
1042 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1045 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1047 * sem_type.adb (Specific_Type): in an instance, the type-specific
1048 operand of an equality check that involves null may have a private
1049 type. Use full view to determine legality of construct.
1051 2011-08-05 Vincent Celier <celier@adacore.com>
1053 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1054 delete or close the file when the call to gnatmake was successful.
1056 2011-08-05 Yannick Moy <moy@adacore.com>
1058 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1059 Global_Discard_Names.
1061 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1063 * sinfo.ads: comments on use of entity field for aspect specifications.
1065 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1067 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1068 node is not itself an entity but a selected component, it is a
1069 rewritten parameterless call to an en enclosing synchronized operation,
1070 and this expansion will be performed again in the instance, so there is
1071 no global information to preserve.
1073 2011-08-05 Javier Miranda <miranda@adacore.com>
1075 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1076 for renamings of predefined primitives.
1077 (In_Predef_Prims_DT): New subprogram.
1079 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1081 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1082 possible interpretation of name is a reference type, add an
1083 interpretation that is the designated type of the reference
1084 discriminant of that type.
1085 * sem_res.adb (resolve): If the interpretation imposed by context is an
1086 implicit dereference, rewrite the node as the deference of the
1087 reference discriminant.
1088 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1089 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1090 parent type or base type.
1091 * sem_ch4.adb (Process_Indexed_Component,
1092 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1093 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1094 Check for implicit dereference.
1095 (List_Operand_Interps): Indicate when an implicit dereference is
1097 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1099 2011-08-05 Thomas Quinot <quinot@adacore.com>
1101 * scos.ads: Update documentation of SCO table. Pragma statements can now
1102 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1103 * par_sco.ads, par_sco.adb: Implement the above change.
1104 (Process_Decisions_Defer): Generate a P decision for the first parameter
1105 of a dyadic pragma Debug.
1106 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1108 * put_scos.adb: Code simplification based on above change.
1110 2011-08-05 Robert Dewar <dewar@adacore.com>
1112 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1113 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1114 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1115 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1117 2011-08-05 Bob Duff <duff@adacore.com>
1119 * a-stunau.ads, g-spipat.adb: Update comments.
1121 2011-08-05 Bob Duff <duff@adacore.com>
1123 * a-fihema.ads: Minor comment fix.
1124 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1126 (Attach, Detach): Remove some unnecessary code.
1127 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1129 2011-08-05 Bob Duff <duff@adacore.com>
1131 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1132 allocation for Objects component. This simplifies the code somewhat. It
1133 is also a little more efficient in the not-so-unusual case where there
1134 are no controlled objects allocated.
1135 Make Finalization_Started flag atomic.
1136 (Finalize): Avoid unnecessary detachment of items from the list.
1137 (pcol): Minor cleanup.
1139 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1141 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1142 package whose name is the same as that of the generic unit, or its
1145 2011-08-05 Bob Duff <duff@adacore.com>
1147 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1148 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1149 Minor comment fixes.
1151 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1153 * make.adb (Linking_Phase): No longer need to set source search path
1154 before calling gnatlink in CodePeer mode.
1155 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1156 gcc in CodePeer mode, since the binder generated file no longer has a
1158 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1159 * switch-c.adb: Update comment.
1161 2011-08-05 Thomas Quinot <quinot@adacore.com>
1163 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1165 2011-08-05 Nicolas Roche <roche@adacore.com>
1167 * gnat_ugn.texi: Fix minor syntax error issue.
1169 2011-08-05 Vincent Celier <celier@adacore.com>
1171 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1172 delete or close the file when the call to gnatmake returns a non
1173 successful return code.
1175 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1177 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1178 check, indicate that the copy of the original node does not come from
1179 source, to prevent an infinite recursion of the expansion.
1181 2011-08-05 Johannes Kanig <kanig@adacore.com>
1183 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1184 VC generation for subprogram bodies.
1186 2011-08-05 Yannick Moy <moy@adacore.com>
1189 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1190 the base type with the smallest allowed base type.
1192 2011-08-05 Sergey Rybin <rybin@adacore.com>
1194 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1197 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1199 * sem_ch12.ads: minor comment updates.
1201 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1203 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1204 instantiation and a formal package the compiler generates a package
1205 renaming declaration so that the generic name within the declaration
1206 is interpreted as a renaming of the instance. At the end of a formal
1207 package declaration, this renaming must become invisible.
1209 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1211 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1212 comparison and rely on concrete entities instead.
1214 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1216 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1217 and discriminants, to indicate that the type has an access discriminant
1218 that supports implicit dereference.
1219 * snames.ads-tmpl: Add names of aspects and attributes related to
1220 Ada2012 iterators: constant_indexing, default_iterator,
1221 iterator_element, implicit_dereference, variable_indexing.
1222 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1223 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1224 iterator-related aspects.
1225 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1227 2011-08-05 Sergey Rybin <rybin@adacore.com>
1229 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1230 metrics in gnatmetric to cover new kinds of coupling mentrics.
1232 2011-08-05 Steve Baird <baird@adacore.com>
1234 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1235 of calling the user-defined main subprogram.
1236 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1237 is set) Call_Main_Subprogram ahead of, as opposed to
1239 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1240 generation of a "with" of the user-defined main subprogram.
1241 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1242 (which is now called from Gen_Main instead).
1244 2011-08-05 Emmanuel Briot <briot@adacore.com>
1246 * projects.texi: Added reference to the Makefile package.
1248 2011-08-05 Thomas Quinot <quinot@adacore.com>
1250 * exp_ch7.adb: Minor comment rewording.
1252 2011-08-05 Ed Falis <falis@adacore.com>
1254 * env.c: Fix comment.
1256 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1258 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1259 character comparison and rely on concrete entities instead.
1261 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1263 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1264 suggested by AI95-0068.
1266 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1268 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1269 the two potential initialization calls. This accounts for any
1270 access-before-elaboration checks which may precede the initialization
1272 (Next_Suitable_Statement): New routine. Returns the next real statement
1273 after the input node while skipping generated checks.
1274 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1275 with comment on usage.
1276 Do not generate Elaborate_All when the trigger is a finalization call
1277 coming from a type init proc.
1278 (Check_Elab_Call): Propagate the initialization procedure context to
1279 subsequent calls to Check_A_Call.
1280 (Check_Internal_Call_Continue): Propagate the initialization procedure
1281 context to subsequent calls to Check_Elab_Call.
1282 (Is_Finalization_Procedure): New routine. Returns True if the input
1283 entity denotes a [Deep_]Finalize routine.
1284 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1285 along with comment on usage.
1287 2011-08-05 Vadim Godunko <godunko@adacore.com>
1289 * s-atocou.ads: Add list of supported platforms.
1291 2011-08-05 Yannick Moy <moy@adacore.com>
1293 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1295 * opt.ads (Disable_ALI_File): new Boolean flag
1296 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1298 2011-08-05 Ed Falis <falis@adacore.com>
1300 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1301 environ is properly defined.
1303 2011-08-05 Vincent Celier <celier@adacore.com>
1305 * make.adb (Compilation_Phase): Exit immediately when all objects have
1306 been found up to date, to avoid multiple exit messages.
1307 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1308 same project for languages with no compiler.
1309 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1311 2011-08-05 Robert Dewar <dewar@adacore.com>
1313 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1314 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1315 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1316 s-atocou-builtin.adb: Minor reformatting.
1318 2011-08-05 Yannick Moy <moy@adacore.com>
1320 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1321 if the node to wrap is a pragma check, this node and enclosed
1322 expression are not expanded, so do not apply any transformations here.
1323 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1324 introducing transient scopes.
1326 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1328 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1329 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1330 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1331 routine is available, so we use the default implementation of these
1333 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1334 support for copying attributes on VxWorks 6.
1336 2011-08-05 Yannick Moy <moy@adacore.com>
1338 * debug.adb: Remove use of -gnatd.D.
1339 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1340 * opt.ads: Simplify variables for ALFA mode, to keep one only
1341 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1344 2011-08-05 Vincent Celier <celier@adacore.com>
1346 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1347 Builder'Default_Switches.
1349 2011-08-05 Vincent Celier <celier@adacore.com>
1351 * makeusg.adb: Add lines for --create-map-file switches.
1353 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1355 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1356 profile is incomplete and the full view is available, replace it with
1358 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1359 incomplete, freezing the subprogram is delayed until the full view is
1361 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1362 fixed-point multiplication operator and the predefined operator is
1363 resolved in favor of the user-defined one.
1365 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1367 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1370 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1372 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1373 whether a type lacks user-defined Read or Write operations, or has a
1374 component that lacks them.
1375 * sem_attr.adb (Check_Stream_Attribute): if restriction
1376 No_Default_Stream_Attributes is active, verify that all subcomponent
1377 types of the target have user-defined stream operations, and report
1379 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1380 * exp_strm.adb: Build_Elementary_Input_Call,
1381 Build_Elementary_Write_Call): remove checks for restriction
1382 No_Default_Stream_Attributes, now checked in semantics.
1384 2011-08-04 Vincent Celier <celier@adacore.com>
1386 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1387 switches on the command line, look for all valid --RTS switches in the
1388 Builder switches and for each language use the first runtime name found
1389 to invoke gprconfig.
1390 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1391 command line and there is no auto-configuration.
1392 (Runtime_Name_Set_For): New function.
1394 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1396 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1397 elaborate initialization expression for variable Abort when processing
1398 a package body or a declaration.
1399 (Create_Finalizer): Propagate the package context when creating the
1400 exception-related variables.
1401 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1402 For_Package along with usage comment.
1404 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1406 * gcc-interface/Makefile.in: Clean up targets.
1407 Enable new package for atomic counters and copy-on-write implementation
1408 of unbounded strings on x86 platforms.
1409 * gcc-interface/Make-lang.in: Update dependencies.
1411 2011-08-04 Robert Dewar <dewar@adacore.com>
1413 * exp_ch7.adb: Minor reformatting.
1415 2011-08-04 Robert Dewar <dewar@adacore.com>
1417 * exp_strm.adb: Minor reformatting.
1419 2011-08-04 Vadim Godunko <godunko@adacore.com>
1421 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1422 operations are not supported.
1423 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1424 * s-atocou-x86.adb: New file.
1425 * Makefile.rtl: Add s-atocou.o file
1427 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1429 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1430 (Compilation_Phase): ... here.
1431 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1433 2011-08-04 Thomas Quinot <quinot@adacore.com>
1435 * Make-generated.in: Fix minor typo in comment.
1437 2011-08-04 Thomas Quinot <quinot@adacore.com>
1439 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1442 2011-08-04 Robert Dewar <dewar@adacore.com>
1444 * a-coinho.adb: Minor reformatting.
1446 2011-08-04 Robert Dewar <dewar@adacore.com>
1448 * a-coinho.ads: Minor reformatting.
1450 2011-08-04 Vadim Godunko <godunko@adacore.com>
1452 * s-atocou.ads, s-atocou.adb: New files.
1453 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1454 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1455 direct use of GCC's atomic builtins and replace them by use of new
1456 atomic counter package.
1458 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1460 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1462 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1464 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1465 with a call to Get_External_Tag.
1466 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1467 subprogram usage. Remove the guard against package declarations and
1468 bodies since Build_Cleanup_Statements is no longer invoked in that
1470 (Build_Components): Initialize Tagged_Type_Stmts when the context
1471 contains at least one library-level tagged type.
1472 (Build_Finalizer): New local variables Has_Tagged_Types and
1473 Tagged_Type_Stmts along with associated comments on usage. Update the
1474 logic to include tagged type processing.
1475 (Create_Finalizer): Insert all library-level tagged type unregistration
1476 code before the jump block circuitry.
1477 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1478 (Expand_N_Package_Declaration): Remove the call to
1479 Build_Cleanup_Statements.
1480 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1481 unregister the external tag of a tagged type.
1482 (Processing_Actions): Reimplemented to handle tagged types.
1483 (Process_Declarations): Detect the declaration of a library-level
1484 tagged type and carry out the appropriate actions.
1485 (Unregister_Tagged_Types): Removed. The machinery has been directly
1486 merged with Build_Finalizer.
1488 2011-08-04 Robert Dewar <dewar@adacore.com>
1490 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1491 gnatls.adb, exp_ch3.adb: Minor reformatting.
1493 2011-08-04 Marc Sango <sango@adacore.com>
1495 * sem_attr.adb (Analyze_Attribute): Replace the message
1496 "invisible attribute of}" of the spark restriction violation in
1497 attribute reference by the simple message "invisible attribute of type".
1498 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1499 two insertion characters: '&' and '}'.
1501 2011-08-04 Vadim Godunko <godunko@adacore.com>
1503 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1504 * a-coinho.ads, a-coinho.adb: New file.
1505 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1507 2011-08-04 Nicolas Roche <roche@adacore.com>
1509 * alfa_test.adb: Not all ali files are containing alfa information even
1510 if compiled with -gnatd.F. So suppress warning about missing ALFA
1513 2011-08-04 Yannick Moy <moy@adacore.com>
1515 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1517 * put_alfa.adb: Check that scope name is not empty.
1519 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1521 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1522 Needs_Elementary_Stream_Operation, to determine whether user-defined
1523 Read and Write attributes are available for the elementary components
1524 of the given type. If only the predefined attributes are available,
1525 then when restriction No_Default_Stream_Attributes is active the
1526 predefined stream attributes for the composite type cannot be created.
1528 2011-08-04 Robert Dewar <dewar@adacore.com>
1530 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1531 Put routines in alpha order
1533 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1535 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1536 * gcc-interface/Make-lang.in: Update dependencies.
1538 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1540 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1541 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1544 2011-08-04 Robert Dewar <dewar@adacore.com>
1546 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1547 lib-xref-alfa.adb: Minor reformatting.
1549 2011-08-04 Marc Sango <sango@adacore.com>
1551 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1552 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1553 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1556 2011-08-04 Tristan Gingold <gingold@adacore.com>
1558 * bindgen.adb (Gen_Adainit_C): Remove.
1559 (Gen_Adafinal_C): Ditto.
1560 (Gen_Elab_Externals_C): Ditto.
1561 (Gen_Elab_Calls_C): Ditto.
1562 (Gen_Elab_Order_C): Ditto.
1563 (Gen_Elab_Defs_C): Ditto.
1564 (Gen_Finalize_Library_C): Ditto.
1565 (Gen_Finalize_Library_Defs_C): Ditto.
1566 (Gen_Main_C): Ditto.
1567 (Gen_Output_File_C): Ditto.
1568 (Gen_Restrictions_C): Ditto.
1569 (Gen_Versions_C): Ditto.
1570 (Write_Info_Ada_C): Ditto.
1571 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1572 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1573 Always call Gen_Output_File_Ada.
1574 * gnatlink.adb (Begin_Info): Now a constant.
1576 (Ada_Bind_File): Remove
1577 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1578 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1579 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1580 * opt.ads (Ada_Bind_File): Remove.
1582 2011-08-04 Thomas Quinot <quinot@adacore.com>
1584 * projects.texi: Document target-specific directory in default project
1587 2011-08-04 Thomas Quinot <quinot@adacore.com>
1589 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1592 2011-08-04 Yannick Moy <moy@adacore.com>
1594 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1595 opt.ads, lib-xref.ads: Code clean up.
1597 2011-08-04 Yannick Moy <moy@adacore.com>
1599 * gnat_rm.texi: Update description of Test_Case
1600 * gnat_ugn.texi: Typo.
1602 2011-08-04 Ed Falis <falis@adacore.com>
1604 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1606 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1608 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1609 it is of type Root_Controlled. This action eliminates fields Prev and
1610 Next from type equality.
1612 2011-08-04 Yannick Moy <moy@adacore.com>
1614 * lib-xref-alfa.adb: Correct typo.
1616 2011-08-04 Matthew Heaney <heaney@adacore.com>
1618 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1621 2011-08-04 Yannick Moy <moy@adacore.com>
1623 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1624 (Analyze_Pragma): allow static string expression for name of Test_Case,
1625 instead of simply string literals.
1626 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1629 2011-08-04 Vincent Celier <celier@adacore.com>
1631 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1632 case suffixes to find truncated main sources.
1634 2011-08-04 Tristan Gingold <gingold@adacore.com>
1636 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1637 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1638 (Compute_Current_Task): Ditto.
1640 2011-08-04 Tristan Gingold <gingold@adacore.com>
1642 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1644 2011-08-04 Yannick Moy <moy@adacore.com>
1646 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1647 library-level constant.
1648 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1649 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1650 used as selector of parameter association, in ALFA mode.
1652 2011-08-04 Robert Dewar <dewar@adacore.com>
1654 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1655 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1658 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1660 * make.adb (Linking_Phase): Set source search path before calling
1661 gnatlink in CodePeer mode.
1663 2011-08-04 Javier Miranda <miranda@adacore.com>
1665 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1666 Remove code which takes care of building TSDs.
1667 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1668 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1669 the accessibility check in VM targets.
1670 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1671 (Building_Static_DT): Now returns false for VM targets.
1672 (Build_VM_TSDs): Removed.
1673 (Expand_Interface_Conversion): Generate missing runtime check for
1674 conversions to interface types whose target type is unknown at compile
1676 (Make_VM_TSD): Add missing code to disable the generation of calls to
1677 Check_TSD if the tagged type is not defined at library level, or not
1678 has a representation clause specifying its external tag, or -gnatdQ is
1680 * exp_disp.ads (Build_VM_TSDs): Removed.
1681 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1682 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1683 register primitives in the dispatch tables in VM targets.
1684 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1685 initialization of class-wide interface objects in VM targets.
1686 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1689 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1691 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1692 when dotnet-ld cannot be found.
1694 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1696 * bindgen.adb: Simplify significantly generation of binder body file in
1698 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1699 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1702 2011-08-04 Yannick Moy <moy@adacore.com>
1704 * sem_prag.adb, sem.ads: Code cleanup.
1706 2011-08-04 Tristan Gingold <gingold@adacore.com>
1708 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1709 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1710 results if possible.
1711 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1712 * gnat_ugn.texi: Update dynamic stack usage section.
1714 2011-08-04 Steve Baird <baird@adacore.com>
1716 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1717 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1718 contains only a call to the user-defined main subprogram.
1719 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1720 call the "wrapper" subprogram instead of directly
1721 calling the user-defined main subprogram.
1723 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1725 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1726 alternatives of a case statement for controlled objects. Rename local
1727 variable A to Dead_Alt.
1728 (Expand_N_If_Statement): Check the then and else statements of an if
1729 statement for controlled objects. Check the then statements of all
1730 elsif parts of an if statement for controlled objects.
1731 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1733 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1734 detects a loop associated with the expansion of an array object.
1735 Augment the processing of the loop statements to account for a possible
1736 wrap done by Process_Statements_For_Controlled_Objects.
1737 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1738 statements and abortable part of an asynchronous select for controlled
1740 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1741 conditional entry call for controlled objects.
1742 (Expand_N_Selective_Accept): Check the alternatives of a selective
1743 accept for controlled objects.
1744 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1745 alternatives of a timed entry call for controlled objects.
1746 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1747 exception handler for controlled objects.
1748 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1749 Add formal parameter Nested_Constructs along with its associated
1751 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1752 Requires_Cleanup_Actions.
1753 (Process_Statements_For_Controlled_Objects): New routine.
1754 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1755 routine. Inspect a node which contains a non-handled sequence of
1756 statements for controlled objects. If such an object is found, the
1757 statements are wrapped in a block.
1759 2011-08-04 Bob Duff <duff@adacore.com>
1761 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1762 need to compare with Class_Wide_Type (T2), in order to get at the
1763 original class-wide type node.
1764 * sem_type.ads (Covers): Improve the comment.
1765 * einfo.ads (Class_Wide_Type): Improve the comment.
1766 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1767 the type of the Deref.
1769 2011-08-04 Yannick Moy <moy@adacore.com>
1771 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1772 separate declarations.
1773 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1774 check identifier of pragma argument.
1775 (Chain_TC): check that no other test case associated to the same entity
1776 share the same name.
1777 (Check_Test_Case): disallow test case inside subprogram body
1778 (Analyze_Pragma): correct call to check identifier and not argument
1779 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1780 function gets name from test case pragma.
1782 2011-08-04 Yannick Moy <moy@adacore.com>
1784 * gnat_rm.texi: Document new pragma and aspect.
1785 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1786 (No_Duplicates_Allowed): new constant array defining whether duplicates
1787 aspects of each kind can appear on the same declaration.
1788 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1789 field, which points to a node holding the previous Spec_PPC_List.
1790 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1791 through the indirection with Contract.
1792 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1793 * par-prag.adb (Prag): do nothing on Test_Case pragma
1794 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1796 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1797 component Ensures of Test_Case.
1798 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1799 (Analyze_Generic_Subprogram_Declaration,
1800 Analyze_Subprogram_Instantiation,
1801 Analyze_Abstract_Subprogram_Declaration,
1802 Analyze_Subprogram_Body_Helper,
1803 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1804 insert contract in subprogram node at point of definition
1806 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1807 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1808 corresponding pragma
1809 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1810 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1811 similar to the analysis of pre/post
1812 (Derive_Subprogram): insert contract in subprogram node at point of
1814 * sem_prag.adb, sem_prag.ads
1815 (Check_Arg_Is_String_Literal, Check_Identifier):
1816 new checking procedures to be called in treatment of pragmas
1817 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1818 pragma is well-formed. This does not check currently that 'Result is
1819 used only in the Ensures component of a Test_Case.
1820 (Analyze_Pragma): add case for Test_Case
1821 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1822 components of a Test_Case.
1823 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1824 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1825 pragma, treated as spec expressions.
1826 (Sig_Flags): add value -1 for Test_Case.
1827 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1828 Get_Requires_From_Test_Case_Pragma): getters for both expression
1829 components of a Test_Case.
1830 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1831 indirection between an entry or [generic] subprogram entity and its
1832 pre/post + test-cases.
1833 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1834 get/set for fields of an N_Contract node.
1835 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1836 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1837 names and pragma for Test_Case.
1838 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1840 2011-08-04 Vincent Celier <celier@adacore.com>
1842 * gnat_ugn.texi: Improve documentation of gnatmake switch
1843 --source-info-file=.
1845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1847 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1848 type). Initialize Atyp to the appropriate type which is later checked
1849 for completion. Rewrite the assertion associated with private type
1852 2011-08-04 Ed Falis <falis@adacore.com>
1854 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1855 initialize the number of CPUs.
1857 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1859 * sem_type.adb (Disambiguate): New subsidiary routine
1860 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1861 equality on an anonymous access type whose designated type is private
1862 does not lead to an ambiguity with the universal access equality
1863 operator in the body or child units of the defining package. The same
1864 is true for a multiplication operator on a private type completed with
1867 2011-08-04 Javier Miranda <miranda@adacore.com>
1869 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1870 (Normalize_Scalars_Config): Removed.
1872 (Register_Opt_Config_Switches): Remove registering config values of
1873 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1874 (Restore_Opt_Config_Switches): Remove code which restores the values of
1875 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1876 Init_Or_Norm_Scalars.
1877 (Save_Opt_Config_Switches): Remove code which saves values of
1878 Init_Or_Norm_Scalars and Normalize_Scalars.
1879 (Set_Opt_Config_Switches): Remove code which restores config values of
1880 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1881 Init_Or_Norm_Scalars.
1883 2011-08-04 Yannick Moy <moy@adacore.com>
1885 * frontend.adb (Frontend): remove previous patch to avoid full
1886 qualification in ALFA mode.
1887 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1888 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1889 unique name for an entity, which could be used to identify the entity
1890 across compilation units.
1892 2011-08-04 Thomas Quinot <quinot@adacore.com>
1895 (Initialize_Default_Project_Path): Add target specific directory
1896 ($prefix/$target/lib/gnat) in front of project path in all cases
1897 (making gnatmake's behaviour consistent with gprbuild).
1898 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1899 Pass target name from Sdefault to project subsystem.
1900 * gnatls.adb: Show new target specific default project directory.
1902 2011-08-04 Johannes Kanig <kanig@adacore.com>
1904 * cstand.adb: Add Information to Identifier in Standard
1905 (Identifer_For): Set Entity to the corresponding entity
1907 2011-08-04 Sergey Rybin <rybin@adacore.com>
1909 * gnat_ugn.texi: Update doc on gnatcheck.
1911 2011-08-04 Yannick Moy <moy@adacore.com>
1913 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1916 2011-08-04 Yannick Moy <moy@adacore.com>
1918 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1919 performing expansion.
1920 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1921 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1922 it is not called in ALFA mode.
1924 2011-08-04 Emmanuel Briot <briot@adacore.com>
1926 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1927 after all, so removed.
1929 2011-08-04 Sergey Rybin <rybin@adacore.com>
1931 * vms_data.ads: Add missing VMS qualifiers.
1933 2011-08-04 Emmanuel Briot <briot@adacore.com>
1935 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1936 the list of files on the command line after processing it through
1939 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1941 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1942 processing for .NET/JVM. These targets can now benefit from
1943 Raise_From_Controlled_Operation and they share the same processing with
1945 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1946 These targets need transient scopes in order to properly finalize short
1947 lived controlled objects.
1948 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1949 NET/JVM. These targets can now benefit from
1950 Raise_From_Controlled_Operation and they share the same processing with
1953 2011-08-04 Geert Bosch <bosch@adacore.com>
1955 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1957 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1959 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1960 Expand_Record_Aggregate, to determine whether aggregate must be
1961 expanded into assignments. This is the case if the ancestor part is
1962 private, regarless of the setting of the flag Has_Private_Ancestor.
1964 2011-08-04 Ed Falis <falis@adacore.com>
1966 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1968 2011-08-04 Bob Duff <duff@adacore.com>
1970 * sinfo.ads: Fix comment.
1972 2011-08-04 Steve Baird <baird@adacore.com>
1974 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1975 choose a package name in much the same way as is
1976 done for JGNAT when VM_Target /= No_VM, except that
1977 a slightly more distinctive prefix string is used.
1979 2011-08-04 Emmanuel Briot <briot@adacore.com>
1981 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1982 gnatmake command line.
1983 This behavior was never documented (and was supported only because of
1984 an early bug in the code). This case might lead to ambiguous cases
1985 (between unit names and truncated base names without suffixes).
1987 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1989 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1990 Remove the external tag of a tagged type from the internal hash table.
1991 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1992 expanded usage of the routine. Strenghten the check for Is_Master. Add
1993 processing for tagged types.
1994 (Build_Finalizer): Create all the necessary lists used in finalizer
1995 creation when the processed context is a package that may contain
1997 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1998 Requires_Cleanup_Actions.
1999 (Expand_N_Package_Body): Package bodies may need clean up code
2000 depending on whether they contain tagged types.
2001 (Expand_N_Package_Declaration): Package declarations may need clean up
2002 code depending on whether they contain tagged types.
2003 (Unregister_Tagged_Types): New routine. Search through a list of
2004 declarations or statements, looking for non-abstract Ada tagged types.
2005 For each such type, generate code to unregister the external tag.
2006 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
2007 Requires_Cleanup_Actions.
2008 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
2009 through a list of declarations or statements looking for non-abstract
2010 Ada tagged types or controlled objects.
2011 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
2012 Requires_Cleanup_Actions.
2013 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
2014 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
2017 2011-08-04 Vincent Celier <celier@adacore.com>
2019 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
2020 has Ada sources, not project Project, because if the root project
2021 Project has no sources of its own, all projects will be deemed without
2024 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2026 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
2027 of the No_Param_Proc acc-to-subp type used for initialization of
2028 __gnat_finalize_library_objects so that it's declared at library level
2029 rather than nested inside of the adainit routine.
2031 2011-08-04 Javier Miranda <miranda@adacore.com>
2033 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
2034 if the tagged type has a representation clause which specifies its
2037 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2039 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
2040 Remove previous procedure with that name.
2041 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
2043 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2044 subtype mark, the ancestor cannot have unknown discriminants.
2045 (Resolve_Record_Aggregate): if the type has invisible components
2046 because of a private ancestor, the aggregate is illegal.
2048 2011-08-04 Vincent Celier <celier@adacore.com>
2050 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2051 account switches -gnat2005, -gnat12 and -gnat2012.
2053 2011-08-04 Bob Duff <duff@adacore.com>
2055 * s-tasdeb.ads: Minor comment fix.
2057 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2059 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2061 * switch.ads, switch.adb (Is_Language_Switch): New function.
2063 2011-08-04 Vincent Celier <celier@adacore.com>
2065 * switch-c.adb: Minor comment addition.
2067 2011-08-04 Vincent Celier <celier@adacore.com>
2069 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2070 ending with '=' is followed by a space (missing file name).
2072 2011-08-04 Pascal Obry <obry@adacore.com>
2074 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2076 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2078 * sem_ch12.adb (Analyze_Associations): New routine
2079 Check_Overloaded_Formal_Subprogram to reject a formal package when
2080 there is a named association or a box initialisation for an overloaded
2081 formal subprogram of the corresponding generic.
2083 2011-08-04 Yannick Moy <moy@adacore.com>
2085 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2086 * get_alfa.adb, put_alfa.adb: Read and write new component of
2088 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2090 2011-08-04 Pascal Obry <obry@adacore.com>
2092 * urealp.adb: Minor reformatting.
2094 2011-08-04 Tristan Gingold <gingold@adacore.com>
2096 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2097 Handle the case when Cleanup_Protected_Object returns Empty.
2099 2011-08-04 Yannick Moy <moy@adacore.com>
2101 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2103 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2105 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2106 call, ignore functions.
2108 2011-08-04 Geert Bosch <bosch@adacore.com>
2110 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2113 2011-08-04 Emmanuel Briot <briot@adacore.com>
2115 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2116 as an index for Builder'Switches. This conforms to the documentation.
2117 * make.adb (Insert_Project_Sources): avoid duplicate code
2119 2011-08-04 Emmanuel Briot <briot@adacore.com>
2121 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2122 name on the command line (for instance "../dummy"), never assume it can
2125 2011-08-04 Tristan Gingold <gingold@adacore.com>
2127 * bindgen.adb: Remove code the reference or create the
2128 Break_Start/__gnat_break_start procedure.
2129 * s-stalib.adb (Break_Start): Removed.
2131 2011-08-04 Emmanuel Briot <briot@adacore.com>
2133 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2134 shared with gprbuild.
2136 2011-08-04 Yannick Moy <moy@adacore.com>
2138 * par-ch4.adb (P_Primary): preferentially issue an error message about
2139 a missing parenthesis arount a conditional or case expression in Ada
2140 2012 mode, if we detect that the alignment is not correct for a
2143 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2145 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2146 tag-to-class-wide conversion as needing finalization actions.
2147 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2148 a tag-to-class-wide conversion as needing finalization actions.
2149 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2150 conversion does not need finalization actions.
2151 (Is_Tag_To_CW_Conversion): New routine.
2152 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2153 whether an object is the result of a tag-to-class-wide conversion.
2155 2011-08-04 Yannick Moy <moy@adacore.com>
2157 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2158 the left-hand-side and right-hand-side of a conjunct are inserted when
2159 translating a pre- or postcondition
2160 * sem_ch6.adb: Correct typo in comment
2162 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2164 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2165 Unchecked_Conversion and Unchecked_Deallocation.
2167 2011-08-04 Thomas Quinot <quinot@adacore.com>
2169 * make.adb: Minor reformatting.
2171 2011-08-04 Emmanuel Briot <briot@adacore.com>
2173 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2174 sources in the project and its imported projects, but not in the whole
2177 2011-08-04 Emmanuel Briot <briot@adacore.com>
2179 * make.adb: Remove debug trace.
2181 2011-08-04 Vincent Celier <celier@adacore.com>
2183 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2184 path in canonical form, to be able to compare path names on platforms
2185 such as Windows or Darwin.
2187 2011-08-04 Thomas Quinot <quinot@adacore.com>
2189 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2190 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2191 * scos.ads: Update documentation accordingly.
2192 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2195 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2197 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2198 attribute only if prefix type is scalar.
2200 2011-08-04 Emmanuel Briot <briot@adacore.com>
2202 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2203 in gnatmake for specifying mains on the command line that do not belong
2204 to the main project. These mains must currently all belong to the same
2206 (Ultimate_Extension_Of): removed, since duplicated
2207 Ultimate_Extending_Project.
2209 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2211 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2213 (CodePeer_Mode_String): New.
2214 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2216 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2217 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2218 mode, since no useful elaboration subprogram is needed by CodePeer.
2219 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2220 In this mode, compile binder file with -gnatC and do stop after this
2223 2011-08-04 Vincent Celier <celier@adacore.com>
2225 * exp_ch7.adb: Minor comment fix.
2227 2011-08-04 Robert Dewar <dewar@adacore.com>
2229 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2230 exp_ch4.adb, makeutl.adb: Minor reformatting.
2232 2011-08-04 Emmanuel Briot <briot@adacore.com>
2234 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2235 Create several new subprograms to move code out of Make. This makes the
2236 code more readable, removes code duplication, and is a preparation work
2237 for adding support for aggregate projects.
2239 2011-08-04 Tristan Gingold <gingold@adacore.com>
2241 * s-po32gl.ads, s-po32gl.adb: New files.
2242 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2243 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2244 (Build_Finalization_Collection): Use it.
2245 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2246 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2248 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2249 * gcc-interface/Make-lang.in: Update dependencies.
2251 2011-08-04 Emmanuel Briot <briot@adacore.com>
2253 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2256 2011-08-04 Emmanuel Briot <briot@adacore.com>
2258 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2259 command line is not a file name, also check whether it could be a unit
2262 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2264 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2265 the header of the finalization routine.
2266 If the unit has no finalizer but is a body whose spec has one, then
2267 generate the decrement of the elaboration entity only.
2268 If the unit has a finalizer and is a spec, then do not generate the
2269 decrement of the elaboration entity.
2270 (Gen_Finalize_Library_C): Likewise.
2272 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2274 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2275 (Bounds_Size_Expression): Removed.
2276 (Double_Alignment_Of): New subsidiary routine.
2277 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2278 for a hole in the dope vector of unconstrained arrays due to different
2279 index and element alignments.
2281 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2283 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2284 raise program_error because body has not been seen yet.
2286 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2288 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2291 2011-08-04 Vincent Celier <celier@adacore.com>
2293 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2295 2011-08-04 Yannick Moy <moy@adacore.com>
2297 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2298 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2300 2011-08-04 Thomas Quinot <quinot@adacore.com>
2302 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2303 instantiation in RCI.
2305 2011-08-04 Emmanuel Briot <briot@adacore.com>
2307 * make.adb: Share more code with gprbuild
2309 2011-08-04 Emmanuel Briot <briot@adacore.com>
2311 * projects.texi: Added documentation for the IDE'Gnat project file
2314 2011-08-04 Nicolas Roche <roche@adacore.com>
2316 * gnat_rm.texi: Minor editing.
2318 2011-08-04 Javier Miranda <miranda@adacore.com>
2320 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2321 and the library case for VM targets.
2322 (Gen_Adainit_Ada): Likewise.
2324 2011-08-04 Robert Dewar <dewar@adacore.com>
2326 * g-altive.ads: Minor comment updates.
2327 * prj-nmsc.adb: Minor reformatting.
2329 2011-08-04 Javier Miranda <miranda@adacore.com>
2332 (Normalize_Scalars_Config): Value of the configuration switch set by
2333 pragma Normalize_Scalars when it appears in the gnat.adc file.
2334 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2335 to save and restore settings of this pragma.
2337 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2338 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2340 2011-08-04 Vincent Celier <celier@adacore.com>
2342 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2344 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2346 * makeutl.adb: Minor reformatting.
2348 2011-08-04 Olivier Hainque <hainque@adacore.com>
2350 * g-altive.ads: Update comments to reflect that only the soft
2351 binding is available today.
2353 2011-08-04 Robert Dewar <dewar@adacore.com>
2355 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2356 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2357 * gcc-interface/Make-lang.in: Update dependencies.
2359 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2361 * prj-env.adb: Remove local debug traces.
2363 2011-08-04 Yannick Moy <moy@adacore.com>
2365 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2366 was used instead of Hi_OK, which could cause a read of an uninitialized
2367 value later on. Detected while working on the new warning.
2368 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2370 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2371 in more cases, in order to detect more unreferenced values.
2372 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2373 object for expression, if any.
2375 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2377 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2378 the operand types instead of the Esize.
2380 2011-08-04 Steve Baird <baird@adacore.com>
2382 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2383 enable CodePeer_Mode.
2384 * bindusg.adb (Display): Add help message describing -P binder switch.
2385 * gnat_ugn.texi: Document -P binder switch.
2386 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2387 user-defined main program directly.
2388 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2389 user-defined main program in the context clause of the package body.
2391 2011-08-04 Yannick Moy <moy@adacore.com>
2393 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2394 duplicate of Defining_Entity
2395 (Get_Unique_Entity_For_Decl): rename function into
2396 Unique_Defining_Entity
2397 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2398 (Formal_Proof_On): remove synthesized flag
2399 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2400 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2401 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2402 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2403 Annotate (Formal_Proof)
2405 2011-08-04 Emmanuel Briot <briot@adacore.com>
2407 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2408 source files with non-standard naming schemes, in imported projects
2410 2011-08-04 Emmanuel Briot <briot@adacore.com>
2412 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2413 specified on the gprbuild command line, we need to compile all units
2414 within that file, not just the first one we find
2415 Fix error message for mains that are not found.
2417 2011-08-04 Thomas Quinot <quinot@adacore.com>
2419 * sem_ch6.adb: Update comment.
2420 * sem_ch12.adb: Minor reformatting.
2422 2011-08-04 Bob Duff <duff@adacore.com>
2424 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2425 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2426 race condition whose symptom is to fail to lock Parent. That, in turn,
2427 causes Parent.Awake_Count to be accessed without locking Parent, which
2428 causes another race condition whose symptom is that Parent.Awake_Count
2429 can be off by 1 (either too high or too low). The solution is to lock
2430 Parent unconditionally, and then lock Acceptor, before reading
2431 Acceptor.Terminate_Alternative.
2433 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2435 * debug.adb: Update comment.
2437 2011-08-04 Robert Dewar <dewar@adacore.com>
2439 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2440 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2441 exp_ch6.adb: Minor reformatting.
2443 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2445 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2448 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2450 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2452 2011-08-04 Thomas Quinot <quinot@adacore.com>
2454 * sinfo.ads: Minor reformatting.
2456 2011-08-04 Emmanuel Briot <briot@adacore.com>
2458 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2459 even if there is no location.
2461 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2463 * sem_res.adb, sem_ch4.adb: move check for restriction
2464 No_Task_Hierarchy to resolve_allocator.
2466 2011-08-04 Thomas Quinot <quinot@adacore.com>
2468 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2469 This flag of N_Pragma nodes is not used, remove it as well as all of
2470 the associated circuitry.
2472 2011-08-04 Javier Miranda <miranda@adacore.com>
2474 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2475 runtime check on duplicated externa tags
2476 * debug.adb Document switch -gnatdQ.
2478 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2480 * a-fihema.ads: Minor typo fix.
2482 2011-08-04 Yannick Moy <moy@adacore.com>
2484 * sem_ch10.adb: Minor comment update.
2486 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2488 * einfo.adb: Update the node field usage to reflect the renaming of
2489 Return_Flag to Return_ Flag_Or_Transient_Decl.
2490 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2491 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2492 (Write_Field15_Name): Change Return_Flag to
2493 Return_Flag_Or_Transient_Decl.
2494 * einfo.ads: Rename node field Return_Flag to
2495 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2496 occurrences in entities.
2497 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2498 associated Inline pragma.
2499 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2500 associated Inline pragma.
2501 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2503 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2504 Return_Flag and Set_Return_Flag.
2505 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2506 objects generated for controlled transients declared inside an
2507 Exception_With_Actions. Update the calls to Return_Flag.
2508 (Process_Object_Declaration): Add code to add a null guard for hook
2509 objects generated for controlled transients declared inside an
2510 Exception_With_Actions. Update related comment.
2511 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2512 objects generated for controlled transients declared inside an
2513 Exception_With_Actions. Update the calls to Return_Flag.
2514 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2516 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2518 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2519 positional aggregate.
2521 2011-08-04 Vincent Celier <celier@adacore.com>
2523 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2524 SLOC only for pragmas.
2526 2011-08-04 Emmanuel Briot <briot@adacore.com>
2528 * projects.texi: Minor typo fix.
2530 2011-08-04 Emmanuel Briot <briot@adacore.com>
2532 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2533 on case-sensitive file systems.
2535 2011-08-04 Thomas Quinot <quinot@adacore.com>
2537 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2538 nested in a disabled pragma.
2539 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2540 enclosing pragma, if any, for X decisions.
2542 2011-08-04 Thomas Quinot <quinot@adacore.com>
2544 * sem_prag.adb: Minor reformatting.
2546 2011-08-04 Vincent Celier <celier@adacore.com>
2548 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2549 allowed in no run time mode.
2551 2011-08-04 Vincent Celier <celier@adacore.com>
2553 * make.adb (Check): When -gnatc is used, check for the source file
2554 inside the ALI file with a canonical case file name.
2556 2011-08-04 Emmanuel Briot <briot@adacore.com>
2558 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2559 overriding the separator.
2561 2011-08-04 Robert Dewar <dewar@adacore.com>
2563 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2564 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2566 2011-08-04 Robert Dewar <dewar@adacore.com>
2568 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2570 2011-08-04 Yannick Moy <moy@adacore.com>
2572 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2573 'Result only appears in postcondition of function.
2575 2011-08-04 Thomas Quinot <quinot@adacore.com>
2577 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2578 external tag, include the value of the external tag in the exception
2581 2011-08-04 Yannick Moy <moy@adacore.com>
2583 * sem_attr.adb (Result): modify error message for misplaced 'Result
2585 2011-08-04 Sergey Rybin <rybin@adacore.com>
2587 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2588 clear that the second argument must be an identifier.
2590 2011-08-04 Thomas Quinot <quinot@adacore.com>
2592 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2593 -fpreserve-control-flow, insert an IF statement on the barrier
2594 condition to ensure that a conditional branch instruction is generated.
2596 2011-08-04 Emmanuel Briot <briot@adacore.com>
2598 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2599 (Processing_Flags.Ignore_Missing_With): new flag.
2601 2011-08-04 Emmanuel Briot <briot@adacore.com>
2603 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2604 Source_List_File on case-insensitive systems where the file is actually
2605 on a case-sensitive file system (NFS,...).
2607 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2609 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2610 function return contains a controlled [extension] aggregate and the
2611 return statement is not part of a handled sequence of statements, wrap
2612 the return in a block. This ensures that all controlled temporaries
2613 generated during aggregate resolution will be picked up by the
2614 finalization machinery.
2616 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2618 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2619 components, freeze type before resolution, to ensure that default
2620 initializations are present for all components.
2621 * sem_res.adb (Resolve_Actuals): the designated object of an
2622 accces-to-constant type is a legal actual in a call to an
2623 initialization procedure.
2625 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2627 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2628 N_Unchecked_Type_Conversion to the possible containers of a renamed
2631 2011-08-04 Yannick Moy <moy@adacore.com>
2633 * par-ch13.adb (Aspect_Specifications_Present): recognize
2634 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2635 is issued in Strict mode.
2636 * par.adb: Fix typos in comments.
2638 2011-08-04 Yannick Moy <moy@adacore.com>
2640 * sem_attr.adb (Result): modify error message to take into account Post
2641 aspect when compiling Ada 2012 (or newer) code.
2643 2011-08-04 Nicolas Roche <roche@adacore.com>
2645 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2646 remove need for GCC exceptions.
2648 2011-08-04 Vincent Celier <celier@adacore.com>
2650 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2651 project, not the source file name.
2652 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2653 excluded, continue looking. This excluded source will only be returned
2654 if there is no other source with the same base name that is not locally
2657 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2659 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2660 private and one of the operands is a real literal, use a qualified
2661 expression rather than a conversion which is not meaningful to the
2664 2011-08-04 Yannick Moy <moy@adacore.com>
2666 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2667 corresponding aspect X'Class are allowed, proceed with analysis of the
2668 aspect instead of skipping it.
2670 2011-08-04 Tristan Gingold <gingold@adacore.com>
2672 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2673 This will allow to have an Ada implementation for the subprogram.
2675 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2677 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2678 completion and aspects are present, apply them to the entity for the
2679 type which is currently the partial view, but which is the one that
2681 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2682 applies to a partial view, indicate that the full view has predicates
2683 and delayed aspects.
2684 (Replace_Type_Reference): Handle properly predicates that apply to the
2685 full view of a private completion.
2687 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2689 * layout.adb (Layout_Type): For composite types, do not set Esize.
2690 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2692 (Size_Known): Look at the RM size of components instead of the Esize.
2693 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2694 issue warning and activate Implicit_Packing.
2695 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2696 if the Esize is not known.
2697 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2698 for elementary types only.
2699 (Analyze_Record_Representation_Clause): Look at the RM size instead
2700 of the Esize to issue errors.
2701 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2703 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2705 Look at the RM size instead of the Esize for types if the latter is
2707 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2709 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2711 * sem_type.adb: proper handling of equality not involving anonymous
2714 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2716 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2717 Vis_Decls. When creating a library-level finalizer for a package spec,
2718 both the declaration and body of the finalizer are inserted either in
2719 the visible or private declarations of the package spec.
2721 2011-08-04 Javier Miranda <miranda@adacore.com>
2723 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2724 use of the full-view of a type when invoking Is_Ancestor.
2725 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2726 the full-view of private parents is requested, then use also the
2727 full-view of the parent of the first derivation.
2729 2011-08-04 Tristan Gingold <gingold@adacore.com>
2731 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2732 instead of the locally imported procedure.
2733 * s-taprop-mingw.adb (Enter_Task): Ditto.
2734 * s-valrea.adb (Scan_Real): Ditto.
2735 * s-imgrea.adb (Set_Image_Real): Ditto.
2736 * s-flocon.ads: Make the package pure.
2738 2011-08-04 Thomas Quinot <quinot@adacore.com>
2740 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2741 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2742 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2743 New subprogram, moved here from...
2744 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2745 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2746 rewriting of the last argument into a procedure call statement here...
2747 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2750 2011-08-04 Thomas Quinot <quinot@adacore.com>
2752 * par_sco.adb: Minor reformatting.
2754 2011-08-04 Robert Dewar <dewar@adacore.com>
2756 * erroutc.adb: Minor reformatting.
2758 2011-08-04 Thomas Quinot <quinot@adacore.com>
2760 * par_sco.adb: Comment update.
2762 2011-08-04 Tristan Gingold <gingold@adacore.com>
2764 * s-flocon.ads: New file.
2765 * g-flocon.ads: Now a renaming of s-flocon.
2766 * Makefile.rtl: Add s-flocon.o
2768 2011-08-04 Javier Miranda <miranda@adacore.com>
2770 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2771 constrained, do not attempt to build a subtype of it.
2773 2011-08-04 Yannick Moy <moy@adacore.com>
2775 * errout.ads Change comments: remove 'R'M as an example where quotes
2776 are needed; add ALFA as another case where quotes are not needed
2777 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2778 case where quotes are not needed.
2779 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2780 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2781 Remove all occurrences of 'A'L'F'A
2783 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2785 * sem_ch13.adb: check legality of invariant pragma.
2787 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2789 * bindgen.adb: Add comments.
2791 2011-08-04 Yannick Moy <moy@adacore.com>
2793 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2795 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2796 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2798 2011-08-04 Robert Dewar <dewar@adacore.com>
2800 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2801 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2802 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2804 2011-08-04 Thomas Quinot <quinot@adacore.com>
2806 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2808 2011-08-04 Thomas Quinot <quinot@adacore.com>
2811 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2814 2011-08-04 Robert Dewar <dewar@adacore.com>
2816 * einfo.ads, exp_ch4.adb: Minor reformatting.
2818 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2820 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2822 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2824 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2825 type in all cases to compute list of primitive operations, because full
2826 view may be an itype that is not attached to the list of declarations.
2828 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2830 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2831 library has already been finalized.
2832 (Gen_Adafinal_C): Likewise.
2833 (Gen_Adainit_Ada): Generate an early return if the library has
2834 already been elaborated.
2835 (Gen_Adainit_C): Likewise.
2836 (Gen_Output_File_Ada): Generate an elaboration flag.
2837 (Gen_Output_File_C): Likewise.
2839 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2841 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2842 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2843 built in the first place.
2844 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2845 for CodePeer because Finalize_Address was not built to begin with.
2846 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2848 2011-08-04 Pascal Obry <obry@adacore.com>
2850 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2851 filenames, this ensures unicity of filenames across processes.
2853 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2855 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2856 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2857 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2858 Add False as the actual to From_Abort in the generated call to
2859 Raise_From_Controlled_Operation.
2861 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2863 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2864 so that the ali file name can be retrieved from outside of this package.
2865 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2866 doing nothing in the general case, but used to update the object file
2867 timestamp if directly generated by the backend.
2868 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2869 to a later time than the ali file one.
2871 2011-08-04 Yannick Moy <moy@adacore.com>
2873 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2874 entities whose body contains an Annotate pragma which forces formal
2876 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2877 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2878 Mark_Non_ALFA_Subprogram to pass in a message and node.
2879 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2880 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2881 surrounding subprogram.
2882 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2883 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2884 as not in ALFA is annotated with Formal_Proof being On, then an error
2885 is issued based on the additional parameters for message and node.
2886 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2887 * gcc-interface/Make-lang.in: Update dependencies.
2889 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2891 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2892 Finalize_Address when CodePeer is enabled.
2894 2011-08-04 Pascal Obry <obry@adacore.com>
2896 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2897 the latter returns a pointer to a static buffer which is deallocated
2898 at the end of the routine.
2900 2011-08-04 Yannick Moy <moy@adacore.com>
2902 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2903 after index creation; mark unconstrained base array type generated as
2904 being in/not in ALFA as well
2905 (Make_Index): mark subtype created as in/not in ALFA
2906 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2907 over a loop as in/not in ALFA, depending on its type and form of loop
2910 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2912 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2913 directly to False on .NET and JVM.
2915 2011-08-04 Yannick Moy <moy@adacore.com>
2917 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2918 constraint that subtype must come from source code to be in ALFA, so
2919 that anonymous subtypes can be in ALFA too.
2921 2011-08-04 Yannick Moy <moy@adacore.com>
2923 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2924 reference for ALFA mode.
2925 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2926 procedure public so as to use it from formal verification back-end.
2928 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2930 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2931 invalid checks of the Parameter, making Remove_Switch not working
2934 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2936 * targparm.ads: Update header: no run-time exception is needed on this
2939 2011-08-04 Vincent Celier <celier@adacore.com>
2941 * a-fihema.adb: Use System.IO instead of GNAT.IO
2943 2011-08-04 Thomas Quinot <quinot@adacore.com>
2945 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2946 are forbidden in Compiler_Unit mode.
2948 2011-08-04 Robert Dewar <dewar@adacore.com>
2950 * sem_util.adb: Minor reformatting.
2952 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2954 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2955 library-level finalizers.
2956 (Gen_Finalize_Library_C): Update the import string for library-level
2958 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2959 library-level finalizer.
2960 * exp_ch7.adb: Remove with and use clauses for Stringt.
2961 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2962 Spec_Decl. Add local variable Body_Id. The names of library-level
2963 finalizers are now manually fully qualified and are no longer external.
2964 A single name is now capable of servicing .NET, JVM and non-VM targets.
2965 Pragma Export is no longer required to provide visibility for the name.
2966 (Create_Finalizer_String): Removed.
2967 (New_Finalizer_Name): New routine which mimics New_..._Name.
2969 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2971 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2972 elaboration counter to Standard_Short_Integer.
2973 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2974 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2975 (Gen_Elab_Externals_C): Likewise.
2977 2011-08-04 Ed Falis <falis@adacore.com>
2979 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2980 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2981 system-vxworks-mips.ads, system-vxworks-x86.ads
2982 (Always_Compatible_Rep): set to False for all VxWorks targets.
2984 2011-08-04 Robert Dewar <dewar@adacore.com>
2986 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2987 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2988 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2989 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2990 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2991 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2992 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2993 Minor reformatting and code reorganization.
2995 2011-08-04 Emmanuel Briot <briot@adacore.com>
2997 * projects.texi: Added doc for aggregate projects.
2999 2011-08-04 Emmanuel Briot <briot@adacore.com>
3001 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
3002 Add support for overriding the Project_Path in aggregate projects.
3004 2011-08-04 Robert Dewar <dewar@adacore.com>
3006 * a-cofove.ads: Minor reformatting.
3008 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
3010 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
3011 on the generated code.
3012 (Build_Finalize_Statements): Update the comment on the generated code.
3013 (Build_Initialize_Statements): Update the comment on the generated code.
3014 (Build_Object_Declarations): Add local variable Result. The object
3015 declarations are now built in sequence.
3016 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
3019 2011-08-04 Robert Dewar <dewar@adacore.com>
3021 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
3023 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
3025 * einfo.ads (Elaboration_Entity): Document new definition and use.
3026 (Elaboration_Entity_Required): Adjust to above change.
3027 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
3028 * exp_ch12.adb: And with and use for Snames.
3029 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
3030 * exp_util.adb (Set_Elaboration_Flag): Likewise.
3031 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
3032 <Check_Unit_Name>: Deal with N_Expanded_Name.
3033 <Attribute_Elaborated>: Extend to all unit names.
3034 * sem_elab.adb: And with and use for Uintp.
3035 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
3036 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
3037 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
3038 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
3039 from Gen_Adainit_Ada.
3040 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
3041 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
3042 case, do not call System.Standard_Library.Adafinal; instead call
3043 finalize_library if needed.
3044 (Gen_Adafinal_C): Likewise.
3045 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3046 non-main program case.
3047 (Gen_Adainit_C): Generate a couple of external declarations here.
3048 In the main program case, set SSL.Finalize_Library_Objects.
3049 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3050 (Gen_Elab_Calls_C): Likewise.
3051 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3052 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3053 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3055 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3056 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3058 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3059 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3060 of external declarations. Call Gen_Finalize_Library_C.
3062 2011-08-04 Emmanuel Briot <briot@adacore.com>
3064 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3065 Compute_Compilation_Phases): new subprogram.
3066 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3067 The number of mains as well as the various compilation phases that
3068 need to be run are now project tree specific, since various
3069 aggregated trees might have different requirements. In particular,
3070 they do not all require bind or link phases.
3072 2011-08-04 Emmanuel Briot <briot@adacore.com>
3074 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3075 (Project_Tree_Appdata): New type.
3076 It is now possible to associate application-specific data to a project
3077 tree. In particular, this is used in the gprbuild builder to avoid a
3078 number of global tables and htables, especially now that there can be
3079 several project trees loaded at once because of aggregate projects.
3080 (Debug_Name): new procedure.
3081 * projects.texi: Clarify syntax of "**" for Source_Dirs
3083 2011-08-03 Emmanuel Briot <briot@adacore.com>
3085 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3086 the "roots" for a main.
3087 (Fill_From_Project): add support for aggregate projects. Main units
3088 in aggregated projects are now automatically added in the list of
3089 files to build (although this fails later on in gprbuild, because
3090 these files are not using the root proejct tree, so this needs
3092 * gcc-interface/Make-lang.in: Update dependencies.
3094 2011-08-03 Yannick Moy <moy@adacore.com>
3096 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3097 conditional expression in ALFA.
3098 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3099 expressions as not in ALFA.
3101 2011-08-03 Robert Dewar <dewar@adacore.com>
3103 * a-cofove.adb: Minor reformatting.
3105 2011-08-03 Emmanuel Briot <briot@adacore.com>
3107 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3108 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3110 These packages are more logically placed in the Queue package, since
3111 they manipulate the queue. It is also likely that they can be adapted
3112 for gnatmake, thus sharing more code.
3113 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3114 that we could move the above.
3116 2011-08-03 Emmanuel Briot <briot@adacore.com>
3118 * errutil.adb (Finalize): clean up the list of error messages on exit.
3119 Calling this subprogram multiple times will no longer show duplicate
3120 error messages on stderr.
3122 2011-08-03 Emmanuel Briot <briot@adacore.com>
3124 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3125 Getopt_Switches when we have already define a command line
3128 2011-08-03 Yannick Moy <moy@adacore.com>
3130 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3131 in ALFA. Instead, they are considered as assertions to prove.
3132 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3133 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3134 if they have no ELSE part, or if they occur in pre- and postconditions,
3135 where the Condition cannot have side-effects in ALFA
3136 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3137 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3138 Instead, include type conversion between scalar types in ALFA.
3139 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3140 if-and-only-if its type is in ALFA.
3142 2011-08-03 Thomas Quinot <quinot@adacore.com>
3144 * scos.adb, get_scos.adb, put_scos.adb
3145 New code letter for decisions: G (entry guard)
3147 (Traverse_Subprogram_Body): Rename to...
3148 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3149 (Traverse_Protected_Body): New subprogram
3150 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3151 protected bodies and entry bodies.
3153 2011-08-03 Yannick Moy <moy@adacore.com>
3155 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3156 entities with get/set subprograms, which is set on procedure entities
3157 generated by the compiler for a postcondition.
3158 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3159 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3160 entity for a declaration
3161 (Get_Unique_Entity_For_Decl): new function returning an entity which
3162 represents a declaration, so that matching spec and body have the same
3165 2011-08-03 Robert Dewar <dewar@adacore.com>
3167 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3168 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3170 2011-08-03 Yannick Moy <moy@adacore.com>
3172 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3173 library-level because retriction No_Implicit_Dynamic_Code in the
3174 front-end prevents its definition as a local subprogram
3175 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3176 for reuse in other contexts
3177 (Traverse_Declarations_Or_Statements,
3178 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3179 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3180 procedures take a callback parameter to be called on all declarations
3182 (Traverse_All_Compilation_Units): new generic function to traverse a
3183 compilation unit and call a callback parameter on all declarations
3185 2011-08-03 Javier Miranda <miranda@adacore.com>
3187 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3188 in Java since they are always enclosed in a namespace that
3189 differentiates them, and overloaded entities are supported by the VM.
3191 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3193 * checks.adb (Determine_Range): If a computed bound of an operation is
3194 outside the range of the base type of the expression, and overflow
3195 checks are enabled, the result is unknown and cannot be used for any
3196 subsequent constant folding.
3197 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3198 unknown, so is the result of the comparison.
3200 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3202 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3203 From_Abort. When finalization was triggered by an abort, propagate
3204 Standard'Abort_Signal rather than Program_Error.
3205 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3207 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3208 From_Abort. When finalization was triggered by an abort, propagate
3209 Standard'Abort_Signal rather than Program_Error.
3210 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3212 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3213 Abort_Id. Update the calls to Build_Object_Declarations and
3214 Build_Raise_Statement to include Abort_Id.
3215 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3216 calls to Build_Object_Declarations and Build_Raise_Statement to include
3218 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3219 calls to Build_Object_Declarations and Build_Raise_Statement to include
3221 (Build_Components): Create an entity for Abort_Id when exceptions are
3222 allowed on the target.
3223 (Build_Finalizer): New local variable Abort_Id.
3224 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3225 calls to Build_Object_Declarations and Build_Raise_Statement to include
3227 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3228 declaration of flag Abort_Id to preserve the original abort status
3229 before finalization code is executed.
3230 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3231 runtime routine Raise_From_Controlled_Operation.
3232 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3233 Abort_Id. Update the call to Build_Object_Declarations to include
3234 Abort_Id. Update the layout of the finalizer body.
3235 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3236 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3237 clunky code to create all flags and objects related to
3238 exception propagation and replace it with a call to
3239 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3241 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3242 Add new formal Abort_Id and associated comment on its use.
3243 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3245 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3246 Remove the 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.
3250 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3252 * s-tassta.adb: Fix minor typos.
3254 2011-08-03 Robert Dewar <dewar@adacore.com>
3256 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3257 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3259 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3261 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3262 to packages. This ensures that the finalizer body will not end up
3263 inside the freeze node.
3264 (Process_Declarations): Add code to detect whether a freeze node has a
3265 nested finalization collection.
3267 2011-08-03 Pascal Obry <obry@adacore.com>
3269 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3270 (Current_Session): Return a not null access to Session_Type.
3271 (Default_Session): Likewise.
3273 2011-08-03 Robert Dewar <dewar@adacore.com>
3275 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3276 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3278 2011-08-03 Pascal Obry <obry@adacore.com>
3280 * g-awk.ads: Minor comment fix.
3282 2011-08-03 Sergey Rybin <rybin@adacore.com>
3284 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3285 the tree structure related to discriminant constraints.
3286 Original_Discriminant cannot be used any more for computing the
3287 defining name for the reference to a discriminant.
3289 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3291 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3292 function is not visibly tagged, this is not a dispatching call and
3293 therfore is not Tag_Indeterminate, even if the function is marked as
3294 dispatching on result.
3296 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3298 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3299 (Expand_N_Free_Statement): Add a guard to protect against run-times
3300 which do not support controlled types.
3301 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3302 against run-times which do not support controlled types.
3303 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3304 against run-times which do not support controlled types.
3305 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3306 against run-times which do not support controlled types.
3307 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3308 protect against run-times which do not support controlled types.
3310 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3312 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3313 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3315 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3317 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3318 modified in the source, to prevent spurious warnings when compiling
3321 2011-08-03 Thomas Quinot <quinot@adacore.com>
3323 * a-except-2005.adb: Minor reformatting.
3325 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3327 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3328 is a renaming declaration in the private part of a package, do not emit
3329 a warning that the with_clause could be moved because the renaming may
3330 be used in the body or in a child unit.
3332 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3334 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3335 Propagate the Comes_From_Source attribute from the original return
3336 object to the renaming.
3338 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3340 * exp_ch7.adb (Build_Raise_Statement): Do not call
3341 Raise_From_Controlled_Operation when this routine is not present in
3342 the run-time library.
3343 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3344 libraries (Ravenscar), tasks are non-terminating, and protected objects
3345 and tasks can only appear at library level, so we do not want
3346 finalization of protected objects nor tasks.
3347 * exp_intr.adb: Minor clarification in comment.
3348 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3349 Gen_Output_File_C): Remove references to finalization of library-level
3350 objects when using restricted run-time libraries.
3352 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3354 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3355 Original_Discriminant only if the parent type is a generic formal.
3357 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3359 * exp_ch13.adb: Add with and use clause for Targparm;
3360 (Expand_N_Free_Statement): Prevent the generation of a custom
3361 Deallocate on .NET/JVM targets since this requires pools and address
3363 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3364 .NET/JVM targets, attach the newly allocated object to the access
3365 type's finalization collection. Do not generate a call to
3366 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3367 exist in the runtime.
3368 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3369 create a custom Allocate for object that do not require initialization.
3370 Attach a newly allocated object to the access type's finalization
3371 collection on .NET/JVM.
3372 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3373 assignment of controlled types on .NET/JVM. The two hidden pointers
3374 Prev and Next and stored and later restored after the assignment takes
3376 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3377 kludge for .NET/JVM to recognize a particular piece of code coming from
3378 Heap_Management and change the call to Finalize into Deep_Finalize.
3379 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3380 finalization collections on .NET/JVM only for types derived from
3381 Controlled. Separate the association of storage pools with a collection
3382 and only allow it on non-.NET/JVM targets.
3383 (Make_Attach_Call): New routine.
3384 (Make_Detach_Call): New routine.
3385 (Process_Object_Declarations): Suppress the generation of
3386 build-in-place return object clean up code on .NET/JVM since it uses
3388 * exp_ch7.ads (Make_Attach_Call): New routine.
3389 (Make_Detach_Call): New routine.
3390 * exp_intr.adb Add with and use clause for Targparm.
3391 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3392 on .NET/JVM targets.
3393 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3394 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3395 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3396 names used in finalization.
3398 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3400 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3401 (Attach, Detach): Lock the current task when chaining an object onto a
3404 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3406 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3407 Rewritten to create the message strings when the exception is not
3408 raised by an abort during finalization.
3409 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3410 Raise_From_Controlled_Operation and update its associated comment.
3411 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3412 Ada.Finalization.Heap_Management provides key functionality
3413 associated with controlled objects on the heap, their creation,
3414 finalization and reclamation. Type Finalization_Collection is
3415 effectively a wrapper which sits ontop of a storage pool and performs
3416 all necessary bookkeeping for all the objects it contains. Each
3417 access-to-controlled or access-to-class-wide type receives a collection
3418 as part of its expansion. The compiler generates buffer code and
3419 invokes Allocate / Deallocate to create and destroy allocated
3421 * a-finali.adb ("="): Removed.
3422 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3423 fields Prev and Next.
3424 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3425 A library unit with at least one controlled object on the library level
3426 has a special finalizer which is invoked by the binder. To signal this,
3427 ali files carry field PF.
3428 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3429 associated comment on field usage.
3430 * a-tags.adb (Get_RC_Offset): Removed.
3431 (Needs_Finalization): New routine.
3432 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3433 Dispatch tables now carry field Needs_Finalization which provides
3434 runtime indication whether a type is controlled or has controlled
3435 components or both. Remove field RC_Offset.
3436 (Get_RC_Offset): Removed along with its associated pragma Export.
3437 Since tagged types with controlled components no longer carry hidden
3438 field _controller, the special mechanism to retrieve its location is no
3440 (Needs_Finalization): New routine.
3441 * atree.ads, atree.adb (Elist24): New routine.
3442 (Set_Elist24): New routine.
3443 * atree.h: Add a define clause for Elist24.
3444 * bindgen.adb New library-level variable Lib_Final_Built.
3445 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3446 presence of a VM target, the routine generates calls to the proper
3447 library finalization routine.
3448 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3449 targets. Set the correct library finalization routine depending on
3450 whether the library has controlled objects or this is a VM compilation.
3451 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3452 to library-level finalizers of compiled units in reverse order of
3453 elaboration. It also produces exception management code and reraises a
3454 potential exception after all units have been finalized.
3455 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3456 library-level finalizers of compiled units in reverse order of
3458 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3459 definitions of all library-level finalizers available to the compilation
3460 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3462 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3463 System.Standard_Library.Adafinal directly. If the library needs
3464 finalization actions, create the sequence of finalization calls.
3465 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3466 Generate a with clause for System.Soft_Links when compiling for a VM.
3467 Remove the code which imports System.Standard_Library.Adafinal as
3468 Do_Finalize. Generate the library finalization routine.
3469 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3470 If the library needs finalization actions, create all the definitions
3471 of library- level finalizers.
3472 (Has_Finalizer): New routine. Determines whether at least one compiled
3473 unit has a library-level finalizer.
3474 Add type Qualification_Mode.
3475 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3476 * einfo.adb: New usage of field 15 as Return_Flag.
3477 Remove Finalization_Chain_Entity from the usages of field 19.
3478 Remove Associated_Final_Chain from the usages of field 23.
3479 New usage of field 23 as Associated_Collection.
3480 New usage of field 24 as Finalizer.
3481 New usage of flag 252 as Is_Processed_Transient.
3482 (Associated_Final_Chain): Removed.
3483 (Associated_Collection): New routine.
3484 (Finalization_Chain_Entity): Removed.
3485 (Finalizer): New routine.
3486 (Is_Finalizer): New routine.
3487 (Is_Processed_Transient): New routine.
3488 (Return_Flag): New routine.
3489 (Set_Associated_Final_Chain): Removed.
3490 (Set_Associated_Collection): New routine.
3491 (Set_Finalization_Chain_Entity): Removed.
3492 (Set_Finalizer): New routine.
3493 (Set_Is_Processed_Transient): New routine.
3494 (Set_Return_Flag): New routine.
3495 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3497 (Write_Field8_Name): Alphabetize the output.
3498 (Write_Field11_Name): Alphabetize the output.
3499 (Write_Field12_Name): Alphabetize the output.
3500 (Write_Field13_Name): Alphabetize the output.
3501 (Write_Field14_Name): Alphabetize the output.
3502 (Write_Field15_Name): Alphabetize the output.
3503 (Write_Field16_Name): Alphabetize the output.
3504 (Write_Field17_Name): Alphabetize the output.
3505 (Write_Field18_Name): Alphabetize the output.
3506 (Write_Field19_Name): Alphabetize the output. Remove the output of
3507 Finalization_Chain_Entity.
3508 (Write_Field20_Name): Alphabetize the output.
3509 (Write_Field21_Name): Alphabetize the output.
3510 (Write_Field22_Name): Alphabetize the output.
3511 (Write_Field23_Name): Alphabetize the output. Remove the output of
3512 Associated_Final_Chain. Add output for Associated_Collection.
3513 (Write_Field24_Name): Alphabetize the output.
3514 (Write_Field25_Name): Add output for Finalizer.
3515 (Write_Field26_Name): Alphabetize the output.
3516 (Write_Field27_Name): Alphabetize the output.
3517 (Write_Field28_Name): Alphabetize the output.
3518 * einfo.ads: Add new field description for Associated_Collection and
3520 Remove Associated_Final_Chain and its uses in nodes.
3521 Remove Finalization_Chain_Entity and its uses in nodes.
3522 Add new field description for Finalizer and its uses in nodes.
3523 Add new synthesized attribute Is_Finalizer.
3524 Add new flag description for Is_Processed_Transient and its uses in
3526 Add new field description for Return_Flag and its uses in nodes.
3527 (Associated_Final_Chain): Removed along with its pragma Inline.
3528 (Associated_Collection): New routine and pragma Inline.
3529 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3530 (Finalizer): New routine and pragma Inline.
3531 (Is_Finalizer): New routine and pragma Inline.
3532 (Is_Processed_Transient): New routine and pragma Inline.
3533 (Return_Flag): New routine and pragma Inline.
3534 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3535 (Set_Associated_Collection): New routine and pragma Inline.
3536 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3537 (Set_Finalizer): New routine and pragma Inline.
3538 (Set_Is_Processed_Transient): New routine and pragma Inline.
3539 (Set_Return_Flag): New routine and pragma Inline.
3540 * exp_aggr.adb: Alphabetize subprograms.
3541 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3542 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3543 associated comments. Remove local variables External_Final_List and
3545 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3546 Ancestor. Remove the retrieval of finalization lists. Update the call to
3548 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3549 lists. Update the call to Late_Expansion.
3550 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3551 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3552 (Gen_Assign): Remove the retrieval of the finalization list used to
3553 build the assignment. Update the calls to Make_Init_Call and
3555 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3556 Remove the mechanism to determine attachment levels and finalization
3557 list retrieval. Remove the processing for coextensions.
3558 (Init_Controller): Removed. Controllers no longer exist.
3559 (Late_Expansion): Remove formals Flist and Obj along with their
3560 associated comments. Update the calls to Build_Record_Aggr_Code and
3561 Build_Array_Aggr_Code.
3562 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3563 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3564 appear in entry bodies, protected subprograms and task bodies.
3565 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3566 * exp_ch3.adb (Add_Final_Chain): Removed.
3567 (Build_Array_Init_Proc): Alphabetize local variables.
3568 (Build_Assignment): Alphabetize local variables. Update the call to
3570 (Build_Class_Wide_Master): Rename local variables to better reflect
3572 (Build_Discriminant_Assignments): Code reformatting.
3573 (Build_Init_Call_Thru): Code reformatting.
3574 (Build_Init_Procedure): Code reformatting. Generate a special version
3575 of Deep_Finalize which is capable of finalizing all initialized
3576 components and ignore the rest.
3577 (Build_Init_Statements): Rename local variables to better reflect their
3579 Reimplement the mechanism to include the creation and update of an index
3580 variable called a "counter". It is used as a bookmark for tracing
3581 initialized and non-initialized components.
3582 (Build_Initialization_Call): Remove local variable Controller_Typ.
3583 Alphabetize all local variables. Remove the initialization of the
3584 record controller and update the call to Make_Init_Call.
3585 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3586 New local variable Counter.
3587 (Constrain_Array): Alphabetize.
3588 (Expand_Freeze_Array_Type): Create a collection instead of a
3590 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3591 Finalize_Address which is used in conjunction with allocated controlled
3593 (Expand_N_Object_Declaration): Remove the creation of a finalization
3594 list for anonymous access types. Update the calls to Make_Init_Call and
3596 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3597 retrieval of finalization lists. Remove the expansion of the record
3598 controller. Create TSS primitive Finalize_Address used in conjunction
3599 with controlled objects on the heap. Create finalization collections
3600 for access-to-controlled record components.
3601 (Expand_Record_Controller): Removed.
3602 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3603 class-wide types now requires additional processing. Create
3604 finalization collections for access-to-controlled types.
3605 (Increment_Counter): New routine.
3606 (Make_Counter): New routine.
3607 (Make_Eq_If): Remove the mention of Name_uController.
3608 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3609 types coming from System.Finalization_Root.
3610 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3611 (Predefined_Primitive_Bodies): There is no longer need to skip types
3612 coming from System.Finalization_Root.
3613 (Stream_Operation_OK): Do not generate stream routines for
3614 type Ada.Finalization.Heap_Management.Finalization_Collection.
3615 * exp_ch3.ads: Alphabetize subprograms.
3616 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3617 Add with and use clause for Lib.
3618 (Complete_Coextension_Finalization): Removed.
3619 (Complete_Controlled_Allocation): New routine. Create a finalization
3620 collection for anonymous access-to-controlled types. Create a custom
3621 Allocate which interfaces with the back end and the machinery in
3623 (Expand_Allocator_Expression): Add necessary calls to
3624 Complete_Controlled_Allocation. Remove the retrieval of finalization
3625 lists. Update the calls to Make_Adjust_Call. Generate a call to
3626 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3627 the associated collection.
3628 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3629 Code clean up. Remove the retrieval of finalization lists and
3631 Update the call to Make_Init_Call. Generate a call to
3632 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3633 the associated collection.
3634 (Get_Allocator_Final_List): Removed. Finalization lists are not
3636 (Suitable_Element): Remove the mention of Name_uController.
3637 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3638 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3639 the left hand side, carry out the assignment and adjust the left hand
3641 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3642 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3643 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3644 BIP_Collection and BIPcollection.
3645 (Build_Heap_Allocator): New routine used to allocate the return object
3646 of a build-in-place function onto a collection.
3647 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3648 (Expand_Call): Do not replace direct calls to Deep routines with their
3650 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3651 and update their occurrences. Add a special return flag to monitor the
3652 [ab]normal execution of the function. The flag is set right before the
3654 Rewrite the mechanism used to allocate a build-in-place return object
3655 on the heap or on a storage pool.
3656 (Is_Direct_Deep_Call): New routine.
3657 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3658 build-in-place function call instead of a final list. Build a call to
3659 Set_Finalize_Address_Ptr to decorate the associated collection.
3660 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3661 order to name the build-in-place function call's result for later
3662 finalization. Add a collection to a build-in-place function call
3663 instead of a final list.
3664 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3665 build-in-place function call instead of a final list. Remove the code
3666 which moves one final list and transforms it into the actual in a
3667 nested build-in-place call.
3668 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3669 build-in-place function call instead of a final list.
3670 (Move_Final_List): Removed.
3671 (Needs_BIP_Collection): New routine.
3672 (Needs_BIP_Final_List): Removed.
3673 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3674 enumeration type BIP_Formal_Kind.
3675 Update the related comment.
3676 (Needs_BIP_Collection): New routine.
3677 (Needs_BIP_Final_List): Removed.
3678 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3679 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3680 majority of subprograms in this unit. Add Name_Finalize_Address to
3681 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3682 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3683 statements for an array type.
3684 (Build_Adjust_Statements): Create the adjust statements for a record
3686 (Build_Cleanup_Statements): New routine. A procedure which given any
3687 construct containing asynchronous calls, references to _master, or is a
3688 task body, a task allocation or a protected body produces the necessary
3689 runtime calls to clean up these constructs.
3690 (Build_Exception_Handler): New routine.
3691 (Build_Final_List): Removed.
3692 (Build_Finalization_Collection): New routine. A core procedure which
3693 creates a collection to service heap allocated controlled objects
3694 associated with an access-to-controlled type.
3695 (Build_Finalize_Statements): Create the finalization statements for a
3697 (Build_Finalizer): New routine. A core procedure which given any
3698 construct with declarations and/or statements detects all objects which
3699 need any type of clean up (controlled objects, protected objects) and
3700 generates all necessary code to clean up the said objects in the proper
3702 (Build_Finalizer_Call): New routine.
3703 (Build_Initialize_Statements): Create the initialization statements for
3704 an array type. The generated routine contains code to finalize partially
3706 (Build_Object_Declarations): New routine.
3707 (Build_Raise_Statement): New routine.
3708 (Clean_Simple_Protected_Objects): Removed.
3709 (Controller_Component): Removed.
3710 (Enclosing_Function): New routine.
3711 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3712 either declarations or statements or both.
3713 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3714 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3716 (Find_Final_List): Removed.
3717 (Global_Flist_Ref): Removed.
3718 (In_Finalization_Root): Removed.
3719 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3720 scope in terms of tree nodes. Process all transient variables within
3722 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3723 generated after the adjust.
3724 (Make_Attach_Call): Removed.
3725 (Make_Call): New routine.
3726 (Make_Clean): Removed.
3727 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3729 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3731 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3733 (Make_Final_Call): Modified to simply create a call to either
3734 Deep_Finalize or Finalize.
3735 (Make_Finalize_Address_Body): New routine.
3736 (Make_Finalize_Address_Stmts): New routine. A function which produces
3737 TSS primitive Finalize_Address used in conjunction with heap allocated
3739 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3740 (Make_Init_Call): Rewritten. There is no longer an attach call
3741 generated after initialization.
3742 (Make_Local_Deep_Finalize): New routine.
3743 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3744 (Make_Transient_Block): Remove the finalization list retrieval and
3746 (Needs_Finalization): Moved to Exp_Util.
3747 (Parent_Field_Type): New routine.
3748 (Preprocess_Components): New routine.
3749 (Process_Transient_Objects): New routine.
3750 (Wrap_HSS_In_Block): New routine.
3751 (Wrap_Transient_Declaration): Remove finalization list management and
3752 controller insertion.
3753 (Wrap_Transient_Expression): Code reformatting.
3754 (Wrap_Transient_Statement): Code reformatting.
3755 * exp_ch7.ads (Build_Final_List): Removed.
3756 (Build_Finalization_Collection): New routine.
3757 (Build_Raise_Statement): New routine.
3758 (Controller_Component): Removed.
3759 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3760 (Find_Final_List): Removed.
3761 (In_Finalization_Root): Removed.
3762 (Is_Simple_Protected_Type): Update related comment.
3763 (Make_Adjust_Call): New parameter profile and associated comments.
3764 (Make_Attach_Call): Removed.
3765 (Make_Final_Call): New parameter profile and associated comments.
3766 (Make_Finalize_Address_Body): New routine.
3767 (Make_Init_Call): New parameter profile and associated comments.
3768 (Make_Local_Deep_Finalize): New routine.
3769 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3770 (Needs_Finalization): Moved to Exp_Util.
3771 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3772 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3773 (Find_Protection_Type): Moved to Exp_Util.
3774 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3775 (Make_DT): Update sequence of dispatch table initialization. Remove the
3776 initialization of field RC_Offset. Add initialization of field Needs_
3778 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3779 Reimplement how an object is first finalized, then deallocated.
3780 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3782 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3783 Register TSS_Finalize_Address with type TSS_Names.
3784 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3785 procedure provides the interface between an allocation / deallocation
3786 and the support machinery in Ada.Finalization.Heap_Management.
3787 (Find_Init_Call): Code reformatting.
3788 (Find_Init_Call_In_List): Code reformatting.
3789 (Find_Protection_Type): Moved from Exp_Ch9.
3790 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3791 (Has_Controlled_Coextensions): Removed.
3792 (Has_Controlled_Objects): New routine.
3793 (In_Library_Level_Package_Body): New routine.
3794 (Insert_Action_After): New routine.
3795 (Is_Finalizable_Transient): New routine. This predicate determines
3796 whether an object declaration is one of the many variants of controlled
3798 (Is_Null_Access_BIP_Func_Call): New routine.
3799 (Is_Non_BIP_Func_Call): New routine.
3800 (Is_Related_To_Func_Return): New routine.
3801 (Needs_Finalization): Moved from Exp_Ch7.
3802 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3803 (Find_Protection_Type): Moved from Exp_Ch9.
3804 (Has_Controlled_Coextensions): Removed.
3805 (Has_Controlled_Objects): New routine.
3806 (In_Library_Level_Package_Body): New routine.
3807 (Insert_Action_After): New routine.
3808 (Is_Finalizable_Transient): New routine.
3809 (Is_Null_Access_BIP_Func_Call): New routine.
3810 (Is_Non_BIP_Func_Call): New routine.
3811 (Is_Related_To_Func_Return): New routine.
3812 (Needs_Finalization): Moved from Exp_ch7.
3813 * expander.adb (Expand): Add a case for N_Free_Statement.
3814 * freeze.adb (Freeze_All): Replace the generation of a finalization
3815 list with a collection for access-to-controlled types.
3816 (Freeze_Entity): Code reformatting.
3817 (Freeze_Record_Type): Remove the freezing of a record controller
3819 (Freeze_Subprogram): Code reformatting.
3820 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3822 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3823 has a library-level finalizer.
3824 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3825 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3826 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3827 files. Add a-fihema to the list of object files.
3829 Alphabetize the associations in type Is_Parameterless_Attribute.
3830 * rtsfind.ads: Ada.Finalization_List.Controller and
3831 System.Finalization_Implementation are no longer a GNAT unit.
3832 Update the range of type Ada_Finalization_Child. Remove the following
3833 recoverable entities:
3835 RE_Attach_To_Final_List
3839 RE_Finalizable_Ptr_Ptr
3840 RE_Global_Final_List
3841 RE_Limited_Record_Controller
3844 RE_Record_Controller
3845 RE_Simple_List_Controller
3847 Add the following recoverable entities:
3849 RE_Add_Offset_To_Address
3853 RE_Exception_Identity
3854 RE_Finalization_Collection
3855 RE_Finalization_Collection_Ptr
3856 RE_Needs_Finalization
3857 RE_Save_Library_Occurrence
3858 RE_Set_Finalize_Address_Ptr
3859 RE_Set_Storage_Pool_Ptr
3861 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3863 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3864 (First_Stored_Discriminant): Remove the mention of Name_uController.
3865 * sem_aux.ads: Comment reformatting.
3866 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3867 to redecorate an already existing class-wide type.
3868 (Decorate_Tagged_Type): New parameter profile and associated comment.
3869 Create a "shadow class-wide type" for a shadow entity.
3870 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3871 of the final chain along with the associated comment.
3872 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3873 Full_Desig and set it to the full view of the designated type.
3874 Initialize the finalization collection to empty.
3875 (Build_Derived_Record_Type): Alphabetize local variables. Code
3877 (Collect_Fixed_Components): Remove the mention of Name_uController.
3878 (Create_Constrained_Components): Remove the mention of Name_uController.
3879 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3880 class-wide type of a shadow entity.
3881 (Process_Full_View): Update the machinery which marks type
3882 Limited_Controlled's entity as limited.
3883 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3884 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3885 list, instead make a collection build-in-place formal.
3886 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3887 a designated type in order to establish a match between the renaming
3888 and the renamed entity.
3889 (Find_Selected_Component): Add guard to prevent spurious exceptions
3890 from being raised on .NET/JVM.
3891 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3892 to the list of primitive that need special processing. Update arrays
3893 C_Names and D_Names.
3894 (Replace_Types): Handle class-wide types.
3895 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3896 different parameter profile, look at the first formal.
3897 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3898 use clauses for Exp_Util.
3899 * sem_res.adb: Remove with and use clauses for Elists.
3900 (Propagate_Coextensions): Removed.
3901 (Resolve_Allocator): Do not propagate the list of coextensions from one
3902 allocator to another.
3903 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3904 Deaccessed_T to Desig_Typ.
3905 (Enter_Name): Remove the mention of Name_uController.
3906 (Gather_Components): Remove the mention of Name_uController.
3907 (Incomplete_Or_Private_View): New routine.
3908 (Is_Coextension_Root): Removed.
3909 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3910 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3911 (Is_Coextension_Root): Removed.
3912 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3913 Controlled types are now derived from a null tagged record. Remove
3914 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3915 * sinfo.adb (Coextensions): Removed.
3916 (Set_Coextensions): Removed.
3917 * sinfo.ads: Remove Coextensions from the explanation of node fields
3918 and its uses in nodes.
3919 Update the field usage of N_Allocator.
3920 (Coextensions): Removed along with its pragma Inline.
3921 (Set_Coextensions): Removed along with its pragma Inline.
3922 * snames.ads-tmpl: Remove names
3927 Name_uLocal_Final_List
3928 Name_Finalization_Root
3935 Name_Finalize_Address
3936 * s-pooglo.adb (Allocate): Add overriding indicator.
3937 (Deallocate): Add overriding indicator.
3938 (Storage_Size): Add overriding indicator.
3939 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3940 than Finalize_Global_List.
3941 (Null_Finalize_Global_List): Removed.
3942 (Save_Library_Occurrence): New routine.
3943 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3944 initialization. Add variable Finalize_Library_Objects along with its
3945 pragma Export. Add variables Library_Exception and
3946 Library_Exception_Set along with their pragma Export.
3947 (Null_Finalize_Global_List): Removed.
3948 (Save_Library_Occurrence): New routine.
3949 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3950 rather than Finalize_Global_List.
3951 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3952 of the constructed node.
3954 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3956 * link.c: Include "auto-host.h" before system headers.
3958 2011-08-03 Vincent Celier <celier@adacore.com>
3960 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3961 that are not extended. Do not check if a library project that is
3962 extended should be regenerated. Do not add to table Library_Paths the
3963 libraries that are in extended projects. Link only with libraries that
3964 are in libray projects that are not extended.
3965 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3966 for a library project that is extended.
3968 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3970 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3971 conforming subprogram renamings that appear to be completions if they
3972 are not fully conformant.
3973 Such renamings are homographs but not completions.
3974 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3975 names in a subprogram renaming that appears in an instance.
3977 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3979 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3980 not immutably limited, build actual subtype from expression to provide
3981 proper bounds to caller.
3983 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3985 * sem_ch8.adb: Minor comment correction.
3987 2011-08-03 Thomas Quinot <quinot@adacore.com>
3989 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3990 returning a limited array, use an extended return statement.
3992 2011-08-03 Vincent Celier <celier@adacore.com>
3994 * make.adb (Initialize): If --subdirs= is used, but no project file is
3995 specified, attempt to create the specify subdir if it does not already
3996 exist and use it as the object directory as if -D had been specified.
3998 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4000 * s-tpopsp-vms.adb: New file.
4001 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
4002 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
4004 2011-08-03 Emmanuel Briot <briot@adacore.com>
4006 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
4009 2011-08-03 Yannick Moy <moy@adacore.com>
4011 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
4012 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
4013 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
4014 detect that an array has static bounds.
4016 2011-08-03 Thomas Quinot <quinot@adacore.com>
4018 * exp_dist.adb: Minor reformatting.
4020 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4022 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
4023 (ATCB_Key): Removed, not always used.
4025 2011-08-03 Emmanuel Briot <briot@adacore.com>
4027 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
4028 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
4029 most remaining global variables.
4031 2011-08-03 Robert Dewar <dewar@adacore.com>
4033 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
4034 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
4037 2011-08-03 Javier Miranda <miranda@adacore.com>
4039 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
4040 that must be passed by copy in VM targets.
4042 2011-08-03 Emmanuel Briot <briot@adacore.com>
4044 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4045 duplicates a similar htable now in the project tree.
4047 2011-08-03 Claire Dross <dross@adacore.com>
4049 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4050 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4051 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4052 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4053 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4054 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4055 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4058 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4060 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4061 (ATCB_Key): Removed, not always used.
4062 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4064 * s-tpopsp-tls.adb: New file.
4065 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4066 x86/x64/ia64/powerpc/sparc Linux.
4068 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4070 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4071 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4073 2011-08-03 Thomas Quinot <quinot@adacore.com>
4075 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4076 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4077 Fix type selection for mapping integer types to PolyORB types.
4079 2011-08-03 Bob Duff <duff@adacore.com>
4081 * sem_ch7.adb: Minor comment clarification.
4083 2011-08-03 Bob Duff <duff@adacore.com>
4085 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4086 an error analyzing a choice, skip further processing. Further
4087 processing could cause a crash or cascade errors.
4089 2011-08-03 Emmanuel Briot <briot@adacore.com>
4091 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4092 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4093 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4094 prj-env.ads (Shared_Project_Tree_Data): new type
4095 An aggregate project and its aggregated trees need to share the common
4096 data structures used for lists of strings, packages,... This makes the
4097 code simpler since otherwise we have to pass the root tree (also used
4098 for the configuration file data) in addition to the current project
4099 tree. This also avoids ambiguities as to which tree should be used.
4100 And finally this saves a bit of memory.
4101 (For_Every_Project_Imported): new parameter Tree.
4102 Since aggregated projects are using a different tree, we need to let
4103 the caller know which tree to use to manipulate the returned project.
4105 2011-08-03 Robert Dewar <dewar@adacore.com>
4107 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4108 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4109 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4110 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4112 2011-08-03 Javier Miranda <miranda@adacore.com>
4114 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4115 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4117 2011-08-03 Bob Duff <duff@adacore.com>
4119 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4122 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4124 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4125 g-sehash.ads: Fix typo. Update header.
4127 2011-08-03 Thomas Quinot <quinot@adacore.com>
4129 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4132 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4134 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4135 prefixes of private types along with records, since the selector may be
4137 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4138 private types along with records, since the selector may be a
4141 2011-08-03 Emmanuel Briot <briot@adacore.com>
4143 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4145 2011-08-03 Javier Miranda <miranda@adacore.com>
4147 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4148 Tagged_Type_Expansion.
4150 2011-08-03 Yannick Moy <moy@adacore.com>
4152 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4153 violation when the argument of concatenation is the name of a
4156 2011-08-03 Emmanuel Briot <briot@adacore.com>
4158 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4159 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4160 (Process_Declarative_Items): new parameter Child_Env.
4162 2011-08-03 Yannick Moy <moy@adacore.com>
4164 * alfa.ads: Update format of ALFA section in ALI file in order to
4165 add a mapping from bodies to specs when both are present.
4166 (ALFA_Scope_Record): Add components for spec file/scope.
4167 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4169 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4170 collected, fill in the spec information when relevant.
4171 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4174 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4176 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4177 code unit to decide whether to add internally generated subprograms.
4179 2011-08-03 Javier Miranda <miranda@adacore.com>
4181 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4182 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4183 be handled by copy in VM targets.
4185 2011-08-03 Emmanuel Briot <briot@adacore.com>
4187 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4188 code with Makeutl.Get_Switches.
4189 * prj-tree.adb: Update comment.
4191 2011-08-03 Thomas Quinot <quinot@adacore.com>
4193 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4194 subprogram with a limited formal that does not support external
4197 2011-08-03 Yannick Moy <moy@adacore.com>
4199 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4201 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4202 not from current unit in two phases, because it is not possible to
4203 change the table while iterating over its content.
4204 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4206 2011-08-03 Sergey Rybin <rybin@adacore.com>
4208 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4209 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4211 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4213 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4214 and the component type is composite, this is ambiguous for predefined
4215 concatenation, but if the node is not overloaded and the entity is a use
4216 -defined function its profile can be used to resolve that aggregate.
4218 2011-08-03 Robert Dewar <dewar@adacore.com>
4220 * exp_ch4.adb: Minor code cleanup.
4222 2011-08-03 Thomas Quinot <quinot@adacore.com>
4224 * exp_dist.adb: Do not generate distribution stubs if serious errors
4225 have been diagnosed.
4227 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4229 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4230 the first formal of a primitive operation, go to the base type to
4231 handle properly an access to a derived type with constrained
4233 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4234 user-defined function that is only use-visible.
4236 2011-08-03 Robert Dewar <dewar@adacore.com>
4238 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4239 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4240 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4241 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4242 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4243 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4244 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4245 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4247 2011-08-03 Robert Dewar <dewar@adacore.com>
4249 * repinfo.adb (List_Mechanism): Add handling of
4250 Convention_Ada_Pass_By_XXX.
4251 * sem_mech.adb (Set_Mechanism): Ditto.
4252 * sem_prag.adb (Process_Convention): Add entries for
4253 Convention_Ada_Pass_By_XXX.
4254 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4256 2011-08-03 Pascal Obry <obry@adacore.com>
4258 * makeutl.adb: Minor reformatting.
4260 2011-08-03 Vincent Celier <celier@adacore.com>
4263 (Get_File_Name) If the file cannot be found when there are no config
4264 pragmas file and May_Fail is True, return No_File instead of the file
4265 name, to be consistent.
4267 2011-08-03 Pascal Obry <obry@adacore.com>
4269 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4272 2011-08-03 Javier Miranda <miranda@adacore.com>
4275 (Same_Representation): In VM targets the representation of arrays with
4276 aliased components differs from arrays with non-aliased components.
4278 2011-08-03 Emmanuel Briot <briot@adacore.com>
4280 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4281 not systematically lower case attribute indexes that contain no "."
4282 Fix definition of several Naming attributes, which take
4283 a unit name as index and therefore should be case insensitive.
4284 Minor refactoring (reduce length of variable names).
4286 2011-08-03 Emmanuel Briot <briot@adacore.com>
4288 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4290 2011-08-03 Emmanuel Briot <briot@adacore.com>
4292 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4293 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4294 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4295 prj-tree.ads (Prj.Tree.Environment): new type.
4297 2011-08-03 Emmanuel Briot <briot@adacore.com>
4299 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4300 prj-tree.adb, prj-tree.ads (Environment): new type.
4302 2011-08-03 Emmanuel Briot <briot@adacore.com>
4304 * prj-tree.ads: Remove unused variable.
4306 2011-08-03 Yannick Moy <moy@adacore.com>
4308 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4309 issuing messages related to SPARK restriction violation.
4311 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4313 * sem_ch6.adb: guard against error nodes in return statements.
4315 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4317 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4318 a warning can only appear on a configuration file, so emit warning
4319 without further checks.
4321 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4323 * s-interr.ads: add overriding keyword.
4325 2011-08-03 Geert Bosch <bosch@adacore.com>
4327 * exp_attr.adb: Fix minor typo.
4329 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4331 * par-ch4.adb: improve error recovery.
4333 2011-08-03 Emmanuel Briot <briot@adacore.com>
4335 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4336 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4339 2011-08-03 Emmanuel Briot <briot@adacore.com>
4341 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4342 "external" as an attribute name in aggregate projects.
4344 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4346 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4347 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4348 from 0, so we need to adjust.
4350 2011-08-03 Emmanuel Briot <briot@adacore.com>
4352 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4353 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4355 2011-08-03 Yannick Moy <moy@adacore.com>
4357 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4358 restriction on overloaded entity if the entity is not an operator.
4360 2011-08-03 Yannick Moy <moy@adacore.com>
4362 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4363 restrict.ads: Rename remaining Check_Formal_Restriction* into
4364 Check_SPARK_Restriction*.
4366 2011-08-03 Emmanuel Briot <briot@adacore.com>
4368 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4369 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4371 (Project_Empty): removed
4372 (Empty_Project): new parameter Qualifier
4373 This is used to have fields specific to aggregate projects, cleaner
4374 New field to store the list of aggregated projects.
4375 (Check_Aggregate_Project): removed
4376 (Process_Aggregated_Projects, Free): new subprograms.
4378 2011-08-03 Olivier Hainque <hainque@adacore.com>
4380 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4382 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4384 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4385 explicit dereference of an unconstrained type, create a constrained
4386 subtype for it, as is done for function calls that return an
4389 2011-08-03 Thomas Quinot <quinot@adacore.com>
4391 * g-pehage.adb (Finalize): Avoid possible double-free.
4393 2011-08-03 Steve Baird <baird@adacore.com>
4395 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4396 Elab_Spec/Body attrs in CodePeer_Mode.
4398 2011-08-03 Javier Miranda <miranda@adacore.com>
4400 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4401 low bound is not known at compile time but they have no others choice.
4402 Done because in this case the bounds can be obtained directly from the
4405 2011-08-03 Ed Falis <falis@adacore.com>
4407 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4408 on VxWorks SMP. Remove unusable constant ANY_CPU.
4410 2011-08-03 Emmanuel Briot <briot@adacore.com>
4412 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4413 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4414 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4415 Prj.Env.Initialize_Empty): new subprograms
4416 (Get_Env, Find_Project): remove parameter Target_Name.
4418 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4420 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4421 as a condition for the delayed call to Derived_Subprograms done for the
4422 case of the rewriting of a derived type that constrains the
4423 discriminants of its parent type.
4424 Avoids redundant subprogram derivations for private subtype derivations.
4426 2011-08-03 Javier Miranda <miranda@adacore.com>
4428 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4429 Build_Record_Aggr_Code.
4430 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4431 discriminants in extension aggregates.
4433 2011-08-03 Emmanuel Briot <briot@adacore.com>
4435 * prj-pp.adb (Print): also output project qualifiers, since in
4436 particular "aggregate" is mandatory in an aggregate project.
4438 2011-08-03 Emmanuel Briot <briot@adacore.com>
4440 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4441 (Debug_Output): new function.
4443 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4445 * gnat_ugn.texi: Document -Wstack-usage.
4446 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4448 2011-08-03 Thomas Quinot <quinot@adacore.com>
4450 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4451 have keyword LIMITED.
4453 2011-08-03 Yannick Moy <moy@adacore.com>
4455 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4456 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4457 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4458 section (does not happen in compiler, only if code directly calls
4460 * get_alfa.adb, get_alfa.ads: New files.
4461 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4463 * lib-xref-alfa.adb: New file.
4464 * lib-xref.adb, lib-xref.ads
4465 (Xref_Entry): redefine information needed in cross-references for ALFA.
4466 Push ALFA treatments in separated local package.
4467 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4468 identifiers. Return entity of package body instead of spec. Return
4469 Empty for a scope with no location.
4470 (Generate_Reference): adapt to new components for ALFA information.
4471 Remove the need for D references on definitions.
4472 (Is_Local_Reference): moved to ALFA local package
4473 (Output_References): extract subfunction as Extract_Source_Name
4474 (Output_Local_References): remove procedure, replaced by filtering of
4475 cross-references in package ALFA and printing in Put_ALFA.
4476 (Write_Entity_Name): remove procedure
4477 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4478 print exact name of entity as it appears in source file
4479 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4480 * put_alfa.adb, put_alfa.ads: New files.
4481 * xref_lib.adb (Search_Xref): protect read of cross-references against
4482 reading other sections of the ALI file, in gnatxref
4483 (Search): protect read of cross-references against reading other
4484 sections of the ALI file, in gnatfind.
4485 * gcc-interface/Make-lang.in: Update dependencies.
4487 2011-08-03 Thomas Quinot <quinot@adacore.com>
4489 * sem_ch3.adb: Minor reformatting.
4491 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4493 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4494 raising an exception.
4496 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4498 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4499 type, always use 1 as the lower bound or string, even if lower bound of
4500 context is not static, to handle properly null strings in a non-static
4503 2011-08-03 Bob Duff <duff@adacore.com>
4505 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4506 always legal on the right-hand side of an assignment statement; there
4507 is always an applicable index constraint in this case. Therefore, the
4508 check for Pkind = N_Assignment_Statement is now unconditional -- it
4509 doesn't depend on whether Is_Constrained (Typ).
4511 2011-08-03 Robert Dewar <dewar@adacore.com>
4513 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4515 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4517 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4518 for an itype created within a generic unit.
4520 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4522 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4523 suppresses all inlining.
4525 2011-08-03 Robert Dewar <dewar@adacore.com>
4527 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4528 exp_aggr.adb: Minor reformatting.
4530 2011-08-03 Thomas Quinot <quinot@adacore.com>
4532 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4533 tagged assignment when discriminant checks are suppressed. This is
4534 useless and extremely costly in terms of static stack usage.
4536 2011-08-03 Bob Duff <duff@adacore.com>
4538 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4539 of generics, because this leads to the wrong entity in the wrong scope,
4540 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4542 (Process_Interface_Name): Follow Alias for instances of generics, to
4543 correct for the above change.
4545 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4547 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4548 is an integer literal it is always safe to replace the reference. In
4549 addition, if the reference appears in the generated code for an object
4550 declaration it is necessary to copy because otherwise the reference
4551 might be to the uninitilized value of the discriminant of the object
4554 2011-08-03 Pascal Obry <obry@adacore.com>
4556 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4557 ACL used, in this case we want to check for ending .exe, not .exe
4558 anywhere in the path.
4560 2011-08-03 Sergey Rybin <rybin@adacore.com>
4562 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4563 the tree structure (semantic decoration of references to record
4566 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4568 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4569 choices of a named array aggregate, bail out when any choices are
4570 marked as Errors_Posted.
4572 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4574 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4575 in which entity is frozen, to handle properly loop variables in
4578 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4580 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4581 subtype is not static, compute the upper bound using attributes, to
4582 handle properly index types that are not integer types.
4584 2011-08-03 Bob Duff <duff@adacore.com>
4586 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4587 Update copyright notice.
4589 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4591 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4592 Original_Discriminant if within an instance.
4593 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4595 2011-08-03 Thomas Quinot <quinot@adacore.com>
4597 * einfo.ads: Minor reformatting.
4599 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4601 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4602 composite type with an unfrozen subcomponent, in the profile of a
4603 primitive operation.
4605 2011-08-03 Robert Dewar <dewar@adacore.com>
4607 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4609 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4611 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4612 unconstrained type with discriminants is initialized with an aggregate,
4613 use the constrained subtype of the aggregate as the type of the object,
4614 because it is immutable, and this allows the back-end to generate no
4615 code for the object declaration.
4617 2011-08-03 Robert Dewar <dewar@adacore.com>
4619 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4620 comparison operand is variable, and turns out to be zero or negative.
4622 2011-08-03 Javier Miranda <miranda@adacore.com>
4625 (Expand_Dispatching_Constructor_Call): Disable expansion of
4626 code required for native targets. Done to avoid generating
4627 references to unavailable runtime entities in VM targets.
4629 (Expand_N_Object_Declaration): Add missing support to handle
4630 the explicit initialization of class-wide interface objects.
4633 2011-08-03 Matthew Heaney <heaney@adacore.com>
4635 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4637 2011-08-03 Matthew Heaney <heaney@adacore.com>
4639 * a-cbdlli.adb (Splice): move source items from first to last
4641 2011-08-03 Yannick Moy <moy@adacore.com>
4643 * sem_util.ads: comment added.
4645 2011-08-03 Javier Miranda <miranda@adacore.com>
4648 (Expand_Record_Aggregate): In VM targets disable the expansion into
4649 assignments of aggregates whose type is not known at compile time.
4651 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4653 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4654 protected entries and task entries, to build the proper renaming
4655 declaration for entry formals, used in debugging.
4656 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4657 parameters in the same way.
4659 2011-08-02 Robert Dewar <dewar@adacore.com>
4661 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4662 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4663 code reorganization.
4665 2011-08-02 Robert Dewar <dewar@adacore.com>
4667 * debug.adb: Debug flag d.P to suppress length comparison optimization
4668 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4669 comparison of Length by comparing First/Last instead.
4671 2011-08-02 Matthew Heaney <heaney@adacore.com>
4673 * a-cobove.ads: Code clean up.
4675 2011-08-02 Vincent Celier <celier@adacore.com>
4677 * adaint.c (file_names_case_sensitive_cache): New static int.
4678 (__gnat_get_file_names_case_sensitive): Cache the return value in
4679 file_names_case_sensitive_cache at the first invocation, to avoid
4680 multiple calls to getenv.
4682 2011-08-02 Bob Duff <duff@adacore.com>
4684 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4686 2011-08-02 Yannick Moy <moy@adacore.com>
4688 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4689 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4690 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4691 indicate that we are in a precondition or postcondition. This is used in
4692 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4693 decide whether to flag the spec or body of the current subprogram as
4696 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4698 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4700 * a-extiin.ads: New file.
4702 2011-08-02 Bob Duff <duff@adacore.com>
4704 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4705 now raises Name_Error instead of Use_Error in certain cases. The other
4706 parts of this AI were already implemented properly.
4708 2011-08-02 Vincent Celier <celier@adacore.com>
4710 * link.c: Only import "auto-host.h" when building the gnattools.
4712 2011-08-02 Yannick Moy <moy@adacore.com>
4714 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4715 which calls a local subprogram, so extract subprogram
4716 from Mark_Non_ALFA_Subprogram_Body.
4718 2011-08-02 Javier Miranda <miranda@adacore.com>
4721 (Extract_Dispatching_Call): If the type of the dispatching object is an
4722 access type then return an explicit dereference in the Object out-mode
4725 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4727 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4728 compatibility checks for all indexes of an array subtype, not just the
4729 first. Reset Has_Dynamic_Range_Check on the subtype before each
4730 potential check to ensure that Insert_Range_Checks will not elide any
4731 of the dynamic checks.
4733 2011-08-02 Yannick Moy <moy@adacore.com>
4735 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4736 SPARK restriction at parsing time.
4737 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4738 directive only if the SPARK restriction is set for this unit.
4740 2011-08-02 Yannick Moy <moy@adacore.com>
4742 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4743 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4744 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4745 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4746 Mark_Non_ALFA_Subprogram_Body.
4747 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4750 2011-08-02 Yannick Moy <moy@adacore.com>
4752 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4755 2011-08-02 Robert Dewar <dewar@adacore.com>
4757 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4758 exp_ch3.adb: Minor reformatting.
4760 2011-08-02 Emmanuel Briot <briot@adacore.com>
4762 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4763 files, not any regular file.
4764 (__gnat_locate_file_with_predicate): new subprogram.
4766 2011-08-02 Yannick Moy <moy@adacore.com>
4768 * sinfo.adb, sinfo.ads: Restrict the use of flags
4769 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4770 nodes, plus N_Subtype_Declaration for the 2nd one.
4772 2011-08-02 Sergey Rybin <rybin@adacore.com>
4774 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4775 - fix bugs in the description of Source_Trace;
4776 - get rid of UNIT_NAME;
4778 2011-08-02 Javier Miranda <miranda@adacore.com>
4781 (Build_Dispatching_Requeue): Adding support for VM targets
4782 since we cannot directly reference the Tag entity.
4783 * exp_sel.adb (Build_K): Adding support for VM targets.
4784 (Build_S_Assignment): Adding support for VM targets.
4786 (Default_Prim_Op_Position): In VM targets do not restrict availability
4787 of predefined interface primitives to compiling in Ada 2005 mode.
4788 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4789 restricted to compiling in Ada 2005 mode.
4790 (Make_VM_TSD): Generate code that declares and initializes the OSD
4791 record. Needed to support dispatching calls through synchronized
4794 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4795 primitives associated with synchronized interfaces.
4796 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4797 primitives associated with synchronized interfaces.
4799 2011-08-02 Yannick Moy <moy@adacore.com>
4801 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4802 statements hidden in SPARK if preceded by the HIDE directive
4803 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4804 exception handlers as hidden in SPARK if preceded by the HIDE directive
4805 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4806 if starting with the HIDE directive
4807 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4808 starting with the HIDE directive; mark the declarations in a private
4809 part as hidden in SPARK if the private part starts with the HIDE
4811 * restrict.adb, restrict.ads
4812 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4813 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4814 argument node belongs to a part which is hidden in SPARK
4815 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4816 parts in SPARK; protect the possibly costly call to
4817 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4818 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4819 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4820 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4822 (Scan): recognize special comment starting with '#' and followed by
4823 SPARK keyword "hide" as a HIDE directive.
4825 2011-08-02 Yannick Moy <moy@adacore.com>
4827 * types.ads, erroutc.ads: Minor reformatting.
4829 2011-08-02 Vincent Celier <celier@adacore.com>
4831 * link.c: Add response file support for cross platforms.
4833 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4835 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4836 in an association, set parent field of copy before partial analysis.
4837 * sem_res.adb (Resolve_Slice): create reference to itype only when
4838 expansion is enabled.
4840 2011-08-02 Yannick Moy <moy@adacore.com>
4842 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4843 for new flag denoting which subprogram bodies are in ALFA
4844 * restrict.adb, sem_ch7.adb: Update comment
4845 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4846 sem_ch9.adb, sem_res.adb: Add calls to
4847 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4848 * sem_ch6.adb (Analyze_Function_Return): add calls to
4849 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4850 middle of the body, and extended return.
4851 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4852 False when missing return.
4853 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4854 to True for subprograms whose spec is in ALFA. Remove later on the flag
4855 on the entity used for a subprogram body when there exists a separate
4857 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4858 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4859 False, otherwise do nothing.
4861 2011-08-02 Robert Dewar <dewar@adacore.com>
4863 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4865 2011-08-02 Yannick Moy <moy@adacore.com>
4867 * sem_ch4.ads: minor formatting.
4869 2011-08-02 Yannick Moy <moy@adacore.com>
4871 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4872 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4873 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4874 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4875 opt.ads: cleanup of SPARK mode
4877 2011-08-02 Yannick Moy <moy@adacore.com>
4879 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4881 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4882 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4884 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4885 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4886 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4887 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4889 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4891 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4892 functions whose return type is not in ALFA.
4893 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4895 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4896 parameter's type is not in ALFA.
4897 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4902 * sem_ch6 (Analyze_Expression_Function): treat the function as
4903 Inline_Always, and introduce a subprogram declaration for it when it is
4905 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4906 expression functions, so that the back-end can determine whether they
4907 can in fact be inlined.
4908 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4909 a function body comes from an expression function.
4911 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4913 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4914 null exclusions to test Can_Never_Be_Null on the anonymous access types
4915 of the formals rather than testing the formals themselves. Exclude this
4916 check in cases where the Old_Formal is marked as a controlling formal,
4917 to avoid issuing spurious errors for bodies completing dispatching
4918 operations (due to the flag not getting set on controlling access
4919 formals in body specs).
4920 (Find_Corresponding_Spec): When checking full and subtype conformance of
4921 subprogram bodies in instances, pass Designated and E in that order, for
4922 consistency with the expected order of the formals (New_Id followed by
4925 2011-08-02 Robert Dewar <dewar@adacore.com>
4927 * sem_ch8.adb: Minor reformatting.
4929 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4931 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4932 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4933 primitive operations of class-wide actuals.
4935 2011-08-02 Javier Miranda <miranda@adacore.com>
4937 * exp_atag.ads, exp_atag.adb
4938 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4939 since its value is implicitly passed in argument Typ.
4940 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4941 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4942 Build_Common_Dispatching_Select_Statements.
4944 2011-08-02 Robert Dewar <dewar@adacore.com>
4946 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4947 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4950 2011-08-02 Robert Dewar <dewar@adacore.com>
4952 * sem_res.adb: Minor reformatting.
4953 * sem_prag.adb: Minor reformatting.
4955 2011-08-02 Javier Miranda <miranda@adacore.com>
4957 * exp_atag.adb, exp_atags.ads
4958 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4959 by the tagged type Entity. Required to use this routine in the VM
4960 targets since we do not have available the Tag entity in the VM
4963 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4964 Ada.Tags has not been previously loaded.
4966 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4967 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4969 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4970 view of enclosing scopes. Required to handle enclosing scopes that
4971 are synchronized types whose full view is a task type.
4973 (Build_VM_TSDs): Minor code improvement to avoid generating and
4974 analyzing lists with empty nodes.
4975 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4976 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4977 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4978 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4979 (Make_Select_Specific_Data_Table): Add support for VM targets.
4980 (Make_VM_TSD): Generate code to initialize the SSD structure of
4983 2011-08-02 Yannick Moy <moy@adacore.com>
4985 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4986 cross-references section in ALI.
4987 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4988 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4990 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4991 subprogram or package entity of a node
4992 (Is_Local_Reference_Type): new function returns True for references
4993 selected in local cross-references.
4994 (Lt): function extracted from Lt in Output_References
4995 (Write_Entity_Name): function extracted from Output_References
4996 (Generate_Definition): generate reference with type 'D' for definition
4997 of objects (object declaration and parameter specification), with
4998 appropriate locations and units, for use in local cross-references.
4999 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
5000 references of type 'I' for initialization in object definition.
5001 (Output_References): move part of function Lt and procedure
5002 Write_Entity_Name outside of the body. Ignore references of types 'D'
5003 and 'I' introduced for local cross-references.
5004 (Output_Local_References): new procedure to output the local
5005 cross-references sections.
5006 (Lref_Entity_Status): new array defining whether an entity is a local
5007 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
5008 with 'I' type when initialization expression is present.
5009 * get_scos.adb, get_scos.ads: Correct comments and typos
5011 2011-08-02 Javier Miranda <miranda@adacore.com>
5013 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
5015 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
5017 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
5020 2011-08-02 Vincent Celier <celier@adacore.com>
5022 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
5023 (No_Space_Img): New function
5024 (Find_Excluded_Sources): When reading from a file, record the file name
5025 and the line number for each excluded source.
5026 (Mark_Excluded_Sources): When reporting an error, if the excluded
5027 sources were read from a file, include file name and line number in
5030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5032 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
5034 2011-08-02 Robert Dewar <dewar@adacore.com>
5036 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
5038 2011-08-02 Javier Miranda <miranda@adacore.com>
5040 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
5041 generation of TSDs to the DOTNET compiler.
5042 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
5043 generation of TSDs to the DOTNET compiler.
5045 2011-08-02 Javier Miranda <miranda@adacore.com>
5047 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5048 record of all the tagged types declared inside library level package
5049 declarations, library level package bodies or library level subprograms.
5050 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5051 associated with a given tagged type.
5052 (Build_VM_TSDs): New subprogram.
5053 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5054 compilation units that are subprograms.
5055 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5056 compilation units that are package bodies.
5057 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5058 units that are a package declaration or a package instantiation.
5059 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5060 reorganization to improve the error generated by the frontend when the
5061 function Ada.Tags.Secondary_Tag is not available.
5062 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5063 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5065 2011-08-02 Javier Miranda <miranda@adacore.com>
5067 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5069 2011-08-02 Robert Dewar <dewar@adacore.com>
5071 * s-imenne.ads: Minor reformatting.
5073 2011-08-02 Robert Dewar <dewar@adacore.com>
5075 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5076 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5077 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5079 2011-08-02 Robert Dewar <dewar@adacore.com>
5081 * einfo.ads (Materialize_Entity): Document this is only for renamings
5082 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5083 required debug information in the case where we transform the object
5084 declaration into a renaming declaration.
5085 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5087 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5090 2011-08-02 Robert Dewar <dewar@adacore.com>
5092 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5093 Suppress_Init_Procs.
5094 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5095 Suppress_Initialization/Initialization_Suppressed.
5096 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5097 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5098 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5099 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5101 2011-08-02 Robert Dewar <dewar@adacore.com>
5103 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5106 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5108 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5109 only have inheritable classwide pre/postconditions.
5111 2011-08-02 Javier Miranda <miranda@adacore.com>
5113 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5114 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5115 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5116 checks if the external tag of a type is the same as the external tag
5117 of some other declaration.
5119 2011-08-02 Thomas Quinot <quinot@adacore.com>
5121 * s-taskin.ads: Minor reformatting.
5123 2011-08-02 Emmanuel Briot <briot@adacore.com>
5125 * g-comlin.adb (Display_Help): swap the order in which it prints the
5126 short help and the general usage.
5128 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5130 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5131 the aspect declarations and attach them to the generic copy for
5132 subsequent analysis.
5133 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5134 declarations of the generic tree to the new subprogram declarations.
5135 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5136 conditions that apply to a subprogram instance.
5138 2011-08-02 Robert Dewar <dewar@adacore.com>
5140 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5142 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5144 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5145 private type with a tagged full view is not derived in the immediate
5146 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5148 2011-08-02 Robert Dewar <dewar@adacore.com>
5150 * exp_ch4.adb: Minor reformatting.
5152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5154 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5155 Ada2012 iterator, the loop will be rewritten during expansion into a
5156 while loop with a cursor and an element declaration. Do not analyze the
5157 body in this case, because if the container is for indefinite types the
5158 actual subtype of the elements will only be determined when the cursor
5159 declaration is analyzed.
5161 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5163 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5164 size/alignment related attributes in CodePeer_Mode.
5166 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5168 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5169 Prepend_Element, since this can result in the operation getting the
5170 wrong slot in the full type's dispatch table if the full type has
5171 inherited operations. The incomplete type's operation will get added
5172 to the proper position in the full type's primitives
5173 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5174 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5175 dispatching operations, since there are cases where nonprimitive
5176 subprograms can get added to the list of incomplete dependents (such
5177 as subprograms in nested packages).
5178 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5179 private part when determining whether to add a primitive with a
5180 parameter of a tagged incomplete type to the Private_Dependents list.
5181 Such primitives can also occur in the visible part, and should not have
5182 been excluded from being private dependents.
5183 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5184 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5185 list of a Taft-amendment incomplete type is a primitive before issuing
5186 an error that the full type must appear in the same unit. There are
5187 cases where nonprimitives can be in the list (such as subprograms in
5189 * sem_disp.adb (Derives_From): Use correct condition for checking that
5190 a formal's type is derived from the type of the corresponding formal in
5191 the parent subprogram (the condition was completely wrong). Add
5192 checking that was missing for controlling result types being derived
5193 from the result type of the parent operation.
5195 2011-08-02 Yannick Moy <moy@adacore.com>
5197 * errout.adb (First_Node): minor renaming
5198 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5201 2011-08-02 Yannick Moy <moy@adacore.com>
5203 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5204 before accessing operands.
5205 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5206 decide whether an initialization expression respects SPARK rules, as
5207 the plain node is the expanded one. This allows for more valid warnings
5209 * gnat_rm.texi: Minor update.
5211 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5213 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5216 2011-08-02 Robert Dewar <dewar@adacore.com>
5218 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5220 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5222 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5223 loop statements and the element renaming declaration with a block when
5224 the element type is controlled.
5226 2011-08-02 Yannick Moy <moy@adacore.com>
5228 * sinfo.ads: Minor formatting.
5230 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5232 * sem_aggr.adb (Add_Association): if the association has a box and no
5233 expression, use the Sloc of the aggregate itself for the new
5235 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5238 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5240 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5241 When a container is provided via a function call, generate a renaming
5242 of the function result. This avoids the creation of a transient scope
5243 and the premature finalization of the container.
5244 * exp_ch7.adb (Is_Container_Cursor): Removed.
5245 (Wrap_Transient_Declaration): Remove the supression of the finalization
5246 of the list controller when the declaration denotes a container cursor,
5249 2011-08-02 Yannick Moy <moy@adacore.com>
5251 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5252 node is from source, instead of the original node being from source.
5254 (Resolve_Array_Aggregate): refine the check for a static expression, to
5255 recognize also static ranges
5256 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5257 Array_Type_Declaration): postpone the test for the type being a subtype
5258 mark after the type has been resolved, so that component-selection and
5259 expanded-name are discriminated.
5260 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5261 to distinguish the case of an iteration scheme, so that an error is
5262 issed on a non-static range in SPARK except in an iteration scheme.
5263 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5264 In_Iter_Schm = True.
5265 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5266 user-defined operators so that they are allowed in renaming
5268 (Find_Selected_Component): refine the check for prefixing of operators
5269 so that they are allowed in renaming. Move the checks for restrictions
5270 on selector name after analysis discriminated between
5271 component-selection and expanded-name.
5272 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5273 concatenation argument of string type if it is static.
5274 * sem_util.adb, sem_util.ads
5275 (Check_Later_Vs_Basic_Declarations): add a new function
5276 Is_Later_Declarative_Item to decice which declarations are allowed as
5277 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5278 mode, add that renamings are considered as later items.
5279 (Enclosing_Package): new function to return the enclosing package
5280 (Enter_Name): correct the rule for homonyms in SPARK
5281 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5282 from source (result of expansion) to avoid issuing wrong warnings.
5284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5286 * errout.adb: On anything but an expression First_Node returns its
5289 2011-08-02 Pascal Obry <obry@adacore.com>
5291 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5293 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5295 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5296 Set the associated loop as the related expression of internally
5298 * exp_ch7.adb (Is_Container_Cursor): New routine.
5299 (Wrap_Transient_Declaration): Supress the finalization of the list
5300 controller when the declaration denotes a container cursor.
5302 2011-08-02 Yannick Moy <moy@adacore.com>
5304 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5306 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5307 expression is a simple expression. This check cannot be performed in
5308 the semantics, so just drop it.
5309 (P_Index_Or_Discriminant_Constraint): move check that the index or
5310 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5311 semantics. Other cases were previously checked in the semantics.
5312 * par-ch4.adb (P_Name): move checks that a selector name is not
5313 character literal or an operator symbol to Find_Selected_Component in
5315 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5316 declarations are not placed after later declarations in a separate
5317 procedure in Sem_Util (possibly not the best choice?), to be used both
5318 during parsing, for Ada 83 mode, and during semantic analysis, for
5320 * par-endh.adb (Check_End): move check that end label is not missing
5321 to Process_End_Label in the semantics
5322 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5323 the special case for SPARK restriction
5324 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5325 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5326 parameter Force to issue the error message even on internal node (used
5327 for generated end label). Call Check_Restriction to check when an error
5328 must be issued. In SPARK mode, issue an error message even if the
5329 restriction is not set.
5330 (Check_Restriction): new procedure with an additional out parameter to
5331 inform the caller that a message has been issued
5332 * sem_aggr.adb: Minor modification of message
5333 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5334 instead of issuing an error message directly
5335 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5336 declarations are not placed after later declarations, by calling
5337 Check_Later_Vs_Basic_Declarations
5338 (Analyze_Subtype_Declaration): move here the check that an index or
5339 discriminant constraint must be a subtype mark. Change the check that
5340 a subtype of String must start at one so that it works on subtype marks.
5341 * sem_ch4.adb (Analyze_Call): move here the check that a named
5342 association cannot follow a positional one in a call
5343 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5344 instead of issuing an error message directly
5345 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5346 selector name is not a character literal or an operator symbol. Move
5347 here the check that the prefix of an expanded name cannot be a
5348 subprogram or a loop statement.
5349 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5350 procedure called from parsing and semantics to check that basic
5351 declarations are not placed after later declarations
5352 (Process_End_Label): move here the check that end label is not missing
5354 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5356 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5357 representation clause in codepeer mode, since it confuses CodePeer and
5358 does not bring useful info.
5360 2011-08-02 Ed Falis <falis@adacore.com>
5362 * init.c: initialize fp hw on MILS.
5364 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5366 * errout.adb (First_Node): for bodies, return the node itself (small
5367 optimization). For other nodes, do not check source_unit if the node
5368 comes from Standard.
5370 2011-08-02 Robert Dewar <dewar@adacore.com>
5372 * exp_ch3.adb: Minor comment additions.
5373 * sem_ch13.adb: Minor reformatting.
5375 2011-08-02 Pascal Obry <obry@adacore.com>
5377 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5379 2011-08-02 Robert Dewar <dewar@adacore.com>
5381 * sem_attr.adb: Minor reformatting.
5383 2011-08-02 Robert Dewar <dewar@adacore.com>
5385 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5386 (Has_Default_Component_Value): Removed
5387 * einfo.ads Comment updates
5388 (Has_Default_Aspect): Replaces Has_Default_Value
5389 (Has_Default_Component_Value): Removed
5391 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5393 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5394 (Get_Simple_Init_Val): Handle Default_Value aspect
5395 (Needs_Simple_Initialization): Handle Default_Value aspect
5396 * exp_ch3.ads: Needs_Simple_Initialization
5397 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5398 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5400 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5401 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5402 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5404 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5406 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5407 package containing iteration primitives.
5408 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5412 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5413 "of", pre-analyze expression in case it is a function call with
5414 finalization actions that must be placed ahead of the loop.
5415 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5416 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5418 2011-08-02 Geert Bosch <bosch@adacore.com>
5420 * cstand.adb (Create_Float_Types): Only consider C's long double for
5421 Long_Long_Float, in addition to double.
5423 2011-08-02 Robert Dewar <dewar@adacore.com>
5425 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5426 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5427 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5432 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5435 2011-08-02 Javier Miranda <miranda@adacore.com>
5437 * einfo.ads, einfo.adb
5438 (Original_Access_Type): Move this attribute to Node26 since there was
5439 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5440 which causes conflicts and breaks the generation of the .NET compiler.
5441 (Interface_Name): Add missing documentation on JGNAT only uses of
5444 2011-08-02 Geert Bosch <bosch@adacore.com>
5446 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5447 (Find_Back_End_Float_Type): Likewise
5448 (Create_Back_End_Float_Types): Likewise
5449 (Create_Float_Types): Likewise
5450 (Register_Float_Type): Likewise
5451 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5452 Nlist and split out type selection in new local Find_Base_Type function.
5453 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5455 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5457 2011-08-02 Robert Dewar <dewar@adacore.com>
5459 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5461 * opt.ads: Minor comment change.
5462 * sem_ch12.adb: Minor code reorganization.
5464 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5466 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5467 subtype's list of rep items to the list on the full subtype in the case
5468 where the lists are the same.
5470 2011-08-02 Geert Bosch <bosch@adacore.com>
5472 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5473 using the one from System.Strings, which also deallocates all strings.
5475 2011-08-02 Geert Bosch <bosch@adacore.com>
5477 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5479 * gcc-interface/Make-lang.in: Update dependencies.
5481 2011-08-02 Olivier Hainque <hainque@adacore.com>
5483 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5486 2011-08-02 Javier Miranda <miranda@adacore.com>
5488 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5489 associated with anonymous access to subprograms.
5491 2011-08-02 Geert Bosch <bosch@adacore.com>
5494 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5495 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5496 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5497 (Add_Symbol_Definition): Move to switch-c.adb
5498 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5499 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5500 (Add_Symbol_Definition): Move to switch-c.adb.
5501 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5503 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5505 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5506 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5508 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5509 (Add_Symbol_Definition): Moved from Prepcomp.
5510 * switch-c.ads: Update copyright notice. Use String_List instead of
5511 Argument_List, removing dependency on System.OS_Lib.
5513 2011-08-02 Yannick Moy <moy@adacore.com>
5515 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5516 mode on initialization expression which does not respect SPARK
5518 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5519 if the tree referenced by its argument represents an initialization
5520 expression in SPARK, suitable for initializing an object in an object
5523 2011-08-02 Javier Miranda <miranda@adacore.com>
5525 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5526 internally generated access to subprogram with its associated protected
5528 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5530 2011-08-02 Geert Bosch <bosch@adacore.com>
5532 * cstand.adb (Register_Float_Type): Print information about type to
5533 register, if the Debug_Flag_Dot_B is set.
5534 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5535 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5536 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5537 with a requested precision of more than Max_Digits digits and no more
5538 than Max_Base_Digits digits, if a range specification is present and the
5539 Predefined_Float_Types list has a suitable type to derive from.
5540 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5541 case of type completion with pragma Import
5543 (Process_Import_Predefined_Type): Processing to complete a type
5544 with pragma Import. Currently supports floating point types only.
5545 (Set_Convention_From_Pragma): Do nothing without underlying type.
5546 (Process_Convention): Guard against absence of underlying type,
5547 which may happen when importing incomplete types.
5548 (Process_Import_Or_Interface): Handle case of importing predefined
5549 types. Tweak error message.
5551 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5553 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5554 functions to previous change. Reorganize code slightly.
5556 2011-08-02 Geert Bosch <bosch@adacore.com>
5558 * back_end.ads (Register_Type_Proc): New call back procedure type for
5559 allowing the back end to provide information about available types.
5560 (Register_Back_End_Types): New procedure to register back end types.
5561 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5563 * cstand.adb (Back_End_Float_Types): New list for floating point types
5564 supported by the back end.
5565 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5566 (Copy_Float_Type): New procedure to make new copies of predefined types.
5567 (Register_Float_Type): New call back procedure to populate the BEFT list
5568 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5569 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5570 (Create_Float_Types): New procedure to create entities for floating
5571 point types predefined in Standard, and put these and any remaining
5572 BEFTs on the Predefined_Float_Types list.
5573 * stand.ads (Predefined_Float_Types): New list for predefined floating
5574 point types that do not have declarations in package Standard.
5576 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5578 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5579 entity node for the unit containing the parameter.
5580 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5581 (Add_Inlined_Subprogram): Likewise.
5582 * gcc-interface/Make-lang.in: Update dependencies.
5584 2011-08-02 Thomas Quinot <quinot@adacore.com>
5586 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5589 2011-08-02 Geert Bosch <bosch@adacore.com>
5591 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5593 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5595 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5596 computed value of Base_Type.
5598 2011-08-02 Yannick Moy <moy@adacore.com>
5600 * restrict.adb (Check_Restriction): issue an error for any use of
5601 class-wide, even if the No_Dispatch restriction is not set.
5602 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5603 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5604 when completing a private extension, the type named in the private part
5605 is not the same as that named in the visible part.
5606 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5607 of an inherited primitive operations of a tagged type or type extension
5608 that returns the tagged type.
5609 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5610 function which returns True for an implicit operation inherited by the
5611 derived type declaration for the argument type.
5612 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5615 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5617 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5618 Process_Bounds, to perform analysis with expansion of a range or an
5619 expression that is the iteration scheme for a loop.
5620 (Analyze_Iterator_Specification): If domain of iteration is given by a
5621 function call with a controlled result, as is the case if call returns
5622 a predefined container, ensure that finalization actions are properly
5624 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5626 2011-08-02 Javier Miranda <miranda@adacore.com>
5628 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5629 * gcc-interface/Make-lang.in: Update dependencies.
5631 2011-08-02 Javier Miranda <miranda@adacore.com>
5633 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5634 determine if the analysis is performed using N or Original_Node (N).
5635 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5636 functionality of routine Is_Variable avoids code duplication.
5637 * checks.adb (Determine_Range): Handle temporaries generated by
5638 Remove_Side_Effects.
5640 2011-08-02 Javier Miranda <miranda@adacore.com>
5642 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5643 expansion of the condition. Required since the previous analysis was
5644 done with expansion disabled (see Resolve_Quantified_Expression) and
5645 hence checks were not inserted and record comparisons have not been
5648 2011-08-02 Ed Falis <falis@adacore.com>
5650 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5653 2011-08-02 Bob Duff <duff@adacore.com>
5655 * opt.ads: Minor comment fix.
5657 2011-08-02 Bob Duff <duff@adacore.com>
5659 * sem_ch12.adb (Analyze_Package_Instantiation,
5660 Analyze_Subprogram_Instantiation): Turn off style checking while
5661 analyzing an instance. Whatever style checks that apply to the generic
5662 unit should apply, so it makes no sense to apply them in an instance.
5663 This was causing trouble when compiling an instance of a runtime
5664 unit that violates the -gnatyO switch.
5665 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5666 one of the two case statements, causing spurious errors.
5668 2011-08-02 Robert Dewar <dewar@adacore.com>
5670 * uname.adb: Minor reformatting.
5671 * gnatcmd.adb: Minor reformatting.
5672 * exp_attr.adb: Minor reformatting.
5674 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5676 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5677 No_Dispatching_Calls, do not look for the Assign primitive, because
5678 predefined primitives are not created in this case.
5680 2011-08-02 Bob Duff <duff@adacore.com>
5682 * stylesw.ads: Minor comment fixes.
5684 2011-08-02 Robert Dewar <dewar@adacore.com>
5686 * freeze.adb (Add_To_Result): New procedure.
5688 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5690 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5691 time, if the specific run-time routines for handling streams of strings
5692 are not available, use the default mechanism.
5694 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5696 * s-regpat.ads: Fix typo.
5698 2011-08-02 Vincent Celier <celier@adacore.com>
5700 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5701 not null, call it to create the in memory config project file without
5702 parsing an existing default config project file.
5704 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5706 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5710 * sem_elim.adb: an abstract subprogram does not need an eliminate
5711 pragma for its descendant to be eliminable.
5713 2011-08-02 Ed Falis <falis@adacore.com>
5715 * init.c: revert to handling before previous checkin for VxWorks
5716 * s-intman-vxworks.adb: delete unnecessary declarations related to
5717 using Ada interrupt facilities for handling signals.
5718 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5719 * s-intman-vxworks.ads: Import __gnat_install_handler as
5720 Initialize_Interrupts.
5721 * s-taprop-vxworks.adb: Delete Signal_Mask.
5722 (Abort_Handler): change construction of mask to unblock exception
5725 2011-08-02 Jerome Guitton <guitton@adacore.com>
5727 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5728 Debug_Raise_Exception before propagation starts.
5730 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5732 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5733 to Restriction_Check_Required.
5734 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5735 * sem_res.adb (Resolve_Call): Likewise.
5736 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5738 2011-08-02 Bob Duff <duff@adacore.com>
5740 * stylesw.ads: Update comment.
5741 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5742 * errout.ads: Remove obsolete comment.
5744 2011-08-02 Javier Miranda <miranda@adacore.com>
5746 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5747 (Set_Is_Safe_To_Reevaluate): new procedure.
5748 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5749 assignment is allowed on safe-to-reevaluate variables.
5750 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5751 temporary created to remove side effects in expressions that use
5752 the secondary stack as safe-to-reevaluate.
5753 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5754 variables that are not true constants.
5756 2011-08-02 Robert Dewar <dewar@adacore.com>
5758 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5759 sem_res.adb, sem_ch6.adb: Minor reformatting.
5761 2011-08-02 Jerome Guitton <guitton@adacore.com>
5763 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5765 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5767 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5768 not set Overridden_Operation if subprogram is an initialization
5771 2011-08-02 Yannick Moy <moy@adacore.com>
5773 * par-ch6.adb: Correct obsolete name in comments
5774 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5775 which takes two message arguments (existing function takes one), with
5776 second message used for continuation.
5777 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5778 block statements that originate from a source block statement, not
5779 generated block statements
5780 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5781 symmetry with procedure case
5782 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5783 function to issue an error in formal mode if a package specification
5784 contains more than one tagged type or type extension.
5785 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5786 parameters matching formals of tagged types are objects (or ancestor
5787 type conversions of objects), not general expressions. Issue an error
5788 on view conversions that are not involving ancestor conversion of an
5790 (Resolve_Type_Conversion): in formal mode, issue an error on the
5791 operand of an ancestor type conversion which is not an object
5792 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5793 procedure so that it works also for actuals of function calls
5794 (Is_Actual_Tagged_Parameter): new function which determines if its
5795 argument is an actual parameter of a formal of tagged type in a
5797 (Is_SPARK_Object_Reference): new function which determines if the tree
5798 referenced by its argument represents an object in SPARK
5800 2011-08-02 Robert Dewar <dewar@adacore.com>
5802 * sem_ch3.adb: Minor reformatting
5803 Minor comment addition
5804 Minor error msg text change
5806 2011-08-02 Javier Miranda <miranda@adacore.com>
5808 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5809 function. Used to be more precise when we generate a variable plus one
5810 assignment to remove side effects in the evaluation of the Bound
5812 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5813 of the bound expression to force its re-analysis and thus expand the
5814 associated transient scope (if required). Code cleanup replacing the
5815 previous code that declared the constant entity by an invocation to
5816 routine Force_Evaluation which centralizes this work in the frontend.
5818 2011-08-02 Robert Dewar <dewar@adacore.com>
5820 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5821 (Base_Type): Now uses improved Is_Base_Type function
5822 * einfo.ads (Base_Type): Inline this function
5824 2011-08-02 Robert Dewar <dewar@adacore.com>
5826 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5827 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5829 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5831 * gcc-interface/Make-lang.in: Update dependencies.
5832 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5835 2011-08-02 Yannick Moy <moy@adacore.com>
5837 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5838 non-simple expression used in delta constraint
5839 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5840 index constraint which is not a subtype mark
5841 * par.adb: With and use Restrict
5842 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5843 mode on component type which is not a subtype mark and default
5844 expression on component
5845 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5846 of string which does not have a lower index bound equal to 1
5847 (Array_Type_Declaration): issue an error in formal mode on index or
5848 component type which is not a subtype mark, and on aliased keyword on
5850 (Derived_Type_Declaration): issue an error in formal mode on interface,
5851 limited or abstract type
5852 (Record_Type_Declaration): issue an error in formal mode on interface
5853 (Record_Type_Definition): issue an error in formal mode on tagged types
5854 and type extensions not declared in the specification of a library unit
5855 package; on null non-tagged record; on variant part
5857 2011-08-02 Vincent Celier <celier@adacore.com>
5859 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5860 not declared for qualified library project when Library_Name is not
5861 declared, but Library_Dir is.
5863 2011-08-02 Robert Dewar <dewar@adacore.com>
5865 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5866 pragmas (affects aspects [Component_]Default_Value
5867 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5868 component type for the resolution
5870 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5872 * einfo.adb (Base_Type): Tune implementation for speed.
5874 2011-08-02 Robert Dewar <dewar@adacore.com>
5876 * freeze.adb: Minor reformatting.
5878 2011-08-02 Thomas Quinot <quinot@adacore.com>
5880 * scos.ads: Update comments.
5882 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5884 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5885 base type, because the parent may be a subtype of a private type whose
5886 convention is established in a private part.
5888 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5890 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5891 statement in a block when the expansion of the return expression has
5892 created a finalization chain.
5893 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5894 with the parent node.
5895 Add N_Extended_Return_Statement to handle the case where a transient
5896 object declaration appears in the Return_Object_Declarations list of
5897 an extended return statement.
5899 2011-08-02 Matthew Gingell <gingell@adacore.com>
5901 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5902 unused parameter 'name'.
5904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5906 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5907 inherited operation, check whether its alias, which is the source
5908 operastion that it renames, has been marked eliminated.
5910 2011-08-02 Javier Miranda <miranda@adacore.com>
5912 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5913 in-mode parameter whose type is an access type since it can be used to
5914 modify its designated object. Enforce code that handles as safe an
5915 access type that is not access-to-constant but it is the result of a
5916 previous removal of side-effects.
5917 (Remove_Side_Effects): Minor code reorganization of cases which require
5918 no action. Done to incorporate documentation on new cases uncovered
5919 working in this ticket: no action needed if this routine was invoked
5920 too early and the nodes are not yet decorated.
5921 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5922 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5923 were issued with actuals that are implicitly provided by
5926 2011-08-02 Robert Dewar <dewar@adacore.com>
5928 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5930 2011-08-02 Yannick Moy <moy@adacore.com>
5932 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5933 to issue an error in formal mode on attribute not supported in this mode
5934 (Analyze_Attribute): issue errors on standard attributes not supported
5936 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5937 comment, and issue error in formal mode on modulus which is not a power
5939 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5941 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5943 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5944 operator on modular type (except 'not').
5946 2011-08-02 Robert Dewar <dewar@adacore.com>
5948 * gnat_rm.texi: Minor reformatting.
5950 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5952 * s-osinte-linux.ads: Minor comment update and reformatting.
5953 * i-cexten.ads: Make this unit pure, as for its parent.
5954 Will allow its usage in more contexts if needed.
5956 2011-08-02 Robert Dewar <dewar@adacore.com>
5958 * s-utf_32.ads: Minor comment fix.
5960 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5962 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5963 operation of a tagged synchronized type, handle the case where the
5964 controlling argument is overloaded.
5966 2011-08-02 Yannick Moy <moy@adacore.com>
5968 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5969 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5970 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5971 SPARK mode and formal verification mode on processing SPARK restriction
5972 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5973 requiring consistency checking.
5975 2011-08-02 Robert Dewar <dewar@adacore.com>
5977 * sem_res.adb: Minor reformatting.
5979 2011-08-02 Robert Dewar <dewar@adacore.com>
5981 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5982 a-cforse.ads: Remove unneeded with of Ada.Containers
5983 Remove commented out pragma Inline's
5984 Move specifications of new subprograms to the actual specs
5986 2011-08-02 Yannick Moy <moy@adacore.com>
5988 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5989 a-cforse.ads: Update comments.
5991 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5993 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5995 2011-08-02 Robert Dewar <dewar@adacore.com>
5997 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5998 a-cforse.ads, a-cofove.ads: Minor reformatting.
6000 2011-08-02 Claire Dross <dross@adacore.com>
6002 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6003 a-cofove.ads: Add comments.
6005 2011-08-02 Yannick Moy <moy@adacore.com>
6007 * gnat_rm.texi: Document formal containers.
6009 2011-08-02 Emmanuel Briot <briot@adacore.com>
6011 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
6014 2011-08-02 Robert Dewar <dewar@adacore.com>
6016 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
6019 2011-08-02 Robert Dewar <dewar@adacore.com>
6021 * aspects.adb: New aspects Default_Value and Default_Component_Value
6022 New format of Aspect_Names table checks for omitted entries
6023 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
6024 handling of boolean aspects for derived types.
6025 New aspects Default_Value and Default_Component_Value
6026 New format of Aspect_Names table checks for omitted entries
6027 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
6028 (Has_Default_Value): New flag
6029 (Has_Default_Component_Value): New flag
6030 (Has_Default_Value): New flag
6031 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
6033 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
6034 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
6035 Default_Value and Default_Component_Value
6036 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
6037 New aspects Default_Value and Default_Component_Value
6038 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
6039 * sprint.adb: Print N_Aspect_Specification node when called from gdb
6041 2011-08-02 Vincent Celier <celier@adacore.com>
6043 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6044 inherit library kind.
6046 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6048 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6051 2011-08-02 Robert Dewar <dewar@adacore.com>
6053 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6055 2011-08-02 Yannick Moy <moy@adacore.com>
6057 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6059 2011-08-02 Robert Dewar <dewar@adacore.com>
6061 * impunit.adb: Add comment.
6063 2011-08-02 Yannick Moy <moy@adacore.com>
6065 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6066 qualification of aggregates in formal mode
6067 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6069 (Resolve_Aggregate): complete the test that an aggregate is adequately
6070 qualified in formal mode
6072 2011-08-02 Pascal Obry <obry@adacore.com>
6074 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6075 * mlib-prj.adb: Supress warning when compiling binder generated file.
6076 (Build_Library): Supress all warnings when compiling the binder
6079 2011-08-02 Yannick Moy <moy@adacore.com>
6081 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6083 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6084 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6085 Add with/use clauses to make Check_Formal_Restriction visible
6087 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6089 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6090 in-parameters when type of the generic formal is private in the generic
6091 spec and non-private in the body.
6093 2011-08-02 Claire Dross <dross@adacore.com>
6095 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6096 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6097 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6098 * impunit.adb, Makefile.rtl: Take new files into account.
6100 2011-08-02 Robert Dewar <dewar@adacore.com>
6102 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6103 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6105 2011-08-02 Yannick Moy <moy@adacore.com>
6107 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6109 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6110 matching static array bounds, taking into account the special case of
6112 * sem_ch3.adb: Typo in comment.
6114 2011-08-02 Yannick Moy <moy@adacore.com>
6116 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6117 which issues an error in formal mode if its argument node is originally
6119 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6120 has a discriminant specification so that it does not include the case
6122 (Derived_Type_Declaration): move here the test that a derived type has a
6123 discriminant specification
6124 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6125 first element of a component association before accessing its choices
6126 (presence of component association is not enough)
6127 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6128 declaration is a library item before accessing the next element in a
6129 list, as library items are not member of lists
6130 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6131 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6132 Check_Formal_Restriction whenever possible.
6134 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6136 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6137 reference when needed.
6139 2011-08-02 Bob Duff <duff@adacore.com>
6141 * gnat_ugn.texi: Fix typo.
6143 2011-08-02 Vincent Celier <celier@adacore.com>
6145 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6146 archive file name. Do not use the full path name of archives for Open
6149 2011-08-02 Robert Dewar <dewar@adacore.com>
6151 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6152 Analyze_Aspect_Specifications
6154 (Analyze_Aspect_Specifications): New handling for boolean aspects
6155 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6156 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6157 sequence for Analyze_Aspect_Specifications
6158 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6159 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6161 2011-08-02 Robert Dewar <dewar@adacore.com>
6163 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6164 aspects, since these no longer exist.
6166 2011-08-02 Robert Dewar <dewar@adacore.com>
6168 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6169 semicolon, do not try to see if there are aspects following it.
6170 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6173 2011-08-02 Robert Dewar <dewar@adacore.com>
6175 * sem_ch8.adb, aspects.ads: Minor reformatting.
6177 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6179 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6180 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6182 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6184 2011-08-02 Yannick Moy <moy@adacore.com>
6186 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6187 mode on subprogram declaration outside of package specification, unless
6188 it is followed by a pragma Import
6189 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6190 Access_Type_Declaration): issue error in formal mode on access type
6191 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6193 (Analyze_Object_Declaration): issue error in formal mode on object
6194 declaration which does not respect SPARK restrictions
6195 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6196 declaration which does not respect SPARK restrictions
6197 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6198 error in formal mode on digits or delta constraint
6199 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6200 decimal fixed point type
6201 (Derived_Type_Declaration): issue error in formal mode on derived type
6202 other than type extensions of tagged record types
6203 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6204 with check on access definition
6205 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6206 mode on protected definition.
6207 (Analyze_Task_Definition): issue error in formal mode on task definition
6209 2011-08-02 Robert Dewar <dewar@adacore.com>
6211 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6213 2011-08-02 Javier Miranda <miranda@adacore.com>
6215 * sem_ch6.adb (Can_Override_Operator): New function.
6216 (Verify_Overriding_Indicator): Add missing code to check overriding
6217 indicator in operators. Fixes regression.
6218 (Check_Overriding_Indicator): Minor reformating after replacing the
6219 code that evaluates if the subprogram can override an operator by
6220 invocations to the above new function.
6222 (Write_Field26_Name): Add missing code to ensure that, following
6223 the documentation in einfo.ads, this field is not shown as attribute
6224 "Static_Initialization" on non-dispatching functions.
6226 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6228 * sem_res.adb (Resolve_Call): A call to
6229 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6230 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6231 i.e., when the second parameter is of type Time_Span.
6233 2011-08-02 Vincent Celier <celier@adacore.com>
6235 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6236 with an archive instead of -L<library dir> -l<library name>.
6238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6240 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6241 mark the base types In_Use in addition to making the operations
6244 2011-08-02 Ed Falis <falis@adacore.com>
6246 * init.c: add and setup __gnat_signal_mask for the exception signals
6247 * s-inmaop-vxworks.adb: new file.
6248 * s-intman-vxworks.adb: remove unnecessary initializations and
6250 * s-intman-vxworks.ads: remove unnecessary variable
6251 * s-taprop-vxworks.adb: simplify signal initialization
6253 2011-08-02 Robert Dewar <dewar@adacore.com>
6255 * sem_ch8.adb: Minor code reorganization, comment updates.
6257 2011-08-02 Robert Dewar <dewar@adacore.com>
6259 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6260 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6262 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6263 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6267 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6268 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6269 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6270 use_type_clauses, to handle more efficiently use_type and use_all_type
6272 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6273 Ada2012 Use_All_Type clause.
6274 (Use_Class_Wide_Operations): new procedure.
6276 2011-08-02 Robert Dewar <dewar@adacore.com>
6278 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6279 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6280 expression to expression function.
6282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6284 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6285 if types are compatible.
6287 2011-08-02 Yannick Moy <moy@adacore.com>
6289 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6290 returns True if its argument array types have same dimension and same
6291 static bounds at each index.
6292 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6293 OUT or IN OUT paramaters which are not view conversions in SPARK.
6294 (Resolve_Arithmetic_Op): issue an error in formal mode on
6295 multiplication or division with operands of fixed point types which are
6296 not qualified or explicitly converted.
6297 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6298 Boolean or array type (except String) operands.
6299 (Resolve_Equality_Op): issue an error in formal mode on equality
6300 operators for array types other than String with non-matching static
6302 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6303 for array types with non-matching static bounds. Factorize the code in
6304 Matching_Static_Array_Bounds.
6305 (Resolve_Qualified_Expression): issue an error in formal mode on
6306 qualified expressions for array types with non-matching static bounds.
6307 (Resolve_Type_Conversion): issue an error in formal mode on type
6308 conversion for array types with non-matching static bounds
6310 2011-08-02 Robert Dewar <dewar@adacore.com>
6312 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6316 * par-ch9.adb: save location of entry for proper error message.
6318 2011-08-02 Javier Miranda <miranda@adacore.com>
6320 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6321 (Use_Full_View) which permits this routine to climb through the
6322 ancestors using the full-view of private parents.
6323 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6324 Use_Full_View to true in calls to Is_Ancestor.
6325 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6326 true in call to Is_Ancestor.
6327 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6328 Use_Full_View to true in call to Is_Ancestor.
6329 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6330 call to Is_Ancestor.
6331 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6332 Use_Full_View to true in calls to Is_Ancestor.
6333 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6334 Make_Select_Specific_Data_Table, Register_Primitive,
6335 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6336 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6337 to true in call to Is_Ancestor.
6338 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6339 Use_Full_View to true in calls to Is_Ancestor.
6341 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6342 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6344 2011-08-02 Robert Dewar <dewar@adacore.com>
6346 * gnat_rm.texi: Minor reformatting.
6347 * sem_prag.adb: Minor reformatting.
6349 2011-08-02 Tristan Gingold <gingold@adacore.com>
6351 * vms_data.ads: Add VMS qualifier for -gnateP.
6353 2011-08-02 Robert Dewar <dewar@adacore.com>
6355 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6356 * par-ch7.adb (P_Package): Proper placement of aspects for package
6358 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6359 (End_Statements): Add Is_Sloc parameterr
6360 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6361 (Check_End): Ad Is_Sloc parameter
6362 (End_Statements): Add Is_Sloc parameterr
6364 2011-08-02 Vincent Celier <celier@adacore.com>
6366 * ug_words: Add VMS qualifier equivalent to -gnateP:
6367 /SYMBOL_PREPROCESSING.
6369 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6371 * gnat-style.texi: For hexadecimal numeric literals the typical
6372 grouping of digits is 4 to represent 2 bytes.
6373 A procedure spec which is split into several lines is indented two
6376 2011-08-02 Yannick Moy <moy@adacore.com>
6378 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6379 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6380 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6382 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6383 choice in array aggregate
6384 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6386 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6387 positional and named aggregate for record, or others in record
6388 aggregate, or multiple choice in record aggregate
6389 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6390 array operands to logical operations AND, OR and XOR do not have the
6391 same static lower and higher bounds
6392 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6394 2011-08-01 Robert Dewar <dewar@adacore.com>
6396 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6397 Replaces Last_Source_Node_In_Sequence.
6398 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6399 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6400 parens and blank in string (this was inconsistently implemented).
6402 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6403 blank in string (this was inconsistently implemented).
6405 (Set_Global_Switches): Set formal mode switches appropriately
6406 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6408 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6409 call Set_Error_Msg_Lang to set "spark" as language name.
6410 * par.adb: Remove unnecessary call to set formal language for errout
6411 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6412 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6414 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6415 calls to it, moved after resolution so that types are known
6416 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6417 result of concatenation is not of type String
6418 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6419 concatenation is not properly restricted
6420 * gnat_rm.texi: Add doc on pragma Spark_95.
6421 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6422 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6423 * gcc-interface/Make-lang.in: Update dependencies.
6425 2011-08-01 Javier Miranda <miranda@adacore.com>
6427 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6428 condition that detects if the overridden operation must replace an
6431 2011-08-01 Javier Miranda <miranda@adacore.com>
6433 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6434 code declarations inserted by Insert_Actions in each alternative of the
6435 N_Case_Expression node.
6437 2011-08-01 Robert Dewar <dewar@adacore.com>
6439 * sem_ch6.adb: Minor code reorganization.
6440 * sem_util.adb: Minor reformatting.
6442 2011-08-01 Pascal Obry <obry@adacore.com>
6444 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6445 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6447 2011-08-01 Yannick Moy <moy@adacore.com>
6449 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6450 literal or operator symbol which is prefixed
6451 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6452 mode on access attributes.
6453 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6454 that concatenation operands are properly restricted in formal mode
6455 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6456 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6457 result of the concatenation has a type different from String.
6458 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6459 Analyze_Quantified_Expression, Analyze_Slice,
6460 Analyze_Null): issue an error in formal mode on unsupported constructs
6462 (Analyze_Block_Statement): only issue error on source block statement
6463 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6464 function which returns the last node in a list of nodes for which
6465 Comes_From_Source returns True, if any
6466 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6467 Last_Source_Node_In_Sequence
6468 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6469 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6470 mode on unsupported constructs
6471 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6472 rest of the actions may be needed later on since the error is marked as
6474 * sinfo.ads: Typos in comments.
6476 2011-08-01 Pascal Obry <obry@adacore.com>
6478 * projects.texi: Minor editing.
6480 2011-08-01 Yannick Moy <moy@adacore.com>
6482 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6483 insertion character ~~
6484 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6485 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6486 with insertion character ~~
6487 (Set_Msg_Text): treat insertion character ~~
6488 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6489 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6490 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6491 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6492 errors related to the formal language restriction not serious
6493 (insertion character |).
6494 * par.adb (Par): set formal language for error messages if needed
6495 * sem_ch6.adb (Check_Missing_Return): take into account possible
6496 generated statements at the end of the function
6497 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6498 enumeration value to define a new pragma SPARK_95
6499 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6500 SPARK_Version): new type and variables to store the SPARK version
6502 (SPARK_Mode): return True when SPARK_Version is set
6503 * par-prag.adb: Correct indentation
6504 (Prag): take Pragma_SPARK_95 into account
6505 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6508 2011-08-01 Robert Dewar <dewar@adacore.com>
6510 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6511 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6512 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6514 2011-08-01 Pascal Obry <obry@adacore.com>
6516 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6517 Target_Name to Get_Path call.
6518 (Parse_Single_Project): Likewise.
6519 (Post_Parse_Context_Clause): Likewise.
6520 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6521 Call Initialise_Project_Path with the proper Target_Name.
6522 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6524 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6525 with the proper Target_Name.
6526 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6528 (Parse_Project_And_Apply_Config): Likewise.
6529 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6530 This is fine as this part of the code is supporting only native
6532 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6533 is fine as this part of the code is supporting only native compilation.
6535 2011-08-01 Yannick Moy <moy@adacore.com>
6537 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6538 of homonym, unless the homonym is one of the cases allowed in SPARK
6539 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6540 package declaration occurring after a body.
6542 2011-08-01 Robert Dewar <dewar@adacore.com>
6544 * checks.adb, exp_ch4.adb: Minor reformatting.
6546 2011-08-01 Javier Miranda <miranda@adacore.com>
6548 * einfo.ads (Access_Disp_Table): Fix documentation.
6549 (Dispatch_Table_Wrappers): Fix documentation.
6551 2011-08-01 Pascal Obry <obry@adacore.com>
6553 * prj-env.adb, prj-env.ads: Minor reformatting.
6555 2011-08-01 Yannick Moy <moy@adacore.com>
6557 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6558 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6559 procedures out of these packages.
6560 * errout.ads, errout.adb
6561 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6562 procedures in of this package
6563 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6564 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6565 on misplaced later vs initial declarations, like in Ada 83
6566 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6567 formal mode on attribute of private type whose full type declaration
6569 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6570 package declaration inside a package specification
6571 (Analyze_Full_Type_Declaration): issue error in formal mode on
6572 controlled type or discriminant type
6573 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6574 user-defined operator means that it should come from the source
6575 (New_Overloaded_Entity): issue error in formal mode on overloaded
6577 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6579 2011-08-01 Thomas Quinot <quinot@adacore.com>
6581 * atree.adb: Minor reformatting.
6582 * checks.adb: Minor reformatting.
6584 2011-08-01 Vincent Celier <celier@adacore.com>
6586 * s-parame-vms-ia64.ads: Fix typo in comment
6588 * s-parame-vms-restrict.ads: Removed, unused.
6590 2011-08-01 Javier Miranda <miranda@adacore.com>
6593 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6595 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6596 * sem_ch3.ads, sem_ch3.adb
6597 (Is_Constant_Bound): New extended version of the subprogram that was
6598 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6599 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6600 * sem_aux.ads (Constant_Value): Fix typo in comment.
6601 * checks.adb (Generate_Index_Checks): New implementation which, for
6602 array objects with constant bounds, generates the runtime check
6603 referencing the bounds of the array type. For other cases this routine
6604 provides its previous behavior obtaining such values from the array
6606 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6608 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6609 we cannot have semantic interpretations of the new node.
6611 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6613 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6616 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6618 * sem_ch8.adb: Minor code editing.
6619 * s-vxwext.adb: Remove trailing space.
6620 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6621 consistency with other files.
6623 2011-08-01 Thomas Quinot <quinot@adacore.com>
6625 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6627 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6629 * par-ch10.adb: reject parameterized expressions as compilation unit.
6630 * sem_ch4.adb: handle properly conditional expression with overloaded
6631 then_clause and no else_clause.
6633 2011-08-01 Tristan Gingold <gingold@adacore.com>
6635 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6636 like done by System.Aux_DEC.
6637 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6639 2011-08-01 Yannick Moy <moy@adacore.com>
6641 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6642 missing label at end of declaration (subprogram or package)
6643 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6644 of positional and named parameter association
6645 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6646 Error_Msg_SP which adds a prefix to the error message giving the name
6647 of the formal language analyzed
6648 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6649 access result type in subprogram, unconstrained array as result type,.
6650 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6652 * sem_ch8.adb: Code clean up.
6654 2011-08-01 Javier Miranda <miranda@adacore.com>
6656 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6657 * einfo.ads (Access_Disp_Table): Fix documentation.
6658 (Dispatch_Table_Wrappers): Fix documentation.
6659 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6660 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6661 to enforce the documentation of this attribute.
6662 (Set_Is_Interface): Cleanup the assertion.
6663 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6664 the Underlying_Type entity before reading attribute Access_Disp_Table.
6665 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6666 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6667 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6668 the Underlying_Type entity before reading attribute Access_Disp_Table.
6669 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6670 Locate the Underlying_Type entity before reading attribute
6673 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6675 * s-poosiz.ads: Additional overriding indicators.
6677 2011-08-01 Yannick Moy <moy@adacore.com>
6679 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6681 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6682 parameter specification does not include a subtype mark.
6683 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6684 formal mode on abstract subprogram.
6685 (Analyze_Subprogram_Specification): issue error in formal mode on
6686 user-defined operator.
6687 (Process_Formals): issue error in formal mode on access parameter and
6689 * sem_ch9.adb (Analyze_Abort_Statement,
6690 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6691 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6692 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6693 Analyze_Requeue, Analyze_Selective_Accept,
6694 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6695 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6696 issue error in formal mode on user-defined raise statement.
6698 2011-08-01 Thomas Quinot <quinot@adacore.com>
6700 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6701 declaration being hidden when overriding an implicit inherited
6703 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6704 (-gnats), do not complain about a source file that contains only a
6707 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6709 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6710 variable if already set.
6712 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6714 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6715 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6716 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6717 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6718 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6719 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6720 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6721 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6722 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6723 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6724 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6725 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6726 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6727 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6728 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6729 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6730 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6731 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6732 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6733 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6734 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6735 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6736 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6737 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6738 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6739 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6740 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6741 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6742 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6743 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6744 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6745 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6746 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6747 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6748 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6749 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6750 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6751 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6752 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6753 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6754 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6755 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6756 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6757 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6758 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6759 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6760 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6761 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6762 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6763 Use GNAT instead of GNARL.
6765 2011-08-01 Bob Duff <duff@adacore.com>
6767 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6768 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6769 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6772 2011-08-01 Yannick Moy <moy@adacore.com>
6774 * debug.adb (d.D) reverve flag for the SPARK mode
6775 (d.E) reverve flag for SPARK generation mode
6776 (d.F) reverve flag for Why generation mode
6777 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6778 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6779 functions which return True when the corresponding modes are set
6780 (Formal_Language): return "spark" or "alfa" when in formal verification
6782 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6783 Error_Msg to prefix the error message with a tag giving the formal
6785 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6786 message with a tag giving the formal language
6787 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6789 (Analyze_Case_Statement): issue error in formal mode on case statement
6790 with a single "others" case alternative
6791 (Analyze_Exit_Statement): issue errors in formal mode on exit
6792 statements which do not respect SPARK restrictions
6793 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6794 (Check_Unreachable_Code): always issue an error (not a warning) in
6795 formal mode on unreachable code (concerns both code after an infinite
6796 loop and after an unconditional jump, both not allowed in SPARK)
6797 * sem_ch6.adb (Analyze_Return_Statement): add call to
6798 Set_Return_Present for a procedure containing a return statement
6799 (already done for functions in Analyze_Function_Return)
6800 (Analyze_Function_Return): issue error in formal mode on extended
6801 return or if return is not last statement in function
6802 (Check_Missing_Return): issue error in formal mode if function does
6803 not end with return or if procedure contains a return
6804 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6805 function to detect if there is an inner scope of its parameter S which
6808 2011-08-01 Thomas Quinot <quinot@adacore.com>
6810 * sem_ch6.ads: Minor reformatting.
6812 2011-08-01 Javier Miranda <miranda@adacore.com>
6814 * sem_util.adb (Abstract_Interface_List): Complete condition when
6815 processing private type declarations to avoid reading unavailable
6817 (Is_Synchronized_Tagged_Type): Complete condition when processing
6818 private extension declaration nodes to avoid reading unavailable
6821 2011-08-01 Thomas Quinot <quinot@adacore.com>
6823 * sem_ch3.adb: Minor reformatting.
6825 2011-08-01 Thomas Quinot <quinot@adacore.com>
6827 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6828 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6829 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6830 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6831 for VMS, instead parametrize the common implementation with
6832 System.Parameters declarations.
6834 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6836 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6838 2011-08-01 Tristan Gingold <gingold@adacore.com>
6840 * seh_init.c: Fix SEH handler installation on win64.
6842 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6844 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6845 double analysis of an anonymous access to subprogram, because it can
6846 lead to improper sharing of profiles and a back-end crash.
6848 2011-08-01 Robert Dewar <dewar@adacore.com>
6850 * make.adb, sem_ch4.adb: Minor reformatting.
6851 * gcc-interface/Make-lang.in: Update dependencies.
6852 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6854 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6856 * gnat_rm.texi: Fix definition of Long_Integer.
6858 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6860 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6861 to prevent storage exhaustion.
6862 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6863 finalized is a function body, insert the cleanup code before the final
6864 return statement, to prevent spurious warnings.
6865 * s-pooglo.ads: add overriding indicator.
6867 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6869 * sem_ch4.adb (Operator_Check): improve error message when both a
6870 with_clause and a use_clause are needed to make operator usage legal.
6871 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6872 determine whether a compilation unit is visible within an other,
6873 either through a with_clause in the current unit, or a with_clause in
6874 its library unit or one one of its parents.
6876 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6878 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6879 over an arbitrary expression of an array or container type.
6880 * lib-xref.adb: clarify comment.
6882 2011-08-01 Bob Duff <duff@adacore.com>
6884 * einfo.ads: Minor reformatting.
6885 * debug.adb: Minor comment improvement.
6887 2011-08-01 Javier Miranda <miranda@adacore.com>
6889 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6890 consider hidden subprograms as valid candidates.
6892 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6894 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6896 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6898 * gnat_ugn.texi: Fix typo.
6900 2011-08-01 Robert Dewar <dewar@adacore.com>
6902 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6903 lib-xref.adb: Minor reformatting
6905 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6907 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6908 when to generate a call to Move_Final_List.
6909 (Has_Controlled_Parts): Remove this function.
6911 2011-08-01 Geert Bosch <bosch@adacore.com>
6913 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6916 2011-08-01 Thomas Quinot <quinot@adacore.com>
6918 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6919 explicit raise of a predefined exception as Comes_From_Source if the
6920 original N_Raise_Statement comes from source.
6922 2011-08-01 Robert Dewar <dewar@adacore.com>
6924 * sinfo.ads: Add comment.
6925 * sem_ch6.adb: Minor reformatting.
6927 2011-08-01 Robert Dewar <dewar@adacore.com>
6929 * freeze.adb (Freeze_Entity): Refine check for bad component size
6930 clause to avoid rejecting confirming clause when atomic/aliased present.
6932 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6934 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6935 better determine whether an entity reference is a write.
6936 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6938 * lib-xref.adb (Output_References): Do no suppress a read reference at
6939 the same location as an immediately preceeding modify-reference, to
6940 handle properly in-out actuals.
6942 2011-08-01 Tristan Gingold <gingold@adacore.com>
6944 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6946 2011-08-01 Quentin Ochem <ochem@adacore.com>
6948 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6949 heap to compute the result.
6951 2011-08-01 Robert Dewar <dewar@adacore.com>
6953 * atree.ads: Minor reformatting.
6955 2011-08-01 Emmanuel Briot <briot@adacore.com>
6957 * g-expect.adb (Get_Command_Output): Fix memory leak.
6959 2011-08-01 Geert Bosch <bosch@adacore.com>
6961 * cstand.adb (P_Float_Type): New procedure to print the definition of
6962 predefined fpt types.
6963 (P_Mixed_Name): New procedure to print a name using mixed case
6964 (Print_Standard): Use P_Float_Type for printing floating point types
6965 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6966 precision IEEE float.
6968 2011-08-01 Thomas Quinot <quinot@adacore.com>
6970 * sem_ch3.adb: Minor reformatting.
6972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6974 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6975 the completion of a generic function, insert the new body rather than
6976 rewriting the original.
6978 2011-08-01 Yannick Moy <moy@adacore.com>
6980 * sinfo.ads, errout.ads: Typos in comments.
6982 2011-08-01 Robert Dewar <dewar@adacore.com>
6984 * par-endh.adb: Minor reformatting.
6986 2011-08-01 Robert Dewar <dewar@adacore.com>
6988 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6989 (Pre_Post_Aspects): New subtype.
6990 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6991 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6992 * par-ch7.adb (P_Package): Remove Decl parameter
6993 (P_Package): Handle new syntax for aspects (before IS)
6994 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6996 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6997 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6998 (P_Package): Remove Decl parameter
6999 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
7001 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
7003 * sem_util.ads, sem_util.adb (Static_Boolean): New function
7004 * sinfo.ads: Document new syntax for aspects in packages etc.
7005 * sprint.adb: Handle new syntax of aspects before IS in package
7007 2011-08-01 Thomas Quinot <quinot@adacore.com>
7009 * atree.ads: Minor reformatting.
7010 * sem_prag.adb: Minor reformatting.
7012 2011-08-01 Robert Dewar <dewar@adacore.com>
7014 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
7015 case expr alternative.
7017 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7019 * sem_ch12.adb: Fix typo.
7021 2011-08-01 Geert Bosch <bosch@adacore.com>
7023 * sem_prag.adb (Check_No_Link_Name): New procedure.
7024 (Process_Import_Or_Interface): Use Check_No_Link_Name.
7025 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
7026 instead of Standard_Long_Long_Float_Size global. Preparation for
7027 eventual removal of per type constants.
7028 * exp_util.ads (Get_Stream_Size): New function returning the stream
7029 size value of subtype E.
7030 * exp_util.adb (Get_Stream_Size): Implement new function.
7031 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
7033 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
7035 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
7037 2011-08-01 Geert Bosch <bosch@adacore.com>
7039 * cstand.adb: Fix comments.
7040 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
7043 2011-08-01 Robert Dewar <dewar@adacore.com>
7045 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7047 2011-08-01 Geert Bosch <bosch@adacore.com>
7049 * atree.ads: Fix comment.
7051 2011-08-01 Robert Dewar <dewar@adacore.com>
7053 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7054 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7055 * par.adb: Add with for Namet.Sp.
7056 * par-tchk.adb: Minor reformatting.
7058 2011-08-01 Vincent Celier <celier@adacore.com>
7060 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7061 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7062 of the init procedure of a SAL.
7063 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7066 2011-08-01 Thomas Quinot <quinot@adacore.com>
7068 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7071 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7073 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7075 2011-08-01 Thomas Quinot <quinot@adacore.com>
7077 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7078 conformant with its spec (return True only for types that have
7079 an overriding Initialize primitive operation that prevents them from
7080 having preelaborable initialization).
7081 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7082 initialization for controlled types in Ada 2005 or later mode.
7084 2011-08-01 Robert Dewar <dewar@adacore.com>
7086 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7088 (Same_Aspect): New function.
7089 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7090 Type_Invariant, Precondition, Postcondition.
7091 * snames.ads-tmpl: Add Name_Type_Invariant.
7093 2011-08-01 Robert Dewar <dewar@adacore.com>
7095 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7097 (Freeze_All_Ent): Fix error in handling inherited aspects.
7098 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7099 already analyzed, but don't skip entire processing of a declaration,
7100 that's wrong in some cases of declarations being rewritten.
7101 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7102 Don't delay for integer, string literals
7103 Treat predicates in usual manner for delay, remove special case code,
7105 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7106 (Build_Predicate_Function): Update saved expression in aspect
7107 (Build_Invariant_Procedure): Update saved expression in aspect
7108 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7109 of replacement of discriminant references if the reference is simple.
7111 2011-08-01 Robert Dewar <dewar@adacore.com>
7113 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7114 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7115 Static_Predicate and Dynamic_Predicate.
7116 (Build_Predicate_Function): Add processing for Static_Predicate
7117 and Dynamic_Predicate.
7118 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7119 (From_Static_Predicate): New flag
7120 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7122 2011-08-01 Robert Dewar <dewar@adacore.com>
7124 * usage.adb: Documentation cleanup for Ada version modes in usage.
7125 * expander.adb: Minor reformatting.
7127 2011-08-01 Robert Dewar <dewar@adacore.com>
7129 * atree.ads: Minor comment fix.
7130 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7131 a-witeio.ads, sem_prag.adb: Minor reformatting.
7133 2011-08-01 Doug Rupp <rupp@adacore.com>
7135 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7136 pointers. Use descrip.h header file for convenience. Add some
7139 2011-08-01 Robert Dewar <dewar@adacore.com>
7141 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7142 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7143 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7145 (Check_Aspect_At_End_Of_Declarations): New procedure
7146 (Analye_Aspect_Specification): Minor changes for above procedures
7147 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7148 specification node as well.
7150 2011-08-01 Pascal Obry <obry@adacore.com>
7152 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7153 Windows files. Use GetFilesAttributes() in this case to check for file
7154 existence instead of returning with an error code.
7156 2011-08-01 Vincent Celier <celier@adacore.com>
7158 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7159 High is above Source length.
7161 2011-08-01 Robert Dewar <dewar@adacore.com>
7163 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7165 2011-08-01 Robert Dewar <dewar@adacore.com>
7167 * aspects.ads (Boolean_Aspects): New subtype.
7168 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7169 for derived types in cases where the parent type and derived type have
7171 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7172 with aspects when parent type also has aspects.
7173 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7174 boolean expression at this point).
7175 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7176 accordance with final decision on the Ada 2012 feature.
7177 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7179 2011-08-01 Matthew Heaney <heaney@adacore.com>
7181 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7183 2011-08-01 Pascal Obry <obry@adacore.com>
7185 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7186 Fix Replace_Slice when High is above current string size.
7187 (Replace_Slice): Fix DL computation when High is above current
7190 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7192 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7194 2011-08-01 Matthew Heaney <heaney@adacore.com>
7196 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7199 2011-08-01 Pascal Obry <obry@adacore.com>
7201 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7204 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7206 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7207 access to protected subprograms in generic bodies.
7208 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7209 protected type, indicate that the convention of the subprogram is
7210 Convention_Protected, because it may be used in subsequent declarations
7211 within the protected declaration.
7213 2011-08-01 Vincent Celier <celier@adacore.com>
7215 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7216 and "final" procedures when the name of the library is "ada", to avoid
7217 duplicate symbols "adainit" and "adafinal" in executables.
7219 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7221 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7222 quantified expression that appears within a postcondition and uses the
7223 Ada2012 'Result attribute.
7225 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7227 * init.c (__gnat_error_handler): Cast reason to int.
7228 (__gnat_install_handler): Explain sa_sigaction use.
7230 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7232 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7233 subprogram has copy-in copy-out parameters, try to promote the mode of
7234 the return type if it is passed in registers.
7236 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7238 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7239 left operand as addressable.
7241 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7243 * gcc-interface/gigi.h (build_function_stub): Remove.
7244 (build_return_expr): Likewise.
7245 (convert_vms_descriptor): Declare.
7246 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7247 (build_function_stub): Move to...
7248 * gcc-interface/utils2.c (build_return_expr): Move to...
7249 * gcc-interface/trans.c (build_function_stub): ...here.
7250 (build_return_expr): ...here.
7251 (Subprogram_Body_to_gnu): Add local variable for language_function.
7252 Disconnect the parameter attributes cache, if any, once done with it.
7253 Call end_subprog_body only after setting the end_locus.
7254 Build the stub associated with the function, if any, at the very end.
7255 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7256 variables and streamline control flow.
7258 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7261 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7264 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7267 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7268 Assign to act.sa_sigaction.
7269 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7270 current->return_address to char * before arithmetic.
7272 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7274 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7275 Correct argument types.
7276 Extract code from reason.
7277 (__gnat_install_handler): Assign to act.sa_sigaction.
7279 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7281 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7282 (GNAT1_OBJS): ...here.
7284 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7287 * g-socthi-mingw.adb (Fill): Fix formatting.
7289 * gcc-interface/gigi.h: Move around comment.
7291 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7294 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7296 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7299 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7301 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7303 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7304 range comparison if Pmode is SImode.
7306 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7307 Eric Botcazou <ebotcazou@adacore.com>
7309 * adadecode.c: Wrap up in extern "C" block.
7310 * adadecode.h: Likewise.
7311 * adaint.c: Likewise. Remove 'const' keyword.
7312 * adaint.h: Likewise.
7314 * atree.h: Likewise.
7316 * cstreams.c: Likewise.
7320 * final.c: Likewise.
7322 * initialize.c: Likewise.
7324 * namet.h: Likewise.
7325 * nlists.h: Likewise.
7326 * raise.c: Likewise.
7327 * raise.h: Likewise.
7328 * repinfo.h: Likewise.
7329 * seh_init.c: Likewise.
7330 * targext.c: Likewise.
7331 * tracebak.c: Likewise.
7332 * uintp.h: Likewise.
7333 * urealp.h: Likewise.
7334 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7335 * xsinfo.adb: Likewise.
7336 * xsnamest.adb: Likewise.
7337 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7338 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7339 * gcc-interface/misc.c: Likewise.
7340 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7341 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7342 ada/targext.o here...
7343 (GNAT_ADA_OBJS): ...and not here.
7344 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7345 (GNATBIND_OBJS): Reorder.
7347 2011-07-07 Richard Henderson <rth@redhat.com>
7349 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7350 dwarf2out_frame_init.
7352 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7354 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7356 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7359 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7361 2011-07-06 Richard Guenther <rguenther@suse.de>
7363 * gcc-interface/misc.c (gnat_init): Merge calls to
7364 build_common_tree_nodes and build_common_tree_nodes_2.
7365 Re-initialize boolean_false_node.
7367 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7368 Olivier Hainque <hainque@adacore.com>
7369 Nicolas Setton <setton@adacore.com>
7371 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7372 the type according to the ARTIFICIAL_P parameter.
7373 (create_type_decl): Likewise.
7374 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7376 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7378 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7379 (gnatbind): Likewise.
7381 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7383 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7385 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7387 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7388 local variable throughout. Remove useless call to Base_Type.
7389 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7390 Take it also into account for the volatileness of the field. Set the
7391 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7393 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7395 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7396 on a dereference built for a by-ref object if it has an address clause.
7398 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7400 * einfo.ads (Address_Taken): Document use for the second argument of
7401 Asm_Input and Asm_Output attributes.
7402 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7403 argument is an entity name, then set Address_Taken on it.
7404 <Attribute_Asm_Output>: Likewise.
7405 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7406 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7407 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7408 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7410 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7413 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7415 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7417 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7418 (ada/utils.o): Update dependencies.
7419 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7420 ../../../libcpp/libcpp.a.
7421 * gcc-interface/utils.c: Include common/common-target.h.
7422 (process_attributes): Use targetm_common.have_named_sections.
7424 2011-06-07 Richard Guenther <rguenther@suse.de>
7426 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7429 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7431 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7432 TREE_THIS_NOTRAP flag.
7434 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7436 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7439 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7441 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7442 constants whose full view has discriminants specially.
7444 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7446 * gcc-interface/utils.c: Include diagnostic.h.
7447 (gnat_write_global_declarations): Output debug information for all
7448 global type declarations before finalizing the compilation unit.
7449 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7451 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7453 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7455 2011-05-25 Kai Tietz <ktietz@redhat.com>
7457 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7458 initialization instead of const/none-const pointer assignment.
7460 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7462 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7463 $(EXTRA_GNAT1_OBJS).
7464 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7465 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7466 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7467 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7468 libcommon-target.a instead of prefix.o.
7470 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7473 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7475 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7477 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7478 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7479 instead of version.o.
7481 2011-05-18 Kai Tietz <ktietz@redhat.com>
7483 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7484 boolean_false_node instead of integer_zero_node.
7485 (convert_with_check): Likewise.
7486 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7488 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7490 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7491 type of the parameter is an unconstrained array, convert the actual to
7492 the type of the formal in the In Out and Out cases as well.
7494 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7496 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7497 call build_function_type_array or build_varargs_function_type_array
7499 (create_subprog_type): Don't call build_function_type; call
7500 build_function_type_vec instead.
7502 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7504 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7505 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7506 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7508 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7510 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7512 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7513 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7515 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7517 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7519 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7521 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7522 instead of accessing TYPE_ARG_TYPES directly.
7523 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7525 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7528 * gcc-interface/gigi.h (get_variant_part): Declare.
7529 * gcc-interface/decl.c (get_variant_part): Make global.
7530 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7531 types have the same constant size, are record types and T1 has a
7532 variant part while T2 doesn't.
7534 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7536 * gcc-interface/utils.c (begin_subprog_body): Do not call
7538 (end_subprog_body): Likewise.
7540 2011-05-04 Richard Guenther <rguenther@suse.de>
7542 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7544 (pos_to_constructor): Likewise.
7546 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7547 Eric Botcazou <ebotcazou@adacore.com>
7549 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7550 of build_function_type. Adjust calls to...
7551 (build_raise_check): ...this. Do not take a void_tree parameter.
7552 Call build_function_type_list instead of build_function_type.
7553 Fix head comment and swap couple of conditional blocks.
7555 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7557 * gnatvsn.ads (Library_Version): Bump to 4.7.
7558 (Current_Year): Bump to 2011.
7560 2011-04-29 Michael Matz <matz@suse.de>
7562 * gcc-interface/misc.c (gnat_handle_option): Set
7563 warn_maybe_uninitialized.
7565 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7567 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7568 the Watson/McCabe paper.
7570 2011-04-23 Jim Meyering <meyering@redhat.com>
7572 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7574 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7576 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7579 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7581 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7583 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7584 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7585 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7586 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7587 <all>: Do not set flags on the reused DECL node coming from an alias.
7588 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7589 don't need debug info here...
7590 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7591 (gigi): Adjust calls to create_subprog_decl.
7592 (build_raise_check): Likewise.
7593 (establish_gnat_vms_condition_handler): Likewise.
7594 (Compilation_Unit_to_gnu): Likewise.
7595 (gnat_to_gnu): Likewise.
7597 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7599 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7600 (NO_REORDER_ADAFLAGS): New variable.
7601 (EXTRA_GNATTOOLS): Always define.
7602 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7603 Clean up and adjust list of files compiled with special options.
7604 * gcc-interface/Make-lang.in: Likewise.
7605 (ada/decl.o): Cosmetical change.
7606 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7608 2011-04-20 Jim Meyering <meyering@redhat.com>
7610 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7612 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7614 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7615 $(CFLAGS) on the link line.
7617 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7620 padded type built for the return type if it is unconstrained.
7622 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7624 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7626 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7628 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7629 before calling TREE_CHAIN.
7630 * gcc-interface/misc.c (gnat_init_ts): New function.
7631 (LANG_HOOKS_INIT_TS): Define.
7633 2011-04-12 Martin Jambor <mjambor@suse.cz>
7635 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7636 instead of cgraph_node.
7638 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7640 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7641 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7644 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7646 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7647 of aggregate types that contain a placeholder.
7649 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7651 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7653 (handle_type_generic_attribute): Likewise.
7655 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7658 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7660 2011-04-04 Kai Tietz <ktietz@redhat.com>
7663 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7666 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7668 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7669 type case, do not strip a padding type around the array type.
7671 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7673 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7676 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7678 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7679 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7680 code for -feliminate-unused-debug-types.
7681 (gnat_post_options): Likewise.
7683 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7685 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7686 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7689 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7691 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7692 DECL_ARTIFICIAL flag on enumeration types.
7694 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7696 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7697 fat pointer types artificial unconditionally.
7698 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7701 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7703 * gcc-interface/gigi.h (get_dummy_type): Declare.
7704 (build_dummy_unc_pointer_types): Likewise.
7705 (finish_fat_pointer_type): Likewise.
7706 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7707 fat pointer type has been built, complete it in place.
7708 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7709 and thin pointers. Remove useless variable.
7710 (finish_fat_pointer_type): Make global and move to...
7711 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7712 (get_dummy_type): New function.
7713 (build_dummy_unc_pointer_types): Likewise.
7714 (gnat_pushdecl): Propage the name to the anonymous variants only.
7715 (update_pointer_to): Only adjust the pointer types in the unconstrained
7718 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7720 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7721 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7722 if this is a Taft amendment type and the full declaration is available.
7723 * gcc-interface/trans.c (process_type): Likewise.
7724 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7725 (process_freeze_entity): Likewise.
7726 * gcc-interface/utils.c (dummy_global): New static variable.
7727 (gnat_write_global_declarations): If there are types declared as used
7728 at the global level, insert them in the global hash table.
7730 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7732 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7733 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7734 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7736 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7737 flag of the type accordingly.
7738 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7740 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7742 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7743 finalizing types when updating the pointers to the designated type.
7744 <all>: Finalize the deferred types even if we didn't defer processing
7745 of incomplete types in this invocation.
7747 2011-04-01 Olivier Hainque <hainque@adacore.com>
7748 Nicolas Setton <setton@adacore.com>
7749 Eric Botcazou <ebotcazou@adacore.com>
7751 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7752 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7754 2011-03-28 Kai Tietz <ktietz@redhat.com>
7756 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7758 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7759 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7761 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7763 2011-03-28 Tristan Gingold <gingold@adacore.com>
7766 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7767 Use ada output of gnatbind.
7768 (ada/b_gnatb.adb): Ditto.
7769 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7770 (ada.mostlyclean, ada.stage1)
7771 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7772 (ada.stagefeedback): Adjust.
7773 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7774 Use ada output of gnatbind.
7775 (b_gnatm.adb): Ditto.
7776 (b_gnatl.o, b_gnatm.o): New rules.
7778 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7780 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7781 for the padded type built to support a specified size or alignment.
7783 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7785 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7786 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7787 unconditionally to the end of the unit when the designated type is
7789 <all>: Rename local variable. Attempt to un-defer types only and do it
7790 for limited_with'ed types as well.
7791 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7792 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7793 consistently and remove redundant call to finalize_from_with_types.
7795 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7797 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7798 subprograms without a previous spec declared in the same unit.
7799 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7800 subprograms at the end of the unit instead of at the beginning.
7801 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7802 isn't public for the special handling of non-inline functions nested
7803 inside inline external functions.
7805 2011-03-25 Jeff Law <law@redhat.com>
7807 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7809 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7811 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7812 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7813 to compute Set_Size_Depends_On_Discriminant.
7814 (Layout_Type): Call it on array types in back-end layout mode.
7815 * sem_util.adb (Requires_Transient_Scope): Return true for array
7816 types only if the size depends on the value of discriminants.
7817 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7818 type if the RHS is a call to a function that returns an unconstrained
7819 type with default discriminant.
7821 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7823 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7824 non-conversion to the nominal result type at the end.
7826 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7828 * gcc-interface/trans.c (create_temporary): New function taken from...
7829 (create_init_temporary): ...here. Call it.
7830 (call_to_gnu): Create the temporary for the return value early, if any.
7831 Create it for a function with copy-in/copy-out parameters if there is
7832 no target; in other cases of copy-in/copy-out, use another temporary.
7833 Push the new binding level lazily. Add and rename local variables.
7835 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7837 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7839 (set_rm_size): Likewise.
7841 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7843 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7844 for the padded type built in order to support a specified alignment.
7845 Fix incorrect formatting.
7847 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7850 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7852 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7854 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7855 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7856 to the end of the list. Adjust recursive call. Rename local variable.
7857 If REORDER is true, reorder components of the record type.
7858 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7859 components_to_record and adjust the parameter list.
7861 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7863 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7864 disabled, use the variable for bounds of loop iteration scheme.
7866 2011-03-21 Kai Tietz <ktietz@redhat.com>
7869 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7871 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7873 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7874 out whether the expression is read-only. Short-circuit placeholder
7875 case and rename a couple of local variables.
7877 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7879 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7880 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7881 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7882 (convert): Deal with conversions from a smaller form type specially.
7884 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7886 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7887 its argument, except for the special -I- switch.
7889 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7891 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7894 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7896 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7898 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7900 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7902 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7903 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7904 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7905 Do not generate the check directly, instead instantiate the template
7906 check present in the descriptor.
7907 (make_descriptor_field): Move around.
7908 (build_vms_descriptor32): Build a template check in the POINTER field.
7909 (build_vms_descriptor): Remove useless suffixes.
7910 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7912 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7915 * targext.c: Include target files if IN_RTS is defined.
7917 2011-01-26 Richard Guenther <rguenther@suse.de>
7920 * targext.c: Include config.h.
7921 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7924 2011-01-04 Pascal Obry <obry@adacore.com>
7925 Eric Botcazou <ebotcazou@adacore.com>
7927 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7929 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7931 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7932 end-of-case on the end label and its associated gotos, if any.
7934 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7936 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7937 expressions of the parameter cache within the statement group of
7940 2011-01-04 Olivier Hainque <hainque@adacore.com>
7941 Eric Botcazou <ebotcazou@adacore.com>
7943 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7944 (set_end_locus_from_node): New function.
7945 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7946 make and the function end_locus.
7947 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7948 for the elaboration subprogram.
7949 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7950 set the end_locus of the expression as well.
7952 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7955 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7956 variables that are referenced in exception handlers volatile.
7960 Copyright (C) 2011 Free Software Foundation, Inc.
7962 Copying and distribution of this file, with or without modification,
7963 are permitted in any medium without royalty provided the copyright
7964 notice and this notice are preserved.
7966 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7967 - fix bugs in the description of Source_Trace;
7968 - get rid of UNIT_NAME;
7970 2011-08-02 Javier Miranda <miranda@adacore.com>
7973 (Build_Dispatching_Requeue): Adding support for VM targets
7974 since we cannot directly reference the Tag entity.
7975 * exp_sel.adb (Build_K): Adding support for VM targets.
7976 (Build_S_Assignment): Adding support for VM targets.
7978 (Default_Prim_Op_Position): In VM targets do not restrict availability
7979 of predefined interface primitives to compiling in Ada 2005 mode.
7980 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7981 restricted to compiling in Ada 2005 mode.
7982 (Make_VM_TSD): Generate code that declares and initializes the OSD
7983 record. Needed to support dispatching calls through synchronized
7986 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7987 primitives associated with synchronized interfaces.
7988 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7989 primitives associated with synchronized interfaces.
7991 2011-08-02 Yannick Moy <moy@adacore.com>
7993 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7994 statements hidden in SPARK if preceded by the HIDE directive
7995 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7996 exception handlers as hidden in SPARK if preceded by the HIDE directive
7997 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7998 if starting with the HIDE directive
7999 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8000 starting with the HIDE directive; mark the declarations in a private
8001 part as hidden in SPARK if the private part starts with the HIDE
8003 * restrict.adb, restrict.ads
8004 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8005 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8006 argument node belongs to a part which is hidden in SPARK
8007 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8008 parts in SPARK; protect the possibly costly call to
8009 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8010 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8011 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8012 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8014 (Scan): recognize special comment starting with '#' and followed by
8015 SPARK keyword "hide" as a HIDE directive.
8017 2011-08-02 Yannick Moy <moy@adacore.com>
8019 * types.ads, erroutc.ads: Minor reformatting.
8021 2011-08-02 Vincent Celier <celier@adacore.com>
8023 * link.c: Add response file support for cross platforms.
8025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8027 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8028 in an association, set parent field of copy before partial analysis.
8029 * sem_res.adb (Resolve_Slice): create reference to itype only when
8030 expansion is enabled.
8032 2011-08-02 Yannick Moy <moy@adacore.com>
8034 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8035 for new flag denoting which subprogram bodies are in ALFA
8036 * restrict.adb, sem_ch7.adb: Update comment
8037 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8038 sem_ch9.adb, sem_res.adb: Add calls to
8039 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8040 * sem_ch6.adb (Analyze_Function_Return): add calls to
8041 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8042 middle of the body, and extended return.
8043 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8044 False when missing return.
8045 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8046 to True for subprograms whose spec is in ALFA. Remove later on the flag
8047 on the entity used for a subprogram body when there exists a separate
8049 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8050 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8051 False, otherwise do nothing.
8053 2011-08-02 Robert Dewar <dewar@adacore.com>
8055 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8057 2011-08-02 Yannick Moy <moy@adacore.com>
8059 * sem_ch4.ads: minor formatting.
8061 2011-08-02 Yannick Moy <moy@adacore.com>
8063 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8064 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8065 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8066 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8067 opt.ads: cleanup of SPARK mode
8069 2011-08-02 Yannick Moy <moy@adacore.com>
8071 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8073 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8074 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8076 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8077 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8078 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8079 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8081 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8083 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8084 functions whose return type is not in ALFA.
8085 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8087 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8088 parameter's type is not in ALFA.
8089 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8094 * sem_ch6 (Analyze_Expression_Function): treat the function as
8095 Inline_Always, and introduce a subprogram declaration for it when it is
8097 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8098 expression functions, so that the back-end can determine whether they
8099 can in fact be inlined.
8100 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8101 a function body comes from an expression function.
8103 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8105 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8106 null exclusions to test Can_Never_Be_Null on the anonymous access types
8107 of the formals rather than testing the formals themselves. Exclude this
8108 check in cases where the Old_Formal is marked as a controlling formal,
8109 to avoid issuing spurious errors for bodies completing dispatching
8110 operations (due to the flag not getting set on controlling access
8111 formals in body specs).
8112 (Find_Corresponding_Spec): When checking full and subtype conformance of
8113 subprogram bodies in instances, pass Designated and E in that order, for
8114 consistency with the expected order of the formals (New_Id followed by
8117 2011-08-02 Robert Dewar <dewar@adacore.com>
8119 * sem_ch8.adb: Minor reformatting.
8121 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8123 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8124 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8125 primitive operations of class-wide actuals.
8127 2011-08-02 Javier Miranda <miranda@adacore.com>
8129 * exp_atag.ads, exp_atag.adb
8130 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8131 since its value is implicitly passed in argument Typ.
8132 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8133 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8134 Build_Common_Dispatching_Select_Statements.
8136 2011-08-02 Robert Dewar <dewar@adacore.com>
8138 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8139 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8142 2011-08-02 Robert Dewar <dewar@adacore.com>
8144 * sem_res.adb: Minor reformatting.
8145 * sem_prag.adb: Minor reformatting.
8147 2011-08-02 Javier Miranda <miranda@adacore.com>
8149 * exp_atag.adb, exp_atags.ads
8150 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8151 by the tagged type Entity. Required to use this routine in the VM
8152 targets since we do not have available the Tag entity in the VM
8155 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8156 Ada.Tags has not been previously loaded.
8158 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8159 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8161 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8162 view of enclosing scopes. Required to handle enclosing scopes that
8163 are synchronized types whose full view is a task type.
8165 (Build_VM_TSDs): Minor code improvement to avoid generating and
8166 analyzing lists with empty nodes.
8167 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8168 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8169 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8170 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8171 (Make_Select_Specific_Data_Table): Add support for VM targets.
8172 (Make_VM_TSD): Generate code to initialize the SSD structure of
8175 2011-08-02 Yannick Moy <moy@adacore.com>
8177 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8178 cross-references section in ALI.
8179 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8180 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8182 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8183 subprogram or package entity of a node
8184 (Is_Local_Reference_Type): new function returns True for references
8185 selected in local cross-references.
8186 (Lt): function extracted from Lt in Output_References
8187 (Write_Entity_Name): function extracted from Output_References
8188 (Generate_Definition): generate reference with type 'D' for definition
8189 of objects (object declaration and parameter specification), with
8190 appropriate locations and units, for use in local cross-references.
8191 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8192 references of type 'I' for initialization in object definition.
8193 (Output_References): move part of function Lt and procedure
8194 Write_Entity_Name outside of the body. Ignore references of types 'D'
8195 and 'I' introduced for local cross-references.
8196 (Output_Local_References): new procedure to output the local
8197 cross-references sections.
8198 (Lref_Entity_Status): new array defining whether an entity is a local
8199 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8200 with 'I' type when initialization expression is present.
8201 * get_scos.adb, get_scos.ads: Correct comments and typos
8203 2011-08-02 Javier Miranda <miranda@adacore.com>
8205 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8207 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8209 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8212 2011-08-02 Vincent Celier <celier@adacore.com>
8214 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8215 (No_Space_Img): New function
8216 (Find_Excluded_Sources): When reading from a file, record the file name
8217 and the line number for each excluded source.
8218 (Mark_Excluded_Sources): When reporting an error, if the excluded
8219 sources were read from a file, include file name and line number in
8222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8224 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8226 2011-08-02 Robert Dewar <dewar@adacore.com>
8228 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8230 2011-08-02 Javier Miranda <miranda@adacore.com>
8232 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8233 generation of TSDs to the DOTNET compiler.
8234 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8235 generation of TSDs to the DOTNET compiler.
8237 2011-08-02 Javier Miranda <miranda@adacore.com>
8239 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8240 record of all the tagged types declared inside library level package
8241 declarations, library level package bodies or library level subprograms.
8242 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8243 associated with a given tagged type.
8244 (Build_VM_TSDs): New subprogram.
8245 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8246 compilation units that are subprograms.
8247 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8248 compilation units that are package bodies.
8249 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8250 units that are a package declaration or a package instantiation.
8251 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8252 reorganization to improve the error generated by the frontend when the
8253 function Ada.Tags.Secondary_Tag is not available.
8254 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8255 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8257 2011-08-02 Javier Miranda <miranda@adacore.com>
8259 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8261 2011-08-02 Robert Dewar <dewar@adacore.com>
8263 * s-imenne.ads: Minor reformatting.
8265 2011-08-02 Robert Dewar <dewar@adacore.com>
8267 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8268 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8269 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8271 2011-08-02 Robert Dewar <dewar@adacore.com>
8273 * einfo.ads (Materialize_Entity): Document this is only for renamings
8274 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8275 required debug information in the case where we transform the object
8276 declaration into a renaming declaration.
8277 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8279 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8282 2011-08-02 Robert Dewar <dewar@adacore.com>
8284 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8285 Suppress_Init_Procs.
8286 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8287 Suppress_Initialization/Initialization_Suppressed.
8288 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8289 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8290 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8291 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8293 2011-08-02 Robert Dewar <dewar@adacore.com>
8295 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8300 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8301 only have inheritable classwide pre/postconditions.
8303 2011-08-02 Javier Miranda <miranda@adacore.com>
8305 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8306 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8307 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8308 checks if the external tag of a type is the same as the external tag
8309 of some other declaration.
8311 2011-08-02 Thomas Quinot <quinot@adacore.com>
8313 * s-taskin.ads: Minor reformatting.
8315 2011-08-02 Emmanuel Briot <briot@adacore.com>
8317 * g-comlin.adb (Display_Help): swap the order in which it prints the
8318 short help and the general usage.
8320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8322 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8323 the aspect declarations and attach them to the generic copy for
8324 subsequent analysis.
8325 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8326 declarations of the generic tree to the new subprogram declarations.
8327 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8328 conditions that apply to a subprogram instance.
8330 2011-08-02 Robert Dewar <dewar@adacore.com>
8332 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8334 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8336 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8337 private type with a tagged full view is not derived in the immediate
8338 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8340 2011-08-02 Robert Dewar <dewar@adacore.com>
8342 * exp_ch4.adb: Minor reformatting.
8344 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8346 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8347 Ada2012 iterator, the loop will be rewritten during expansion into a
8348 while loop with a cursor and an element declaration. Do not analyze the
8349 body in this case, because if the container is for indefinite types the
8350 actual subtype of the elements will only be determined when the cursor
8351 declaration is analyzed.
8353 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8355 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8356 size/alignment related attributes in CodePeer_Mode.
8358 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8360 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8361 Prepend_Element, since this can result in the operation getting the
8362 wrong slot in the full type's dispatch table if the full type has
8363 inherited operations. The incomplete type's operation will get added
8364 to the proper position in the full type's primitives
8365 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8366 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8367 dispatching operations, since there are cases where nonprimitive
8368 subprograms can get added to the list of incomplete dependents (such
8369 as subprograms in nested packages).
8370 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8371 private part when determining whether to add a primitive with a
8372 parameter of a tagged incomplete type to the Private_Dependents list.
8373 Such primitives can also occur in the visible part, and should not have
8374 been excluded from being private dependents.
8375 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8376 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8377 list of a Taft-amendment incomplete type is a primitive before issuing
8378 an error that the full type must appear in the same unit. There are
8379 cases where nonprimitives can be in the list (such as subprograms in
8381 * sem_disp.adb (Derives_From): Use correct condition for checking that
8382 a formal's type is derived from the type of the corresponding formal in
8383 the parent subprogram (the condition was completely wrong). Add
8384 checking that was missing for controlling result types being derived
8385 from the result type of the parent operation.
8387 2011-08-02 Yannick Moy <moy@adacore.com>
8389 * errout.adb (First_Node): minor renaming
8390 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8393 2011-08-02 Yannick Moy <moy@adacore.com>
8395 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8396 before accessing operands.
8397 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8398 decide whether an initialization expression respects SPARK rules, as
8399 the plain node is the expanded one. This allows for more valid warnings
8401 * gnat_rm.texi: Minor update.
8403 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8405 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8408 2011-08-02 Robert Dewar <dewar@adacore.com>
8410 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8412 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8414 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8415 loop statements and the element renaming declaration with a block when
8416 the element type is controlled.
8418 2011-08-02 Yannick Moy <moy@adacore.com>
8420 * sinfo.ads: Minor formatting.
8422 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8424 * sem_aggr.adb (Add_Association): if the association has a box and no
8425 expression, use the Sloc of the aggregate itself for the new
8427 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8430 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8432 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8433 When a container is provided via a function call, generate a renaming
8434 of the function result. This avoids the creation of a transient scope
8435 and the premature finalization of the container.
8436 * exp_ch7.adb (Is_Container_Cursor): Removed.
8437 (Wrap_Transient_Declaration): Remove the supression of the finalization
8438 of the list controller when the declaration denotes a container cursor,
8441 2011-08-02 Yannick Moy <moy@adacore.com>
8443 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8444 node is from source, instead of the original node being from source.
8446 (Resolve_Array_Aggregate): refine the check for a static expression, to
8447 recognize also static ranges
8448 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8449 Array_Type_Declaration): postpone the test for the type being a subtype
8450 mark after the type has been resolved, so that component-selection and
8451 expanded-name are discriminated.
8452 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8453 to distinguish the case of an iteration scheme, so that an error is
8454 issed on a non-static range in SPARK except in an iteration scheme.
8455 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8456 In_Iter_Schm = True.
8457 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8458 user-defined operators so that they are allowed in renaming
8460 (Find_Selected_Component): refine the check for prefixing of operators
8461 so that they are allowed in renaming. Move the checks for restrictions
8462 on selector name after analysis discriminated between
8463 component-selection and expanded-name.
8464 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8465 concatenation argument of string type if it is static.
8466 * sem_util.adb, sem_util.ads
8467 (Check_Later_Vs_Basic_Declarations): add a new function
8468 Is_Later_Declarative_Item to decice which declarations are allowed as
8469 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8470 mode, add that renamings are considered as later items.
8471 (Enclosing_Package): new function to return the enclosing package
8472 (Enter_Name): correct the rule for homonyms in SPARK
8473 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8474 from source (result of expansion) to avoid issuing wrong warnings.
8476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8478 * errout.adb: On anything but an expression First_Node returns its
8481 2011-08-02 Pascal Obry <obry@adacore.com>
8483 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8485 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8487 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8488 Set the associated loop as the related expression of internally
8490 * exp_ch7.adb (Is_Container_Cursor): New routine.
8491 (Wrap_Transient_Declaration): Supress the finalization of the list
8492 controller when the declaration denotes a container cursor.
8494 2011-08-02 Yannick Moy <moy@adacore.com>
8496 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8498 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8499 expression is a simple expression. This check cannot be performed in
8500 the semantics, so just drop it.
8501 (P_Index_Or_Discriminant_Constraint): move check that the index or
8502 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8503 semantics. Other cases were previously checked in the semantics.
8504 * par-ch4.adb (P_Name): move checks that a selector name is not
8505 character literal or an operator symbol to Find_Selected_Component in
8507 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8508 declarations are not placed after later declarations in a separate
8509 procedure in Sem_Util (possibly not the best choice?), to be used both
8510 during parsing, for Ada 83 mode, and during semantic analysis, for
8512 * par-endh.adb (Check_End): move check that end label is not missing
8513 to Process_End_Label in the semantics
8514 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8515 the special case for SPARK restriction
8516 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8517 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8518 parameter Force to issue the error message even on internal node (used
8519 for generated end label). Call Check_Restriction to check when an error
8520 must be issued. In SPARK mode, issue an error message even if the
8521 restriction is not set.
8522 (Check_Restriction): new procedure with an additional out parameter to
8523 inform the caller that a message has been issued
8524 * sem_aggr.adb: Minor modification of message
8525 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8526 instead of issuing an error message directly
8527 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8528 declarations are not placed after later declarations, by calling
8529 Check_Later_Vs_Basic_Declarations
8530 (Analyze_Subtype_Declaration): move here the check that an index or
8531 discriminant constraint must be a subtype mark. Change the check that
8532 a subtype of String must start at one so that it works on subtype marks.
8533 * sem_ch4.adb (Analyze_Call): move here the check that a named
8534 association cannot follow a positional one in a call
8535 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8536 instead of issuing an error message directly
8537 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8538 selector name is not a character literal or an operator symbol. Move
8539 here the check that the prefix of an expanded name cannot be a
8540 subprogram or a loop statement.
8541 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8542 procedure called from parsing and semantics to check that basic
8543 declarations are not placed after later declarations
8544 (Process_End_Label): move here the check that end label is not missing
8546 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8548 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8549 representation clause in codepeer mode, since it confuses CodePeer and
8550 does not bring useful info.
8552 2011-08-02 Ed Falis <falis@adacore.com>
8554 * init.c: initialize fp hw on MILS.
8556 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8558 * errout.adb (First_Node): for bodies, return the node itself (small
8559 optimization). For other nodes, do not check source_unit if the node
8560 comes from Standard.
8562 2011-08-02 Robert Dewar <dewar@adacore.com>
8564 * exp_ch3.adb: Minor comment additions.
8565 * sem_ch13.adb: Minor reformatting.
8567 2011-08-02 Pascal Obry <obry@adacore.com>
8569 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8571 2011-08-02 Robert Dewar <dewar@adacore.com>
8573 * sem_attr.adb: Minor reformatting.
8575 2011-08-02 Robert Dewar <dewar@adacore.com>
8577 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8578 (Has_Default_Component_Value): Removed
8579 * einfo.ads Comment updates
8580 (Has_Default_Aspect): Replaces Has_Default_Value
8581 (Has_Default_Component_Value): Removed
8583 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8585 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8586 (Get_Simple_Init_Val): Handle Default_Value aspect
8587 (Needs_Simple_Initialization): Handle Default_Value aspect
8588 * exp_ch3.ads: Needs_Simple_Initialization
8589 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8590 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8592 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8593 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8594 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8596 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8598 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8599 package containing iteration primitives.
8600 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8602 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8604 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8605 "of", pre-analyze expression in case it is a function call with
8606 finalization actions that must be placed ahead of the loop.
8607 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8608 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8610 2011-08-02 Geert Bosch <bosch@adacore.com>
8612 * cstand.adb (Create_Float_Types): Only consider C's long double for
8613 Long_Long_Float, in addition to double.
8615 2011-08-02 Robert Dewar <dewar@adacore.com>
8617 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8618 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8619 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8624 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8627 2011-08-02 Javier Miranda <miranda@adacore.com>
8629 * einfo.ads, einfo.adb
8630 (Original_Access_Type): Move this attribute to Node26 since there was
8631 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8632 which causes conflicts and breaks the generation of the .NET compiler.
8633 (Interface_Name): Add missing documentation on JGNAT only uses of
8636 2011-08-02 Geert Bosch <bosch@adacore.com>
8638 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8639 (Find_Back_End_Float_Type): Likewise
8640 (Create_Back_End_Float_Types): Likewise
8641 (Create_Float_Types): Likewise
8642 (Register_Float_Type): Likewise
8643 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8644 Nlist and split out type selection in new local Find_Base_Type function.
8645 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8647 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8649 2011-08-02 Robert Dewar <dewar@adacore.com>
8651 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8653 * opt.ads: Minor comment change.
8654 * sem_ch12.adb: Minor code reorganization.
8656 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8658 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8659 subtype's list of rep items to the list on the full subtype in the case
8660 where the lists are the same.
8662 2011-08-02 Geert Bosch <bosch@adacore.com>
8664 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8665 using the one from System.Strings, which also deallocates all strings.
8667 2011-08-02 Geert Bosch <bosch@adacore.com>
8669 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8671 * gcc-interface/Make-lang.in: Update dependencies.
8673 2011-08-02 Olivier Hainque <hainque@adacore.com>
8675 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8678 2011-08-02 Javier Miranda <miranda@adacore.com>
8680 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8681 associated with anonymous access to subprograms.
8683 2011-08-02 Geert Bosch <bosch@adacore.com>
8686 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8687 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8688 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8689 (Add_Symbol_Definition): Move to switch-c.adb
8690 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8691 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8692 (Add_Symbol_Definition): Move to switch-c.adb.
8693 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8695 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8697 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8698 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8700 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8701 (Add_Symbol_Definition): Moved from Prepcomp.
8702 * switch-c.ads: Update copyright notice. Use String_List instead of
8703 Argument_List, removing dependency on System.OS_Lib.
8705 2011-08-02 Yannick Moy <moy@adacore.com>
8707 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8708 mode on initialization expression which does not respect SPARK
8710 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8711 if the tree referenced by its argument represents an initialization
8712 expression in SPARK, suitable for initializing an object in an object
8715 2011-08-02 Javier Miranda <miranda@adacore.com>
8717 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8718 internally generated access to subprogram with its associated protected
8720 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8722 2011-08-02 Geert Bosch <bosch@adacore.com>
8724 * cstand.adb (Register_Float_Type): Print information about type to
8725 register, if the Debug_Flag_Dot_B is set.
8726 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8727 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8728 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8729 with a requested precision of more than Max_Digits digits and no more
8730 than Max_Base_Digits digits, if a range specification is present and the
8731 Predefined_Float_Types list has a suitable type to derive from.
8732 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8733 case of type completion with pragma Import
8735 (Process_Import_Predefined_Type): Processing to complete a type
8736 with pragma Import. Currently supports floating point types only.
8737 (Set_Convention_From_Pragma): Do nothing without underlying type.
8738 (Process_Convention): Guard against absence of underlying type,
8739 which may happen when importing incomplete types.
8740 (Process_Import_Or_Interface): Handle case of importing predefined
8741 types. Tweak error message.
8743 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8745 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8746 functions to previous change. Reorganize code slightly.
8748 2011-08-02 Geert Bosch <bosch@adacore.com>
8750 * back_end.ads (Register_Type_Proc): New call back procedure type for
8751 allowing the back end to provide information about available types.
8752 (Register_Back_End_Types): New procedure to register back end types.
8753 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8755 * cstand.adb (Back_End_Float_Types): New list for floating point types
8756 supported by the back end.
8757 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8758 (Copy_Float_Type): New procedure to make new copies of predefined types.
8759 (Register_Float_Type): New call back procedure to populate the BEFT list
8760 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8761 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8762 (Create_Float_Types): New procedure to create entities for floating
8763 point types predefined in Standard, and put these and any remaining
8764 BEFTs on the Predefined_Float_Types list.
8765 * stand.ads (Predefined_Float_Types): New list for predefined floating
8766 point types that do not have declarations in package Standard.
8768 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8770 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8771 entity node for the unit containing the parameter.
8772 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8773 (Add_Inlined_Subprogram): Likewise.
8774 * gcc-interface/Make-lang.in: Update dependencies.
8776 2011-08-02 Thomas Quinot <quinot@adacore.com>
8778 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8781 2011-08-02 Geert Bosch <bosch@adacore.com>
8783 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8785 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8787 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8788 computed value of Base_Type.
8790 2011-08-02 Yannick Moy <moy@adacore.com>
8792 * restrict.adb (Check_Restriction): issue an error for any use of
8793 class-wide, even if the No_Dispatch restriction is not set.
8794 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8795 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8796 when completing a private extension, the type named in the private part
8797 is not the same as that named in the visible part.
8798 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8799 of an inherited primitive operations of a tagged type or type extension
8800 that returns the tagged type.
8801 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8802 function which returns True for an implicit operation inherited by the
8803 derived type declaration for the argument type.
8804 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8809 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8810 Process_Bounds, to perform analysis with expansion of a range or an
8811 expression that is the iteration scheme for a loop.
8812 (Analyze_Iterator_Specification): If domain of iteration is given by a
8813 function call with a controlled result, as is the case if call returns
8814 a predefined container, ensure that finalization actions are properly
8816 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8818 2011-08-02 Javier Miranda <miranda@adacore.com>
8820 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8821 * gcc-interface/Make-lang.in: Update dependencies.
8823 2011-08-02 Javier Miranda <miranda@adacore.com>
8825 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8826 determine if the analysis is performed using N or Original_Node (N).
8827 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8828 functionality of routine Is_Variable avoids code duplication.
8829 * checks.adb (Determine_Range): Handle temporaries generated by
8830 Remove_Side_Effects.
8832 2011-08-02 Javier Miranda <miranda@adacore.com>
8834 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8835 expansion of the condition. Required since the previous analysis was
8836 done with expansion disabled (see Resolve_Quantified_Expression) and
8837 hence checks were not inserted and record comparisons have not been
8840 2011-08-02 Ed Falis <falis@adacore.com>
8842 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8845 2011-08-02 Bob Duff <duff@adacore.com>
8847 * opt.ads: Minor comment fix.
8849 2011-08-02 Bob Duff <duff@adacore.com>
8851 * sem_ch12.adb (Analyze_Package_Instantiation,
8852 Analyze_Subprogram_Instantiation): Turn off style checking while
8853 analyzing an instance. Whatever style checks that apply to the generic
8854 unit should apply, so it makes no sense to apply them in an instance.
8855 This was causing trouble when compiling an instance of a runtime
8856 unit that violates the -gnatyO switch.
8857 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8858 one of the two case statements, causing spurious errors.
8860 2011-08-02 Robert Dewar <dewar@adacore.com>
8862 * uname.adb: Minor reformatting.
8863 * gnatcmd.adb: Minor reformatting.
8864 * exp_attr.adb: Minor reformatting.
8866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8868 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8869 No_Dispatching_Calls, do not look for the Assign primitive, because
8870 predefined primitives are not created in this case.
8872 2011-08-02 Bob Duff <duff@adacore.com>
8874 * stylesw.ads: Minor comment fixes.
8876 2011-08-02 Robert Dewar <dewar@adacore.com>
8878 * freeze.adb (Add_To_Result): New procedure.
8880 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8882 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8883 time, if the specific run-time routines for handling streams of strings
8884 are not available, use the default mechanism.
8886 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8888 * s-regpat.ads: Fix typo.
8890 2011-08-02 Vincent Celier <celier@adacore.com>
8892 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8893 not null, call it to create the in memory config project file without
8894 parsing an existing default config project file.
8896 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8898 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8902 * sem_elim.adb: an abstract subprogram does not need an eliminate
8903 pragma for its descendant to be eliminable.
8905 2011-08-02 Ed Falis <falis@adacore.com>
8907 * init.c: revert to handling before previous checkin for VxWorks
8908 * s-intman-vxworks.adb: delete unnecessary declarations related to
8909 using Ada interrupt facilities for handling signals.
8910 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8911 * s-intman-vxworks.ads: Import __gnat_install_handler as
8912 Initialize_Interrupts.
8913 * s-taprop-vxworks.adb: Delete Signal_Mask.
8914 (Abort_Handler): change construction of mask to unblock exception
8917 2011-08-02 Jerome Guitton <guitton@adacore.com>
8919 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8920 Debug_Raise_Exception before propagation starts.
8922 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8924 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8925 to Restriction_Check_Required.
8926 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8927 * sem_res.adb (Resolve_Call): Likewise.
8928 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8930 2011-08-02 Bob Duff <duff@adacore.com>
8932 * stylesw.ads: Update comment.
8933 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8934 * errout.ads: Remove obsolete comment.
8936 2011-08-02 Javier Miranda <miranda@adacore.com>
8938 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8939 (Set_Is_Safe_To_Reevaluate): new procedure.
8940 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8941 assignment is allowed on safe-to-reevaluate variables.
8942 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8943 temporary created to remove side effects in expressions that use
8944 the secondary stack as safe-to-reevaluate.
8945 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8946 variables that are not true constants.
8948 2011-08-02 Robert Dewar <dewar@adacore.com>
8950 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8951 sem_res.adb, sem_ch6.adb: Minor reformatting.
8953 2011-08-02 Jerome Guitton <guitton@adacore.com>
8955 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8957 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8959 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8960 not set Overridden_Operation if subprogram is an initialization
8963 2011-08-02 Yannick Moy <moy@adacore.com>
8965 * par-ch6.adb: Correct obsolete name in comments
8966 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8967 which takes two message arguments (existing function takes one), with
8968 second message used for continuation.
8969 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8970 block statements that originate from a source block statement, not
8971 generated block statements
8972 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8973 symmetry with procedure case
8974 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8975 function to issue an error in formal mode if a package specification
8976 contains more than one tagged type or type extension.
8977 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8978 parameters matching formals of tagged types are objects (or ancestor
8979 type conversions of objects), not general expressions. Issue an error
8980 on view conversions that are not involving ancestor conversion of an
8982 (Resolve_Type_Conversion): in formal mode, issue an error on the
8983 operand of an ancestor type conversion which is not an object
8984 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8985 procedure so that it works also for actuals of function calls
8986 (Is_Actual_Tagged_Parameter): new function which determines if its
8987 argument is an actual parameter of a formal of tagged type in a
8989 (Is_SPARK_Object_Reference): new function which determines if the tree
8990 referenced by its argument represents an object in SPARK
8992 2011-08-02 Robert Dewar <dewar@adacore.com>
8994 * sem_ch3.adb: Minor reformatting
8995 Minor comment addition
8996 Minor error msg text change
8998 2011-08-02 Javier Miranda <miranda@adacore.com>
9000 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9001 function. Used to be more precise when we generate a variable plus one
9002 assignment to remove side effects in the evaluation of the Bound
9004 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9005 of the bound expression to force its re-analysis and thus expand the
9006 associated transient scope (if required). Code cleanup replacing the
9007 previous code that declared the constant entity by an invocation to
9008 routine Force_Evaluation which centralizes this work in the frontend.
9010 2011-08-02 Robert Dewar <dewar@adacore.com>
9012 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9013 (Base_Type): Now uses improved Is_Base_Type function
9014 * einfo.ads (Base_Type): Inline this function
9016 2011-08-02 Robert Dewar <dewar@adacore.com>
9018 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9019 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9021 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9023 * gcc-interface/Make-lang.in: Update dependencies.
9024 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9027 2011-08-02 Yannick Moy <moy@adacore.com>
9029 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9030 non-simple expression used in delta constraint
9031 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9032 index constraint which is not a subtype mark
9033 * par.adb: With and use Restrict
9034 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9035 mode on component type which is not a subtype mark and default
9036 expression on component
9037 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9038 of string which does not have a lower index bound equal to 1
9039 (Array_Type_Declaration): issue an error in formal mode on index or
9040 component type which is not a subtype mark, and on aliased keyword on
9042 (Derived_Type_Declaration): issue an error in formal mode on interface,
9043 limited or abstract type
9044 (Record_Type_Declaration): issue an error in formal mode on interface
9045 (Record_Type_Definition): issue an error in formal mode on tagged types
9046 and type extensions not declared in the specification of a library unit
9047 package; on null non-tagged record; on variant part
9049 2011-08-02 Vincent Celier <celier@adacore.com>
9051 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9052 not declared for qualified library project when Library_Name is not
9053 declared, but Library_Dir is.
9055 2011-08-02 Robert Dewar <dewar@adacore.com>
9057 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9058 pragmas (affects aspects [Component_]Default_Value
9059 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9060 component type for the resolution
9062 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9064 * einfo.adb (Base_Type): Tune implementation for speed.
9066 2011-08-02 Robert Dewar <dewar@adacore.com>
9068 * freeze.adb: Minor reformatting.
9070 2011-08-02 Thomas Quinot <quinot@adacore.com>
9072 * scos.ads: Update comments.
9074 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9076 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9077 base type, because the parent may be a subtype of a private type whose
9078 convention is established in a private part.
9080 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9082 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9083 statement in a block when the expansion of the return expression has
9084 created a finalization chain.
9085 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9086 with the parent node.
9087 Add N_Extended_Return_Statement to handle the case where a transient
9088 object declaration appears in the Return_Object_Declarations list of
9089 an extended return statement.
9091 2011-08-02 Matthew Gingell <gingell@adacore.com>
9093 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9094 unused parameter 'name'.
9096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9098 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9099 inherited operation, check whether its alias, which is the source
9100 operastion that it renames, has been marked eliminated.
9102 2011-08-02 Javier Miranda <miranda@adacore.com>
9104 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9105 in-mode parameter whose type is an access type since it can be used to
9106 modify its designated object. Enforce code that handles as safe an
9107 access type that is not access-to-constant but it is the result of a
9108 previous removal of side-effects.
9109 (Remove_Side_Effects): Minor code reorganization of cases which require
9110 no action. Done to incorporate documentation on new cases uncovered
9111 working in this ticket: no action needed if this routine was invoked
9112 too early and the nodes are not yet decorated.
9113 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9114 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9115 were issued with actuals that are implicitly provided by
9118 2011-08-02 Robert Dewar <dewar@adacore.com>
9120 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9122 2011-08-02 Yannick Moy <moy@adacore.com>
9124 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9125 to issue an error in formal mode on attribute not supported in this mode
9126 (Analyze_Attribute): issue errors on standard attributes not supported
9128 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9129 comment, and issue error in formal mode on modulus which is not a power
9131 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9133 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9135 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9136 operator on modular type (except 'not').
9138 2011-08-02 Robert Dewar <dewar@adacore.com>
9140 * gnat_rm.texi: Minor reformatting.
9142 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9144 * s-osinte-linux.ads: Minor comment update and reformatting.
9145 * i-cexten.ads: Make this unit pure, as for its parent.
9146 Will allow its usage in more contexts if needed.
9148 2011-08-02 Robert Dewar <dewar@adacore.com>
9150 * s-utf_32.ads: Minor comment fix.
9152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9154 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9155 operation of a tagged synchronized type, handle the case where the
9156 controlling argument is overloaded.
9158 2011-08-02 Yannick Moy <moy@adacore.com>
9160 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9161 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9162 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9163 SPARK mode and formal verification mode on processing SPARK restriction
9164 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9165 requiring consistency checking.
9167 2011-08-02 Robert Dewar <dewar@adacore.com>
9169 * sem_res.adb: Minor reformatting.
9171 2011-08-02 Robert Dewar <dewar@adacore.com>
9173 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9174 a-cforse.ads: Remove unneeded with of Ada.Containers
9175 Remove commented out pragma Inline's
9176 Move specifications of new subprograms to the actual specs
9178 2011-08-02 Yannick Moy <moy@adacore.com>
9180 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9181 a-cforse.ads: Update comments.
9183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9185 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9187 2011-08-02 Robert Dewar <dewar@adacore.com>
9189 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9190 a-cforse.ads, a-cofove.ads: Minor reformatting.
9192 2011-08-02 Claire Dross <dross@adacore.com>
9194 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9195 a-cofove.ads: Add comments.
9197 2011-08-02 Yannick Moy <moy@adacore.com>
9199 * gnat_rm.texi: Document formal containers.
9201 2011-08-02 Emmanuel Briot <briot@adacore.com>
9203 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9206 2011-08-02 Robert Dewar <dewar@adacore.com>
9208 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9211 2011-08-02 Robert Dewar <dewar@adacore.com>
9213 * aspects.adb: New aspects Default_Value and Default_Component_Value
9214 New format of Aspect_Names table checks for omitted entries
9215 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9216 handling of boolean aspects for derived types.
9217 New aspects Default_Value and Default_Component_Value
9218 New format of Aspect_Names table checks for omitted entries
9219 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9220 (Has_Default_Value): New flag
9221 (Has_Default_Component_Value): New flag
9222 (Has_Default_Value): New flag
9223 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9225 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9226 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9227 Default_Value and Default_Component_Value
9228 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9229 New aspects Default_Value and Default_Component_Value
9230 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9231 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9233 2011-08-02 Vincent Celier <celier@adacore.com>
9235 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9236 inherit library kind.
9238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9240 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9243 2011-08-02 Robert Dewar <dewar@adacore.com>
9245 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9247 2011-08-02 Yannick Moy <moy@adacore.com>
9249 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9251 2011-08-02 Robert Dewar <dewar@adacore.com>
9253 * impunit.adb: Add comment.
9255 2011-08-02 Yannick Moy <moy@adacore.com>
9257 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9258 qualification of aggregates in formal mode
9259 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9261 (Resolve_Aggregate): complete the test that an aggregate is adequately
9262 qualified in formal mode
9264 2011-08-02 Pascal Obry <obry@adacore.com>
9266 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9267 * mlib-prj.adb: Supress warning when compiling binder generated file.
9268 (Build_Library): Supress all warnings when compiling the binder
9271 2011-08-02 Yannick Moy <moy@adacore.com>
9273 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9275 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9276 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9277 Add with/use clauses to make Check_Formal_Restriction visible
9279 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9281 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9282 in-parameters when type of the generic formal is private in the generic
9283 spec and non-private in the body.
9285 2011-08-02 Claire Dross <dross@adacore.com>
9287 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9288 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9289 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9290 * impunit.adb, Makefile.rtl: Take new files into account.
9292 2011-08-02 Robert Dewar <dewar@adacore.com>
9294 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9295 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9297 2011-08-02 Yannick Moy <moy@adacore.com>
9299 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9301 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9302 matching static array bounds, taking into account the special case of
9304 * sem_ch3.adb: Typo in comment.
9306 2011-08-02 Yannick Moy <moy@adacore.com>
9308 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9309 which issues an error in formal mode if its argument node is originally
9311 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9312 has a discriminant specification so that it does not include the case
9314 (Derived_Type_Declaration): move here the test that a derived type has a
9315 discriminant specification
9316 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9317 first element of a component association before accessing its choices
9318 (presence of component association is not enough)
9319 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9320 declaration is a library item before accessing the next element in a
9321 list, as library items are not member of lists
9322 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9323 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9324 Check_Formal_Restriction whenever possible.
9326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9328 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9329 reference when needed.
9331 2011-08-02 Bob Duff <duff@adacore.com>
9333 * gnat_ugn.texi: Fix typo.
9335 2011-08-02 Vincent Celier <celier@adacore.com>
9337 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9338 archive file name. Do not use the full path name of archives for Open
9341 2011-08-02 Robert Dewar <dewar@adacore.com>
9343 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9344 Analyze_Aspect_Specifications
9346 (Analyze_Aspect_Specifications): New handling for boolean aspects
9347 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9348 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9349 sequence for Analyze_Aspect_Specifications
9350 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9351 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9353 2011-08-02 Robert Dewar <dewar@adacore.com>
9355 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9356 aspects, since these no longer exist.
9358 2011-08-02 Robert Dewar <dewar@adacore.com>
9360 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9361 semicolon, do not try to see if there are aspects following it.
9362 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9365 2011-08-02 Robert Dewar <dewar@adacore.com>
9367 * sem_ch8.adb, aspects.ads: Minor reformatting.
9369 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9371 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9372 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9374 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9376 2011-08-02 Yannick Moy <moy@adacore.com>
9378 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9379 mode on subprogram declaration outside of package specification, unless
9380 it is followed by a pragma Import
9381 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9382 Access_Type_Declaration): issue error in formal mode on access type
9383 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9385 (Analyze_Object_Declaration): issue error in formal mode on object
9386 declaration which does not respect SPARK restrictions
9387 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9388 declaration which does not respect SPARK restrictions
9389 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9390 error in formal mode on digits or delta constraint
9391 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9392 decimal fixed point type
9393 (Derived_Type_Declaration): issue error in formal mode on derived type
9394 other than type extensions of tagged record types
9395 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9396 with check on access definition
9397 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9398 mode on protected definition.
9399 (Analyze_Task_Definition): issue error in formal mode on task definition
9401 2011-08-02 Robert Dewar <dewar@adacore.com>
9403 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9405 2011-08-02 Javier Miranda <miranda@adacore.com>
9407 * sem_ch6.adb (Can_Override_Operator): New function.
9408 (Verify_Overriding_Indicator): Add missing code to check overriding
9409 indicator in operators. Fixes regression.
9410 (Check_Overriding_Indicator): Minor reformating after replacing the
9411 code that evaluates if the subprogram can override an operator by
9412 invocations to the above new function.
9414 (Write_Field26_Name): Add missing code to ensure that, following
9415 the documentation in einfo.ads, this field is not shown as attribute
9416 "Static_Initialization" on non-dispatching functions.
9418 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9420 * sem_res.adb (Resolve_Call): A call to
9421 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9422 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9423 i.e., when the second parameter is of type Time_Span.
9425 2011-08-02 Vincent Celier <celier@adacore.com>
9427 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9428 with an archive instead of -L<library dir> -l<library name>.
9430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9432 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9433 mark the base types In_Use in addition to making the operations
9436 2011-08-02 Ed Falis <falis@adacore.com>
9438 * init.c: add and setup __gnat_signal_mask for the exception signals
9439 * s-inmaop-vxworks.adb: new file.
9440 * s-intman-vxworks.adb: remove unnecessary initializations and
9442 * s-intman-vxworks.ads: remove unnecessary variable
9443 * s-taprop-vxworks.adb: simplify signal initialization
9445 2011-08-02 Robert Dewar <dewar@adacore.com>
9447 * sem_ch8.adb: Minor code reorganization, comment updates.
9449 2011-08-02 Robert Dewar <dewar@adacore.com>
9451 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9452 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9454 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9455 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9459 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9460 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9461 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9462 use_type_clauses, to handle more efficiently use_type and use_all_type
9464 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9465 Ada2012 Use_All_Type clause.
9466 (Use_Class_Wide_Operations): new procedure.
9468 2011-08-02 Robert Dewar <dewar@adacore.com>
9470 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9471 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9472 expression to expression function.
9474 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9476 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9477 if types are compatible.
9479 2011-08-02 Yannick Moy <moy@adacore.com>
9481 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9482 returns True if its argument array types have same dimension and same
9483 static bounds at each index.
9484 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9485 OUT or IN OUT paramaters which are not view conversions in SPARK.
9486 (Resolve_Arithmetic_Op): issue an error in formal mode on
9487 multiplication or division with operands of fixed point types which are
9488 not qualified or explicitly converted.
9489 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9490 Boolean or array type (except String) operands.
9491 (Resolve_Equality_Op): issue an error in formal mode on equality
9492 operators for array types other than String with non-matching static
9494 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9495 for array types with non-matching static bounds. Factorize the code in
9496 Matching_Static_Array_Bounds.
9497 (Resolve_Qualified_Expression): issue an error in formal mode on
9498 qualified expressions for array types with non-matching static bounds.
9499 (Resolve_Type_Conversion): issue an error in formal mode on type
9500 conversion for array types with non-matching static bounds
9502 2011-08-02 Robert Dewar <dewar@adacore.com>
9504 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9508 * par-ch9.adb: save location of entry for proper error message.
9510 2011-08-02 Javier Miranda <miranda@adacore.com>
9512 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9513 (Use_Full_View) which permits this routine to climb through the
9514 ancestors using the full-view of private parents.
9515 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9516 Use_Full_View to true in calls to Is_Ancestor.
9517 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9518 true in call to Is_Ancestor.
9519 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9520 Use_Full_View to true in call to Is_Ancestor.
9521 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9522 call to Is_Ancestor.
9523 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9524 Use_Full_View to true in calls to Is_Ancestor.
9525 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9526 Make_Select_Specific_Data_Table, Register_Primitive,
9527 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9528 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9529 to true in call to Is_Ancestor.
9530 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9531 Use_Full_View to true in calls to Is_Ancestor.
9533 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9534 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9536 2011-08-02 Robert Dewar <dewar@adacore.com>
9538 * gnat_rm.texi: Minor reformatting.
9539 * sem_prag.adb: Minor reformatting.
9541 2011-08-02 Tristan Gingold <gingold@adacore.com>
9543 * vms_data.ads: Add VMS qualifier for -gnateP.
9545 2011-08-02 Robert Dewar <dewar@adacore.com>
9547 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9548 * par-ch7.adb (P_Package): Proper placement of aspects for package
9550 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9551 (End_Statements): Add Is_Sloc parameterr
9552 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9553 (Check_End): Ad Is_Sloc parameter
9554 (End_Statements): Add Is_Sloc parameterr
9556 2011-08-02 Vincent Celier <celier@adacore.com>
9558 * ug_words: Add VMS qualifier equivalent to -gnateP:
9559 /SYMBOL_PREPROCESSING.
9561 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9563 * gnat-style.texi: For hexadecimal numeric literals the typical
9564 grouping of digits is 4 to represent 2 bytes.
9565 A procedure spec which is split into several lines is indented two
9568 2011-08-02 Yannick Moy <moy@adacore.com>
9570 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9571 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9572 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9574 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9575 choice in array aggregate
9576 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9578 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9579 positional and named aggregate for record, or others in record
9580 aggregate, or multiple choice in record aggregate
9581 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9582 array operands to logical operations AND, OR and XOR do not have the
9583 same static lower and higher bounds
9584 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9586 2011-08-01 Robert Dewar <dewar@adacore.com>
9588 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9589 Replaces Last_Source_Node_In_Sequence.
9590 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9591 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9592 parens and blank in string (this was inconsistently implemented).
9594 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9595 blank in string (this was inconsistently implemented).
9597 (Set_Global_Switches): Set formal mode switches appropriately
9598 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9600 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9601 call Set_Error_Msg_Lang to set "spark" as language name.
9602 * par.adb: Remove unnecessary call to set formal language for errout
9603 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9604 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9606 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9607 calls to it, moved after resolution so that types are known
9608 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9609 result of concatenation is not of type String
9610 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9611 concatenation is not properly restricted
9612 * gnat_rm.texi: Add doc on pragma Spark_95.
9613 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9614 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9615 * gcc-interface/Make-lang.in: Update dependencies.
9617 2011-08-01 Javier Miranda <miranda@adacore.com>
9619 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9620 condition that detects if the overridden operation must replace an
9623 2011-08-01 Javier Miranda <miranda@adacore.com>
9625 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9626 code declarations inserted by Insert_Actions in each alternative of the
9627 N_Case_Expression node.
9629 2011-08-01 Robert Dewar <dewar@adacore.com>
9631 * sem_ch6.adb: Minor code reorganization.
9632 * sem_util.adb: Minor reformatting.
9634 2011-08-01 Pascal Obry <obry@adacore.com>
9636 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9637 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9639 2011-08-01 Yannick Moy <moy@adacore.com>
9641 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9642 literal or operator symbol which is prefixed
9643 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9644 mode on access attributes.
9645 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9646 that concatenation operands are properly restricted in formal mode
9647 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9648 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9649 result of the concatenation has a type different from String.
9650 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9651 Analyze_Quantified_Expression, Analyze_Slice,
9652 Analyze_Null): issue an error in formal mode on unsupported constructs
9654 (Analyze_Block_Statement): only issue error on source block statement
9655 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9656 function which returns the last node in a list of nodes for which
9657 Comes_From_Source returns True, if any
9658 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9659 Last_Source_Node_In_Sequence
9660 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9661 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9662 mode on unsupported constructs
9663 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9664 rest of the actions may be needed later on since the error is marked as
9666 * sinfo.ads: Typos in comments.
9668 2011-08-01 Pascal Obry <obry@adacore.com>
9670 * projects.texi: Minor editing.
9672 2011-08-01 Yannick Moy <moy@adacore.com>
9674 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9675 insertion character ~~
9676 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9677 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9678 with insertion character ~~
9679 (Set_Msg_Text): treat insertion character ~~
9680 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9681 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9682 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9683 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9684 errors related to the formal language restriction not serious
9685 (insertion character |).
9686 * par.adb (Par): set formal language for error messages if needed
9687 * sem_ch6.adb (Check_Missing_Return): take into account possible
9688 generated statements at the end of the function
9689 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9690 enumeration value to define a new pragma SPARK_95
9691 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9692 SPARK_Version): new type and variables to store the SPARK version
9694 (SPARK_Mode): return True when SPARK_Version is set
9695 * par-prag.adb: Correct indentation
9696 (Prag): take Pragma_SPARK_95 into account
9697 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9700 2011-08-01 Robert Dewar <dewar@adacore.com>
9702 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9703 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9704 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9706 2011-08-01 Pascal Obry <obry@adacore.com>
9708 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9709 Target_Name to Get_Path call.
9710 (Parse_Single_Project): Likewise.
9711 (Post_Parse_Context_Clause): Likewise.
9712 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9713 Call Initialise_Project_Path with the proper Target_Name.
9714 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9716 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9717 with the proper Target_Name.
9718 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9720 (Parse_Project_And_Apply_Config): Likewise.
9721 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9722 This is fine as this part of the code is supporting only native
9724 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9725 is fine as this part of the code is supporting only native compilation.
9727 2011-08-01 Yannick Moy <moy@adacore.com>
9729 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9730 of homonym, unless the homonym is one of the cases allowed in SPARK
9731 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9732 package declaration occurring after a body.
9734 2011-08-01 Robert Dewar <dewar@adacore.com>
9736 * checks.adb, exp_ch4.adb: Minor reformatting.
9738 2011-08-01 Javier Miranda <miranda@adacore.com>
9740 * einfo.ads (Access_Disp_Table): Fix documentation.
9741 (Dispatch_Table_Wrappers): Fix documentation.
9743 2011-08-01 Pascal Obry <obry@adacore.com>
9745 * prj-env.adb, prj-env.ads: Minor reformatting.
9747 2011-08-01 Yannick Moy <moy@adacore.com>
9749 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9750 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9751 procedures out of these packages.
9752 * errout.ads, errout.adb
9753 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9754 procedures in of this package
9755 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9756 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9757 on misplaced later vs initial declarations, like in Ada 83
9758 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9759 formal mode on attribute of private type whose full type declaration
9761 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9762 package declaration inside a package specification
9763 (Analyze_Full_Type_Declaration): issue error in formal mode on
9764 controlled type or discriminant type
9765 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9766 user-defined operator means that it should come from the source
9767 (New_Overloaded_Entity): issue error in formal mode on overloaded
9769 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9771 2011-08-01 Thomas Quinot <quinot@adacore.com>
9773 * atree.adb: Minor reformatting.
9774 * checks.adb: Minor reformatting.
9776 2011-08-01 Vincent Celier <celier@adacore.com>
9778 * s-parame-vms-ia64.ads: Fix typo in comment
9780 * s-parame-vms-restrict.ads: Removed, unused.
9782 2011-08-01 Javier Miranda <miranda@adacore.com>
9785 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9787 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9788 * sem_ch3.ads, sem_ch3.adb
9789 (Is_Constant_Bound): New extended version of the subprogram that was
9790 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9791 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9792 * sem_aux.ads (Constant_Value): Fix typo in comment.
9793 * checks.adb (Generate_Index_Checks): New implementation which, for
9794 array objects with constant bounds, generates the runtime check
9795 referencing the bounds of the array type. For other cases this routine
9796 provides its previous behavior obtaining such values from the array
9798 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9800 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9801 we cannot have semantic interpretations of the new node.
9803 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9805 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9808 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9810 * sem_ch8.adb: Minor code editing.
9811 * s-vxwext.adb: Remove trailing space.
9812 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9813 consistency with other files.
9815 2011-08-01 Thomas Quinot <quinot@adacore.com>
9817 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9819 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9821 * par-ch10.adb: reject parameterized expressions as compilation unit.
9822 * sem_ch4.adb: handle properly conditional expression with overloaded
9823 then_clause and no else_clause.
9825 2011-08-01 Tristan Gingold <gingold@adacore.com>
9827 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9828 like done by System.Aux_DEC.
9829 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9831 2011-08-01 Yannick Moy <moy@adacore.com>
9833 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9834 missing label at end of declaration (subprogram or package)
9835 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9836 of positional and named parameter association
9837 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9838 Error_Msg_SP which adds a prefix to the error message giving the name
9839 of the formal language analyzed
9840 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9841 access result type in subprogram, unconstrained array as result type,.
9842 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9844 * sem_ch8.adb: Code clean up.
9846 2011-08-01 Javier Miranda <miranda@adacore.com>
9848 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9849 * einfo.ads (Access_Disp_Table): Fix documentation.
9850 (Dispatch_Table_Wrappers): Fix documentation.
9851 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9852 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9853 to enforce the documentation of this attribute.
9854 (Set_Is_Interface): Cleanup the assertion.
9855 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9856 the Underlying_Type entity before reading attribute Access_Disp_Table.
9857 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9858 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9859 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9860 the Underlying_Type entity before reading attribute Access_Disp_Table.
9861 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9862 Locate the Underlying_Type entity before reading attribute
9865 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9867 * s-poosiz.ads: Additional overriding indicators.
9869 2011-08-01 Yannick Moy <moy@adacore.com>
9871 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9873 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9874 parameter specification does not include a subtype mark.
9875 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9876 formal mode on abstract subprogram.
9877 (Analyze_Subprogram_Specification): issue error in formal mode on
9878 user-defined operator.
9879 (Process_Formals): issue error in formal mode on access parameter and
9881 * sem_ch9.adb (Analyze_Abort_Statement,
9882 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9883 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9884 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9885 Analyze_Requeue, Analyze_Selective_Accept,
9886 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9887 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9888 issue error in formal mode on user-defined raise statement.
9890 2011-08-01 Thomas Quinot <quinot@adacore.com>
9892 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9893 declaration being hidden when overriding an implicit inherited
9895 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9896 (-gnats), do not complain about a source file that contains only a
9899 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9901 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9902 variable if already set.
9904 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9906 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9907 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9908 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9909 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9910 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9911 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9912 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9913 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9914 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9915 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9916 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9917 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9918 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9919 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9920 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9921 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9922 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9923 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9924 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9925 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9926 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9927 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9928 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9929 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9930 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9931 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9932 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9933 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9934 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9935 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9936 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9937 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9938 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9939 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9940 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9941 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9942 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9943 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9944 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9945 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9946 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9947 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9948 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9949 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9950 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9951 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9952 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9953 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9954 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9955 Use GNAT instead of GNARL.
9957 2011-08-01 Bob Duff <duff@adacore.com>
9959 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9960 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9961 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9964 2011-08-01 Yannick Moy <moy@adacore.com>
9966 * debug.adb (d.D) reverve flag for the SPARK mode
9967 (d.E) reverve flag for SPARK generation mode
9968 (d.F) reverve flag for Why generation mode
9969 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9970 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9971 functions which return True when the corresponding modes are set
9972 (Formal_Language): return "spark" or "alfa" when in formal verification
9974 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9975 Error_Msg to prefix the error message with a tag giving the formal
9977 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9978 message with a tag giving the formal language
9979 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9981 (Analyze_Case_Statement): issue error in formal mode on case statement
9982 with a single "others" case alternative
9983 (Analyze_Exit_Statement): issue errors in formal mode on exit
9984 statements which do not respect SPARK restrictions
9985 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9986 (Check_Unreachable_Code): always issue an error (not a warning) in
9987 formal mode on unreachable code (concerns both code after an infinite
9988 loop and after an unconditional jump, both not allowed in SPARK)
9989 * sem_ch6.adb (Analyze_Return_Statement): add call to
9990 Set_Return_Present for a procedure containing a return statement
9991 (already done for functions in Analyze_Function_Return)
9992 (Analyze_Function_Return): issue error in formal mode on extended
9993 return or if return is not last statement in function
9994 (Check_Missing_Return): issue error in formal mode if function does
9995 not end with return or if procedure contains a return
9996 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9997 function to detect if there is an inner scope of its parameter S which
10000 2011-08-01 Thomas Quinot <quinot@adacore.com>
10002 * sem_ch6.ads: Minor reformatting.
10004 2011-08-01 Javier Miranda <miranda@adacore.com>
10006 * sem_util.adb (Abstract_Interface_List): Complete condition when
10007 processing private type declarations to avoid reading unavailable
10009 (Is_Synchronized_Tagged_Type): Complete condition when processing
10010 private extension declaration nodes to avoid reading unavailable
10013 2011-08-01 Thomas Quinot <quinot@adacore.com>
10015 * sem_ch3.adb: Minor reformatting.
10017 2011-08-01 Thomas Quinot <quinot@adacore.com>
10019 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10020 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10021 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10022 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10023 for VMS, instead parametrize the common implementation with
10024 System.Parameters declarations.
10026 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10028 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10030 2011-08-01 Tristan Gingold <gingold@adacore.com>
10032 * seh_init.c: Fix SEH handler installation on win64.
10034 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10036 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10037 double analysis of an anonymous access to subprogram, because it can
10038 lead to improper sharing of profiles and a back-end crash.
10040 2011-08-01 Robert Dewar <dewar@adacore.com>
10042 * make.adb, sem_ch4.adb: Minor reformatting.
10043 * gcc-interface/Make-lang.in: Update dependencies.
10044 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10046 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10048 * gnat_rm.texi: Fix definition of Long_Integer.
10050 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10052 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10053 to prevent storage exhaustion.
10054 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10055 finalized is a function body, insert the cleanup code before the final
10056 return statement, to prevent spurious warnings.
10057 * s-pooglo.ads: add overriding indicator.
10059 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10061 * sem_ch4.adb (Operator_Check): improve error message when both a
10062 with_clause and a use_clause are needed to make operator usage legal.
10063 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10064 determine whether a compilation unit is visible within an other,
10065 either through a with_clause in the current unit, or a with_clause in
10066 its library unit or one one of its parents.
10068 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10070 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10071 over an arbitrary expression of an array or container type.
10072 * lib-xref.adb: clarify comment.
10074 2011-08-01 Bob Duff <duff@adacore.com>
10076 * einfo.ads: Minor reformatting.
10077 * debug.adb: Minor comment improvement.
10079 2011-08-01 Javier Miranda <miranda@adacore.com>
10081 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10082 consider hidden subprograms as valid candidates.
10084 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10086 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10088 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10090 * gnat_ugn.texi: Fix typo.
10092 2011-08-01 Robert Dewar <dewar@adacore.com>
10094 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10095 lib-xref.adb: Minor reformatting
10097 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10099 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10100 when to generate a call to Move_Final_List.
10101 (Has_Controlled_Parts): Remove this function.
10103 2011-08-01 Geert Bosch <bosch@adacore.com>
10105 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10106 "," in choice list.
10108 2011-08-01 Thomas Quinot <quinot@adacore.com>
10110 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10111 explicit raise of a predefined exception as Comes_From_Source if the
10112 original N_Raise_Statement comes from source.
10114 2011-08-01 Robert Dewar <dewar@adacore.com>
10116 * sinfo.ads: Add comment.
10117 * sem_ch6.adb: Minor reformatting.
10119 2011-08-01 Robert Dewar <dewar@adacore.com>
10121 * freeze.adb (Freeze_Entity): Refine check for bad component size
10122 clause to avoid rejecting confirming clause when atomic/aliased present.
10124 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10126 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10127 better determine whether an entity reference is a write.
10128 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10130 * lib-xref.adb (Output_References): Do no suppress a read reference at
10131 the same location as an immediately preceeding modify-reference, to
10132 handle properly in-out actuals.
10134 2011-08-01 Tristan Gingold <gingold@adacore.com>
10136 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10138 2011-08-01 Quentin Ochem <ochem@adacore.com>
10140 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10141 heap to compute the result.
10143 2011-08-01 Robert Dewar <dewar@adacore.com>
10145 * atree.ads: Minor reformatting.
10147 2011-08-01 Emmanuel Briot <briot@adacore.com>
10149 * g-expect.adb (Get_Command_Output): Fix memory leak.
10151 2011-08-01 Geert Bosch <bosch@adacore.com>
10153 * cstand.adb (P_Float_Type): New procedure to print the definition of
10154 predefined fpt types.
10155 (P_Mixed_Name): New procedure to print a name using mixed case
10156 (Print_Standard): Use P_Float_Type for printing floating point types
10157 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10158 precision IEEE float.
10160 2011-08-01 Thomas Quinot <quinot@adacore.com>
10162 * sem_ch3.adb: Minor reformatting.
10164 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10166 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10167 the completion of a generic function, insert the new body rather than
10168 rewriting the original.
10170 2011-08-01 Yannick Moy <moy@adacore.com>
10172 * sinfo.ads, errout.ads: Typos in comments.
10174 2011-08-01 Robert Dewar <dewar@adacore.com>
10176 * par-endh.adb: Minor reformatting.
10178 2011-08-01 Robert Dewar <dewar@adacore.com>
10180 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10181 (Pre_Post_Aspects): New subtype.
10182 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10183 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10184 * par-ch7.adb (P_Package): Remove Decl parameter
10185 (P_Package): Handle new syntax for aspects (before IS)
10186 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10188 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10189 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10190 (P_Package): Remove Decl parameter
10191 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10193 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10195 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10196 * sinfo.ads: Document new syntax for aspects in packages etc.
10197 * sprint.adb: Handle new syntax of aspects before IS in package
10199 2011-08-01 Thomas Quinot <quinot@adacore.com>
10201 * atree.ads: Minor reformatting.
10202 * sem_prag.adb: Minor reformatting.
10204 2011-08-01 Robert Dewar <dewar@adacore.com>
10206 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10207 case expr alternative.
10209 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10211 * sem_ch12.adb: Fix typo.
10213 2011-08-01 Geert Bosch <bosch@adacore.com>
10215 * sem_prag.adb (Check_No_Link_Name): New procedure.
10216 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10217 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10218 instead of Standard_Long_Long_Float_Size global. Preparation for
10219 eventual removal of per type constants.
10220 * exp_util.ads (Get_Stream_Size): New function returning the stream
10221 size value of subtype E.
10222 * exp_util.adb (Get_Stream_Size): Implement new function.
10223 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10225 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10227 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10229 2011-08-01 Geert Bosch <bosch@adacore.com>
10231 * cstand.adb: Fix comments.
10232 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10233 count of arguments.
10235 2011-08-01 Robert Dewar <dewar@adacore.com>
10237 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10239 2011-08-01 Geert Bosch <bosch@adacore.com>
10241 * atree.ads: Fix comment.
10243 2011-08-01 Robert Dewar <dewar@adacore.com>
10245 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10246 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10247 * par.adb: Add with for Namet.Sp.
10248 * par-tchk.adb: Minor reformatting.
10250 2011-08-01 Vincent Celier <celier@adacore.com>
10252 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10253 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10254 of the init procedure of a SAL.
10255 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10258 2011-08-01 Thomas Quinot <quinot@adacore.com>
10260 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10263 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10265 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10267 2011-08-01 Thomas Quinot <quinot@adacore.com>
10269 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10270 conformant with its spec (return True only for types that have
10271 an overriding Initialize primitive operation that prevents them from
10272 having preelaborable initialization).
10273 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10274 initialization for controlled types in Ada 2005 or later mode.
10276 2011-08-01 Robert Dewar <dewar@adacore.com>
10278 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10280 (Same_Aspect): New function.
10281 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10282 Type_Invariant, Precondition, Postcondition.
10283 * snames.ads-tmpl: Add Name_Type_Invariant.
10285 2011-08-01 Robert Dewar <dewar@adacore.com>
10287 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10289 (Freeze_All_Ent): Fix error in handling inherited aspects.
10290 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10291 already analyzed, but don't skip entire processing of a declaration,
10292 that's wrong in some cases of declarations being rewritten.
10293 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10294 Don't delay for integer, string literals
10295 Treat predicates in usual manner for delay, remove special case code,
10297 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10298 (Build_Predicate_Function): Update saved expression in aspect
10299 (Build_Invariant_Procedure): Update saved expression in aspect
10300 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10301 of replacement of discriminant references if the reference is simple.
10303 2011-08-01 Robert Dewar <dewar@adacore.com>
10305 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10306 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10307 Static_Predicate and Dynamic_Predicate.
10308 (Build_Predicate_Function): Add processing for Static_Predicate
10309 and Dynamic_Predicate.
10310 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10311 (From_Static_Predicate): New flag
10312 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10314 2011-08-01 Robert Dewar <dewar@adacore.com>
10316 * usage.adb: Documentation cleanup for Ada version modes in usage.
10317 * expander.adb: Minor reformatting.
10319 2011-08-01 Robert Dewar <dewar@adacore.com>
10321 * atree.ads: Minor comment fix.
10322 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10323 a-witeio.ads, sem_prag.adb: Minor reformatting.
10325 2011-08-01 Doug Rupp <rupp@adacore.com>
10327 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10328 pointers. Use descrip.h header file for convenience. Add some
10331 2011-08-01 Robert Dewar <dewar@adacore.com>
10333 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10334 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10335 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10337 (Check_Aspect_At_End_Of_Declarations): New procedure
10338 (Analye_Aspect_Specification): Minor changes for above procedures
10339 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10340 specification node as well.
10342 2011-08-01 Pascal Obry <obry@adacore.com>
10344 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10345 Windows files. Use GetFilesAttributes() in this case to check for file
10346 existence instead of returning with an error code.
10348 2011-08-01 Vincent Celier <celier@adacore.com>
10350 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10351 High is above Source length.
10353 2011-08-01 Robert Dewar <dewar@adacore.com>
10355 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10357 2011-08-01 Robert Dewar <dewar@adacore.com>
10359 * aspects.ads (Boolean_Aspects): New subtype.
10360 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10361 for derived types in cases where the parent type and derived type have
10363 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10364 with aspects when parent type also has aspects.
10365 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10366 boolean expression at this point).
10367 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10368 accordance with final decision on the Ada 2012 feature.
10369 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10371 2011-08-01 Matthew Heaney <heaney@adacore.com>
10373 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10375 2011-08-01 Pascal Obry <obry@adacore.com>
10377 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10378 Fix Replace_Slice when High is above current string size.
10379 (Replace_Slice): Fix DL computation when High is above current
10382 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10384 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10386 2011-08-01 Matthew Heaney <heaney@adacore.com>
10388 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10391 2011-08-01 Pascal Obry <obry@adacore.com>
10393 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10396 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10398 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10399 access to protected subprograms in generic bodies.
10400 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10401 protected type, indicate that the convention of the subprogram is
10402 Convention_Protected, because it may be used in subsequent declarations
10403 within the protected declaration.
10405 2011-08-01 Vincent Celier <celier@adacore.com>
10407 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10408 and "final" procedures when the name of the library is "ada", to avoid
10409 duplicate symbols "adainit" and "adafinal" in executables.
10411 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10413 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10414 quantified expression that appears within a postcondition and uses the
10415 Ada2012 'Result attribute.
10417 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10419 * init.c (__gnat_error_handler): Cast reason to int.
10420 (__gnat_install_handler): Explain sa_sigaction use.
10422 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10424 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10425 subprogram has copy-in copy-out parameters, try to promote the mode of
10426 the return type if it is passed in registers.
10428 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10430 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10431 left operand as addressable.
10433 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10435 * gcc-interface/gigi.h (build_function_stub): Remove.
10436 (build_return_expr): Likewise.
10437 (convert_vms_descriptor): Declare.
10438 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10439 (build_function_stub): Move to...
10440 * gcc-interface/utils2.c (build_return_expr): Move to...
10441 * gcc-interface/trans.c (build_function_stub): ...here.
10442 (build_return_expr): ...here.
10443 (Subprogram_Body_to_gnu): Add local variable for language_function.
10444 Disconnect the parameter attributes cache, if any, once done with it.
10445 Call end_subprog_body only after setting the end_locus.
10446 Build the stub associated with the function, if any, at the very end.
10447 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10448 variables and streamline control flow.
10450 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10453 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10454 g-trasym-dwarf.adb.
10456 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10459 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10460 Assign to act.sa_sigaction.
10461 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10462 current->return_address to char * before arithmetic.
10464 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10466 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10467 Correct argument types.
10468 Extract code from reason.
10469 (__gnat_install_handler): Assign to act.sa_sigaction.
10471 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10473 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10474 (GNAT1_OBJS): ...here.
10476 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10479 * g-socthi-mingw.adb (Fill): Fix formatting.
10481 * gcc-interface/gigi.h: Move around comment.
10483 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10486 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10488 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10491 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10493 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10495 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10496 range comparison if Pmode is SImode.
10498 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10499 Eric Botcazou <ebotcazou@adacore.com>
10501 * adadecode.c: Wrap up in extern "C" block.
10502 * adadecode.h: Likewise.
10503 * adaint.c: Likewise. Remove 'const' keyword.
10504 * adaint.h: Likewise.
10505 * argv.c: Likewise.
10506 * atree.h: Likewise.
10508 * cstreams.c: Likewise.
10510 * exit.c: Likewise.
10512 * final.c: Likewise.
10513 * init.c: Likewise.
10514 * initialize.c: Likewise.
10515 * link.c: Likewise.
10516 * namet.h: Likewise.
10517 * nlists.h: Likewise.
10518 * raise.c: Likewise.
10519 * raise.h: Likewise.
10520 * repinfo.h: Likewise.
10521 * seh_init.c: Likewise.
10522 * targext.c: Likewise.
10523 * tracebak.c: Likewise.
10524 * uintp.h: Likewise.
10525 * urealp.h: Likewise.
10526 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10527 * xsinfo.adb: Likewise.
10528 * xsnamest.adb: Likewise.
10529 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10530 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10531 * gcc-interface/misc.c: Likewise.
10532 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10533 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10534 ada/targext.o here...
10535 (GNAT_ADA_OBJS): ...and not here.
10536 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10537 (GNATBIND_OBJS): Reorder.
10539 2011-07-07 Richard Henderson <rth@redhat.com>
10541 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10542 dwarf2out_frame_init.
10544 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10546 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10548 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10551 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10553 2011-07-06 Richard Guenther <rguenther@suse.de>
10555 * gcc-interface/misc.c (gnat_init): Merge calls to
10556 build_common_tree_nodes and build_common_tree_nodes_2.
10557 Re-initialize boolean_false_node.
10559 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10560 Olivier Hainque <hainque@adacore.com>
10561 Nicolas Setton <setton@adacore.com>
10563 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10564 the type according to the ARTIFICIAL_P parameter.
10565 (create_type_decl): Likewise.
10566 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10568 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10570 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10571 (gnatbind): Likewise.
10573 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10575 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10577 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10579 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10580 local variable throughout. Remove useless call to Base_Type.
10581 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10582 Take it also into account for the volatileness of the field. Set the
10583 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10585 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10587 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10588 on a dereference built for a by-ref object if it has an address clause.
10590 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10592 * einfo.ads (Address_Taken): Document use for the second argument of
10593 Asm_Input and Asm_Output attributes.
10594 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10595 argument is an entity name, then set Address_Taken on it.
10596 <Attribute_Asm_Output>: Likewise.
10597 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10598 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10599 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10600 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10602 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10604 PR middle-end/46500
10605 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10607 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10609 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10610 (ada/utils.o): Update dependencies.
10611 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10612 ../../../libcpp/libcpp.a.
10613 * gcc-interface/utils.c: Include common/common-target.h.
10614 (process_attributes): Use targetm_common.have_named_sections.
10616 2011-06-07 Richard Guenther <rguenther@suse.de>
10618 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10621 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10623 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10624 TREE_THIS_NOTRAP flag.
10626 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10628 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10631 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10633 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10634 constants whose full view has discriminants specially.
10636 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10638 * gcc-interface/utils.c: Include diagnostic.h.
10639 (gnat_write_global_declarations): Output debug information for all
10640 global type declarations before finalizing the compilation unit.
10641 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10643 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10645 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10647 2011-05-25 Kai Tietz <ktietz@redhat.com>
10649 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10650 initialization instead of const/none-const pointer assignment.
10652 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10654 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10655 $(EXTRA_GNAT1_OBJS).
10656 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10657 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10658 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10659 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10660 libcommon-target.a instead of prefix.o.
10662 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10665 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10667 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10669 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10670 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10671 instead of version.o.
10673 2011-05-18 Kai Tietz <ktietz@redhat.com>
10675 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10676 boolean_false_node instead of integer_zero_node.
10677 (convert_with_check): Likewise.
10678 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10680 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10682 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10683 type of the parameter is an unconstrained array, convert the actual to
10684 the type of the formal in the In Out and Out cases as well.
10686 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10688 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10689 call build_function_type_array or build_varargs_function_type_array
10691 (create_subprog_type): Don't call build_function_type; call
10692 build_function_type_vec instead.
10694 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10696 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10697 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10698 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10700 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10702 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10704 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10705 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10707 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10709 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10711 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10713 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10714 instead of accessing TYPE_ARG_TYPES directly.
10715 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10717 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10720 * gcc-interface/gigi.h (get_variant_part): Declare.
10721 * gcc-interface/decl.c (get_variant_part): Make global.
10722 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10723 types have the same constant size, are record types and T1 has a
10724 variant part while T2 doesn't.
10726 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10728 * gcc-interface/utils.c (begin_subprog_body): Do not call
10730 (end_subprog_body): Likewise.
10732 2011-05-04 Richard Guenther <rguenther@suse.de>
10734 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10736 (pos_to_constructor): Likewise.
10738 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10739 Eric Botcazou <ebotcazou@adacore.com>
10741 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10742 of build_function_type. Adjust calls to...
10743 (build_raise_check): ...this. Do not take a void_tree parameter.
10744 Call build_function_type_list instead of build_function_type.
10745 Fix head comment and swap couple of conditional blocks.
10747 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10749 * gnatvsn.ads (Library_Version): Bump to 4.7.
10750 (Current_Year): Bump to 2011.
10752 2011-04-29 Michael Matz <matz@suse.de>
10754 * gcc-interface/misc.c (gnat_handle_option): Set
10755 warn_maybe_uninitialized.
10757 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10759 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10760 the Watson/McCabe paper.
10762 2011-04-23 Jim Meyering <meyering@redhat.com>
10764 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10766 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10768 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10771 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10773 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10775 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10776 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10777 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10778 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10779 <all>: Do not set flags on the reused DECL node coming from an alias.
10780 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10781 don't need debug info here...
10782 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10783 (gigi): Adjust calls to create_subprog_decl.
10784 (build_raise_check): Likewise.
10785 (establish_gnat_vms_condition_handler): Likewise.
10786 (Compilation_Unit_to_gnu): Likewise.
10787 (gnat_to_gnu): Likewise.
10789 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10791 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10792 (NO_REORDER_ADAFLAGS): New variable.
10793 (EXTRA_GNATTOOLS): Always define.
10794 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10795 Clean up and adjust list of files compiled with special options.
10796 * gcc-interface/Make-lang.in: Likewise.
10797 (ada/decl.o): Cosmetical change.
10798 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10800 2011-04-20 Jim Meyering <meyering@redhat.com>
10802 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10804 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10806 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10807 $(CFLAGS) on the link line.
10809 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10812 padded type built for the return type if it is unconstrained.
10814 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10816 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10818 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10820 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10821 before calling TREE_CHAIN.
10822 * gcc-interface/misc.c (gnat_init_ts): New function.
10823 (LANG_HOOKS_INIT_TS): Define.
10825 2011-04-12 Martin Jambor <mjambor@suse.cz>
10827 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10828 instead of cgraph_node.
10830 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10832 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10833 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10836 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10838 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10839 of aggregate types that contain a placeholder.
10841 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10843 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10845 (handle_type_generic_attribute): Likewise.
10847 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10850 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10852 2011-04-04 Kai Tietz <ktietz@redhat.com>
10855 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10858 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10860 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10861 type case, do not strip a padding type around the array type.
10863 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10865 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10868 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10870 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10871 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10872 code for -feliminate-unused-debug-types.
10873 (gnat_post_options): Likewise.
10875 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10877 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10878 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10881 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10883 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10884 DECL_ARTIFICIAL flag on enumeration types.
10886 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10888 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10889 fat pointer types artificial unconditionally.
10890 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10893 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10895 * gcc-interface/gigi.h (get_dummy_type): Declare.
10896 (build_dummy_unc_pointer_types): Likewise.
10897 (finish_fat_pointer_type): Likewise.
10898 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10899 fat pointer type has been built, complete it in place.
10900 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10901 and thin pointers. Remove useless variable.
10902 (finish_fat_pointer_type): Make global and move to...
10903 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10904 (get_dummy_type): New function.
10905 (build_dummy_unc_pointer_types): Likewise.
10906 (gnat_pushdecl): Propage the name to the anonymous variants only.
10907 (update_pointer_to): Only adjust the pointer types in the unconstrained
10910 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10912 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10913 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10914 if this is a Taft amendment type and the full declaration is available.
10915 * gcc-interface/trans.c (process_type): Likewise.
10916 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10917 (process_freeze_entity): Likewise.
10918 * gcc-interface/utils.c (dummy_global): New static variable.
10919 (gnat_write_global_declarations): If there are types declared as used
10920 at the global level, insert them in the global hash table.
10922 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10924 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10925 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10926 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10928 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10929 flag of the type accordingly.
10930 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10932 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10934 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10935 finalizing types when updating the pointers to the designated type.
10936 <all>: Finalize the deferred types even if we didn't defer processing
10937 of incomplete types in this invocation.
10939 2011-04-01 Olivier Hainque <hainque@adacore.com>
10940 Nicolas Setton <setton@adacore.com>
10941 Eric Botcazou <ebotcazou@adacore.com>
10943 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10944 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10946 2011-03-28 Kai Tietz <ktietz@redhat.com>
10948 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10950 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10951 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10953 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10955 2011-03-28 Tristan Gingold <gingold@adacore.com>
10958 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10959 Use ada output of gnatbind.
10960 (ada/b_gnatb.adb): Ditto.
10961 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10962 (ada.mostlyclean, ada.stage1)
10963 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10964 (ada.stagefeedback): Adjust.
10965 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10966 Use ada output of gnatbind.
10967 (b_gnatm.adb): Ditto.
10968 (b_gnatl.o, b_gnatm.o): New rules.
10970 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10972 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10973 for the padded type built to support a specified size or alignment.
10975 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10977 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10978 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10979 unconditionally to the end of the unit when the designated type is
10981 <all>: Rename local variable. Attempt to un-defer types only and do it
10982 for limited_with'ed types as well.
10983 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10984 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10985 consistently and remove redundant call to finalize_from_with_types.
10987 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10989 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10990 subprograms without a previous spec declared in the same unit.
10991 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10992 subprograms at the end of the unit instead of at the beginning.
10993 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10994 isn't public for the special handling of non-inline functions nested
10995 inside inline external functions.
10997 2011-03-25 Jeff Law <law@redhat.com>
10999 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11001 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11003 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11004 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11005 to compute Set_Size_Depends_On_Discriminant.
11006 (Layout_Type): Call it on array types in back-end layout mode.
11007 * sem_util.adb (Requires_Transient_Scope): Return true for array
11008 types only if the size depends on the value of discriminants.
11009 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11010 type if the RHS is a call to a function that returns an unconstrained
11011 type with default discriminant.
11013 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11015 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11016 non-conversion to the nominal result type at the end.
11018 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11020 * gcc-interface/trans.c (create_temporary): New function taken from...
11021 (create_init_temporary): ...here. Call it.
11022 (call_to_gnu): Create the temporary for the return value early, if any.
11023 Create it for a function with copy-in/copy-out parameters if there is
11024 no target; in other cases of copy-in/copy-out, use another temporary.
11025 Push the new binding level lazily. Add and rename local variables.
11027 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11029 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11031 (set_rm_size): Likewise.
11033 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11035 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11036 for the padded type built in order to support a specified alignment.
11037 Fix incorrect formatting.
11039 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11042 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11044 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11046 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11047 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11048 to the end of the list. Adjust recursive call. Rename local variable.
11049 If REORDER is true, reorder components of the record type.
11050 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11051 components_to_record and adjust the parameter list.
11053 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11055 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11056 disabled, use the variable for bounds of loop iteration scheme.
11058 2011-03-21 Kai Tietz <ktietz@redhat.com>
11061 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11063 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11065 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11066 out whether the expression is read-only. Short-circuit placeholder
11067 case and rename a couple of local variables.
11069 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11071 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11072 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11073 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11074 (convert): Deal with conversions from a smaller form type specially.
11076 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11078 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11079 its argument, except for the special -I- switch.
11081 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11083 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11086 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11088 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11090 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11092 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11094 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11095 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11096 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11097 Do not generate the check directly, instead instantiate the template
11098 check present in the descriptor.
11099 (make_descriptor_field): Move around.
11100 (build_vms_descriptor32): Build a template check in the POINTER field.
11101 (build_vms_descriptor): Remove useless suffixes.
11102 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11104 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11107 * targext.c: Include target files if IN_RTS is defined.
11109 2011-01-26 Richard Guenther <rguenther@suse.de>
11112 * targext.c: Include config.h.
11113 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11116 2011-01-04 Pascal Obry <obry@adacore.com>
11117 Eric Botcazou <ebotcazou@adacore.com>
11119 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11121 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11123 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11124 end-of-case on the end label and its associated gotos, if any.
11126 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11128 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11129 expressions of the parameter cache within the statement group of
11130 the CICO mechanism.
11132 2011-01-04 Olivier Hainque <hainque@adacore.com>
11133 Eric Botcazou <ebotcazou@adacore.com>
11135 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11136 (set_end_locus_from_node): New function.
11137 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11138 make and the function end_locus.
11139 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11140 for the elaboration subprogram.
11141 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11142 set the end_locus of the expression as well.
11144 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11147 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11148 variables that are referenced in exception handlers volatile.
11152 Copyright (C) 2011 Free Software Foundation, Inc.
11154 Copying and distribution of this file, with or without modification,
11155 are permitted in any medium without royalty provided the copyright
11156 notice and this notice are preserved.