1 2011-08-29 Thomas Quinot <quinot@adacore.com>
3 * sinfo.ads, sem_ch7.adb: Minor reformatting.
5 2011-08-29 Bob Duff <duff@adacore.com>
7 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
8 restriction on allocators, as required by AI05-0013-1.
9 * restrict.ads: Minor comment fix.
11 2011-08-29 Tristan Gingold <gingold@adacore.com>
13 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
14 (To_Jmpbuf_Address): Ditto
15 (builtin_longjmp): Ditto
17 2011-08-29 Thomas Quinot <quinot@adacore.com>
19 * sem_res.adb: Minor reformatting.
21 2011-08-29 Vincent Celier <celier@adacore.com>
23 * make.adb (Gnatmake): Move special processing for VM targets after the
24 call to Get_Target_Parameters.
26 2011-08-29 Thomas Quinot <quinot@adacore.com>
28 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
30 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
32 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
33 where an anonymous access discriminant of a limited designated type
34 appears in a non-immutably limited discriminated type and issue an
35 error message. Add local variable Desig_T and replace all occurrences
38 2011-08-29 Jose Ruiz <ruiz@adacore.com>
40 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
41 implementation is compliant to RM D.15(15/2) after the modification
42 imposed by AI05-0094-1 (binding interpretation).
44 2011-08-29 Robert Dewar <dewar@adacore.com>
46 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
47 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
49 2011-08-29 Thomas Quinot <quinot@adacore.com>
51 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
52 the scope name, do not report a missing label as a style violation (it
53 will be diagnosed as an illegality).
54 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
55 variant records: Get_Enum_Lit_From_Pos already returns a usage
56 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
57 on Expr in Integer_Literal case so that it can be used by
60 2011-08-29 Tristan Gingold <gingold@adacore.com>
62 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
64 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
65 (Build_Abort_Block_Handler): New function to build an Abort_Signal
67 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
68 Build_Abort_Block_Handler to build the exception handler. Do not
69 undefer aborts for the Abort_Signal exception handler if back-end
71 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
72 back_end exceptions for all others and abort_signal.
73 * s-except.ads (ZCX_By_Default): New constant.
74 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
75 (Raise_Exception_Always): Ditto.
76 (Raise_From_Signal_Handler): Ditto.
77 (Raise_With_Location_And_Msg): Ditto.
78 (Raise_With_Msg): Ditto.
80 (Reraise_Occurence): Ditto.
81 (Reraise_Occurrence_Always): Ditto.
82 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
83 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
84 * s-interr-hwint.adb (Interrupt_Manager): Defer abort if ZCX.
86 2011-08-29 Thomas Quinot <quinot@adacore.com>
88 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
90 2011-08-29 Robert Dewar <dewar@adacore.com>
92 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
93 Minor code reorganization.
95 2011-08-29 Bob Duff <duff@adacore.com>
97 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
98 2012, not just Ada 2005.
100 2011-08-29 Vincent Celier <celier@adacore.com>
102 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
103 with a project file or with gprbuid, if -gnatep= is specified, the
104 builder may need to be invoked with -x.
106 2011-08-29 Tristan Gingold <gingold@adacore.com>
108 * a-exexpr-gcc.adb: Minor comment fix.
110 2011-08-29 Robert Dewar <dewar@adacore.com>
112 * sem_ch8.adb: Minor reformatting.
114 2011-08-29 Bob Duff <duff@adacore.com>
116 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
117 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
118 treating "some" as unreserved in earlier Ada versions. This is now
119 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
120 rather than Name_Some, since Tok_Some is now recognized as reserved.
121 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
123 * scans.ads: Minor comment fixes.
124 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
125 for other language versions.
126 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
127 treating "some" as unreserved in earlier Ada versions. This is now
128 handled in Snames.Is_Keyword_Name.
129 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
131 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
132 unreserved in earlier Ada versions. This is now handled in
133 Snames.Is_Keyword_Name.
134 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
135 words as for other language versions.
136 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
137 Ada 2012, not just Ada 2005.
139 2011-08-29 Ed Schonberg <schonberg@adacore.com>
141 * sem_ch13.adb: Additional semantic checks for aspects involved in
144 2011-08-29 Matthew Heaney <heaney@adacore.com>
146 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
147 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
149 (Ancestor_Find): ditto.
151 2011-08-29 Thomas Quinot <quinot@adacore.com>
153 * par-endh.adb: Minor reformatting.
155 2011-08-29 Tristan Gingold <gingold@adacore.com>
157 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
158 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
159 (Adjust_N_CLeanups_For): Remove.
160 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
162 (Propgate_Exception): Adjust.
163 * raise-gcc.c: Add a few static/const.
164 (Adjust_N_Cleanups_For): Remove declaration.
165 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
167 2011-08-29 Ed Schonberg <schonberg@adacore.com>
169 * sem_ch8.adb: Use type of function return when rewriting as object
172 2011-08-29 Gary Dismukes <dismukes@adacore.com>
174 * sem_type.adb: Minor reformatting.
176 2011-08-29 Robert Dewar <dewar@adacore.com>
178 * makeutl.adb: Minor reformatting.
180 2011-08-29 Ed Schonberg <schonberg@adacore.com>
182 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
183 function call of a limited type, the expansion of the renaming is
184 complicated by the presence of various temporaries and subtypes that
185 capture constraints of the renamed object.
186 Rewrite node as an object declaration, whose expansion is simpler.
187 Given that the object is limited there is no copy involved and no
190 2011-08-29 Robert Dewar <dewar@adacore.com>
192 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
193 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
195 2011-08-29 Tristan Gingold <gingold@adacore.com>
197 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
198 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
199 system-linux-hppa.ads, system-linux-s390.ads,
200 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
201 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
202 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
203 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
204 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
205 system-solaris-sparc.ads, system-lynxos-x86.ads,
206 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
207 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
208 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
209 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
210 system-vxworks-x86.ads: Remove GCC_ZCX_Support
211 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
212 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
213 * opt.ads: Adjust comment.
214 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
215 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
216 * system.ads: Move GCC_ZCX_Support to obsolete entries.
218 2011-08-29 Emmanuel Briot <briot@adacore.com>
220 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
221 file name is specified on the gnatmake or gprbuild command line, and
222 before we search for that file in the project.
224 2011-08-29 Ed Schonberg <schonberg@adacore.com>
226 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
227 used to determine whether a possible interpretation for an overloadable
228 entity is declared within the current instantiation and should be
229 included in the candidate set.
231 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
233 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
235 2011-08-29 Ed Schonberg <schonberg@adacore.com>
237 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
238 access subtype is access_to_subprogram, when applying checks for
241 2011-08-29 Matthew Heaney <heaney@adacore.com>
243 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
244 for sibling when common parent.
246 2011-08-29 Thomas Quinot <quinot@adacore.com>
248 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
251 2011-08-29 Ed Schonberg <schonberg@adacore.com>
253 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
254 for the return type when in ASIS mode.
256 2011-08-29 Vincent Celier <celier@adacore.com>
258 * make.adb (Gnatmake): Get the default search dirs, then the target
259 parameters after getting the Builder switches, as the Builder switches
260 may include --RTS= and that could change the default search dirs.
262 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
264 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
265 Make_Final_Call. Move the processing for class-wide types before the
266 processing for derivations from [Limited_]Controlled.
267 (Make_Final_Call): Move the processing for class-wide types before the
268 processing for derivations from [Limited_]Controlled.
269 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
270 Add code to account for alignments larger than the list header. Add a
271 comment illustrating the structure of the allocated object + padding +
273 (Deallocate_Any_Controlled): Add code to account for alignments larger
274 than the list header.
276 2011-08-29 Ed Schonberg <schonberg@adacore.com>
278 * sinfo.ads, sinfo.adb: New node kind
279 N_Formal_Incomplete_Type_Definition, related flags.
280 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
281 Parse formal incomplete types.
282 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
284 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
285 Formal incomplete types do not need completion.
286 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
287 Validate_Incomplete_Type_Instance): New procedures to handle formal
289 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
290 that corresponds to a formal incomplete type.
291 * sprint.adb: Handle formal incomplete type declarations.
292 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
295 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
297 * a-fihema.ads, a-fihema.adb: Unit removed.
298 * a-undesu.ads, a-undesu.adb: New unit implementing
299 Ada.Unchecked_Deallocate_Subpool.
300 * einfo.adb: Remove Associated_Collection from the node usage.
301 Add Finalization_Master to the node usage.
302 (Associated_Collection): Removed.
303 (Finalization_Master): New routine.
304 (Set_Associated_Collection): Removed.
305 (Set_Finalization_Master): New routine.
306 (Write_Field23_Name): Remove Associated_Collection from the output. Add
307 Finalization_Master to the output.
308 * einfo.ads: Remove attribute Associated_Collection and its uses in
310 Add new attribute Finalization_Master along with its uses in entitites.
311 (Associated_Collection): Removed along with its pragma import.
312 (Finalization_Master): New routine along with a pragma import.
313 (Set_Associated_Collection): Removed along with its pragma import.
314 (Set_Finalization_Master): New routine along with a pragma import.
315 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
316 Build_Finalization_Collection with Build_Finalization_Master.
317 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
318 before the bodies of the predefined routines. Add comment explaining
319 this. Replace call to Build_Finalization_Collection with
320 Build_Finalization_Master.
321 (Freeze_Type): Replace call to Build_Finalization_Collection with
322 Build_Finalization_Master.
323 (Make_Finalize_Address_Body): Comment reformatting.
324 (Make_Predefined_Primitive_Specs): Code reformatting.
325 (Stream_Operation_OK): Update comment mentioning finalization
326 collections. Replace RE_Finalization_Collection with
327 RE_Finalization_Master.
328 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
329 Associated_Collection with Finalization_Master. Replace call to
330 Build_Finalization_Collection with Build_Finalization_Master.
331 (Expand_Allocator_Expression): Replace call to Associated_Collection
332 with Finalization_Master. Replace call to Set_Associated_Collection with
333 Set_Finalization_Master. Remove the generation of
334 Set_Finalize_Address_Ptr.
335 (Expand_N_Allocator): Replace call to Associated_Collection with
336 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
337 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
338 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
339 comment on usage. Replace call to Needs_BIP_Collection with
340 Needs_BIP_Finalization_Master Remplace BIP_Collection with
341 BIP_Finalization_Master. Update all comments which mention finalization
342 collections. Replace Associated_Collection with
343 Finalization_Master. Replace Build_Finalization_Collection with
344 Build_Finalization_Master.
345 (BIP_Formal_Suffix): Update BIP_Collection's case.
346 (Build_Heap_Allocator): Update the related comment. Rename local
347 variable Collect to Fin_Mas_Id and update its occurrences. Update
348 comments which mention finalization collections. Replace
349 Set_Associated_Collection with Set_Finalization_Master.
350 (Expand_Call): Update the code which detects a special piece of library
352 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
353 Add_Collection_Actual_To_Build_In_Place_Call with
354 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
355 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
356 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
357 Add_Collection_Actual_To_Build_In_Place_Call with
358 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
359 (Make_Build_In_Place_Call_In_Assignment): Replace call to
360 Add_Collection_Actual_To_Build_In_Place_Call with
361 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
362 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
363 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
364 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
365 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
366 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
367 Replace call to Set_Associated_Collection with Set_Finalization_Master.
368 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
369 Replace the call to Associated_Collection with Finalization_Master.
370 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
371 Update the way finalization master names are generated. Update the
372 retrieval of the correct access type which will carry the pool and
374 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
375 (Make_Finalize_Address_Body): Abstract types do not need
376 Finalize_Address. Code reformatting.
377 (Make_Finalize_Address_Stmts): Update comment on usage.
378 (Make_Set_Finalize_Address_Ptr_Call): Removed.
379 (Process_Declarations): Update comments.
380 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
381 Build_Finalization_Master. Update associated comment.
382 (Make_Set_Finalize_Address_Ptr_Call): Removed.
383 * exp_ch13.adb: Update comments which mention finalization collections.
384 (Expand_N_Free_Statement): Replace the call to Associated_Collection
385 with Finalization_Master.
386 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
387 create calls to routines Allocate_Any_Controlled and
388 Deallocate_Any_Controlled.
389 (Find_Finalize_Address): New routine.
390 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
392 (Requires_Cleanup_Actions): Update the comment on freeze node
394 * exp_util.ads: Remove comment on generated code for
395 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
396 is better to simply look in the body.
397 * freeze.adb (Freeze_All): Update the comment of finalization
398 collections. Replace the call to Associated_Collection with
399 Finalization_Master. Replace the call to Build_Finalization_Collection
400 with Build_Finalization_Master.
401 * impunit.adb: Add a-undesu and s-stposu to the list of units.
402 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
404 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
405 Ada.Finalization. Add processing for children of System.Storage_Pools.
406 * rtsfind.ads: Remove the naming of second level children of
408 Remove Ada_Finalization_Heap_Management from the list of units.
409 Remove subtype Ada_Finalization_Child.
410 Remove the following subprogram entities:
414 RE_Finalization_Collection
415 RE_Finalization_Collection_Ptr
416 RE_Set_Finalize_Address_Ptr
418 Add the naming of second level children of System.Storage_Pools.
419 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
421 Add subtype System_Storage_Pools_Child.
422 Add the following subprogram entities to System.Finalization_Masters:
424 RE_Finalization_Master
425 RE_Finalization_Master_Ptr
427 Add the following subprogram entities to System.Storage_Pools.Subpools:
429 RE_Allocate_Any_Controlled
430 RE_Deallocate_Any_Controlled
431 RE_Root_Storage_Pool_With_Subpools
435 Move the following subprogram entities from
436 Ada.Finalization.Heap_Management to System.Finalization_Masters:
438 RE_Add_Offset_To_Address
443 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
444 Set_Associated_Collection with Set_Finalization_Master.
445 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
446 BIP_Finalization_Master is created.
447 * s-finmas.adb: New unit System.Finalization_Masters.
448 * s-finmas.ads: New unit System.Finalization_Masters.
449 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
450 * s-stposu.ads, s-stposu.adb: New unit implementing
451 System.Storage_Pools.Subpools.
453 2011-08-29 Bob Duff <duff@adacore.com>
455 * tbuild.adb: Add assertion.
457 2011-08-29 Thomas Quinot <quinot@adacore.com>
459 * s-pooglo.adb: Minor reformatting.
461 2011-08-29 Ed Schonberg <schonberg@adacore.com>
463 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
464 an indexed component of a packed array whose element type is a record
465 with a representation clause different from that of the right-hand
466 side, generate a temporary to minimuze the number of bit-field
467 operations generated.
469 2011-08-29 Ed Schonberg <schonberg@adacore.com>
471 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
472 declarations, and thus are likely insertion points for actions.
474 2011-08-29 Bob Duff <duff@adacore.com>
476 * einfo.ads: Minor comment fix.
478 2011-08-29 Robert Dewar <dewar@adacore.com>
480 * frontend.adb, gnat1drv.adb: Minor reformatting.
482 2011-08-29 Tristan Gingold <gingold@adacore.com>
484 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
485 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
486 space in front of the header.
488 2011-08-29 Johannes Kanig <kanig@adacore.com>
490 * frontend.adb (Frontend): Exit after creating Standard package when
492 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
495 2011-08-29 Robert Dewar <dewar@adacore.com>
497 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
498 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
499 snames.ads-tmpl: Minor reformatting.
501 2011-08-29 Philippe Gil <gil@adacore.com>
503 * prj.adb (Reset_Units_In_Table): New procedure.
504 Reset units to avoid access to freed memory.
506 2011-08-29 Thomas Quinot <quinot@adacore.com>
508 * get_scos.adb: When reading a P statement SCO without a pragma name
509 (from an older ALI file), ensure that the Pragma_Name component is set
510 to Unknown_Pragma (not left uninitialized).
512 2011-08-29 Vincent Celier <celier@adacore.com>
514 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
515 modified to compute correctly the object path of a SAL project that is
516 extending another library project.
517 (Write_Path_File): New procedure.
518 * makeutl.ads (Directories): New table moved from Buildgpr
519 (Get_Directories): New procedure moved from Buildgpr
520 (Write_Path_File): New procedure
521 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
522 paths before binding SALs, instead of Set_Ada_Paths.
523 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
525 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
526 (Current_Source_Path_File_Of): New function
527 (Set_Current_Object_Path_File_Of): New procedure
528 (Current_Source_Object_File_Of): New function
529 (Set_Current_Object_Path_File_Of): New procedure
530 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
531 (Current_Source_Path_File_Of): New function
532 (Set_Current_Object_Path_File_Of): New procedure
533 (Current_Source_Object_File_Of): New function
534 (Set_Current_Object_Path_File_Of): New procedure
536 2011-08-29 Ed Schonberg <schonberg@adacore.com>
538 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
539 packed entity, use a bit-field assignment only if there is no change of
542 2011-08-29 Thomas Quinot <quinot@adacore.com>
544 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
545 Is_RTU instead of using Chars comparisons.
547 2011-08-29 Thomas Quinot <quinot@adacore.com>
549 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
550 temporary object if the actual is constrained, and the discriminants
551 read from the stream don't match.
553 2011-08-29 Tristan Gingold <gingold@adacore.com>
555 * sem_attr.adb, exp_attr.adb: Add handling of
556 Attribute_System_Allocator_Alignment
557 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
558 Attribute_System_Allocator_Alignment.
559 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
560 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
561 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
562 get_target_system_allocator_alignment.
564 2011-08-29 Arnaud Charlet <charlet@adacore.com>
566 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
569 2011-08-29 Arnaud Charlet <charlet@adacore.com>
571 * exp_ch3.adb (In_Runtime): Fix typo.
573 2011-08-29 Bob Duff <duff@adacore.com>
575 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
577 2011-08-29 Ed Schonberg <schonberg@adacore.com>
579 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
580 and a separate tag assignment is generated, ensure that the tag
581 assignment is analyzed.
583 2011-08-29 Ed Schonberg <schonberg@adacore.com>
585 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
586 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
587 of statement lists that may contain local declarations.
588 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
589 duplicate the triggering statements needed for the expansion of this
590 construct, when the trigger is a dispatching call to a synchronized
593 2011-08-29 Arnaud Charlet <charlet@adacore.com>
595 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
596 * bindgen.adb: Add comments.
597 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
600 2011-08-29 Robert Dewar <dewar@adacore.com>
602 * exp_attr.adb: Minor reformatting.
603 Minor code reorganization and commenting.
604 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
607 2011-08-29 Thomas Quinot <quinot@adacore.com>
609 * get_scos.adb: Ignore chaining indicators not currently supported
612 2011-08-29 Arnaud Charlet <charlet@adacore.com>
614 * system.ads: Minor editing.
616 2011-08-29 Arnaud Charlet <charlet@adacore.com>
618 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
620 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
621 Attribute_Elab_Subp_Body.
622 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
623 * sem_util.adb: Update comments.
625 2011-08-29 Thomas Quinot <quinot@adacore.com>
627 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
628 pragma name for each SCO statement corresponding to a pragma.
630 2011-08-29 Arnaud Charlet <charlet@adacore.com>
632 * opt.ads: Minor editing.
634 2011-08-29 Yannick Moy <moy@adacore.com>
636 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
637 that only made sense for CodePeer mode.
639 2011-08-29 Jose Ruiz <ruiz@adacore.com>
641 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
642 which is no longer used.
643 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
644 handling of the 64-bit division check.
645 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
647 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
650 2011-08-29 Thomas Quinot <quinot@adacore.com>
652 * get_scos.adb: Minor reformatting.
654 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
656 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
657 statement list is wrapped in a block, the block is explicitly analyzed
658 in order to properly redecorate the entities and create a servicing
661 2011-08-29 Tristan Gingold <gingold@adacore.com>
663 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
664 (Set_Zero_Cost_Handling): Remove.
666 2011-08-29 Thomas Quinot <quinot@adacore.com>
668 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
670 2011-08-29 Geert Bosch <bosch@adacore.com>
672 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
673 instruction, as the latter may produce -0.0, which is not a valid VAX
675 (Neg_G): Likewise for VAX F float.
677 2011-08-29 Robert Dewar <dewar@adacore.com>
679 * exp_util.adb: Minor reformatting.
681 2011-08-29 Yannick Moy <moy@adacore.com>
683 * sem_ch3.adb: Minor comment update.
685 2011-08-29 Thomas Quinot <quinot@adacore.com>
687 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
690 2011-08-29 Thomas Quinot <quinot@adacore.com>
692 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
693 current statement sequence on a generic instantiation or a subprogram
696 2011-08-29 Robert Dewar <dewar@adacore.com>
698 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
701 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
703 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
704 Correct the check which involves the freeze node of a controlled or
705 access-to-controlled type.
707 2011-08-29 Geert Bosch <bosch@adacore.com>
709 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
711 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
714 2011-08-29 Yannick Moy <moy@adacore.com>
716 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
717 for every index type and component type that is not a subtype_mark.
718 (Process_Subtype): Set Etype of subtype.
720 2011-08-29 Robert Dewar <dewar@adacore.com>
722 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
723 reorganization. Minor reformatting.
725 2011-08-29 Steve Baird <baird@adacore.com>
727 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
728 for CodePeer and ALFA modes.
730 2011-08-29 Ed Schonberg <schonberg@adacore.com>
732 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
733 that comes from an enclosing scope if it is not the renaming of an
734 actual, to handle properly a spurious ambiguity in an instance.
736 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
738 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
739 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
740 use it instead of the Esize of the first parameter.
741 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
743 <Size>: Likewise. Call it for composite types on the RM size.
745 2011-08-29 Yannick Moy <moy@adacore.com>
747 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
748 * sem_util.adb (Unique_Name): Correct behaviour for names of
751 2011-08-29 Yannick Moy <moy@adacore.com>
753 * sem_prag.adb (Check_Precondition_Postcondition): In formal
754 verification mode, analyze pragma expression for correctness, for
755 pre/post on library-level subprogram, as it is not expanded later.
757 2011-08-29 Yannick Moy <moy@adacore.com>
759 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
760 in formal verification.
762 2011-08-29 Thomas Quinot <quinot@adacore.com>
764 * sem_util.adb: Minor reformatting.
765 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
767 * par_sco.ads, par_sco.adb: Update comments.
769 2011-08-29 Yannick Moy <moy@adacore.com>
771 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
772 associated getter/setter.
773 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
775 2011-08-29 Vincent Celier <celier@adacore.com>
777 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
778 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
779 with declarations for Language_Kind and Dependency_Kind for Ada.
780 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
781 (Process_Compiler): Take into account the new attributes Dependency_Kind
783 (Check_Configuration): Check if language kind is unit based, not if the
784 language name is Ada.
785 (Process_Exceptions_Unit_Based): Ditto
786 (Add_Language): Remove default additions of language and dependency kind
787 * prj.ads: Minor comment change
788 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
790 2011-08-29 Johannes Kanig <kanig@adacore.com>
792 * debug.adb: Update comments.
794 2011-08-24 Joseph Myers <joseph@codesourcery.com>
796 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
797 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
798 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
799 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
800 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
802 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
804 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
805 (GNATLIBCFLAGS_FOR_C): Replace
806 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
807 (gnatlib-shared-default, gnatlib-shared-dual-win32)
808 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
809 (gnatlib-sjlj, gnatlib-zcx): Likewise.
811 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
813 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
815 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
817 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
819 2011-08-05 Nicolas Roche <roche@adacore.com>
821 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
822 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
824 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
826 2011-08-05 Matthew Heaney <heaney@adacore.com>
828 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
829 subprogram bodies declared out-of-order.
831 2011-08-05 Yannick Moy <moy@adacore.com>
833 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
834 entities directly in package Standard, otherwise skip the standard
837 2011-08-05 Robert Dewar <dewar@adacore.com>
839 * a-cbmutr.adb: Minor reformatting
840 (Allocate_Node): refactor node allocation algorithm
842 2011-08-05 Robert Dewar <dewar@adacore.com>
844 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
845 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
847 (Analyze_Pragma, case Check_Policy): Ditto.
848 * sem_prag.ads (Check_Disabled): New function
849 * snames.ads-tmpl: Add Name_Disable.
851 2011-08-05 Robert Dewar <dewar@adacore.com>
853 * gnat_rm.texi: Document implementation-defined policy DISABLE for
854 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
856 2011-08-05 Ed Schonberg <schonberg@adacore.com>
858 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
859 that appears in a generic formal part and applies to a formal
862 2011-08-05 Robert Dewar <dewar@adacore.com>
864 * a-cbmutr.ads: Minor reformatting.
866 2011-08-05 Matthew Heaney <heaney@adacore.com>
868 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
869 to check count, check sign of value instead.
870 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
871 (Copy_Subtree): allocate copy of source element
872 (Equal_Subtree): compare elements, not access objects
874 2011-08-05 Vincent Celier <celier@adacore.com>
876 * gnat_ugn.texi: Fix VMS alternative.
878 2011-08-05 Thomas Quinot <quinot@adacore.com>
880 * sem_ch11.adb: Add comment.
882 2011-08-05 Robert Dewar <dewar@adacore.com>
884 * exp_util.adb: Minor comment fix.
886 2011-08-05 Robert Dewar <dewar@adacore.com>
888 * scng.adb (Error_Unterminated_String): Improve flag position when
891 2011-08-05 Matthew Heaney <heaney@adacore.com>
893 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
895 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
896 multiway tree containers.
898 2011-08-05 Robert Dewar <dewar@adacore.com>
900 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
901 * stylesw.adb: Implement -gnatyC to control comment spacing
902 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
904 * usage.adb: Add line for -gnatyC.
906 2011-08-05 Robert Dewar <dewar@adacore.com>
908 * gnat_ugn.texi: Document -gnatyC.
909 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
910 synonym for COMMENTS2).
912 2011-08-05 Robert Dewar <dewar@adacore.com>
914 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
915 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
916 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
917 a-comutr.ads, lib-xref.adb: Minor reformatting.
919 2011-08-05 Robert Dewar <dewar@adacore.com>
921 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
922 warning if there is an exception handler present.
924 2011-08-05 Pascal Obry <obry@adacore.com>
926 * a-iteint.ads: Fix copyright year.
928 2011-08-05 Thomas Quinot <quinot@adacore.com>
930 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
931 statement SCO for a USE clause or a representation clause.
933 2011-08-05 Yannick Moy <moy@adacore.com>
935 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
936 between body and spec for stub.
937 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
938 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
939 pragma precondition or postcondition, for which the enclosing
940 subprogram or package in the AST is not the desired one, return empty.
942 2011-08-05 Thomas Quinot <quinot@adacore.com>
944 * g-expect.adb: Minor reformatting.
946 2011-08-05 Bob Duff <duff@adacore.com>
948 * a-fihema.adb: Comment out OS_Lib.
950 2011-08-05 Matthew Heaney <heaney@adacore.com>
952 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
953 (unbounded multiway tree containers) and a-iteint.ads.
954 * a-comutr.ads, a-comutr.adb:
955 This is the new Ada 2012 unit for unbounded multiway tree containers
956 * a-cimutr.ads, a-cimutr.adb
957 This is the new Ada 2012 unit for indefinite multiway tree containers
958 * a-iteint.ads: New file.
960 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
962 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
964 2011-08-05 Bob Duff <duff@adacore.com>
966 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
968 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
970 2011-08-05 Ed Schonberg <schonberg@adacore.com>
972 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
973 general indexing aspects of Ada2012. Called when analyzing indexed
974 components when other interpretations fail.
975 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
976 in an expression context where overloading is meaningful. This excludes
977 the occurrence in an aspect specification (efficiency only).
978 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
979 related to iterators can be set by an attribute specification, but
981 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
982 Constant_Indexing and Variable_Indexing.
983 (Check_Indexing_Functions): New procedure to perform legality checks.
984 Additional semantic checks at end of declarations.
986 2011-08-05 Sergey Rybin <rybin@adacore.com>
988 * tree_io.ads: Update ASIS_Version_Number because of the change of the
989 order of calling Tree_Write/Tree_Read routines made for aspects.
991 2011-08-05 Bob Duff <duff@adacore.com>
993 * a-fihema.adb (Finalize): Fix race condition.
995 2011-08-05 Yannick Moy <moy@adacore.com>
997 * sem_ch12.adb (Analyze_Package_Instantiation,
998 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
1001 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1003 * sem_type.adb (Specific_Type): in an instance, the type-specific
1004 operand of an equality check that involves null may have a private
1005 type. Use full view to determine legality of construct.
1007 2011-08-05 Vincent Celier <celier@adacore.com>
1009 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1010 delete or close the file when the call to gnatmake was successful.
1012 2011-08-05 Yannick Moy <moy@adacore.com>
1014 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
1015 Global_Discard_Names.
1017 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1019 * sinfo.ads: comments on use of entity field for aspect specifications.
1021 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1023 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
1024 node is not itself an entity but a selected component, it is a
1025 rewritten parameterless call to an en enclosing synchronized operation,
1026 and this expansion will be performed again in the instance, so there is
1027 no global information to preserve.
1029 2011-08-05 Javier Miranda <miranda@adacore.com>
1031 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
1032 for renamings of predefined primitives.
1033 (In_Predef_Prims_DT): New subprogram.
1035 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1037 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
1038 possible interpretation of name is a reference type, add an
1039 interpretation that is the designated type of the reference
1040 discriminant of that type.
1041 * sem_res.adb (resolve): If the interpretation imposed by context is an
1042 implicit dereference, rewrite the node as the deference of the
1043 reference discriminant.
1044 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
1045 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
1046 parent type or base type.
1047 * sem_ch4.adb (Process_Indexed_Component,
1048 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
1049 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
1050 Check for implicit dereference.
1051 (List_Operand_Interps): Indicate when an implicit dereference is
1053 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
1055 2011-08-05 Thomas Quinot <quinot@adacore.com>
1057 * scos.ads: Update documentation of SCO table. Pragma statements can now
1058 be marked as disabled (using 'p' instead of 'P' as the statement kind).
1059 * par_sco.ads, par_sco.adb: Implement the above change.
1060 (Process_Decisions_Defer): Generate a P decision for the first parameter
1061 of a dyadic pragma Debug.
1062 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
1064 * put_scos.adb: Code simplification based on above change.
1066 2011-08-05 Robert Dewar <dewar@adacore.com>
1068 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
1069 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
1070 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
1071 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
1073 2011-08-05 Bob Duff <duff@adacore.com>
1075 * a-stunau.ads, g-spipat.adb: Update comments.
1077 2011-08-05 Bob Duff <duff@adacore.com>
1079 * a-fihema.ads: Minor comment fix.
1080 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
1082 (Attach, Detach): Remove some unnecessary code.
1083 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
1085 2011-08-05 Bob Duff <duff@adacore.com>
1087 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
1088 allocation for Objects component. This simplifies the code somewhat. It
1089 is also a little more efficient in the not-so-unusual case where there
1090 are no controlled objects allocated.
1091 Make Finalization_Started flag atomic.
1092 (Finalize): Avoid unnecessary detachment of items from the list.
1093 (pcol): Minor cleanup.
1095 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1097 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
1098 package whose name is the same as that of the generic unit, or its
1101 2011-08-05 Bob Duff <duff@adacore.com>
1103 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
1104 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
1105 Minor comment fixes.
1107 2011-08-05 Arnaud Charlet <charlet@adacore.com>
1109 * make.adb (Linking_Phase): No longer need to set source search path
1110 before calling gnatlink in CodePeer mode.
1111 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
1112 gcc in CodePeer mode, since the binder generated file no longer has a
1114 * switch.ads, switch.adb (Is_Language_Switch): Removed.
1115 * switch-c.adb: Update comment.
1117 2011-08-05 Thomas Quinot <quinot@adacore.com>
1119 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
1121 2011-08-05 Nicolas Roche <roche@adacore.com>
1123 * gnat_ugn.texi: Fix minor syntax error issue.
1125 2011-08-05 Vincent Celier <celier@adacore.com>
1127 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
1128 delete or close the file when the call to gnatmake returns a non
1129 successful return code.
1131 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1133 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
1134 check, indicate that the copy of the original node does not come from
1135 source, to prevent an infinite recursion of the expansion.
1137 2011-08-05 Johannes Kanig <kanig@adacore.com>
1139 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1140 VC generation for subprogram bodies.
1142 2011-08-05 Yannick Moy <moy@adacore.com>
1145 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1146 the base type with the smallest allowed base type.
1148 2011-08-05 Sergey Rybin <rybin@adacore.com>
1150 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1153 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1155 * sem_ch12.ads: minor comment updates.
1157 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1159 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1160 instantiation and a formal package the compiler generates a package
1161 renaming declaration so that the generic name within the declaration
1162 is interpreted as a renaming of the instance. At the end of a formal
1163 package declaration, this renaming must become invisible.
1165 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1167 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1168 comparison and rely on concrete entities instead.
1170 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1172 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1173 and discriminants, to indicate that the type has an access discriminant
1174 that supports implicit dereference.
1175 * snames.ads-tmpl: Add names of aspects and attributes related to
1176 Ada2012 iterators: constant_indexing, default_iterator,
1177 iterator_element, implicit_dereference, variable_indexing.
1178 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1179 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1180 iterator-related aspects.
1181 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1183 2011-08-05 Sergey Rybin <rybin@adacore.com>
1185 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1186 metrics in gnatmetric to cover new kinds of coupling mentrics.
1188 2011-08-05 Steve Baird <baird@adacore.com>
1190 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1191 of calling the user-defined main subprogram.
1192 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1193 is set) Call_Main_Subprogram ahead of, as opposed to
1195 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1196 generation of a "with" of the user-defined main subprogram.
1197 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1198 (which is now called from Gen_Main instead).
1200 2011-08-05 Emmanuel Briot <briot@adacore.com>
1202 * projects.texi: Added reference to the Makefile package.
1204 2011-08-05 Thomas Quinot <quinot@adacore.com>
1206 * exp_ch7.adb: Minor comment rewording.
1208 2011-08-05 Ed Falis <falis@adacore.com>
1210 * env.c: Fix comment.
1212 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1214 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1215 character comparison and rely on concrete entities instead.
1217 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1219 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1220 suggested by AI95-0068.
1222 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1224 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1225 the two potential initialization calls. This accounts for any
1226 access-before-elaboration checks which may precede the initialization
1228 (Next_Suitable_Statement): New routine. Returns the next real statement
1229 after the input node while skipping generated checks.
1230 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1231 with comment on usage.
1232 Do not generate Elaborate_All when the trigger is a finalization call
1233 coming from a type init proc.
1234 (Check_Elab_Call): Propagate the initialization procedure context to
1235 subsequent calls to Check_A_Call.
1236 (Check_Internal_Call_Continue): Propagate the initialization procedure
1237 context to subsequent calls to Check_Elab_Call.
1238 (Is_Finalization_Procedure): New routine. Returns True if the input
1239 entity denotes a [Deep_]Finalize routine.
1240 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1241 along with comment on usage.
1243 2011-08-05 Vadim Godunko <godunko@adacore.com>
1245 * s-atocou.ads: Add list of supported platforms.
1247 2011-08-05 Yannick Moy <moy@adacore.com>
1249 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1251 * opt.ads (Disable_ALI_File): new Boolean flag
1252 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1254 2011-08-05 Ed Falis <falis@adacore.com>
1256 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1257 environ is properly defined.
1259 2011-08-05 Vincent Celier <celier@adacore.com>
1261 * make.adb (Compilation_Phase): Exit immediately when all objects have
1262 been found up to date, to avoid multiple exit messages.
1263 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1264 same project for languages with no compiler.
1265 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1267 2011-08-05 Robert Dewar <dewar@adacore.com>
1269 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1270 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1271 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1272 s-atocou-builtin.adb: Minor reformatting.
1274 2011-08-05 Yannick Moy <moy@adacore.com>
1276 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1277 if the node to wrap is a pragma check, this node and enclosed
1278 expression are not expanded, so do not apply any transformations here.
1279 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1280 introducing transient scopes.
1282 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1284 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1285 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1286 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1287 routine is available, so we use the default implementation of these
1289 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1290 support for copying attributes on VxWorks 6.
1292 2011-08-05 Yannick Moy <moy@adacore.com>
1294 * debug.adb: Remove use of -gnatd.D.
1295 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1296 * opt.ads: Simplify variables for ALFA mode, to keep one only
1297 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1300 2011-08-05 Vincent Celier <celier@adacore.com>
1302 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1303 Builder'Default_Switches.
1305 2011-08-05 Vincent Celier <celier@adacore.com>
1307 * makeusg.adb: Add lines for --create-map-file switches.
1309 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1311 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1312 profile is incomplete and the full view is available, replace it with
1314 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1315 incomplete, freezing the subprogram is delayed until the full view is
1317 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1318 fixed-point multiplication operator and the predefined operator is
1319 resolved in favor of the user-defined one.
1321 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1323 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1326 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1328 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1329 whether a type lacks user-defined Read or Write operations, or has a
1330 component that lacks them.
1331 * sem_attr.adb (Check_Stream_Attribute): if restriction
1332 No_Default_Stream_Attributes is active, verify that all subcomponent
1333 types of the target have user-defined stream operations, and report
1335 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1336 * exp_strm.adb: Build_Elementary_Input_Call,
1337 Build_Elementary_Write_Call): remove checks for restriction
1338 No_Default_Stream_Attributes, now checked in semantics.
1340 2011-08-04 Vincent Celier <celier@adacore.com>
1342 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1343 switches on the command line, look for all valid --RTS switches in the
1344 Builder switches and for each language use the first runtime name found
1345 to invoke gprconfig.
1346 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1347 command line and there is no auto-configuration.
1348 (Runtime_Name_Set_For): New function.
1350 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1352 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1353 elaborate initialization expression for variable Abort when processing
1354 a package body or a declaration.
1355 (Create_Finalizer): Propagate the package context when creating the
1356 exception-related variables.
1357 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1358 For_Package along with usage comment.
1360 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1362 * gcc-interface/Makefile.in: Clean up targets.
1363 Enable new package for atomic counters and copy-on-write implementation
1364 of unbounded strings on x86 platforms.
1365 * gcc-interface/Make-lang.in: Update dependencies.
1367 2011-08-04 Robert Dewar <dewar@adacore.com>
1369 * exp_ch7.adb: Minor reformatting.
1371 2011-08-04 Robert Dewar <dewar@adacore.com>
1373 * exp_strm.adb: Minor reformatting.
1375 2011-08-04 Vadim Godunko <godunko@adacore.com>
1377 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1378 operations are not supported.
1379 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1380 * s-atocou-x86.adb: New file.
1381 * Makefile.rtl: Add s-atocou.o file
1383 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1385 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1386 (Compilation_Phase): ... here.
1387 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1389 2011-08-04 Thomas Quinot <quinot@adacore.com>
1391 * Make-generated.in: Fix minor typo in comment.
1393 2011-08-04 Thomas Quinot <quinot@adacore.com>
1395 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1398 2011-08-04 Robert Dewar <dewar@adacore.com>
1400 * a-coinho.adb: Minor reformatting.
1402 2011-08-04 Robert Dewar <dewar@adacore.com>
1404 * a-coinho.ads: Minor reformatting.
1406 2011-08-04 Vadim Godunko <godunko@adacore.com>
1408 * s-atocou.ads, s-atocou.adb: New files.
1409 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1410 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1411 direct use of GCC's atomic builtins and replace them by use of new
1412 atomic counter package.
1414 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1416 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1418 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1420 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1421 with a call to Get_External_Tag.
1422 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1423 subprogram usage. Remove the guard against package declarations and
1424 bodies since Build_Cleanup_Statements is no longer invoked in that
1426 (Build_Components): Initialize Tagged_Type_Stmts when the context
1427 contains at least one library-level tagged type.
1428 (Build_Finalizer): New local variables Has_Tagged_Types and
1429 Tagged_Type_Stmts along with associated comments on usage. Update the
1430 logic to include tagged type processing.
1431 (Create_Finalizer): Insert all library-level tagged type unregistration
1432 code before the jump block circuitry.
1433 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1434 (Expand_N_Package_Declaration): Remove the call to
1435 Build_Cleanup_Statements.
1436 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1437 unregister the external tag of a tagged type.
1438 (Processing_Actions): Reimplemented to handle tagged types.
1439 (Process_Declarations): Detect the declaration of a library-level
1440 tagged type and carry out the appropriate actions.
1441 (Unregister_Tagged_Types): Removed. The machinery has been directly
1442 merged with Build_Finalizer.
1444 2011-08-04 Robert Dewar <dewar@adacore.com>
1446 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1447 gnatls.adb, exp_ch3.adb: Minor reformatting.
1449 2011-08-04 Marc Sango <sango@adacore.com>
1451 * sem_attr.adb (Analyze_Attribute): Replace the message
1452 "invisible attribute of}" of the spark restriction violation in
1453 attribute reference by the simple message "invisible attribute of type".
1454 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1455 two insertion characters: '&' and '}'.
1457 2011-08-04 Vadim Godunko <godunko@adacore.com>
1459 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1460 * a-coinho.ads, a-coinho.adb: New file.
1461 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1463 2011-08-04 Nicolas Roche <roche@adacore.com>
1465 * alfa_test.adb: Not all ali files are containing alfa information even
1466 if compiled with -gnatd.F. So suppress warning about missing ALFA
1469 2011-08-04 Yannick Moy <moy@adacore.com>
1471 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1473 * put_alfa.adb: Check that scope name is not empty.
1475 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1477 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1478 Needs_Elementary_Stream_Operation, to determine whether user-defined
1479 Read and Write attributes are available for the elementary components
1480 of the given type. If only the predefined attributes are available,
1481 then when restriction No_Default_Stream_Attributes is active the
1482 predefined stream attributes for the composite type cannot be created.
1484 2011-08-04 Robert Dewar <dewar@adacore.com>
1486 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1487 Put routines in alpha order
1489 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1491 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1492 * gcc-interface/Make-lang.in: Update dependencies.
1494 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1496 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1497 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1500 2011-08-04 Robert Dewar <dewar@adacore.com>
1502 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1503 lib-xref-alfa.adb: Minor reformatting.
1505 2011-08-04 Marc Sango <sango@adacore.com>
1507 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1508 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1509 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1512 2011-08-04 Tristan Gingold <gingold@adacore.com>
1514 * bindgen.adb (Gen_Adainit_C): Remove.
1515 (Gen_Adafinal_C): Ditto.
1516 (Gen_Elab_Externals_C): Ditto.
1517 (Gen_Elab_Calls_C): Ditto.
1518 (Gen_Elab_Order_C): Ditto.
1519 (Gen_Elab_Defs_C): Ditto.
1520 (Gen_Finalize_Library_C): Ditto.
1521 (Gen_Finalize_Library_Defs_C): Ditto.
1522 (Gen_Main_C): Ditto.
1523 (Gen_Output_File_C): Ditto.
1524 (Gen_Restrictions_C): Ditto.
1525 (Gen_Versions_C): Ditto.
1526 (Write_Info_Ada_C): Ditto.
1527 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1528 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1529 Always call Gen_Output_File_Ada.
1530 * gnatlink.adb (Begin_Info): Now a constant.
1532 (Ada_Bind_File): Remove
1533 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1534 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1535 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1536 * opt.ads (Ada_Bind_File): Remove.
1538 2011-08-04 Thomas Quinot <quinot@adacore.com>
1540 * projects.texi: Document target-specific directory in default project
1543 2011-08-04 Thomas Quinot <quinot@adacore.com>
1545 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1548 2011-08-04 Yannick Moy <moy@adacore.com>
1550 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1551 opt.ads, lib-xref.ads: Code clean up.
1553 2011-08-04 Yannick Moy <moy@adacore.com>
1555 * gnat_rm.texi: Update description of Test_Case
1556 * gnat_ugn.texi: Typo.
1558 2011-08-04 Ed Falis <falis@adacore.com>
1560 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1562 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1564 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1565 it is of type Root_Controlled. This action eliminates fields Prev and
1566 Next from type equality.
1568 2011-08-04 Yannick Moy <moy@adacore.com>
1570 * lib-xref-alfa.adb: Correct typo.
1572 2011-08-04 Matthew Heaney <heaney@adacore.com>
1574 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1577 2011-08-04 Yannick Moy <moy@adacore.com>
1579 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1580 (Analyze_Pragma): allow static string expression for name of Test_Case,
1581 instead of simply string literals.
1582 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1585 2011-08-04 Vincent Celier <celier@adacore.com>
1587 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1588 case suffixes to find truncated main sources.
1590 2011-08-04 Tristan Gingold <gingold@adacore.com>
1592 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1593 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1594 (Compute_Current_Task): Ditto.
1596 2011-08-04 Tristan Gingold <gingold@adacore.com>
1598 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1600 2011-08-04 Yannick Moy <moy@adacore.com>
1602 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1603 library-level constant.
1604 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1605 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1606 used as selector of parameter association, in ALFA mode.
1608 2011-08-04 Robert Dewar <dewar@adacore.com>
1610 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1611 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1614 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1616 * make.adb (Linking_Phase): Set source search path before calling
1617 gnatlink in CodePeer mode.
1619 2011-08-04 Javier Miranda <miranda@adacore.com>
1621 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1622 Remove code which takes care of building TSDs.
1623 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1624 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1625 the accessibility check in VM targets.
1626 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1627 (Building_Static_DT): Now returns false for VM targets.
1628 (Build_VM_TSDs): Removed.
1629 (Expand_Interface_Conversion): Generate missing runtime check for
1630 conversions to interface types whose target type is unknown at compile
1632 (Make_VM_TSD): Add missing code to disable the generation of calls to
1633 Check_TSD if the tagged type is not defined at library level, or not
1634 has a representation clause specifying its external tag, or -gnatdQ is
1636 * exp_disp.ads (Build_VM_TSDs): Removed.
1637 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1638 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1639 register primitives in the dispatch tables in VM targets.
1640 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1641 initialization of class-wide interface objects in VM targets.
1642 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1645 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1647 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1648 when dotnet-ld cannot be found.
1650 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1652 * bindgen.adb: Simplify significantly generation of binder body file in
1654 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1655 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1658 2011-08-04 Yannick Moy <moy@adacore.com>
1660 * sem_prag.adb, sem.ads: Code cleanup.
1662 2011-08-04 Tristan Gingold <gingold@adacore.com>
1664 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1665 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1666 results if possible.
1667 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1668 * gnat_ugn.texi: Update dynamic stack usage section.
1670 2011-08-04 Steve Baird <baird@adacore.com>
1672 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1673 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1674 contains only a call to the user-defined main subprogram.
1675 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1676 call the "wrapper" subprogram instead of directly
1677 calling the user-defined main subprogram.
1679 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1681 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1682 alternatives of a case statement for controlled objects. Rename local
1683 variable A to Dead_Alt.
1684 (Expand_N_If_Statement): Check the then and else statements of an if
1685 statement for controlled objects. Check the then statements of all
1686 elsif parts of an if statement for controlled objects.
1687 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1689 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1690 detects a loop associated with the expansion of an array object.
1691 Augment the processing of the loop statements to account for a possible
1692 wrap done by Process_Statements_For_Controlled_Objects.
1693 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1694 statements and abortable part of an asynchronous select for controlled
1696 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1697 conditional entry call for controlled objects.
1698 (Expand_N_Selective_Accept): Check the alternatives of a selective
1699 accept for controlled objects.
1700 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1701 alternatives of a timed entry call for controlled objects.
1702 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1703 exception handler for controlled objects.
1704 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1705 Add formal parameter Nested_Constructs along with its associated
1707 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1708 Requires_Cleanup_Actions.
1709 (Process_Statements_For_Controlled_Objects): New routine.
1710 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1711 routine. Inspect a node which contains a non-handled sequence of
1712 statements for controlled objects. If such an object is found, the
1713 statements are wrapped in a block.
1715 2011-08-04 Bob Duff <duff@adacore.com>
1717 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1718 need to compare with Class_Wide_Type (T2), in order to get at the
1719 original class-wide type node.
1720 * sem_type.ads (Covers): Improve the comment.
1721 * einfo.ads (Class_Wide_Type): Improve the comment.
1722 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1723 the type of the Deref.
1725 2011-08-04 Yannick Moy <moy@adacore.com>
1727 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1728 separate declarations.
1729 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1730 check identifier of pragma argument.
1731 (Chain_TC): check that no other test case associated to the same entity
1732 share the same name.
1733 (Check_Test_Case): disallow test case inside subprogram body
1734 (Analyze_Pragma): correct call to check identifier and not argument
1735 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1736 function gets name from test case pragma.
1738 2011-08-04 Yannick Moy <moy@adacore.com>
1740 * gnat_rm.texi: Document new pragma and aspect.
1741 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1742 (No_Duplicates_Allowed): new constant array defining whether duplicates
1743 aspects of each kind can appear on the same declaration.
1744 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1745 field, which points to a node holding the previous Spec_PPC_List.
1746 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1747 through the indirection with Contract.
1748 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1749 * par-prag.adb (Prag): do nothing on Test_Case pragma
1750 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1752 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1753 component Ensures of Test_Case.
1754 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1755 (Analyze_Generic_Subprogram_Declaration,
1756 Analyze_Subprogram_Instantiation,
1757 Analyze_Abstract_Subprogram_Declaration,
1758 Analyze_Subprogram_Body_Helper,
1759 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1760 insert contract in subprogram node at point of definition
1762 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1763 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1764 corresponding pragma
1765 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1766 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1767 similar to the analysis of pre/post
1768 (Derive_Subprogram): insert contract in subprogram node at point of
1770 * sem_prag.adb, sem_prag.ads
1771 (Check_Arg_Is_String_Literal, Check_Identifier):
1772 new checking procedures to be called in treatment of pragmas
1773 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1774 pragma is well-formed. This does not check currently that 'Result is
1775 used only in the Ensures component of a Test_Case.
1776 (Analyze_Pragma): add case for Test_Case
1777 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1778 components of a Test_Case.
1779 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1780 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1781 pragma, treated as spec expressions.
1782 (Sig_Flags): add value -1 for Test_Case.
1783 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1784 Get_Requires_From_Test_Case_Pragma): getters for both expression
1785 components of a Test_Case.
1786 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1787 indirection between an entry or [generic] subprogram entity and its
1788 pre/post + test-cases.
1789 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1790 get/set for fields of an N_Contract node.
1791 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1792 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1793 names and pragma for Test_Case.
1794 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1796 2011-08-04 Vincent Celier <celier@adacore.com>
1798 * gnat_ugn.texi: Improve documentation of gnatmake switch
1799 --source-info-file=.
1801 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1803 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1804 type). Initialize Atyp to the appropriate type which is later checked
1805 for completion. Rewrite the assertion associated with private type
1808 2011-08-04 Ed Falis <falis@adacore.com>
1810 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1811 initialize the number of CPUs.
1813 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1815 * sem_type.adb (Disambiguate): New subsidiary routine
1816 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1817 equality on an anonymous access type whose designated type is private
1818 does not lead to an ambiguity with the universal access equality
1819 operator in the body or child units of the defining package. The same
1820 is true for a multiplication operator on a private type completed with
1823 2011-08-04 Javier Miranda <miranda@adacore.com>
1825 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1826 (Normalize_Scalars_Config): Removed.
1828 (Register_Opt_Config_Switches): Remove registering config values of
1829 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1830 (Restore_Opt_Config_Switches): Remove code which restores the values of
1831 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1832 Init_Or_Norm_Scalars.
1833 (Save_Opt_Config_Switches): Remove code which saves values of
1834 Init_Or_Norm_Scalars and Normalize_Scalars.
1835 (Set_Opt_Config_Switches): Remove code which restores config values of
1836 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1837 Init_Or_Norm_Scalars.
1839 2011-08-04 Yannick Moy <moy@adacore.com>
1841 * frontend.adb (Frontend): remove previous patch to avoid full
1842 qualification in ALFA mode.
1843 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1844 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1845 unique name for an entity, which could be used to identify the entity
1846 across compilation units.
1848 2011-08-04 Thomas Quinot <quinot@adacore.com>
1851 (Initialize_Default_Project_Path): Add target specific directory
1852 ($prefix/$target/lib/gnat) in front of project path in all cases
1853 (making gnatmake's behaviour consistent with gprbuild).
1854 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1855 Pass target name from Sdefault to project subsystem.
1856 * gnatls.adb: Show new target specific default project directory.
1858 2011-08-04 Johannes Kanig <kanig@adacore.com>
1860 * cstand.adb: Add Information to Identifier in Standard
1861 (Identifer_For): Set Entity to the corresponding entity
1863 2011-08-04 Sergey Rybin <rybin@adacore.com>
1865 * gnat_ugn.texi: Update doc on gnatcheck.
1867 2011-08-04 Yannick Moy <moy@adacore.com>
1869 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1872 2011-08-04 Yannick Moy <moy@adacore.com>
1874 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1875 performing expansion.
1876 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1877 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1878 it is not called in ALFA mode.
1880 2011-08-04 Emmanuel Briot <briot@adacore.com>
1882 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1883 after all, so removed.
1885 2011-08-04 Sergey Rybin <rybin@adacore.com>
1887 * vms_data.ads: Add missing VMS qualifiers.
1889 2011-08-04 Emmanuel Briot <briot@adacore.com>
1891 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1892 the list of files on the command line after processing it through
1895 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1897 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1898 processing for .NET/JVM. These targets can now benefit from
1899 Raise_From_Controlled_Operation and they share the same processing with
1901 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1902 These targets need transient scopes in order to properly finalize short
1903 lived controlled objects.
1904 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1905 NET/JVM. These targets can now benefit from
1906 Raise_From_Controlled_Operation and they share the same processing with
1909 2011-08-04 Geert Bosch <bosch@adacore.com>
1911 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1913 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1915 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1916 Expand_Record_Aggregate, to determine whether aggregate must be
1917 expanded into assignments. This is the case if the ancestor part is
1918 private, regarless of the setting of the flag Has_Private_Ancestor.
1920 2011-08-04 Ed Falis <falis@adacore.com>
1922 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1924 2011-08-04 Bob Duff <duff@adacore.com>
1926 * sinfo.ads: Fix comment.
1928 2011-08-04 Steve Baird <baird@adacore.com>
1930 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1931 choose a package name in much the same way as is
1932 done for JGNAT when VM_Target /= No_VM, except that
1933 a slightly more distinctive prefix string is used.
1935 2011-08-04 Emmanuel Briot <briot@adacore.com>
1937 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1938 gnatmake command line.
1939 This behavior was never documented (and was supported only because of
1940 an early bug in the code). This case might lead to ambiguous cases
1941 (between unit names and truncated base names without suffixes).
1943 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1945 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1946 Remove the external tag of a tagged type from the internal hash table.
1947 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1948 expanded usage of the routine. Strenghten the check for Is_Master. Add
1949 processing for tagged types.
1950 (Build_Finalizer): Create all the necessary lists used in finalizer
1951 creation when the processed context is a package that may contain
1953 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1954 Requires_Cleanup_Actions.
1955 (Expand_N_Package_Body): Package bodies may need clean up code
1956 depending on whether they contain tagged types.
1957 (Expand_N_Package_Declaration): Package declarations may need clean up
1958 code depending on whether they contain tagged types.
1959 (Unregister_Tagged_Types): New routine. Search through a list of
1960 declarations or statements, looking for non-abstract Ada tagged types.
1961 For each such type, generate code to unregister the external tag.
1962 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1963 Requires_Cleanup_Actions.
1964 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1965 through a list of declarations or statements looking for non-abstract
1966 Ada tagged types or controlled objects.
1967 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1968 Requires_Cleanup_Actions.
1969 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1970 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1973 2011-08-04 Vincent Celier <celier@adacore.com>
1975 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1976 has Ada sources, not project Project, because if the root project
1977 Project has no sources of its own, all projects will be deemed without
1980 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1982 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1983 of the No_Param_Proc acc-to-subp type used for initialization of
1984 __gnat_finalize_library_objects so that it's declared at library level
1985 rather than nested inside of the adainit routine.
1987 2011-08-04 Javier Miranda <miranda@adacore.com>
1989 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1990 if the tagged type has a representation clause which specifies its
1993 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1995 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1996 Remove previous procedure with that name.
1997 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1999 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
2000 subtype mark, the ancestor cannot have unknown discriminants.
2001 (Resolve_Record_Aggregate): if the type has invisible components
2002 because of a private ancestor, the aggregate is illegal.
2004 2011-08-04 Vincent Celier <celier@adacore.com>
2006 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
2007 account switches -gnat2005, -gnat12 and -gnat2012.
2009 2011-08-04 Bob Duff <duff@adacore.com>
2011 * s-tasdeb.ads: Minor comment fix.
2013 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2015 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
2017 * switch.ads, switch.adb (Is_Language_Switch): New function.
2019 2011-08-04 Vincent Celier <celier@adacore.com>
2021 * switch-c.adb: Minor comment addition.
2023 2011-08-04 Vincent Celier <celier@adacore.com>
2025 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
2026 ending with '=' is followed by a space (missing file name).
2028 2011-08-04 Pascal Obry <obry@adacore.com>
2030 * g-regist.ads: Fix size of HKEY on x86_64-windows.
2032 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2034 * sem_ch12.adb (Analyze_Associations): New routine
2035 Check_Overloaded_Formal_Subprogram to reject a formal package when
2036 there is a named association or a box initialisation for an overloaded
2037 formal subprogram of the corresponding generic.
2039 2011-08-04 Yannick Moy <moy@adacore.com>
2041 * alfa.ads (ALFA_Xref_Record): add component for type of entity
2042 * get_alfa.adb, put_alfa.adb: Read and write new component of
2044 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
2046 2011-08-04 Pascal Obry <obry@adacore.com>
2048 * urealp.adb: Minor reformatting.
2050 2011-08-04 Tristan Gingold <gingold@adacore.com>
2052 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
2053 Handle the case when Cleanup_Protected_Object returns Empty.
2055 2011-08-04 Yannick Moy <moy@adacore.com>
2057 * frontend.adb (Frontend): only qualify names in non-ALFA mode
2059 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2061 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
2062 call, ignore functions.
2064 2011-08-04 Geert Bosch <bosch@adacore.com>
2066 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
2069 2011-08-04 Emmanuel Briot <briot@adacore.com>
2071 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
2072 as an index for Builder'Switches. This conforms to the documentation.
2073 * make.adb (Insert_Project_Sources): avoid duplicate code
2075 2011-08-04 Emmanuel Briot <briot@adacore.com>
2077 * makeutl.adb (Complete_Mains): if the user has passed a relative file
2078 name on the command line (for instance "../dummy"), never assume it can
2081 2011-08-04 Tristan Gingold <gingold@adacore.com>
2083 * bindgen.adb: Remove code the reference or create the
2084 Break_Start/__gnat_break_start procedure.
2085 * s-stalib.adb (Break_Start): Removed.
2087 2011-08-04 Emmanuel Briot <briot@adacore.com>
2089 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
2090 shared with gprbuild.
2092 2011-08-04 Yannick Moy <moy@adacore.com>
2094 * par-ch4.adb (P_Primary): preferentially issue an error message about
2095 a missing parenthesis arount a conditional or case expression in Ada
2096 2012 mode, if we detect that the alignment is not correct for a
2099 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2101 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
2102 tag-to-class-wide conversion as needing finalization actions.
2103 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
2104 a tag-to-class-wide conversion as needing finalization actions.
2105 (Is_Finalizable_Transient): The result of a tag-to-class-wide
2106 conversion does not need finalization actions.
2107 (Is_Tag_To_CW_Conversion): New routine.
2108 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
2109 whether an object is the result of a tag-to-class-wide conversion.
2111 2011-08-04 Yannick Moy <moy@adacore.com>
2113 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
2114 the left-hand-side and right-hand-side of a conjunct are inserted when
2115 translating a pre- or postcondition
2116 * sem_ch6.adb: Correct typo in comment
2118 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2120 * gnat_rm.texi: Ravenscar does not prohibit dependence on
2121 Unchecked_Conversion and Unchecked_Deallocation.
2123 2011-08-04 Thomas Quinot <quinot@adacore.com>
2125 * make.adb: Minor reformatting.
2127 2011-08-04 Emmanuel Briot <briot@adacore.com>
2129 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
2130 sources in the project and its imported projects, but not in the whole
2133 2011-08-04 Emmanuel Briot <briot@adacore.com>
2135 * make.adb: Remove debug trace.
2137 2011-08-04 Vincent Celier <celier@adacore.com>
2139 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2140 path in canonical form, to be able to compare path names on platforms
2141 such as Windows or Darwin.
2143 2011-08-04 Thomas Quinot <quinot@adacore.com>
2145 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2146 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2147 * scos.ads: Update documentation accordingly.
2148 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2151 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2153 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2154 attribute only if prefix type is scalar.
2156 2011-08-04 Emmanuel Briot <briot@adacore.com>
2158 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2159 in gnatmake for specifying mains on the command line that do not belong
2160 to the main project. These mains must currently all belong to the same
2162 (Ultimate_Extension_Of): removed, since duplicated
2163 Ultimate_Extending_Project.
2165 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2167 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2169 (CodePeer_Mode_String): New.
2170 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2172 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2173 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2174 mode, since no useful elaboration subprogram is needed by CodePeer.
2175 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2176 In this mode, compile binder file with -gnatC and do stop after this
2179 2011-08-04 Vincent Celier <celier@adacore.com>
2181 * exp_ch7.adb: Minor comment fix.
2183 2011-08-04 Robert Dewar <dewar@adacore.com>
2185 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2186 exp_ch4.adb, makeutl.adb: Minor reformatting.
2188 2011-08-04 Emmanuel Briot <briot@adacore.com>
2190 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2191 Create several new subprograms to move code out of Make. This makes the
2192 code more readable, removes code duplication, and is a preparation work
2193 for adding support for aggregate projects.
2195 2011-08-04 Tristan Gingold <gingold@adacore.com>
2197 * s-po32gl.ads, s-po32gl.adb: New files.
2198 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2199 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2200 (Build_Finalization_Collection): Use it.
2201 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2202 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2204 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2205 * gcc-interface/Make-lang.in: Update dependencies.
2207 2011-08-04 Emmanuel Briot <briot@adacore.com>
2209 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2212 2011-08-04 Emmanuel Briot <briot@adacore.com>
2214 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2215 command line is not a file name, also check whether it could be a unit
2218 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2220 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2221 the header of the finalization routine.
2222 If the unit has no finalizer but is a body whose spec has one, then
2223 generate the decrement of the elaboration entity only.
2224 If the unit has a finalizer and is a spec, then do not generate the
2225 decrement of the elaboration entity.
2226 (Gen_Finalize_Library_C): Likewise.
2228 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2230 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2231 (Bounds_Size_Expression): Removed.
2232 (Double_Alignment_Of): New subsidiary routine.
2233 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2234 for a hole in the dope vector of unconstrained arrays due to different
2235 index and element alignments.
2237 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2239 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2240 raise program_error because body has not been seen yet.
2242 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2244 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2247 2011-08-04 Vincent Celier <celier@adacore.com>
2249 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2251 2011-08-04 Yannick Moy <moy@adacore.com>
2253 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2254 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2256 2011-08-04 Thomas Quinot <quinot@adacore.com>
2258 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2259 instantiation in RCI.
2261 2011-08-04 Emmanuel Briot <briot@adacore.com>
2263 * make.adb: Share more code with gprbuild
2265 2011-08-04 Emmanuel Briot <briot@adacore.com>
2267 * projects.texi: Added documentation for the IDE'Gnat project file
2270 2011-08-04 Nicolas Roche <roche@adacore.com>
2272 * gnat_rm.texi: Minor editing.
2274 2011-08-04 Javier Miranda <miranda@adacore.com>
2276 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2277 and the library case for VM targets.
2278 (Gen_Adainit_Ada): Likewise.
2280 2011-08-04 Robert Dewar <dewar@adacore.com>
2282 * g-altive.ads: Minor comment updates.
2283 * prj-nmsc.adb: Minor reformatting.
2285 2011-08-04 Javier Miranda <miranda@adacore.com>
2288 (Normalize_Scalars_Config): Value of the configuration switch set by
2289 pragma Normalize_Scalars when it appears in the gnat.adc file.
2290 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2291 to save and restore settings of this pragma.
2293 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2294 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2296 2011-08-04 Vincent Celier <celier@adacore.com>
2298 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2300 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2302 * makeutl.adb: Minor reformatting.
2304 2011-08-04 Olivier Hainque <hainque@adacore.com>
2306 * g-altive.ads: Update comments to reflect that only the soft
2307 binding is available today.
2309 2011-08-04 Robert Dewar <dewar@adacore.com>
2311 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2312 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2313 * gcc-interface/Make-lang.in: Update dependencies.
2315 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2317 * prj-env.adb: Remove local debug traces.
2319 2011-08-04 Yannick Moy <moy@adacore.com>
2321 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2322 was used instead of Hi_OK, which could cause a read of an uninitialized
2323 value later on. Detected while working on the new warning.
2324 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2326 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2327 in more cases, in order to detect more unreferenced values.
2328 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2329 object for expression, if any.
2331 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2333 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2334 the operand types instead of the Esize.
2336 2011-08-04 Steve Baird <baird@adacore.com>
2338 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2339 enable CodePeer_Mode.
2340 * bindusg.adb (Display): Add help message describing -P binder switch.
2341 * gnat_ugn.texi: Document -P binder switch.
2342 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2343 user-defined main program directly.
2344 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2345 user-defined main program in the context clause of the package body.
2347 2011-08-04 Yannick Moy <moy@adacore.com>
2349 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2350 duplicate of Defining_Entity
2351 (Get_Unique_Entity_For_Decl): rename function into
2352 Unique_Defining_Entity
2353 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2354 (Formal_Proof_On): remove synthesized flag
2355 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2356 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2357 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2358 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2359 Annotate (Formal_Proof)
2361 2011-08-04 Emmanuel Briot <briot@adacore.com>
2363 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2364 source files with non-standard naming schemes, in imported projects
2366 2011-08-04 Emmanuel Briot <briot@adacore.com>
2368 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2369 specified on the gprbuild command line, we need to compile all units
2370 within that file, not just the first one we find
2371 Fix error message for mains that are not found.
2373 2011-08-04 Thomas Quinot <quinot@adacore.com>
2375 * sem_ch6.adb: Update comment.
2376 * sem_ch12.adb: Minor reformatting.
2378 2011-08-04 Bob Duff <duff@adacore.com>
2380 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2381 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2382 race condition whose symptom is to fail to lock Parent. That, in turn,
2383 causes Parent.Awake_Count to be accessed without locking Parent, which
2384 causes another race condition whose symptom is that Parent.Awake_Count
2385 can be off by 1 (either too high or too low). The solution is to lock
2386 Parent unconditionally, and then lock Acceptor, before reading
2387 Acceptor.Terminate_Alternative.
2389 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2391 * debug.adb: Update comment.
2393 2011-08-04 Robert Dewar <dewar@adacore.com>
2395 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2396 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2397 exp_ch6.adb: Minor reformatting.
2399 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2401 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2404 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2406 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2408 2011-08-04 Thomas Quinot <quinot@adacore.com>
2410 * sinfo.ads: Minor reformatting.
2412 2011-08-04 Emmanuel Briot <briot@adacore.com>
2414 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2415 even if there is no location.
2417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2419 * sem_res.adb, sem_ch4.adb: move check for restriction
2420 No_Task_Hierarchy to resolve_allocator.
2422 2011-08-04 Thomas Quinot <quinot@adacore.com>
2424 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2425 This flag of N_Pragma nodes is not used, remove it as well as all of
2426 the associated circuitry.
2428 2011-08-04 Javier Miranda <miranda@adacore.com>
2430 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2431 runtime check on duplicated externa tags
2432 * debug.adb Document switch -gnatdQ.
2434 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2436 * a-fihema.ads: Minor typo fix.
2438 2011-08-04 Yannick Moy <moy@adacore.com>
2440 * sem_ch10.adb: Minor comment update.
2442 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2444 * einfo.adb: Update the node field usage to reflect the renaming of
2445 Return_Flag to Return_ Flag_Or_Transient_Decl.
2446 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2447 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2448 (Write_Field15_Name): Change Return_Flag to
2449 Return_Flag_Or_Transient_Decl.
2450 * einfo.ads: Rename node field Return_Flag to
2451 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2452 occurrences in entities.
2453 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2454 associated Inline pragma.
2455 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2456 associated Inline pragma.
2457 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2459 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2460 Return_Flag and Set_Return_Flag.
2461 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2462 objects generated for controlled transients declared inside an
2463 Exception_With_Actions. Update the calls to Return_Flag.
2464 (Process_Object_Declaration): Add code to add a null guard for hook
2465 objects generated for controlled transients declared inside an
2466 Exception_With_Actions. Update related comment.
2467 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2468 objects generated for controlled transients declared inside an
2469 Exception_With_Actions. Update the calls to Return_Flag.
2470 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2472 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2474 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2475 positional aggregate.
2477 2011-08-04 Vincent Celier <celier@adacore.com>
2479 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2480 SLOC only for pragmas.
2482 2011-08-04 Emmanuel Briot <briot@adacore.com>
2484 * projects.texi: Minor typo fix.
2486 2011-08-04 Emmanuel Briot <briot@adacore.com>
2488 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2489 on case-sensitive file systems.
2491 2011-08-04 Thomas Quinot <quinot@adacore.com>
2493 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2494 nested in a disabled pragma.
2495 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2496 enclosing pragma, if any, for X decisions.
2498 2011-08-04 Thomas Quinot <quinot@adacore.com>
2500 * sem_prag.adb: Minor reformatting.
2502 2011-08-04 Vincent Celier <celier@adacore.com>
2504 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2505 allowed in no run time mode.
2507 2011-08-04 Vincent Celier <celier@adacore.com>
2509 * make.adb (Check): When -gnatc is used, check for the source file
2510 inside the ALI file with a canonical case file name.
2512 2011-08-04 Emmanuel Briot <briot@adacore.com>
2514 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2515 overriding the separator.
2517 2011-08-04 Robert Dewar <dewar@adacore.com>
2519 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2520 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2522 2011-08-04 Robert Dewar <dewar@adacore.com>
2524 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2526 2011-08-04 Yannick Moy <moy@adacore.com>
2528 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2529 'Result only appears in postcondition of function.
2531 2011-08-04 Thomas Quinot <quinot@adacore.com>
2533 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2534 external tag, include the value of the external tag in the exception
2537 2011-08-04 Yannick Moy <moy@adacore.com>
2539 * sem_attr.adb (Result): modify error message for misplaced 'Result
2541 2011-08-04 Sergey Rybin <rybin@adacore.com>
2543 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2544 clear that the second argument must be an identifier.
2546 2011-08-04 Thomas Quinot <quinot@adacore.com>
2548 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2549 -fpreserve-control-flow, insert an IF statement on the barrier
2550 condition to ensure that a conditional branch instruction is generated.
2552 2011-08-04 Emmanuel Briot <briot@adacore.com>
2554 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2555 (Processing_Flags.Ignore_Missing_With): new flag.
2557 2011-08-04 Emmanuel Briot <briot@adacore.com>
2559 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2560 Source_List_File on case-insensitive systems where the file is actually
2561 on a case-sensitive file system (NFS,...).
2563 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2565 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2566 function return contains a controlled [extension] aggregate and the
2567 return statement is not part of a handled sequence of statements, wrap
2568 the return in a block. This ensures that all controlled temporaries
2569 generated during aggregate resolution will be picked up by the
2570 finalization machinery.
2572 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2574 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2575 components, freeze type before resolution, to ensure that default
2576 initializations are present for all components.
2577 * sem_res.adb (Resolve_Actuals): the designated object of an
2578 accces-to-constant type is a legal actual in a call to an
2579 initialization procedure.
2581 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2583 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2584 N_Unchecked_Type_Conversion to the possible containers of a renamed
2587 2011-08-04 Yannick Moy <moy@adacore.com>
2589 * par-ch13.adb (Aspect_Specifications_Present): recognize
2590 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2591 is issued in Strict mode.
2592 * par.adb: Fix typos in comments.
2594 2011-08-04 Yannick Moy <moy@adacore.com>
2596 * sem_attr.adb (Result): modify error message to take into account Post
2597 aspect when compiling Ada 2012 (or newer) code.
2599 2011-08-04 Nicolas Roche <roche@adacore.com>
2601 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2602 remove need for GCC exceptions.
2604 2011-08-04 Vincent Celier <celier@adacore.com>
2606 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2607 project, not the source file name.
2608 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2609 excluded, continue looking. This excluded source will only be returned
2610 if there is no other source with the same base name that is not locally
2613 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2615 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2616 private and one of the operands is a real literal, use a qualified
2617 expression rather than a conversion which is not meaningful to the
2620 2011-08-04 Yannick Moy <moy@adacore.com>
2622 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2623 corresponding aspect X'Class are allowed, proceed with analysis of the
2624 aspect instead of skipping it.
2626 2011-08-04 Tristan Gingold <gingold@adacore.com>
2628 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2629 This will allow to have an Ada implementation for the subprogram.
2631 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2633 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2634 completion and aspects are present, apply them to the entity for the
2635 type which is currently the partial view, but which is the one that
2637 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2638 applies to a partial view, indicate that the full view has predicates
2639 and delayed aspects.
2640 (Replace_Type_Reference): Handle properly predicates that apply to the
2641 full view of a private completion.
2643 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2645 * layout.adb (Layout_Type): For composite types, do not set Esize.
2646 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2648 (Size_Known): Look at the RM size of components instead of the Esize.
2649 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2650 issue warning and activate Implicit_Packing.
2651 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2652 if the Esize is not known.
2653 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2654 for elementary types only.
2655 (Analyze_Record_Representation_Clause): Look at the RM size instead
2656 of the Esize to issue errors.
2657 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2659 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2661 Look at the RM size instead of the Esize for types if the latter is
2663 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2665 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2667 * sem_type.adb: proper handling of equality not involving anonymous
2670 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2672 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2673 Vis_Decls. When creating a library-level finalizer for a package spec,
2674 both the declaration and body of the finalizer are inserted either in
2675 the visible or private declarations of the package spec.
2677 2011-08-04 Javier Miranda <miranda@adacore.com>
2679 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2680 use of the full-view of a type when invoking Is_Ancestor.
2681 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2682 the full-view of private parents is requested, then use also the
2683 full-view of the parent of the first derivation.
2685 2011-08-04 Tristan Gingold <gingold@adacore.com>
2687 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2688 instead of the locally imported procedure.
2689 * s-taprop-mingw.adb (Enter_Task): Ditto.
2690 * s-valrea.adb (Scan_Real): Ditto.
2691 * s-imgrea.adb (Set_Image_Real): Ditto.
2692 * s-flocon.ads: Make the package pure.
2694 2011-08-04 Thomas Quinot <quinot@adacore.com>
2696 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2697 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2698 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2699 New subprogram, moved here from...
2700 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2701 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2702 rewriting of the last argument into a procedure call statement here...
2703 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2706 2011-08-04 Thomas Quinot <quinot@adacore.com>
2708 * par_sco.adb: Minor reformatting.
2710 2011-08-04 Robert Dewar <dewar@adacore.com>
2712 * erroutc.adb: Minor reformatting.
2714 2011-08-04 Thomas Quinot <quinot@adacore.com>
2716 * par_sco.adb: Comment update.
2718 2011-08-04 Tristan Gingold <gingold@adacore.com>
2720 * s-flocon.ads: New file.
2721 * g-flocon.ads: Now a renaming of s-flocon.
2722 * Makefile.rtl: Add s-flocon.o
2724 2011-08-04 Javier Miranda <miranda@adacore.com>
2726 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2727 constrained, do not attempt to build a subtype of it.
2729 2011-08-04 Yannick Moy <moy@adacore.com>
2731 * errout.ads Change comments: remove 'R'M as an example where quotes
2732 are needed; add ALFA as another case where quotes are not needed
2733 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2734 case where quotes are not needed.
2735 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2736 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2737 Remove all occurrences of 'A'L'F'A
2739 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2741 * sem_ch13.adb: check legality of invariant pragma.
2743 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2745 * bindgen.adb: Add comments.
2747 2011-08-04 Yannick Moy <moy@adacore.com>
2749 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2751 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2752 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2754 2011-08-04 Robert Dewar <dewar@adacore.com>
2756 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2757 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2758 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2760 2011-08-04 Thomas Quinot <quinot@adacore.com>
2762 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2764 2011-08-04 Thomas Quinot <quinot@adacore.com>
2767 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2770 2011-08-04 Robert Dewar <dewar@adacore.com>
2772 * einfo.ads, exp_ch4.adb: Minor reformatting.
2774 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2776 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2778 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2780 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2781 type in all cases to compute list of primitive operations, because full
2782 view may be an itype that is not attached to the list of declarations.
2784 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2786 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2787 library has already been finalized.
2788 (Gen_Adafinal_C): Likewise.
2789 (Gen_Adainit_Ada): Generate an early return if the library has
2790 already been elaborated.
2791 (Gen_Adainit_C): Likewise.
2792 (Gen_Output_File_Ada): Generate an elaboration flag.
2793 (Gen_Output_File_C): Likewise.
2795 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2797 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2798 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2799 built in the first place.
2800 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2801 for CodePeer because Finalize_Address was not built to begin with.
2802 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2804 2011-08-04 Pascal Obry <obry@adacore.com>
2806 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2807 filenames, this ensures unicity of filenames across processes.
2809 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2811 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2812 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2813 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2814 Add False as the actual to From_Abort in the generated call to
2815 Raise_From_Controlled_Operation.
2817 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2819 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2820 so that the ali file name can be retrieved from outside of this package.
2821 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2822 doing nothing in the general case, but used to update the object file
2823 timestamp if directly generated by the backend.
2824 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2825 to a later time than the ali file one.
2827 2011-08-04 Yannick Moy <moy@adacore.com>
2829 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2830 entities whose body contains an Annotate pragma which forces formal
2832 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2833 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2834 Mark_Non_ALFA_Subprogram to pass in a message and node.
2835 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2836 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2837 surrounding subprogram.
2838 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2839 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2840 as not in ALFA is annotated with Formal_Proof being On, then an error
2841 is issued based on the additional parameters for message and node.
2842 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2843 * gcc-interface/Make-lang.in: Update dependencies.
2845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2847 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2848 Finalize_Address when CodePeer is enabled.
2850 2011-08-04 Pascal Obry <obry@adacore.com>
2852 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2853 the latter returns a pointer to a static buffer which is deallocated
2854 at the end of the routine.
2856 2011-08-04 Yannick Moy <moy@adacore.com>
2858 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2859 after index creation; mark unconstrained base array type generated as
2860 being in/not in ALFA as well
2861 (Make_Index): mark subtype created as in/not in ALFA
2862 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2863 over a loop as in/not in ALFA, depending on its type and form of loop
2866 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2868 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2869 directly to False on .NET and JVM.
2871 2011-08-04 Yannick Moy <moy@adacore.com>
2873 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2874 constraint that subtype must come from source code to be in ALFA, so
2875 that anonymous subtypes can be in ALFA too.
2877 2011-08-04 Yannick Moy <moy@adacore.com>
2879 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2880 reference for ALFA mode.
2881 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2882 procedure public so as to use it from formal verification back-end.
2884 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2886 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2887 invalid checks of the Parameter, making Remove_Switch not working
2890 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2892 * targparm.ads: Update header: no run-time exception is needed on this
2895 2011-08-04 Vincent Celier <celier@adacore.com>
2897 * a-fihema.adb: Use System.IO instead of GNAT.IO
2899 2011-08-04 Thomas Quinot <quinot@adacore.com>
2901 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2902 are forbidden in Compiler_Unit mode.
2904 2011-08-04 Robert Dewar <dewar@adacore.com>
2906 * sem_util.adb: Minor reformatting.
2908 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2910 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2911 library-level finalizers.
2912 (Gen_Finalize_Library_C): Update the import string for library-level
2914 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2915 library-level finalizer.
2916 * exp_ch7.adb: Remove with and use clauses for Stringt.
2917 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2918 Spec_Decl. Add local variable Body_Id. The names of library-level
2919 finalizers are now manually fully qualified and are no longer external.
2920 A single name is now capable of servicing .NET, JVM and non-VM targets.
2921 Pragma Export is no longer required to provide visibility for the name.
2922 (Create_Finalizer_String): Removed.
2923 (New_Finalizer_Name): New routine which mimics New_..._Name.
2925 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2927 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2928 elaboration counter to Standard_Short_Integer.
2929 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2930 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2931 (Gen_Elab_Externals_C): Likewise.
2933 2011-08-04 Ed Falis <falis@adacore.com>
2935 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2936 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2937 system-vxworks-mips.ads, system-vxworks-x86.ads
2938 (Always_Compatible_Rep): set to False for all VxWorks targets.
2940 2011-08-04 Robert Dewar <dewar@adacore.com>
2942 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2943 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2944 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2945 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2946 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2947 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2948 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2949 Minor reformatting and code reorganization.
2951 2011-08-04 Emmanuel Briot <briot@adacore.com>
2953 * projects.texi: Added doc for aggregate projects.
2955 2011-08-04 Emmanuel Briot <briot@adacore.com>
2957 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2958 Add support for overriding the Project_Path in aggregate projects.
2960 2011-08-04 Robert Dewar <dewar@adacore.com>
2962 * a-cofove.ads: Minor reformatting.
2964 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2966 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2967 on the generated code.
2968 (Build_Finalize_Statements): Update the comment on the generated code.
2969 (Build_Initialize_Statements): Update the comment on the generated code.
2970 (Build_Object_Declarations): Add local variable Result. The object
2971 declarations are now built in sequence.
2972 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2975 2011-08-04 Robert Dewar <dewar@adacore.com>
2977 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2979 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2981 * einfo.ads (Elaboration_Entity): Document new definition and use.
2982 (Elaboration_Entity_Required): Adjust to above change.
2983 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2984 * exp_ch12.adb: And with and use for Snames.
2985 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2986 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2987 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2988 <Check_Unit_Name>: Deal with N_Expanded_Name.
2989 <Attribute_Elaborated>: Extend to all unit names.
2990 * sem_elab.adb: And with and use for Uintp.
2991 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2992 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2993 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2994 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2995 from Gen_Adainit_Ada.
2996 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2997 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2998 case, do not call System.Standard_Library.Adafinal; instead call
2999 finalize_library if needed.
3000 (Gen_Adafinal_C): Likewise.
3001 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
3002 non-main program case.
3003 (Gen_Adainit_C): Generate a couple of external declarations here.
3004 In the main program case, set SSL.Finalize_Library_Objects.
3005 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
3006 (Gen_Elab_Calls_C): Likewise.
3007 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
3008 (Gen_Finalize_Library_C): Likewise. Generate a full function.
3009 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
3011 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
3012 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
3014 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
3015 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
3016 of external declarations. Call Gen_Finalize_Library_C.
3018 2011-08-04 Emmanuel Briot <briot@adacore.com>
3020 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
3021 Compute_Compilation_Phases): new subprogram.
3022 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
3023 The number of mains as well as the various compilation phases that
3024 need to be run are now project tree specific, since various
3025 aggregated trees might have different requirements. In particular,
3026 they do not all require bind or link phases.
3028 2011-08-04 Emmanuel Briot <briot@adacore.com>
3030 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
3031 (Project_Tree_Appdata): New type.
3032 It is now possible to associate application-specific data to a project
3033 tree. In particular, this is used in the gprbuild builder to avoid a
3034 number of global tables and htables, especially now that there can be
3035 several project trees loaded at once because of aggregate projects.
3036 (Debug_Name): new procedure.
3037 * projects.texi: Clarify syntax of "**" for Source_Dirs
3039 2011-08-03 Emmanuel Briot <briot@adacore.com>
3041 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
3042 the "roots" for a main.
3043 (Fill_From_Project): add support for aggregate projects. Main units
3044 in aggregated projects are now automatically added in the list of
3045 files to build (although this fails later on in gprbuild, because
3046 these files are not using the root proejct tree, so this needs
3048 * gcc-interface/Make-lang.in: Update dependencies.
3050 2011-08-03 Yannick Moy <moy@adacore.com>
3052 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
3053 conditional expression in ALFA.
3054 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
3055 expressions as not in ALFA.
3057 2011-08-03 Robert Dewar <dewar@adacore.com>
3059 * a-cofove.adb: Minor reformatting.
3061 2011-08-03 Emmanuel Briot <briot@adacore.com>
3063 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
3064 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
3066 These packages are more logically placed in the Queue package, since
3067 they manipulate the queue. It is also likely that they can be adapted
3068 for gnatmake, thus sharing more code.
3069 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
3070 that we could move the above.
3072 2011-08-03 Emmanuel Briot <briot@adacore.com>
3074 * errutil.adb (Finalize): clean up the list of error messages on exit.
3075 Calling this subprogram multiple times will no longer show duplicate
3076 error messages on stderr.
3078 2011-08-03 Emmanuel Briot <briot@adacore.com>
3080 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
3081 Getopt_Switches when we have already define a command line
3084 2011-08-03 Yannick Moy <moy@adacore.com>
3086 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
3087 in ALFA. Instead, they are considered as assertions to prove.
3088 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
3089 nodes as not in ALFA. Instead, include conditional expressions in ALFA
3090 if they have no ELSE part, or if they occur in pre- and postconditions,
3091 where the Condition cannot have side-effects in ALFA
3092 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
3093 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
3094 Instead, include type conversion between scalar types in ALFA.
3095 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
3096 if-and-only-if its type is in ALFA.
3098 2011-08-03 Thomas Quinot <quinot@adacore.com>
3100 * scos.adb, get_scos.adb, put_scos.adb
3101 New code letter for decisions: G (entry guard)
3103 (Traverse_Subprogram_Body): Rename to...
3104 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
3105 (Traverse_Protected_Body): New subprogram
3106 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
3107 protected bodies and entry bodies.
3109 2011-08-03 Yannick Moy <moy@adacore.com>
3111 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
3112 entities with get/set subprograms, which is set on procedure entities
3113 generated by the compiler for a postcondition.
3114 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
3115 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
3116 entity for a declaration
3117 (Get_Unique_Entity_For_Decl): new function returning an entity which
3118 represents a declaration, so that matching spec and body have the same
3121 2011-08-03 Robert Dewar <dewar@adacore.com>
3123 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
3124 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
3126 2011-08-03 Yannick Moy <moy@adacore.com>
3128 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
3129 library-level because retriction No_Implicit_Dynamic_Code in the
3130 front-end prevents its definition as a local subprogram
3131 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
3132 for reuse in other contexts
3133 (Traverse_Declarations_Or_Statements,
3134 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3135 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
3136 procedures take a callback parameter to be called on all declarations
3138 (Traverse_All_Compilation_Units): new generic function to traverse a
3139 compilation unit and call a callback parameter on all declarations
3141 2011-08-03 Javier Miranda <miranda@adacore.com>
3143 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3144 in Java since they are always enclosed in a namespace that
3145 differentiates them, and overloaded entities are supported by the VM.
3147 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3149 * checks.adb (Determine_Range): If a computed bound of an operation is
3150 outside the range of the base type of the expression, and overflow
3151 checks are enabled, the result is unknown and cannot be used for any
3152 subsequent constant folding.
3153 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3154 unknown, so is the result of the comparison.
3156 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3158 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3159 From_Abort. When finalization was triggered by an abort, propagate
3160 Standard'Abort_Signal rather than Program_Error.
3161 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3163 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3164 From_Abort. When finalization was triggered by an abort, propagate
3165 Standard'Abort_Signal rather than Program_Error.
3166 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3168 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3169 Abort_Id. Update the calls to Build_Object_Declarations and
3170 Build_Raise_Statement to include Abort_Id.
3171 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3172 calls to Build_Object_Declarations and Build_Raise_Statement to include
3174 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3175 calls to Build_Object_Declarations and Build_Raise_Statement to include
3177 (Build_Components): Create an entity for Abort_Id when exceptions are
3178 allowed on the target.
3179 (Build_Finalizer): New local variable Abort_Id.
3180 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3181 calls to Build_Object_Declarations and Build_Raise_Statement to include
3183 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3184 declaration of flag Abort_Id to preserve the original abort status
3185 before finalization code is executed.
3186 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3187 runtime routine Raise_From_Controlled_Operation.
3188 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3189 Abort_Id. Update the call to Build_Object_Declarations to include
3190 Abort_Id. Update the layout of the finalizer body.
3191 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3192 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3193 clunky code to create all flags and objects related to
3194 exception propagation and replace it with a call to
3195 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3197 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3198 Add new formal Abort_Id and associated comment on its use.
3199 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3201 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3202 Remove the clunky code to create all flags and objects related to
3203 exception propagation and replace it with a call to
3204 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3206 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3208 * s-tassta.adb: Fix minor typos.
3210 2011-08-03 Robert Dewar <dewar@adacore.com>
3212 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3213 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3215 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3217 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3218 to packages. This ensures that the finalizer body will not end up
3219 inside the freeze node.
3220 (Process_Declarations): Add code to detect whether a freeze node has a
3221 nested finalization collection.
3223 2011-08-03 Pascal Obry <obry@adacore.com>
3225 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3226 (Current_Session): Return a not null access to Session_Type.
3227 (Default_Session): Likewise.
3229 2011-08-03 Robert Dewar <dewar@adacore.com>
3231 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3232 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3234 2011-08-03 Pascal Obry <obry@adacore.com>
3236 * g-awk.ads: Minor comment fix.
3238 2011-08-03 Sergey Rybin <rybin@adacore.com>
3240 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3241 the tree structure related to discriminant constraints.
3242 Original_Discriminant cannot be used any more for computing the
3243 defining name for the reference to a discriminant.
3245 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3247 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3248 function is not visibly tagged, this is not a dispatching call and
3249 therfore is not Tag_Indeterminate, even if the function is marked as
3250 dispatching on result.
3252 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3254 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3255 (Expand_N_Free_Statement): Add a guard to protect against run-times
3256 which do not support controlled types.
3257 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3258 against run-times which do not support controlled types.
3259 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3260 against run-times which do not support controlled types.
3261 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3262 against run-times which do not support controlled types.
3263 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3264 protect against run-times which do not support controlled types.
3266 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3268 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3269 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3271 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3273 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3274 modified in the source, to prevent spurious warnings when compiling
3277 2011-08-03 Thomas Quinot <quinot@adacore.com>
3279 * a-except-2005.adb: Minor reformatting.
3281 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3283 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3284 is a renaming declaration in the private part of a package, do not emit
3285 a warning that the with_clause could be moved because the renaming may
3286 be used in the body or in a child unit.
3288 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3290 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3291 Propagate the Comes_From_Source attribute from the original return
3292 object to the renaming.
3294 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3296 * exp_ch7.adb (Build_Raise_Statement): Do not call
3297 Raise_From_Controlled_Operation when this routine is not present in
3298 the run-time library.
3299 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3300 libraries (Ravenscar), tasks are non-terminating, and protected objects
3301 and tasks can only appear at library level, so we do not want
3302 finalization of protected objects nor tasks.
3303 * exp_intr.adb: Minor clarification in comment.
3304 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3305 Gen_Output_File_C): Remove references to finalization of library-level
3306 objects when using restricted run-time libraries.
3308 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3310 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3311 Original_Discriminant only if the parent type is a generic formal.
3313 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3315 * exp_ch13.adb: Add with and use clause for Targparm;
3316 (Expand_N_Free_Statement): Prevent the generation of a custom
3317 Deallocate on .NET/JVM targets since this requires pools and address
3319 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3320 .NET/JVM targets, attach the newly allocated object to the access
3321 type's finalization collection. Do not generate a call to
3322 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3323 exist in the runtime.
3324 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3325 create a custom Allocate for object that do not require initialization.
3326 Attach a newly allocated object to the access type's finalization
3327 collection on .NET/JVM.
3328 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3329 assignment of controlled types on .NET/JVM. The two hidden pointers
3330 Prev and Next and stored and later restored after the assignment takes
3332 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3333 kludge for .NET/JVM to recognize a particular piece of code coming from
3334 Heap_Management and change the call to Finalize into Deep_Finalize.
3335 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3336 finalization collections on .NET/JVM only for types derived from
3337 Controlled. Separate the association of storage pools with a collection
3338 and only allow it on non-.NET/JVM targets.
3339 (Make_Attach_Call): New routine.
3340 (Make_Detach_Call): New routine.
3341 (Process_Object_Declarations): Suppress the generation of
3342 build-in-place return object clean up code on .NET/JVM since it uses
3344 * exp_ch7.ads (Make_Attach_Call): New routine.
3345 (Make_Detach_Call): New routine.
3346 * exp_intr.adb Add with and use clause for Targparm.
3347 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3348 on .NET/JVM targets.
3349 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3350 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3351 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3352 names used in finalization.
3354 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3356 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3357 (Attach, Detach): Lock the current task when chaining an object onto a
3360 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3362 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3363 Rewritten to create the message strings when the exception is not
3364 raised by an abort during finalization.
3365 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3366 Raise_From_Controlled_Operation and update its associated comment.
3367 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3368 Ada.Finalization.Heap_Management provides key functionality
3369 associated with controlled objects on the heap, their creation,
3370 finalization and reclamation. Type Finalization_Collection is
3371 effectively a wrapper which sits ontop of a storage pool and performs
3372 all necessary bookkeeping for all the objects it contains. Each
3373 access-to-controlled or access-to-class-wide type receives a collection
3374 as part of its expansion. The compiler generates buffer code and
3375 invokes Allocate / Deallocate to create and destroy allocated
3377 * a-finali.adb ("="): Removed.
3378 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3379 fields Prev and Next.
3380 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3381 A library unit with at least one controlled object on the library level
3382 has a special finalizer which is invoked by the binder. To signal this,
3383 ali files carry field PF.
3384 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3385 associated comment on field usage.
3386 * a-tags.adb (Get_RC_Offset): Removed.
3387 (Needs_Finalization): New routine.
3388 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3389 Dispatch tables now carry field Needs_Finalization which provides
3390 runtime indication whether a type is controlled or has controlled
3391 components or both. Remove field RC_Offset.
3392 (Get_RC_Offset): Removed along with its associated pragma Export.
3393 Since tagged types with controlled components no longer carry hidden
3394 field _controller, the special mechanism to retrieve its location is no
3396 (Needs_Finalization): New routine.
3397 * atree.ads, atree.adb (Elist24): New routine.
3398 (Set_Elist24): New routine.
3399 * atree.h: Add a define clause for Elist24.
3400 * bindgen.adb New library-level variable Lib_Final_Built.
3401 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3402 presence of a VM target, the routine generates calls to the proper
3403 library finalization routine.
3404 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3405 targets. Set the correct library finalization routine depending on
3406 whether the library has controlled objects or this is a VM compilation.
3407 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3408 to library-level finalizers of compiled units in reverse order of
3409 elaboration. It also produces exception management code and reraises a
3410 potential exception after all units have been finalized.
3411 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3412 library-level finalizers of compiled units in reverse order of
3414 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3415 definitions of all library-level finalizers available to the compilation
3416 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3418 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3419 System.Standard_Library.Adafinal directly. If the library needs
3420 finalization actions, create the sequence of finalization calls.
3421 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3422 Generate a with clause for System.Soft_Links when compiling for a VM.
3423 Remove the code which imports System.Standard_Library.Adafinal as
3424 Do_Finalize. Generate the library finalization routine.
3425 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3426 If the library needs finalization actions, create all the definitions
3427 of library- level finalizers.
3428 (Has_Finalizer): New routine. Determines whether at least one compiled
3429 unit has a library-level finalizer.
3430 Add type Qualification_Mode.
3431 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3432 * einfo.adb: New usage of field 15 as Return_Flag.
3433 Remove Finalization_Chain_Entity from the usages of field 19.
3434 Remove Associated_Final_Chain from the usages of field 23.
3435 New usage of field 23 as Associated_Collection.
3436 New usage of field 24 as Finalizer.
3437 New usage of flag 252 as Is_Processed_Transient.
3438 (Associated_Final_Chain): Removed.
3439 (Associated_Collection): New routine.
3440 (Finalization_Chain_Entity): Removed.
3441 (Finalizer): New routine.
3442 (Is_Finalizer): New routine.
3443 (Is_Processed_Transient): New routine.
3444 (Return_Flag): New routine.
3445 (Set_Associated_Final_Chain): Removed.
3446 (Set_Associated_Collection): New routine.
3447 (Set_Finalization_Chain_Entity): Removed.
3448 (Set_Finalizer): New routine.
3449 (Set_Is_Processed_Transient): New routine.
3450 (Set_Return_Flag): New routine.
3451 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3453 (Write_Field8_Name): Alphabetize the output.
3454 (Write_Field11_Name): Alphabetize the output.
3455 (Write_Field12_Name): Alphabetize the output.
3456 (Write_Field13_Name): Alphabetize the output.
3457 (Write_Field14_Name): Alphabetize the output.
3458 (Write_Field15_Name): Alphabetize the output.
3459 (Write_Field16_Name): Alphabetize the output.
3460 (Write_Field17_Name): Alphabetize the output.
3461 (Write_Field18_Name): Alphabetize the output.
3462 (Write_Field19_Name): Alphabetize the output. Remove the output of
3463 Finalization_Chain_Entity.
3464 (Write_Field20_Name): Alphabetize the output.
3465 (Write_Field21_Name): Alphabetize the output.
3466 (Write_Field22_Name): Alphabetize the output.
3467 (Write_Field23_Name): Alphabetize the output. Remove the output of
3468 Associated_Final_Chain. Add output for Associated_Collection.
3469 (Write_Field24_Name): Alphabetize the output.
3470 (Write_Field25_Name): Add output for Finalizer.
3471 (Write_Field26_Name): Alphabetize the output.
3472 (Write_Field27_Name): Alphabetize the output.
3473 (Write_Field28_Name): Alphabetize the output.
3474 * einfo.ads: Add new field description for Associated_Collection and
3476 Remove Associated_Final_Chain and its uses in nodes.
3477 Remove Finalization_Chain_Entity and its uses in nodes.
3478 Add new field description for Finalizer and its uses in nodes.
3479 Add new synthesized attribute Is_Finalizer.
3480 Add new flag description for Is_Processed_Transient and its uses in
3482 Add new field description for Return_Flag and its uses in nodes.
3483 (Associated_Final_Chain): Removed along with its pragma Inline.
3484 (Associated_Collection): New routine and pragma Inline.
3485 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3486 (Finalizer): New routine and pragma Inline.
3487 (Is_Finalizer): New routine and pragma Inline.
3488 (Is_Processed_Transient): New routine and pragma Inline.
3489 (Return_Flag): New routine and pragma Inline.
3490 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3491 (Set_Associated_Collection): New routine and pragma Inline.
3492 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3493 (Set_Finalizer): New routine and pragma Inline.
3494 (Set_Is_Processed_Transient): New routine and pragma Inline.
3495 (Set_Return_Flag): New routine and pragma Inline.
3496 * exp_aggr.adb: Alphabetize subprograms.
3497 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3498 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3499 associated comments. Remove local variables External_Final_List and
3501 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3502 Ancestor. Remove the retrieval of finalization lists. Update the call to
3504 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3505 lists. Update the call to Late_Expansion.
3506 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3507 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3508 (Gen_Assign): Remove the retrieval of the finalization list used to
3509 build the assignment. Update the calls to Make_Init_Call and
3511 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3512 Remove the mechanism to determine attachment levels and finalization
3513 list retrieval. Remove the processing for coextensions.
3514 (Init_Controller): Removed. Controllers no longer exist.
3515 (Late_Expansion): Remove formals Flist and Obj along with their
3516 associated comments. Update the calls to Build_Record_Aggr_Code and
3517 Build_Array_Aggr_Code.
3518 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3519 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3520 appear in entry bodies, protected subprograms and task bodies.
3521 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3522 * exp_ch3.adb (Add_Final_Chain): Removed.
3523 (Build_Array_Init_Proc): Alphabetize local variables.
3524 (Build_Assignment): Alphabetize local variables. Update the call to
3526 (Build_Class_Wide_Master): Rename local variables to better reflect
3528 (Build_Discriminant_Assignments): Code reformatting.
3529 (Build_Init_Call_Thru): Code reformatting.
3530 (Build_Init_Procedure): Code reformatting. Generate a special version
3531 of Deep_Finalize which is capable of finalizing all initialized
3532 components and ignore the rest.
3533 (Build_Init_Statements): Rename local variables to better reflect their
3535 Reimplement the mechanism to include the creation and update of an index
3536 variable called a "counter". It is used as a bookmark for tracing
3537 initialized and non-initialized components.
3538 (Build_Initialization_Call): Remove local variable Controller_Typ.
3539 Alphabetize all local variables. Remove the initialization of the
3540 record controller and update the call to Make_Init_Call.
3541 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3542 New local variable Counter.
3543 (Constrain_Array): Alphabetize.
3544 (Expand_Freeze_Array_Type): Create a collection instead of a
3546 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3547 Finalize_Address which is used in conjunction with allocated controlled
3549 (Expand_N_Object_Declaration): Remove the creation of a finalization
3550 list for anonymous access types. Update the calls to Make_Init_Call and
3552 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3553 retrieval of finalization lists. Remove the expansion of the record
3554 controller. Create TSS primitive Finalize_Address used in conjunction
3555 with controlled objects on the heap. Create finalization collections
3556 for access-to-controlled record components.
3557 (Expand_Record_Controller): Removed.
3558 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3559 class-wide types now requires additional processing. Create
3560 finalization collections for access-to-controlled types.
3561 (Increment_Counter): New routine.
3562 (Make_Counter): New routine.
3563 (Make_Eq_If): Remove the mention of Name_uController.
3564 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3565 types coming from System.Finalization_Root.
3566 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3567 (Predefined_Primitive_Bodies): There is no longer need to skip types
3568 coming from System.Finalization_Root.
3569 (Stream_Operation_OK): Do not generate stream routines for
3570 type Ada.Finalization.Heap_Management.Finalization_Collection.
3571 * exp_ch3.ads: Alphabetize subprograms.
3572 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3573 Add with and use clause for Lib.
3574 (Complete_Coextension_Finalization): Removed.
3575 (Complete_Controlled_Allocation): New routine. Create a finalization
3576 collection for anonymous access-to-controlled types. Create a custom
3577 Allocate which interfaces with the back end and the machinery in
3579 (Expand_Allocator_Expression): Add necessary calls to
3580 Complete_Controlled_Allocation. Remove the retrieval of finalization
3581 lists. Update the calls to Make_Adjust_Call. Generate a call to
3582 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3583 the associated collection.
3584 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3585 Code clean up. Remove the retrieval of finalization lists and
3587 Update the call to Make_Init_Call. Generate a call to
3588 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3589 the associated collection.
3590 (Get_Allocator_Final_List): Removed. Finalization lists are not
3592 (Suitable_Element): Remove the mention of Name_uController.
3593 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3594 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3595 the left hand side, carry out the assignment and adjust the left hand
3597 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3598 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3599 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3600 BIP_Collection and BIPcollection.
3601 (Build_Heap_Allocator): New routine used to allocate the return object
3602 of a build-in-place function onto a collection.
3603 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3604 (Expand_Call): Do not replace direct calls to Deep routines with their
3606 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3607 and update their occurrences. Add a special return flag to monitor the
3608 [ab]normal execution of the function. The flag is set right before the
3610 Rewrite the mechanism used to allocate a build-in-place return object
3611 on the heap or on a storage pool.
3612 (Is_Direct_Deep_Call): New routine.
3613 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3614 build-in-place function call instead of a final list. Build a call to
3615 Set_Finalize_Address_Ptr to decorate the associated collection.
3616 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3617 order to name the build-in-place function call's result for later
3618 finalization. Add a collection to a build-in-place function call
3619 instead of a final list.
3620 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3621 build-in-place function call instead of a final list. Remove the code
3622 which moves one final list and transforms it into the actual in a
3623 nested build-in-place call.
3624 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3625 build-in-place function call instead of a final list.
3626 (Move_Final_List): Removed.
3627 (Needs_BIP_Collection): New routine.
3628 (Needs_BIP_Final_List): Removed.
3629 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3630 enumeration type BIP_Formal_Kind.
3631 Update the related comment.
3632 (Needs_BIP_Collection): New routine.
3633 (Needs_BIP_Final_List): Removed.
3634 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3635 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3636 majority of subprograms in this unit. Add Name_Finalize_Address to
3637 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3638 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3639 statements for an array type.
3640 (Build_Adjust_Statements): Create the adjust statements for a record
3642 (Build_Cleanup_Statements): New routine. A procedure which given any
3643 construct containing asynchronous calls, references to _master, or is a
3644 task body, a task allocation or a protected body produces the necessary
3645 runtime calls to clean up these constructs.
3646 (Build_Exception_Handler): New routine.
3647 (Build_Final_List): Removed.
3648 (Build_Finalization_Collection): New routine. A core procedure which
3649 creates a collection to service heap allocated controlled objects
3650 associated with an access-to-controlled type.
3651 (Build_Finalize_Statements): Create the finalization statements for a
3653 (Build_Finalizer): New routine. A core procedure which given any
3654 construct with declarations and/or statements detects all objects which
3655 need any type of clean up (controlled objects, protected objects) and
3656 generates all necessary code to clean up the said objects in the proper
3658 (Build_Finalizer_Call): New routine.
3659 (Build_Initialize_Statements): Create the initialization statements for
3660 an array type. The generated routine contains code to finalize partially
3662 (Build_Object_Declarations): New routine.
3663 (Build_Raise_Statement): New routine.
3664 (Clean_Simple_Protected_Objects): Removed.
3665 (Controller_Component): Removed.
3666 (Enclosing_Function): New routine.
3667 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3668 either declarations or statements or both.
3669 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3670 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3672 (Find_Final_List): Removed.
3673 (Global_Flist_Ref): Removed.
3674 (In_Finalization_Root): Removed.
3675 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3676 scope in terms of tree nodes. Process all transient variables within
3678 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3679 generated after the adjust.
3680 (Make_Attach_Call): Removed.
3681 (Make_Call): New routine.
3682 (Make_Clean): Removed.
3683 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3685 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3687 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3689 (Make_Final_Call): Modified to simply create a call to either
3690 Deep_Finalize or Finalize.
3691 (Make_Finalize_Address_Body): New routine.
3692 (Make_Finalize_Address_Stmts): New routine. A function which produces
3693 TSS primitive Finalize_Address used in conjunction with heap allocated
3695 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3696 (Make_Init_Call): Rewritten. There is no longer an attach call
3697 generated after initialization.
3698 (Make_Local_Deep_Finalize): New routine.
3699 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3700 (Make_Transient_Block): Remove the finalization list retrieval and
3702 (Needs_Finalization): Moved to Exp_Util.
3703 (Parent_Field_Type): New routine.
3704 (Preprocess_Components): New routine.
3705 (Process_Transient_Objects): New routine.
3706 (Wrap_HSS_In_Block): New routine.
3707 (Wrap_Transient_Declaration): Remove finalization list management and
3708 controller insertion.
3709 (Wrap_Transient_Expression): Code reformatting.
3710 (Wrap_Transient_Statement): Code reformatting.
3711 * exp_ch7.ads (Build_Final_List): Removed.
3712 (Build_Finalization_Collection): New routine.
3713 (Build_Raise_Statement): New routine.
3714 (Controller_Component): Removed.
3715 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3716 (Find_Final_List): Removed.
3717 (In_Finalization_Root): Removed.
3718 (Is_Simple_Protected_Type): Update related comment.
3719 (Make_Adjust_Call): New parameter profile and associated comments.
3720 (Make_Attach_Call): Removed.
3721 (Make_Final_Call): New parameter profile and associated comments.
3722 (Make_Finalize_Address_Body): New routine.
3723 (Make_Init_Call): New parameter profile and associated comments.
3724 (Make_Local_Deep_Finalize): New routine.
3725 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3726 (Needs_Finalization): Moved to Exp_Util.
3727 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3728 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3729 (Find_Protection_Type): Moved to Exp_Util.
3730 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3731 (Make_DT): Update sequence of dispatch table initialization. Remove the
3732 initialization of field RC_Offset. Add initialization of field Needs_
3734 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3735 Reimplement how an object is first finalized, then deallocated.
3736 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3738 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3739 Register TSS_Finalize_Address with type TSS_Names.
3740 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3741 procedure provides the interface between an allocation / deallocation
3742 and the support machinery in Ada.Finalization.Heap_Management.
3743 (Find_Init_Call): Code reformatting.
3744 (Find_Init_Call_In_List): Code reformatting.
3745 (Find_Protection_Type): Moved from Exp_Ch9.
3746 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3747 (Has_Controlled_Coextensions): Removed.
3748 (Has_Controlled_Objects): New routine.
3749 (In_Library_Level_Package_Body): New routine.
3750 (Insert_Action_After): New routine.
3751 (Is_Finalizable_Transient): New routine. This predicate determines
3752 whether an object declaration is one of the many variants of controlled
3754 (Is_Null_Access_BIP_Func_Call): New routine.
3755 (Is_Non_BIP_Func_Call): New routine.
3756 (Is_Related_To_Func_Return): New routine.
3757 (Needs_Finalization): Moved from Exp_Ch7.
3758 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3759 (Find_Protection_Type): Moved from Exp_Ch9.
3760 (Has_Controlled_Coextensions): Removed.
3761 (Has_Controlled_Objects): New routine.
3762 (In_Library_Level_Package_Body): New routine.
3763 (Insert_Action_After): New routine.
3764 (Is_Finalizable_Transient): New routine.
3765 (Is_Null_Access_BIP_Func_Call): New routine.
3766 (Is_Non_BIP_Func_Call): New routine.
3767 (Is_Related_To_Func_Return): New routine.
3768 (Needs_Finalization): Moved from Exp_ch7.
3769 * expander.adb (Expand): Add a case for N_Free_Statement.
3770 * freeze.adb (Freeze_All): Replace the generation of a finalization
3771 list with a collection for access-to-controlled types.
3772 (Freeze_Entity): Code reformatting.
3773 (Freeze_Record_Type): Remove the freezing of a record controller
3775 (Freeze_Subprogram): Code reformatting.
3776 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3778 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3779 has a library-level finalizer.
3780 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3781 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3782 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3783 files. Add a-fihema to the list of object files.
3785 Alphabetize the associations in type Is_Parameterless_Attribute.
3786 * rtsfind.ads: Ada.Finalization_List.Controller and
3787 System.Finalization_Implementation are no longer a GNAT unit.
3788 Update the range of type Ada_Finalization_Child. Remove the following
3789 recoverable entities:
3791 RE_Attach_To_Final_List
3795 RE_Finalizable_Ptr_Ptr
3796 RE_Global_Final_List
3797 RE_Limited_Record_Controller
3800 RE_Record_Controller
3801 RE_Simple_List_Controller
3803 Add the following recoverable entities:
3805 RE_Add_Offset_To_Address
3809 RE_Exception_Identity
3810 RE_Finalization_Collection
3811 RE_Finalization_Collection_Ptr
3812 RE_Needs_Finalization
3813 RE_Save_Library_Occurrence
3814 RE_Set_Finalize_Address_Ptr
3815 RE_Set_Storage_Pool_Ptr
3817 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3819 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3820 (First_Stored_Discriminant): Remove the mention of Name_uController.
3821 * sem_aux.ads: Comment reformatting.
3822 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3823 to redecorate an already existing class-wide type.
3824 (Decorate_Tagged_Type): New parameter profile and associated comment.
3825 Create a "shadow class-wide type" for a shadow entity.
3826 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3827 of the final chain along with the associated comment.
3828 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3829 Full_Desig and set it to the full view of the designated type.
3830 Initialize the finalization collection to empty.
3831 (Build_Derived_Record_Type): Alphabetize local variables. Code
3833 (Collect_Fixed_Components): Remove the mention of Name_uController.
3834 (Create_Constrained_Components): Remove the mention of Name_uController.
3835 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3836 class-wide type of a shadow entity.
3837 (Process_Full_View): Update the machinery which marks type
3838 Limited_Controlled's entity as limited.
3839 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3840 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3841 list, instead make a collection build-in-place formal.
3842 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3843 a designated type in order to establish a match between the renaming
3844 and the renamed entity.
3845 (Find_Selected_Component): Add guard to prevent spurious exceptions
3846 from being raised on .NET/JVM.
3847 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3848 to the list of primitive that need special processing. Update arrays
3849 C_Names and D_Names.
3850 (Replace_Types): Handle class-wide types.
3851 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3852 different parameter profile, look at the first formal.
3853 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3854 use clauses for Exp_Util.
3855 * sem_res.adb: Remove with and use clauses for Elists.
3856 (Propagate_Coextensions): Removed.
3857 (Resolve_Allocator): Do not propagate the list of coextensions from one
3858 allocator to another.
3859 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3860 Deaccessed_T to Desig_Typ.
3861 (Enter_Name): Remove the mention of Name_uController.
3862 (Gather_Components): Remove the mention of Name_uController.
3863 (Incomplete_Or_Private_View): New routine.
3864 (Is_Coextension_Root): Removed.
3865 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3866 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3867 (Is_Coextension_Root): Removed.
3868 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3869 Controlled types are now derived from a null tagged record. Remove
3870 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3871 * sinfo.adb (Coextensions): Removed.
3872 (Set_Coextensions): Removed.
3873 * sinfo.ads: Remove Coextensions from the explanation of node fields
3874 and its uses in nodes.
3875 Update the field usage of N_Allocator.
3876 (Coextensions): Removed along with its pragma Inline.
3877 (Set_Coextensions): Removed along with its pragma Inline.
3878 * snames.ads-tmpl: Remove names
3883 Name_uLocal_Final_List
3884 Name_Finalization_Root
3891 Name_Finalize_Address
3892 * s-pooglo.adb (Allocate): Add overriding indicator.
3893 (Deallocate): Add overriding indicator.
3894 (Storage_Size): Add overriding indicator.
3895 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3896 than Finalize_Global_List.
3897 (Null_Finalize_Global_List): Removed.
3898 (Save_Library_Occurrence): New routine.
3899 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3900 initialization. Add variable Finalize_Library_Objects along with its
3901 pragma Export. Add variables Library_Exception and
3902 Library_Exception_Set along with their pragma Export.
3903 (Null_Finalize_Global_List): Removed.
3904 (Save_Library_Occurrence): New routine.
3905 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3906 rather than Finalize_Global_List.
3907 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3908 of the constructed node.
3910 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3912 * link.c: Include "auto-host.h" before system headers.
3914 2011-08-03 Vincent Celier <celier@adacore.com>
3916 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3917 that are not extended. Do not check if a library project that is
3918 extended should be regenerated. Do not add to table Library_Paths the
3919 libraries that are in extended projects. Link only with libraries that
3920 are in libray projects that are not extended.
3921 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3922 for a library project that is extended.
3924 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3926 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3927 conforming subprogram renamings that appear to be completions if they
3928 are not fully conformant.
3929 Such renamings are homographs but not completions.
3930 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3931 names in a subprogram renaming that appears in an instance.
3933 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3935 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3936 not immutably limited, build actual subtype from expression to provide
3937 proper bounds to caller.
3939 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3941 * sem_ch8.adb: Minor comment correction.
3943 2011-08-03 Thomas Quinot <quinot@adacore.com>
3945 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3946 returning a limited array, use an extended return statement.
3948 2011-08-03 Vincent Celier <celier@adacore.com>
3950 * make.adb (Initialize): If --subdirs= is used, but no project file is
3951 specified, attempt to create the specify subdir if it does not already
3952 exist and use it as the object directory as if -D had been specified.
3954 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3956 * s-tpopsp-vms.adb: New file.
3957 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3958 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3960 2011-08-03 Emmanuel Briot <briot@adacore.com>
3962 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3965 2011-08-03 Yannick Moy <moy@adacore.com>
3967 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3968 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3969 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3970 detect that an array has static bounds.
3972 2011-08-03 Thomas Quinot <quinot@adacore.com>
3974 * exp_dist.adb: Minor reformatting.
3976 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3978 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3979 (ATCB_Key): Removed, not always used.
3981 2011-08-03 Emmanuel Briot <briot@adacore.com>
3983 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3984 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3985 most remaining global variables.
3987 2011-08-03 Robert Dewar <dewar@adacore.com>
3989 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3990 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3993 2011-08-03 Javier Miranda <miranda@adacore.com>
3995 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3996 that must be passed by copy in VM targets.
3998 2011-08-03 Emmanuel Briot <briot@adacore.com>
4000 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
4001 duplicates a similar htable now in the project tree.
4003 2011-08-03 Claire Dross <dross@adacore.com>
4005 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
4006 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
4007 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
4008 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
4009 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
4010 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
4011 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
4014 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4016 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
4017 (ATCB_Key): Removed, not always used.
4018 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
4020 * s-tpopsp-tls.adb: New file.
4021 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
4022 x86/x64/ia64/powerpc/sparc Linux.
4024 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4026 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
4027 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
4029 2011-08-03 Thomas Quinot <quinot@adacore.com>
4031 * rtsfind.ads, exp_dist.adb, exp_dist.ads
4032 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
4033 Fix type selection for mapping integer types to PolyORB types.
4035 2011-08-03 Bob Duff <duff@adacore.com>
4037 * sem_ch7.adb: Minor comment clarification.
4039 2011-08-03 Bob Duff <duff@adacore.com>
4041 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
4042 an error analyzing a choice, skip further processing. Further
4043 processing could cause a crash or cascade errors.
4045 2011-08-03 Emmanuel Briot <briot@adacore.com>
4047 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
4048 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
4049 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
4050 prj-env.ads (Shared_Project_Tree_Data): new type
4051 An aggregate project and its aggregated trees need to share the common
4052 data structures used for lists of strings, packages,... This makes the
4053 code simpler since otherwise we have to pass the root tree (also used
4054 for the configuration file data) in addition to the current project
4055 tree. This also avoids ambiguities as to which tree should be used.
4056 And finally this saves a bit of memory.
4057 (For_Every_Project_Imported): new parameter Tree.
4058 Since aggregated projects are using a different tree, we need to let
4059 the caller know which tree to use to manipulate the returned project.
4061 2011-08-03 Robert Dewar <dewar@adacore.com>
4063 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
4064 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
4065 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
4066 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
4068 2011-08-03 Javier Miranda <miranda@adacore.com>
4070 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
4071 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
4073 2011-08-03 Bob Duff <duff@adacore.com>
4075 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
4078 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
4080 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
4081 g-sehash.ads: Fix typo. Update header.
4083 2011-08-03 Thomas Quinot <quinot@adacore.com>
4085 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
4088 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4090 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
4091 prefixes of private types along with records, since the selector may be
4093 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
4094 private types along with records, since the selector may be a
4097 2011-08-03 Emmanuel Briot <briot@adacore.com>
4099 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
4101 2011-08-03 Javier Miranda <miranda@adacore.com>
4103 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
4104 Tagged_Type_Expansion.
4106 2011-08-03 Yannick Moy <moy@adacore.com>
4108 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
4109 violation when the argument of concatenation is the name of a
4112 2011-08-03 Emmanuel Briot <briot@adacore.com>
4114 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
4115 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
4116 (Process_Declarative_Items): new parameter Child_Env.
4118 2011-08-03 Yannick Moy <moy@adacore.com>
4120 * alfa.ads: Update format of ALFA section in ALI file in order to
4121 add a mapping from bodies to specs when both are present.
4122 (ALFA_Scope_Record): Add components for spec file/scope.
4123 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
4125 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
4126 collected, fill in the spec information when relevant.
4127 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
4130 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4132 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
4133 code unit to decide whether to add internally generated subprograms.
4135 2011-08-03 Javier Miranda <miranda@adacore.com>
4137 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4138 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4139 be handled by copy in VM targets.
4141 2011-08-03 Emmanuel Briot <briot@adacore.com>
4143 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4144 code with Makeutl.Get_Switches.
4145 * prj-tree.adb: Update comment.
4147 2011-08-03 Thomas Quinot <quinot@adacore.com>
4149 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4150 subprogram with a limited formal that does not support external
4153 2011-08-03 Yannick Moy <moy@adacore.com>
4155 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4157 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4158 not from current unit in two phases, because it is not possible to
4159 change the table while iterating over its content.
4160 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4162 2011-08-03 Sergey Rybin <rybin@adacore.com>
4164 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4165 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4167 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4169 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4170 and the component type is composite, this is ambiguous for predefined
4171 concatenation, but if the node is not overloaded and the entity is a use
4172 -defined function its profile can be used to resolve that aggregate.
4174 2011-08-03 Robert Dewar <dewar@adacore.com>
4176 * exp_ch4.adb: Minor code cleanup.
4178 2011-08-03 Thomas Quinot <quinot@adacore.com>
4180 * exp_dist.adb: Do not generate distribution stubs if serious errors
4181 have been diagnosed.
4183 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4185 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4186 the first formal of a primitive operation, go to the base type to
4187 handle properly an access to a derived type with constrained
4189 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4190 user-defined function that is only use-visible.
4192 2011-08-03 Robert Dewar <dewar@adacore.com>
4194 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4195 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4196 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4197 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4198 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4199 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4200 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4201 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4203 2011-08-03 Robert Dewar <dewar@adacore.com>
4205 * repinfo.adb (List_Mechanism): Add handling of
4206 Convention_Ada_Pass_By_XXX.
4207 * sem_mech.adb (Set_Mechanism): Ditto.
4208 * sem_prag.adb (Process_Convention): Add entries for
4209 Convention_Ada_Pass_By_XXX.
4210 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4212 2011-08-03 Pascal Obry <obry@adacore.com>
4214 * makeutl.adb: Minor reformatting.
4216 2011-08-03 Vincent Celier <celier@adacore.com>
4219 (Get_File_Name) If the file cannot be found when there are no config
4220 pragmas file and May_Fail is True, return No_File instead of the file
4221 name, to be consistent.
4223 2011-08-03 Pascal Obry <obry@adacore.com>
4225 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4228 2011-08-03 Javier Miranda <miranda@adacore.com>
4231 (Same_Representation): In VM targets the representation of arrays with
4232 aliased components differs from arrays with non-aliased components.
4234 2011-08-03 Emmanuel Briot <briot@adacore.com>
4236 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4237 not systematically lower case attribute indexes that contain no "."
4238 Fix definition of several Naming attributes, which take
4239 a unit name as index and therefore should be case insensitive.
4240 Minor refactoring (reduce length of variable names).
4242 2011-08-03 Emmanuel Briot <briot@adacore.com>
4244 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4246 2011-08-03 Emmanuel Briot <briot@adacore.com>
4248 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4249 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4250 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4251 prj-tree.ads (Prj.Tree.Environment): new type.
4253 2011-08-03 Emmanuel Briot <briot@adacore.com>
4255 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4256 prj-tree.adb, prj-tree.ads (Environment): new type.
4258 2011-08-03 Emmanuel Briot <briot@adacore.com>
4260 * prj-tree.ads: Remove unused variable.
4262 2011-08-03 Yannick Moy <moy@adacore.com>
4264 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4265 issuing messages related to SPARK restriction violation.
4267 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4269 * sem_ch6.adb: guard against error nodes in return statements.
4271 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4273 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4274 a warning can only appear on a configuration file, so emit warning
4275 without further checks.
4277 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4279 * s-interr.ads: add overriding keyword.
4281 2011-08-03 Geert Bosch <bosch@adacore.com>
4283 * exp_attr.adb: Fix minor typo.
4285 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4287 * par-ch4.adb: improve error recovery.
4289 2011-08-03 Emmanuel Briot <briot@adacore.com>
4291 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4292 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4295 2011-08-03 Emmanuel Briot <briot@adacore.com>
4297 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4298 "external" as an attribute name in aggregate projects.
4300 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4302 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4303 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4304 from 0, so we need to adjust.
4306 2011-08-03 Emmanuel Briot <briot@adacore.com>
4308 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4309 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4311 2011-08-03 Yannick Moy <moy@adacore.com>
4313 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4314 restriction on overloaded entity if the entity is not an operator.
4316 2011-08-03 Yannick Moy <moy@adacore.com>
4318 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4319 restrict.ads: Rename remaining Check_Formal_Restriction* into
4320 Check_SPARK_Restriction*.
4322 2011-08-03 Emmanuel Briot <briot@adacore.com>
4324 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4325 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4327 (Project_Empty): removed
4328 (Empty_Project): new parameter Qualifier
4329 This is used to have fields specific to aggregate projects, cleaner
4330 New field to store the list of aggregated projects.
4331 (Check_Aggregate_Project): removed
4332 (Process_Aggregated_Projects, Free): new subprograms.
4334 2011-08-03 Olivier Hainque <hainque@adacore.com>
4336 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4338 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4340 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4341 explicit dereference of an unconstrained type, create a constrained
4342 subtype for it, as is done for function calls that return an
4345 2011-08-03 Thomas Quinot <quinot@adacore.com>
4347 * g-pehage.adb (Finalize): Avoid possible double-free.
4349 2011-08-03 Steve Baird <baird@adacore.com>
4351 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4352 Elab_Spec/Body attrs in CodePeer_Mode.
4354 2011-08-03 Javier Miranda <miranda@adacore.com>
4356 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4357 low bound is not known at compile time but they have no others choice.
4358 Done because in this case the bounds can be obtained directly from the
4361 2011-08-03 Ed Falis <falis@adacore.com>
4363 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4364 on VxWorks SMP. Remove unusable constant ANY_CPU.
4366 2011-08-03 Emmanuel Briot <briot@adacore.com>
4368 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4369 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4370 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4371 Prj.Env.Initialize_Empty): new subprograms
4372 (Get_Env, Find_Project): remove parameter Target_Name.
4374 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4376 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4377 as a condition for the delayed call to Derived_Subprograms done for the
4378 case of the rewriting of a derived type that constrains the
4379 discriminants of its parent type.
4380 Avoids redundant subprogram derivations for private subtype derivations.
4382 2011-08-03 Javier Miranda <miranda@adacore.com>
4384 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4385 Build_Record_Aggr_Code.
4386 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4387 discriminants in extension aggregates.
4389 2011-08-03 Emmanuel Briot <briot@adacore.com>
4391 * prj-pp.adb (Print): also output project qualifiers, since in
4392 particular "aggregate" is mandatory in an aggregate project.
4394 2011-08-03 Emmanuel Briot <briot@adacore.com>
4396 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4397 (Debug_Output): new function.
4399 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4401 * gnat_ugn.texi: Document -Wstack-usage.
4402 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4404 2011-08-03 Thomas Quinot <quinot@adacore.com>
4406 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4407 have keyword LIMITED.
4409 2011-08-03 Yannick Moy <moy@adacore.com>
4411 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4412 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4413 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4414 section (does not happen in compiler, only if code directly calls
4416 * get_alfa.adb, get_alfa.ads: New files.
4417 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4419 * lib-xref-alfa.adb: New file.
4420 * lib-xref.adb, lib-xref.ads
4421 (Xref_Entry): redefine information needed in cross-references for ALFA.
4422 Push ALFA treatments in separated local package.
4423 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4424 identifiers. Return entity of package body instead of spec. Return
4425 Empty for a scope with no location.
4426 (Generate_Reference): adapt to new components for ALFA information.
4427 Remove the need for D references on definitions.
4428 (Is_Local_Reference): moved to ALFA local package
4429 (Output_References): extract subfunction as Extract_Source_Name
4430 (Output_Local_References): remove procedure, replaced by filtering of
4431 cross-references in package ALFA and printing in Put_ALFA.
4432 (Write_Entity_Name): remove procedure
4433 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4434 print exact name of entity as it appears in source file
4435 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4436 * put_alfa.adb, put_alfa.ads: New files.
4437 * xref_lib.adb (Search_Xref): protect read of cross-references against
4438 reading other sections of the ALI file, in gnatxref
4439 (Search): protect read of cross-references against reading other
4440 sections of the ALI file, in gnatfind.
4441 * gcc-interface/Make-lang.in: Update dependencies.
4443 2011-08-03 Thomas Quinot <quinot@adacore.com>
4445 * sem_ch3.adb: Minor reformatting.
4447 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4449 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4450 raising an exception.
4452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4454 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4455 type, always use 1 as the lower bound or string, even if lower bound of
4456 context is not static, to handle properly null strings in a non-static
4459 2011-08-03 Bob Duff <duff@adacore.com>
4461 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4462 always legal on the right-hand side of an assignment statement; there
4463 is always an applicable index constraint in this case. Therefore, the
4464 check for Pkind = N_Assignment_Statement is now unconditional -- it
4465 doesn't depend on whether Is_Constrained (Typ).
4467 2011-08-03 Robert Dewar <dewar@adacore.com>
4469 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4471 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4473 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4474 for an itype created within a generic unit.
4476 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4478 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4479 suppresses all inlining.
4481 2011-08-03 Robert Dewar <dewar@adacore.com>
4483 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4484 exp_aggr.adb: Minor reformatting.
4486 2011-08-03 Thomas Quinot <quinot@adacore.com>
4488 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4489 tagged assignment when discriminant checks are suppressed. This is
4490 useless and extremely costly in terms of static stack usage.
4492 2011-08-03 Bob Duff <duff@adacore.com>
4494 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4495 of generics, because this leads to the wrong entity in the wrong scope,
4496 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4498 (Process_Interface_Name): Follow Alias for instances of generics, to
4499 correct for the above change.
4501 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4503 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4504 is an integer literal it is always safe to replace the reference. In
4505 addition, if the reference appears in the generated code for an object
4506 declaration it is necessary to copy because otherwise the reference
4507 might be to the uninitilized value of the discriminant of the object
4510 2011-08-03 Pascal Obry <obry@adacore.com>
4512 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4513 ACL used, in this case we want to check for ending .exe, not .exe
4514 anywhere in the path.
4516 2011-08-03 Sergey Rybin <rybin@adacore.com>
4518 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4519 the tree structure (semantic decoration of references to record
4522 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4524 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4525 choices of a named array aggregate, bail out when any choices are
4526 marked as Errors_Posted.
4528 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4530 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4531 in which entity is frozen, to handle properly loop variables in
4534 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4536 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4537 subtype is not static, compute the upper bound using attributes, to
4538 handle properly index types that are not integer types.
4540 2011-08-03 Bob Duff <duff@adacore.com>
4542 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4543 Update copyright notice.
4545 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4547 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4548 Original_Discriminant if within an instance.
4549 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4551 2011-08-03 Thomas Quinot <quinot@adacore.com>
4553 * einfo.ads: Minor reformatting.
4555 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4557 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4558 composite type with an unfrozen subcomponent, in the profile of a
4559 primitive operation.
4561 2011-08-03 Robert Dewar <dewar@adacore.com>
4563 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4565 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4567 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4568 unconstrained type with discriminants is initialized with an aggregate,
4569 use the constrained subtype of the aggregate as the type of the object,
4570 because it is immutable, and this allows the back-end to generate no
4571 code for the object declaration.
4573 2011-08-03 Robert Dewar <dewar@adacore.com>
4575 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4576 comparison operand is variable, and turns out to be zero or negative.
4578 2011-08-03 Javier Miranda <miranda@adacore.com>
4581 (Expand_Dispatching_Constructor_Call): Disable expansion of
4582 code required for native targets. Done to avoid generating
4583 references to unavailable runtime entities in VM targets.
4585 (Expand_N_Object_Declaration): Add missing support to handle
4586 the explicit initialization of class-wide interface objects.
4589 2011-08-03 Matthew Heaney <heaney@adacore.com>
4591 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4593 2011-08-03 Matthew Heaney <heaney@adacore.com>
4595 * a-cbdlli.adb (Splice): move source items from first to last
4597 2011-08-03 Yannick Moy <moy@adacore.com>
4599 * sem_util.ads: comment added.
4601 2011-08-03 Javier Miranda <miranda@adacore.com>
4604 (Expand_Record_Aggregate): In VM targets disable the expansion into
4605 assignments of aggregates whose type is not known at compile time.
4607 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4609 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4610 protected entries and task entries, to build the proper renaming
4611 declaration for entry formals, used in debugging.
4612 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4613 parameters in the same way.
4615 2011-08-02 Robert Dewar <dewar@adacore.com>
4617 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4618 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4619 code reorganization.
4621 2011-08-02 Robert Dewar <dewar@adacore.com>
4623 * debug.adb: Debug flag d.P to suppress length comparison optimization
4624 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4625 comparison of Length by comparing First/Last instead.
4627 2011-08-02 Matthew Heaney <heaney@adacore.com>
4629 * a-cobove.ads: Code clean up.
4631 2011-08-02 Vincent Celier <celier@adacore.com>
4633 * adaint.c (file_names_case_sensitive_cache): New static int.
4634 (__gnat_get_file_names_case_sensitive): Cache the return value in
4635 file_names_case_sensitive_cache at the first invocation, to avoid
4636 multiple calls to getenv.
4638 2011-08-02 Bob Duff <duff@adacore.com>
4640 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4642 2011-08-02 Yannick Moy <moy@adacore.com>
4644 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4645 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4646 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4647 indicate that we are in a precondition or postcondition. This is used in
4648 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4649 decide whether to flag the spec or body of the current subprogram as
4652 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4654 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4656 * a-extiin.ads: New file.
4658 2011-08-02 Bob Duff <duff@adacore.com>
4660 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4661 now raises Name_Error instead of Use_Error in certain cases. The other
4662 parts of this AI were already implemented properly.
4664 2011-08-02 Vincent Celier <celier@adacore.com>
4666 * link.c: Only import "auto-host.h" when building the gnattools.
4668 2011-08-02 Yannick Moy <moy@adacore.com>
4670 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4671 which calls a local subprogram, so extract subprogram
4672 from Mark_Non_ALFA_Subprogram_Body.
4674 2011-08-02 Javier Miranda <miranda@adacore.com>
4677 (Extract_Dispatching_Call): If the type of the dispatching object is an
4678 access type then return an explicit dereference in the Object out-mode
4681 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4683 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4684 compatibility checks for all indexes of an array subtype, not just the
4685 first. Reset Has_Dynamic_Range_Check on the subtype before each
4686 potential check to ensure that Insert_Range_Checks will not elide any
4687 of the dynamic checks.
4689 2011-08-02 Yannick Moy <moy@adacore.com>
4691 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4692 SPARK restriction at parsing time.
4693 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4694 directive only if the SPARK restriction is set for this unit.
4696 2011-08-02 Yannick Moy <moy@adacore.com>
4698 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4699 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4700 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4701 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4702 Mark_Non_ALFA_Subprogram_Body.
4703 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4706 2011-08-02 Yannick Moy <moy@adacore.com>
4708 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4711 2011-08-02 Robert Dewar <dewar@adacore.com>
4713 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4714 exp_ch3.adb: Minor reformatting.
4716 2011-08-02 Emmanuel Briot <briot@adacore.com>
4718 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4719 files, not any regular file.
4720 (__gnat_locate_file_with_predicate): new subprogram.
4722 2011-08-02 Yannick Moy <moy@adacore.com>
4724 * sinfo.adb, sinfo.ads: Restrict the use of flags
4725 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4726 nodes, plus N_Subtype_Declaration for the 2nd one.
4728 2011-08-02 Sergey Rybin <rybin@adacore.com>
4730 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4731 - fix bugs in the description of Source_Trace;
4732 - get rid of UNIT_NAME;
4734 2011-08-02 Javier Miranda <miranda@adacore.com>
4737 (Build_Dispatching_Requeue): Adding support for VM targets
4738 since we cannot directly reference the Tag entity.
4739 * exp_sel.adb (Build_K): Adding support for VM targets.
4740 (Build_S_Assignment): Adding support for VM targets.
4742 (Default_Prim_Op_Position): In VM targets do not restrict availability
4743 of predefined interface primitives to compiling in Ada 2005 mode.
4744 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4745 restricted to compiling in Ada 2005 mode.
4746 (Make_VM_TSD): Generate code that declares and initializes the OSD
4747 record. Needed to support dispatching calls through synchronized
4750 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4751 primitives associated with synchronized interfaces.
4752 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4753 primitives associated with synchronized interfaces.
4755 2011-08-02 Yannick Moy <moy@adacore.com>
4757 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4758 statements hidden in SPARK if preceded by the HIDE directive
4759 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4760 exception handlers as hidden in SPARK if preceded by the HIDE directive
4761 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4762 if starting with the HIDE directive
4763 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4764 starting with the HIDE directive; mark the declarations in a private
4765 part as hidden in SPARK if the private part starts with the HIDE
4767 * restrict.adb, restrict.ads
4768 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4769 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4770 argument node belongs to a part which is hidden in SPARK
4771 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4772 parts in SPARK; protect the possibly costly call to
4773 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4774 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4775 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4776 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4778 (Scan): recognize special comment starting with '#' and followed by
4779 SPARK keyword "hide" as a HIDE directive.
4781 2011-08-02 Yannick Moy <moy@adacore.com>
4783 * types.ads, erroutc.ads: Minor reformatting.
4785 2011-08-02 Vincent Celier <celier@adacore.com>
4787 * link.c: Add response file support for cross platforms.
4789 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4791 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4792 in an association, set parent field of copy before partial analysis.
4793 * sem_res.adb (Resolve_Slice): create reference to itype only when
4794 expansion is enabled.
4796 2011-08-02 Yannick Moy <moy@adacore.com>
4798 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4799 for new flag denoting which subprogram bodies are in ALFA
4800 * restrict.adb, sem_ch7.adb: Update comment
4801 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4802 sem_ch9.adb, sem_res.adb: Add calls to
4803 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4804 * sem_ch6.adb (Analyze_Function_Return): add calls to
4805 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4806 middle of the body, and extended return.
4807 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4808 False when missing return.
4809 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4810 to True for subprograms whose spec is in ALFA. Remove later on the flag
4811 on the entity used for a subprogram body when there exists a separate
4813 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4814 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4815 False, otherwise do nothing.
4817 2011-08-02 Robert Dewar <dewar@adacore.com>
4819 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4821 2011-08-02 Yannick Moy <moy@adacore.com>
4823 * sem_ch4.ads: minor formatting.
4825 2011-08-02 Yannick Moy <moy@adacore.com>
4827 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4828 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4829 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4830 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4831 opt.ads: cleanup of SPARK mode
4833 2011-08-02 Yannick Moy <moy@adacore.com>
4835 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4837 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4838 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4840 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4841 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4842 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4843 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4845 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4847 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4848 functions whose return type is not in ALFA.
4849 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4851 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4852 parameter's type is not in ALFA.
4853 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4856 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4858 * sem_ch6 (Analyze_Expression_Function): treat the function as
4859 Inline_Always, and introduce a subprogram declaration for it when it is
4861 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4862 expression functions, so that the back-end can determine whether they
4863 can in fact be inlined.
4864 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4865 a function body comes from an expression function.
4867 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4869 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4870 null exclusions to test Can_Never_Be_Null on the anonymous access types
4871 of the formals rather than testing the formals themselves. Exclude this
4872 check in cases where the Old_Formal is marked as a controlling formal,
4873 to avoid issuing spurious errors for bodies completing dispatching
4874 operations (due to the flag not getting set on controlling access
4875 formals in body specs).
4876 (Find_Corresponding_Spec): When checking full and subtype conformance of
4877 subprogram bodies in instances, pass Designated and E in that order, for
4878 consistency with the expected order of the formals (New_Id followed by
4881 2011-08-02 Robert Dewar <dewar@adacore.com>
4883 * sem_ch8.adb: Minor reformatting.
4885 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4887 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4888 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4889 primitive operations of class-wide actuals.
4891 2011-08-02 Javier Miranda <miranda@adacore.com>
4893 * exp_atag.ads, exp_atag.adb
4894 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4895 since its value is implicitly passed in argument Typ.
4896 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4897 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4898 Build_Common_Dispatching_Select_Statements.
4900 2011-08-02 Robert Dewar <dewar@adacore.com>
4902 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4903 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4906 2011-08-02 Robert Dewar <dewar@adacore.com>
4908 * sem_res.adb: Minor reformatting.
4909 * sem_prag.adb: Minor reformatting.
4911 2011-08-02 Javier Miranda <miranda@adacore.com>
4913 * exp_atag.adb, exp_atags.ads
4914 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4915 by the tagged type Entity. Required to use this routine in the VM
4916 targets since we do not have available the Tag entity in the VM
4919 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4920 Ada.Tags has not been previously loaded.
4922 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4923 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4925 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4926 view of enclosing scopes. Required to handle enclosing scopes that
4927 are synchronized types whose full view is a task type.
4929 (Build_VM_TSDs): Minor code improvement to avoid generating and
4930 analyzing lists with empty nodes.
4931 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4932 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4933 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4934 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4935 (Make_Select_Specific_Data_Table): Add support for VM targets.
4936 (Make_VM_TSD): Generate code to initialize the SSD structure of
4939 2011-08-02 Yannick Moy <moy@adacore.com>
4941 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4942 cross-references section in ALI.
4943 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4944 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4946 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4947 subprogram or package entity of a node
4948 (Is_Local_Reference_Type): new function returns True for references
4949 selected in local cross-references.
4950 (Lt): function extracted from Lt in Output_References
4951 (Write_Entity_Name): function extracted from Output_References
4952 (Generate_Definition): generate reference with type 'D' for definition
4953 of objects (object declaration and parameter specification), with
4954 appropriate locations and units, for use in local cross-references.
4955 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4956 references of type 'I' for initialization in object definition.
4957 (Output_References): move part of function Lt and procedure
4958 Write_Entity_Name outside of the body. Ignore references of types 'D'
4959 and 'I' introduced for local cross-references.
4960 (Output_Local_References): new procedure to output the local
4961 cross-references sections.
4962 (Lref_Entity_Status): new array defining whether an entity is a local
4963 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4964 with 'I' type when initialization expression is present.
4965 * get_scos.adb, get_scos.ads: Correct comments and typos
4967 2011-08-02 Javier Miranda <miranda@adacore.com>
4969 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4971 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4973 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4976 2011-08-02 Vincent Celier <celier@adacore.com>
4978 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4979 (No_Space_Img): New function
4980 (Find_Excluded_Sources): When reading from a file, record the file name
4981 and the line number for each excluded source.
4982 (Mark_Excluded_Sources): When reporting an error, if the excluded
4983 sources were read from a file, include file name and line number in
4986 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4988 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4990 2011-08-02 Robert Dewar <dewar@adacore.com>
4992 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4994 2011-08-02 Javier Miranda <miranda@adacore.com>
4996 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4997 generation of TSDs to the DOTNET compiler.
4998 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4999 generation of TSDs to the DOTNET compiler.
5001 2011-08-02 Javier Miranda <miranda@adacore.com>
5003 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
5004 record of all the tagged types declared inside library level package
5005 declarations, library level package bodies or library level subprograms.
5006 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
5007 associated with a given tagged type.
5008 (Build_VM_TSDs): New subprogram.
5009 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
5010 compilation units that are subprograms.
5011 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
5012 compilation units that are package bodies.
5013 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
5014 units that are a package declaration or a package instantiation.
5015 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
5016 reorganization to improve the error generated by the frontend when the
5017 function Ada.Tags.Secondary_Tag is not available.
5018 * rtsfind.ads (RE_Register_TSD): New runtime entity.
5019 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
5021 2011-08-02 Javier Miranda <miranda@adacore.com>
5023 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
5025 2011-08-02 Robert Dewar <dewar@adacore.com>
5027 * s-imenne.ads: Minor reformatting.
5029 2011-08-02 Robert Dewar <dewar@adacore.com>
5031 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
5032 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
5033 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
5035 2011-08-02 Robert Dewar <dewar@adacore.com>
5037 * einfo.ads (Materialize_Entity): Document this is only for renamings
5038 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
5039 required debug information in the case where we transform the object
5040 declaration into a renaming declaration.
5041 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
5043 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
5046 2011-08-02 Robert Dewar <dewar@adacore.com>
5048 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
5049 Suppress_Init_Procs.
5050 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
5051 Suppress_Initialization/Initialization_Suppressed.
5052 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
5053 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
5054 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
5055 * sem_prag.adb: New processing for pragma Suppress_Initialization.
5057 2011-08-02 Robert Dewar <dewar@adacore.com>
5059 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
5062 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5064 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
5065 only have inheritable classwide pre/postconditions.
5067 2011-08-02 Javier Miranda <miranda@adacore.com>
5069 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
5070 * rtsfind.ads (RE_Check_TSD): New runtime entity.
5071 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
5072 checks if the external tag of a type is the same as the external tag
5073 of some other declaration.
5075 2011-08-02 Thomas Quinot <quinot@adacore.com>
5077 * s-taskin.ads: Minor reformatting.
5079 2011-08-02 Emmanuel Briot <briot@adacore.com>
5081 * g-comlin.adb (Display_Help): swap the order in which it prints the
5082 short help and the general usage.
5084 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5086 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
5087 the aspect declarations and attach them to the generic copy for
5088 subsequent analysis.
5089 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
5090 declarations of the generic tree to the new subprogram declarations.
5091 * sem_attr.adb (Check_Precondition_Postcondition): recognize
5092 conditions that apply to a subprogram instance.
5094 2011-08-02 Robert Dewar <dewar@adacore.com>
5096 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
5098 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5100 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
5101 private type with a tagged full view is not derived in the immediate
5102 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
5104 2011-08-02 Robert Dewar <dewar@adacore.com>
5106 * exp_ch4.adb: Minor reformatting.
5108 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5110 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
5111 Ada2012 iterator, the loop will be rewritten during expansion into a
5112 while loop with a cursor and an element declaration. Do not analyze the
5113 body in this case, because if the container is for indefinite types the
5114 actual subtype of the elements will only be determined when the cursor
5115 declaration is analyzed.
5117 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5119 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
5120 size/alignment related attributes in CodePeer_Mode.
5122 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5124 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
5125 Prepend_Element, since this can result in the operation getting the
5126 wrong slot in the full type's dispatch table if the full type has
5127 inherited operations. The incomplete type's operation will get added
5128 to the proper position in the full type's primitives
5129 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
5130 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
5131 dispatching operations, since there are cases where nonprimitive
5132 subprograms can get added to the list of incomplete dependents (such
5133 as subprograms in nested packages).
5134 * sem_ch6.adb (Process_Formals): First, remove test for being in a
5135 private part when determining whether to add a primitive with a
5136 parameter of a tagged incomplete type to the Private_Dependents list.
5137 Such primitives can also occur in the visible part, and should not have
5138 been excluded from being private dependents.
5139 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5140 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5141 list of a Taft-amendment incomplete type is a primitive before issuing
5142 an error that the full type must appear in the same unit. There are
5143 cases where nonprimitives can be in the list (such as subprograms in
5145 * sem_disp.adb (Derives_From): Use correct condition for checking that
5146 a formal's type is derived from the type of the corresponding formal in
5147 the parent subprogram (the condition was completely wrong). Add
5148 checking that was missing for controlling result types being derived
5149 from the result type of the parent operation.
5151 2011-08-02 Yannick Moy <moy@adacore.com>
5153 * errout.adb (First_Node): minor renaming
5154 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5157 2011-08-02 Yannick Moy <moy@adacore.com>
5159 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5160 before accessing operands.
5161 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5162 decide whether an initialization expression respects SPARK rules, as
5163 the plain node is the expanded one. This allows for more valid warnings
5165 * gnat_rm.texi: Minor update.
5167 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5169 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5172 2011-08-02 Robert Dewar <dewar@adacore.com>
5174 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5176 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5178 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5179 loop statements and the element renaming declaration with a block when
5180 the element type is controlled.
5182 2011-08-02 Yannick Moy <moy@adacore.com>
5184 * sinfo.ads: Minor formatting.
5186 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5188 * sem_aggr.adb (Add_Association): if the association has a box and no
5189 expression, use the Sloc of the aggregate itself for the new
5191 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5194 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5196 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5197 When a container is provided via a function call, generate a renaming
5198 of the function result. This avoids the creation of a transient scope
5199 and the premature finalization of the container.
5200 * exp_ch7.adb (Is_Container_Cursor): Removed.
5201 (Wrap_Transient_Declaration): Remove the supression of the finalization
5202 of the list controller when the declaration denotes a container cursor,
5205 2011-08-02 Yannick Moy <moy@adacore.com>
5207 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5208 node is from source, instead of the original node being from source.
5210 (Resolve_Array_Aggregate): refine the check for a static expression, to
5211 recognize also static ranges
5212 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5213 Array_Type_Declaration): postpone the test for the type being a subtype
5214 mark after the type has been resolved, so that component-selection and
5215 expanded-name are discriminated.
5216 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5217 to distinguish the case of an iteration scheme, so that an error is
5218 issed on a non-static range in SPARK except in an iteration scheme.
5219 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5220 In_Iter_Schm = True.
5221 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5222 user-defined operators so that they are allowed in renaming
5224 (Find_Selected_Component): refine the check for prefixing of operators
5225 so that they are allowed in renaming. Move the checks for restrictions
5226 on selector name after analysis discriminated between
5227 component-selection and expanded-name.
5228 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5229 concatenation argument of string type if it is static.
5230 * sem_util.adb, sem_util.ads
5231 (Check_Later_Vs_Basic_Declarations): add a new function
5232 Is_Later_Declarative_Item to decice which declarations are allowed as
5233 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5234 mode, add that renamings are considered as later items.
5235 (Enclosing_Package): new function to return the enclosing package
5236 (Enter_Name): correct the rule for homonyms in SPARK
5237 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5238 from source (result of expansion) to avoid issuing wrong warnings.
5240 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5242 * errout.adb: On anything but an expression First_Node returns its
5245 2011-08-02 Pascal Obry <obry@adacore.com>
5247 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5249 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5251 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5252 Set the associated loop as the related expression of internally
5254 * exp_ch7.adb (Is_Container_Cursor): New routine.
5255 (Wrap_Transient_Declaration): Supress the finalization of the list
5256 controller when the declaration denotes a container cursor.
5258 2011-08-02 Yannick Moy <moy@adacore.com>
5260 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5262 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5263 expression is a simple expression. This check cannot be performed in
5264 the semantics, so just drop it.
5265 (P_Index_Or_Discriminant_Constraint): move check that the index or
5266 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5267 semantics. Other cases were previously checked in the semantics.
5268 * par-ch4.adb (P_Name): move checks that a selector name is not
5269 character literal or an operator symbol to Find_Selected_Component in
5271 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5272 declarations are not placed after later declarations in a separate
5273 procedure in Sem_Util (possibly not the best choice?), to be used both
5274 during parsing, for Ada 83 mode, and during semantic analysis, for
5276 * par-endh.adb (Check_End): move check that end label is not missing
5277 to Process_End_Label in the semantics
5278 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5279 the special case for SPARK restriction
5280 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5281 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5282 parameter Force to issue the error message even on internal node (used
5283 for generated end label). Call Check_Restriction to check when an error
5284 must be issued. In SPARK mode, issue an error message even if the
5285 restriction is not set.
5286 (Check_Restriction): new procedure with an additional out parameter to
5287 inform the caller that a message has been issued
5288 * sem_aggr.adb: Minor modification of message
5289 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5290 instead of issuing an error message directly
5291 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5292 declarations are not placed after later declarations, by calling
5293 Check_Later_Vs_Basic_Declarations
5294 (Analyze_Subtype_Declaration): move here the check that an index or
5295 discriminant constraint must be a subtype mark. Change the check that
5296 a subtype of String must start at one so that it works on subtype marks.
5297 * sem_ch4.adb (Analyze_Call): move here the check that a named
5298 association cannot follow a positional one in a call
5299 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5300 instead of issuing an error message directly
5301 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5302 selector name is not a character literal or an operator symbol. Move
5303 here the check that the prefix of an expanded name cannot be a
5304 subprogram or a loop statement.
5305 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5306 procedure called from parsing and semantics to check that basic
5307 declarations are not placed after later declarations
5308 (Process_End_Label): move here the check that end label is not missing
5310 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5312 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5313 representation clause in codepeer mode, since it confuses CodePeer and
5314 does not bring useful info.
5316 2011-08-02 Ed Falis <falis@adacore.com>
5318 * init.c: initialize fp hw on MILS.
5320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5322 * errout.adb (First_Node): for bodies, return the node itself (small
5323 optimization). For other nodes, do not check source_unit if the node
5324 comes from Standard.
5326 2011-08-02 Robert Dewar <dewar@adacore.com>
5328 * exp_ch3.adb: Minor comment additions.
5329 * sem_ch13.adb: Minor reformatting.
5331 2011-08-02 Pascal Obry <obry@adacore.com>
5333 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5335 2011-08-02 Robert Dewar <dewar@adacore.com>
5337 * sem_attr.adb: Minor reformatting.
5339 2011-08-02 Robert Dewar <dewar@adacore.com>
5341 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5342 (Has_Default_Component_Value): Removed
5343 * einfo.ads Comment updates
5344 (Has_Default_Aspect): Replaces Has_Default_Value
5345 (Has_Default_Component_Value): Removed
5347 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5349 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5350 (Get_Simple_Init_Val): Handle Default_Value aspect
5351 (Needs_Simple_Initialization): Handle Default_Value aspect
5352 * exp_ch3.ads: Needs_Simple_Initialization
5353 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5354 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5356 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5357 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5358 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5360 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5362 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5363 package containing iteration primitives.
5364 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5366 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5368 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5369 "of", pre-analyze expression in case it is a function call with
5370 finalization actions that must be placed ahead of the loop.
5371 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5372 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5374 2011-08-02 Geert Bosch <bosch@adacore.com>
5376 * cstand.adb (Create_Float_Types): Only consider C's long double for
5377 Long_Long_Float, in addition to double.
5379 2011-08-02 Robert Dewar <dewar@adacore.com>
5381 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5382 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5383 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5386 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5388 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5391 2011-08-02 Javier Miranda <miranda@adacore.com>
5393 * einfo.ads, einfo.adb
5394 (Original_Access_Type): Move this attribute to Node26 since there was
5395 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5396 which causes conflicts and breaks the generation of the .NET compiler.
5397 (Interface_Name): Add missing documentation on JGNAT only uses of
5400 2011-08-02 Geert Bosch <bosch@adacore.com>
5402 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5403 (Find_Back_End_Float_Type): Likewise
5404 (Create_Back_End_Float_Types): Likewise
5405 (Create_Float_Types): Likewise
5406 (Register_Float_Type): Likewise
5407 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5408 Nlist and split out type selection in new local Find_Base_Type function.
5409 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5411 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5413 2011-08-02 Robert Dewar <dewar@adacore.com>
5415 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5417 * opt.ads: Minor comment change.
5418 * sem_ch12.adb: Minor code reorganization.
5420 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5422 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5423 subtype's list of rep items to the list on the full subtype in the case
5424 where the lists are the same.
5426 2011-08-02 Geert Bosch <bosch@adacore.com>
5428 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5429 using the one from System.Strings, which also deallocates all strings.
5431 2011-08-02 Geert Bosch <bosch@adacore.com>
5433 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5435 * gcc-interface/Make-lang.in: Update dependencies.
5437 2011-08-02 Olivier Hainque <hainque@adacore.com>
5439 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5442 2011-08-02 Javier Miranda <miranda@adacore.com>
5444 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5445 associated with anonymous access to subprograms.
5447 2011-08-02 Geert Bosch <bosch@adacore.com>
5450 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5451 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5452 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5453 (Add_Symbol_Definition): Move to switch-c.adb
5454 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5455 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5456 (Add_Symbol_Definition): Move to switch-c.adb.
5457 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5459 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5461 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5462 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5464 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5465 (Add_Symbol_Definition): Moved from Prepcomp.
5466 * switch-c.ads: Update copyright notice. Use String_List instead of
5467 Argument_List, removing dependency on System.OS_Lib.
5469 2011-08-02 Yannick Moy <moy@adacore.com>
5471 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5472 mode on initialization expression which does not respect SPARK
5474 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5475 if the tree referenced by its argument represents an initialization
5476 expression in SPARK, suitable for initializing an object in an object
5479 2011-08-02 Javier Miranda <miranda@adacore.com>
5481 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5482 internally generated access to subprogram with its associated protected
5484 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5486 2011-08-02 Geert Bosch <bosch@adacore.com>
5488 * cstand.adb (Register_Float_Type): Print information about type to
5489 register, if the Debug_Flag_Dot_B is set.
5490 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5491 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5492 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5493 with a requested precision of more than Max_Digits digits and no more
5494 than Max_Base_Digits digits, if a range specification is present and the
5495 Predefined_Float_Types list has a suitable type to derive from.
5496 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5497 case of type completion with pragma Import
5499 (Process_Import_Predefined_Type): Processing to complete a type
5500 with pragma Import. Currently supports floating point types only.
5501 (Set_Convention_From_Pragma): Do nothing without underlying type.
5502 (Process_Convention): Guard against absence of underlying type,
5503 which may happen when importing incomplete types.
5504 (Process_Import_Or_Interface): Handle case of importing predefined
5505 types. Tweak error message.
5507 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5509 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5510 functions to previous change. Reorganize code slightly.
5512 2011-08-02 Geert Bosch <bosch@adacore.com>
5514 * back_end.ads (Register_Type_Proc): New call back procedure type for
5515 allowing the back end to provide information about available types.
5516 (Register_Back_End_Types): New procedure to register back end types.
5517 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5519 * cstand.adb (Back_End_Float_Types): New list for floating point types
5520 supported by the back end.
5521 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5522 (Copy_Float_Type): New procedure to make new copies of predefined types.
5523 (Register_Float_Type): New call back procedure to populate the BEFT list
5524 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5525 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5526 (Create_Float_Types): New procedure to create entities for floating
5527 point types predefined in Standard, and put these and any remaining
5528 BEFTs on the Predefined_Float_Types list.
5529 * stand.ads (Predefined_Float_Types): New list for predefined floating
5530 point types that do not have declarations in package Standard.
5532 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5534 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5535 entity node for the unit containing the parameter.
5536 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5537 (Add_Inlined_Subprogram): Likewise.
5538 * gcc-interface/Make-lang.in: Update dependencies.
5540 2011-08-02 Thomas Quinot <quinot@adacore.com>
5542 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5545 2011-08-02 Geert Bosch <bosch@adacore.com>
5547 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5549 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5551 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5552 computed value of Base_Type.
5554 2011-08-02 Yannick Moy <moy@adacore.com>
5556 * restrict.adb (Check_Restriction): issue an error for any use of
5557 class-wide, even if the No_Dispatch restriction is not set.
5558 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5559 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5560 when completing a private extension, the type named in the private part
5561 is not the same as that named in the visible part.
5562 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5563 of an inherited primitive operations of a tagged type or type extension
5564 that returns the tagged type.
5565 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5566 function which returns True for an implicit operation inherited by the
5567 derived type declaration for the argument type.
5568 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5571 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5573 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5574 Process_Bounds, to perform analysis with expansion of a range or an
5575 expression that is the iteration scheme for a loop.
5576 (Analyze_Iterator_Specification): If domain of iteration is given by a
5577 function call with a controlled result, as is the case if call returns
5578 a predefined container, ensure that finalization actions are properly
5580 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5582 2011-08-02 Javier Miranda <miranda@adacore.com>
5584 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5585 * gcc-interface/Make-lang.in: Update dependencies.
5587 2011-08-02 Javier Miranda <miranda@adacore.com>
5589 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5590 determine if the analysis is performed using N or Original_Node (N).
5591 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5592 functionality of routine Is_Variable avoids code duplication.
5593 * checks.adb (Determine_Range): Handle temporaries generated by
5594 Remove_Side_Effects.
5596 2011-08-02 Javier Miranda <miranda@adacore.com>
5598 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5599 expansion of the condition. Required since the previous analysis was
5600 done with expansion disabled (see Resolve_Quantified_Expression) and
5601 hence checks were not inserted and record comparisons have not been
5604 2011-08-02 Ed Falis <falis@adacore.com>
5606 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5609 2011-08-02 Bob Duff <duff@adacore.com>
5611 * opt.ads: Minor comment fix.
5613 2011-08-02 Bob Duff <duff@adacore.com>
5615 * sem_ch12.adb (Analyze_Package_Instantiation,
5616 Analyze_Subprogram_Instantiation): Turn off style checking while
5617 analyzing an instance. Whatever style checks that apply to the generic
5618 unit should apply, so it makes no sense to apply them in an instance.
5619 This was causing trouble when compiling an instance of a runtime
5620 unit that violates the -gnatyO switch.
5621 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5622 one of the two case statements, causing spurious errors.
5624 2011-08-02 Robert Dewar <dewar@adacore.com>
5626 * uname.adb: Minor reformatting.
5627 * gnatcmd.adb: Minor reformatting.
5628 * exp_attr.adb: Minor reformatting.
5630 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5632 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5633 No_Dispatching_Calls, do not look for the Assign primitive, because
5634 predefined primitives are not created in this case.
5636 2011-08-02 Bob Duff <duff@adacore.com>
5638 * stylesw.ads: Minor comment fixes.
5640 2011-08-02 Robert Dewar <dewar@adacore.com>
5642 * freeze.adb (Add_To_Result): New procedure.
5644 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5646 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5647 time, if the specific run-time routines for handling streams of strings
5648 are not available, use the default mechanism.
5650 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5652 * s-regpat.ads: Fix typo.
5654 2011-08-02 Vincent Celier <celier@adacore.com>
5656 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5657 not null, call it to create the in memory config project file without
5658 parsing an existing default config project file.
5660 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5662 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5664 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5666 * sem_elim.adb: an abstract subprogram does not need an eliminate
5667 pragma for its descendant to be eliminable.
5669 2011-08-02 Ed Falis <falis@adacore.com>
5671 * init.c: revert to handling before previous checkin for VxWorks
5672 * s-intman-vxworks.adb: delete unnecessary declarations related to
5673 using Ada interrupt facilities for handling signals.
5674 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5675 * s-intman-vxworks.ads: Import __gnat_install_handler as
5676 Initialize_Interrupts.
5677 * s-taprop-vxworks.adb: Delete Signal_Mask.
5678 (Abort_Handler): change construction of mask to unblock exception
5681 2011-08-02 Jerome Guitton <guitton@adacore.com>
5683 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5684 Debug_Raise_Exception before propagation starts.
5686 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5688 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5689 to Restriction_Check_Required.
5690 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5691 * sem_res.adb (Resolve_Call): Likewise.
5692 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5694 2011-08-02 Bob Duff <duff@adacore.com>
5696 * stylesw.ads: Update comment.
5697 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5698 * errout.ads: Remove obsolete comment.
5700 2011-08-02 Javier Miranda <miranda@adacore.com>
5702 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5703 (Set_Is_Safe_To_Reevaluate): new procedure.
5704 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5705 assignment is allowed on safe-to-reevaluate variables.
5706 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5707 temporary created to remove side effects in expressions that use
5708 the secondary stack as safe-to-reevaluate.
5709 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5710 variables that are not true constants.
5712 2011-08-02 Robert Dewar <dewar@adacore.com>
5714 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5715 sem_res.adb, sem_ch6.adb: Minor reformatting.
5717 2011-08-02 Jerome Guitton <guitton@adacore.com>
5719 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5721 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5723 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5724 not set Overridden_Operation if subprogram is an initialization
5727 2011-08-02 Yannick Moy <moy@adacore.com>
5729 * par-ch6.adb: Correct obsolete name in comments
5730 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5731 which takes two message arguments (existing function takes one), with
5732 second message used for continuation.
5733 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5734 block statements that originate from a source block statement, not
5735 generated block statements
5736 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5737 symmetry with procedure case
5738 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5739 function to issue an error in formal mode if a package specification
5740 contains more than one tagged type or type extension.
5741 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5742 parameters matching formals of tagged types are objects (or ancestor
5743 type conversions of objects), not general expressions. Issue an error
5744 on view conversions that are not involving ancestor conversion of an
5746 (Resolve_Type_Conversion): in formal mode, issue an error on the
5747 operand of an ancestor type conversion which is not an object
5748 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5749 procedure so that it works also for actuals of function calls
5750 (Is_Actual_Tagged_Parameter): new function which determines if its
5751 argument is an actual parameter of a formal of tagged type in a
5753 (Is_SPARK_Object_Reference): new function which determines if the tree
5754 referenced by its argument represents an object in SPARK
5756 2011-08-02 Robert Dewar <dewar@adacore.com>
5758 * sem_ch3.adb: Minor reformatting
5759 Minor comment addition
5760 Minor error msg text change
5762 2011-08-02 Javier Miranda <miranda@adacore.com>
5764 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5765 function. Used to be more precise when we generate a variable plus one
5766 assignment to remove side effects in the evaluation of the Bound
5768 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5769 of the bound expression to force its re-analysis and thus expand the
5770 associated transient scope (if required). Code cleanup replacing the
5771 previous code that declared the constant entity by an invocation to
5772 routine Force_Evaluation which centralizes this work in the frontend.
5774 2011-08-02 Robert Dewar <dewar@adacore.com>
5776 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5777 (Base_Type): Now uses improved Is_Base_Type function
5778 * einfo.ads (Base_Type): Inline this function
5780 2011-08-02 Robert Dewar <dewar@adacore.com>
5782 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5783 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5785 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5787 * gcc-interface/Make-lang.in: Update dependencies.
5788 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5791 2011-08-02 Yannick Moy <moy@adacore.com>
5793 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5794 non-simple expression used in delta constraint
5795 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5796 index constraint which is not a subtype mark
5797 * par.adb: With and use Restrict
5798 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5799 mode on component type which is not a subtype mark and default
5800 expression on component
5801 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5802 of string which does not have a lower index bound equal to 1
5803 (Array_Type_Declaration): issue an error in formal mode on index or
5804 component type which is not a subtype mark, and on aliased keyword on
5806 (Derived_Type_Declaration): issue an error in formal mode on interface,
5807 limited or abstract type
5808 (Record_Type_Declaration): issue an error in formal mode on interface
5809 (Record_Type_Definition): issue an error in formal mode on tagged types
5810 and type extensions not declared in the specification of a library unit
5811 package; on null non-tagged record; on variant part
5813 2011-08-02 Vincent Celier <celier@adacore.com>
5815 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5816 not declared for qualified library project when Library_Name is not
5817 declared, but Library_Dir is.
5819 2011-08-02 Robert Dewar <dewar@adacore.com>
5821 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5822 pragmas (affects aspects [Component_]Default_Value
5823 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5824 component type for the resolution
5826 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5828 * einfo.adb (Base_Type): Tune implementation for speed.
5830 2011-08-02 Robert Dewar <dewar@adacore.com>
5832 * freeze.adb: Minor reformatting.
5834 2011-08-02 Thomas Quinot <quinot@adacore.com>
5836 * scos.ads: Update comments.
5838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5840 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5841 base type, because the parent may be a subtype of a private type whose
5842 convention is established in a private part.
5844 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5846 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5847 statement in a block when the expansion of the return expression has
5848 created a finalization chain.
5849 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5850 with the parent node.
5851 Add N_Extended_Return_Statement to handle the case where a transient
5852 object declaration appears in the Return_Object_Declarations list of
5853 an extended return statement.
5855 2011-08-02 Matthew Gingell <gingell@adacore.com>
5857 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5858 unused parameter 'name'.
5860 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5862 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5863 inherited operation, check whether its alias, which is the source
5864 operastion that it renames, has been marked eliminated.
5866 2011-08-02 Javier Miranda <miranda@adacore.com>
5868 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5869 in-mode parameter whose type is an access type since it can be used to
5870 modify its designated object. Enforce code that handles as safe an
5871 access type that is not access-to-constant but it is the result of a
5872 previous removal of side-effects.
5873 (Remove_Side_Effects): Minor code reorganization of cases which require
5874 no action. Done to incorporate documentation on new cases uncovered
5875 working in this ticket: no action needed if this routine was invoked
5876 too early and the nodes are not yet decorated.
5877 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5878 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5879 were issued with actuals that are implicitly provided by
5882 2011-08-02 Robert Dewar <dewar@adacore.com>
5884 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5886 2011-08-02 Yannick Moy <moy@adacore.com>
5888 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5889 to issue an error in formal mode on attribute not supported in this mode
5890 (Analyze_Attribute): issue errors on standard attributes not supported
5892 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5893 comment, and issue error in formal mode on modulus which is not a power
5895 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5897 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5899 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5900 operator on modular type (except 'not').
5902 2011-08-02 Robert Dewar <dewar@adacore.com>
5904 * gnat_rm.texi: Minor reformatting.
5906 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5908 * s-osinte-linux.ads: Minor comment update and reformatting.
5909 * i-cexten.ads: Make this unit pure, as for its parent.
5910 Will allow its usage in more contexts if needed.
5912 2011-08-02 Robert Dewar <dewar@adacore.com>
5914 * s-utf_32.ads: Minor comment fix.
5916 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5918 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5919 operation of a tagged synchronized type, handle the case where the
5920 controlling argument is overloaded.
5922 2011-08-02 Yannick Moy <moy@adacore.com>
5924 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5925 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5926 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5927 SPARK mode and formal verification mode on processing SPARK restriction
5928 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5929 requiring consistency checking.
5931 2011-08-02 Robert Dewar <dewar@adacore.com>
5933 * sem_res.adb: Minor reformatting.
5935 2011-08-02 Robert Dewar <dewar@adacore.com>
5937 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5938 a-cforse.ads: Remove unneeded with of Ada.Containers
5939 Remove commented out pragma Inline's
5940 Move specifications of new subprograms to the actual specs
5942 2011-08-02 Yannick Moy <moy@adacore.com>
5944 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5945 a-cforse.ads: Update comments.
5947 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5949 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5951 2011-08-02 Robert Dewar <dewar@adacore.com>
5953 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5954 a-cforse.ads, a-cofove.ads: Minor reformatting.
5956 2011-08-02 Claire Dross <dross@adacore.com>
5958 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5959 a-cofove.ads: Add comments.
5961 2011-08-02 Yannick Moy <moy@adacore.com>
5963 * gnat_rm.texi: Document formal containers.
5965 2011-08-02 Emmanuel Briot <briot@adacore.com>
5967 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5970 2011-08-02 Robert Dewar <dewar@adacore.com>
5972 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5975 2011-08-02 Robert Dewar <dewar@adacore.com>
5977 * aspects.adb: New aspects Default_Value and Default_Component_Value
5978 New format of Aspect_Names table checks for omitted entries
5979 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5980 handling of boolean aspects for derived types.
5981 New aspects Default_Value and Default_Component_Value
5982 New format of Aspect_Names table checks for omitted entries
5983 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5984 (Has_Default_Value): New flag
5985 (Has_Default_Component_Value): New flag
5986 (Has_Default_Value): New flag
5987 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5989 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5990 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5991 Default_Value and Default_Component_Value
5992 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5993 New aspects Default_Value and Default_Component_Value
5994 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5995 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5997 2011-08-02 Vincent Celier <celier@adacore.com>
5999 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
6000 inherit library kind.
6002 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6004 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
6007 2011-08-02 Robert Dewar <dewar@adacore.com>
6009 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
6011 2011-08-02 Yannick Moy <moy@adacore.com>
6013 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
6015 2011-08-02 Robert Dewar <dewar@adacore.com>
6017 * impunit.adb: Add comment.
6019 2011-08-02 Yannick Moy <moy@adacore.com>
6021 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
6022 qualification of aggregates in formal mode
6023 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
6025 (Resolve_Aggregate): complete the test that an aggregate is adequately
6026 qualified in formal mode
6028 2011-08-02 Pascal Obry <obry@adacore.com>
6030 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
6031 * mlib-prj.adb: Supress warning when compiling binder generated file.
6032 (Build_Library): Supress all warnings when compiling the binder
6035 2011-08-02 Yannick Moy <moy@adacore.com>
6037 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
6039 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
6040 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
6041 Add with/use clauses to make Check_Formal_Restriction visible
6043 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6045 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
6046 in-parameters when type of the generic formal is private in the generic
6047 spec and non-private in the body.
6049 2011-08-02 Claire Dross <dross@adacore.com>
6051 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
6052 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
6053 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
6054 * impunit.adb, Makefile.rtl: Take new files into account.
6056 2011-08-02 Robert Dewar <dewar@adacore.com>
6058 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
6059 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6061 2011-08-02 Yannick Moy <moy@adacore.com>
6063 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
6065 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
6066 matching static array bounds, taking into account the special case of
6068 * sem_ch3.adb: Typo in comment.
6070 2011-08-02 Yannick Moy <moy@adacore.com>
6072 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
6073 which issues an error in formal mode if its argument node is originally
6075 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
6076 has a discriminant specification so that it does not include the case
6078 (Derived_Type_Declaration): move here the test that a derived type has a
6079 discriminant specification
6080 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
6081 first element of a component association before accessing its choices
6082 (presence of component association is not enough)
6083 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
6084 declaration is a library item before accessing the next element in a
6085 list, as library items are not member of lists
6086 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
6087 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
6088 Check_Formal_Restriction whenever possible.
6090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6092 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
6093 reference when needed.
6095 2011-08-02 Bob Duff <duff@adacore.com>
6097 * gnat_ugn.texi: Fix typo.
6099 2011-08-02 Vincent Celier <celier@adacore.com>
6101 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
6102 archive file name. Do not use the full path name of archives for Open
6105 2011-08-02 Robert Dewar <dewar@adacore.com>
6107 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
6108 Analyze_Aspect_Specifications
6110 (Analyze_Aspect_Specifications): New handling for boolean aspects
6111 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
6112 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
6113 sequence for Analyze_Aspect_Specifications
6114 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
6115 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
6117 2011-08-02 Robert Dewar <dewar@adacore.com>
6119 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
6120 aspects, since these no longer exist.
6122 2011-08-02 Robert Dewar <dewar@adacore.com>
6124 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
6125 semicolon, do not try to see if there are aspects following it.
6126 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
6129 2011-08-02 Robert Dewar <dewar@adacore.com>
6131 * sem_ch8.adb, aspects.ads: Minor reformatting.
6133 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
6135 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
6136 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6138 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6140 2011-08-02 Yannick Moy <moy@adacore.com>
6142 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6143 mode on subprogram declaration outside of package specification, unless
6144 it is followed by a pragma Import
6145 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6146 Access_Type_Declaration): issue error in formal mode on access type
6147 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6149 (Analyze_Object_Declaration): issue error in formal mode on object
6150 declaration which does not respect SPARK restrictions
6151 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6152 declaration which does not respect SPARK restrictions
6153 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6154 error in formal mode on digits or delta constraint
6155 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6156 decimal fixed point type
6157 (Derived_Type_Declaration): issue error in formal mode on derived type
6158 other than type extensions of tagged record types
6159 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6160 with check on access definition
6161 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6162 mode on protected definition.
6163 (Analyze_Task_Definition): issue error in formal mode on task definition
6165 2011-08-02 Robert Dewar <dewar@adacore.com>
6167 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6169 2011-08-02 Javier Miranda <miranda@adacore.com>
6171 * sem_ch6.adb (Can_Override_Operator): New function.
6172 (Verify_Overriding_Indicator): Add missing code to check overriding
6173 indicator in operators. Fixes regression.
6174 (Check_Overriding_Indicator): Minor reformating after replacing the
6175 code that evaluates if the subprogram can override an operator by
6176 invocations to the above new function.
6178 (Write_Field26_Name): Add missing code to ensure that, following
6179 the documentation in einfo.ads, this field is not shown as attribute
6180 "Static_Initialization" on non-dispatching functions.
6182 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6184 * sem_res.adb (Resolve_Call): A call to
6185 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6186 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6187 i.e., when the second parameter is of type Time_Span.
6189 2011-08-02 Vincent Celier <celier@adacore.com>
6191 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6192 with an archive instead of -L<library dir> -l<library name>.
6194 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6196 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6197 mark the base types In_Use in addition to making the operations
6200 2011-08-02 Ed Falis <falis@adacore.com>
6202 * init.c: add and setup __gnat_signal_mask for the exception signals
6203 * s-inmaop-vxworks.adb: new file.
6204 * s-intman-vxworks.adb: remove unnecessary initializations and
6206 * s-intman-vxworks.ads: remove unnecessary variable
6207 * s-taprop-vxworks.adb: simplify signal initialization
6209 2011-08-02 Robert Dewar <dewar@adacore.com>
6211 * sem_ch8.adb: Minor code reorganization, comment updates.
6213 2011-08-02 Robert Dewar <dewar@adacore.com>
6215 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6216 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6218 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6219 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6221 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6223 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6224 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6225 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6226 use_type_clauses, to handle more efficiently use_type and use_all_type
6228 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6229 Ada2012 Use_All_Type clause.
6230 (Use_Class_Wide_Operations): new procedure.
6232 2011-08-02 Robert Dewar <dewar@adacore.com>
6234 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6235 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6236 expression to expression function.
6238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6240 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6241 if types are compatible.
6243 2011-08-02 Yannick Moy <moy@adacore.com>
6245 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6246 returns True if its argument array types have same dimension and same
6247 static bounds at each index.
6248 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6249 OUT or IN OUT paramaters which are not view conversions in SPARK.
6250 (Resolve_Arithmetic_Op): issue an error in formal mode on
6251 multiplication or division with operands of fixed point types which are
6252 not qualified or explicitly converted.
6253 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6254 Boolean or array type (except String) operands.
6255 (Resolve_Equality_Op): issue an error in formal mode on equality
6256 operators for array types other than String with non-matching static
6258 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6259 for array types with non-matching static bounds. Factorize the code in
6260 Matching_Static_Array_Bounds.
6261 (Resolve_Qualified_Expression): issue an error in formal mode on
6262 qualified expressions for array types with non-matching static bounds.
6263 (Resolve_Type_Conversion): issue an error in formal mode on type
6264 conversion for array types with non-matching static bounds
6266 2011-08-02 Robert Dewar <dewar@adacore.com>
6268 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6270 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6272 * par-ch9.adb: save location of entry for proper error message.
6274 2011-08-02 Javier Miranda <miranda@adacore.com>
6276 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6277 (Use_Full_View) which permits this routine to climb through the
6278 ancestors using the full-view of private parents.
6279 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6280 Use_Full_View to true in calls to Is_Ancestor.
6281 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6282 true in call to Is_Ancestor.
6283 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6284 Use_Full_View to true in call to Is_Ancestor.
6285 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6286 call to Is_Ancestor.
6287 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6288 Use_Full_View to true in calls to Is_Ancestor.
6289 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6290 Make_Select_Specific_Data_Table, Register_Primitive,
6291 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6292 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6293 to true in call to Is_Ancestor.
6294 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6295 Use_Full_View to true in calls to Is_Ancestor.
6297 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6298 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6300 2011-08-02 Robert Dewar <dewar@adacore.com>
6302 * gnat_rm.texi: Minor reformatting.
6303 * sem_prag.adb: Minor reformatting.
6305 2011-08-02 Tristan Gingold <gingold@adacore.com>
6307 * vms_data.ads: Add VMS qualifier for -gnateP.
6309 2011-08-02 Robert Dewar <dewar@adacore.com>
6311 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6312 * par-ch7.adb (P_Package): Proper placement of aspects for package
6314 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6315 (End_Statements): Add Is_Sloc parameterr
6316 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6317 (Check_End): Ad Is_Sloc parameter
6318 (End_Statements): Add Is_Sloc parameterr
6320 2011-08-02 Vincent Celier <celier@adacore.com>
6322 * ug_words: Add VMS qualifier equivalent to -gnateP:
6323 /SYMBOL_PREPROCESSING.
6325 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6327 * gnat-style.texi: For hexadecimal numeric literals the typical
6328 grouping of digits is 4 to represent 2 bytes.
6329 A procedure spec which is split into several lines is indented two
6332 2011-08-02 Yannick Moy <moy@adacore.com>
6334 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6335 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6336 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6338 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6339 choice in array aggregate
6340 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6342 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6343 positional and named aggregate for record, or others in record
6344 aggregate, or multiple choice in record aggregate
6345 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6346 array operands to logical operations AND, OR and XOR do not have the
6347 same static lower and higher bounds
6348 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6350 2011-08-01 Robert Dewar <dewar@adacore.com>
6352 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6353 Replaces Last_Source_Node_In_Sequence.
6354 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6355 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6356 parens and blank in string (this was inconsistently implemented).
6358 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6359 blank in string (this was inconsistently implemented).
6361 (Set_Global_Switches): Set formal mode switches appropriately
6362 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6364 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6365 call Set_Error_Msg_Lang to set "spark" as language name.
6366 * par.adb: Remove unnecessary call to set formal language for errout
6367 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6368 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6370 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6371 calls to it, moved after resolution so that types are known
6372 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6373 result of concatenation is not of type String
6374 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6375 concatenation is not properly restricted
6376 * gnat_rm.texi: Add doc on pragma Spark_95.
6377 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6378 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6379 * gcc-interface/Make-lang.in: Update dependencies.
6381 2011-08-01 Javier Miranda <miranda@adacore.com>
6383 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6384 condition that detects if the overridden operation must replace an
6387 2011-08-01 Javier Miranda <miranda@adacore.com>
6389 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6390 code declarations inserted by Insert_Actions in each alternative of the
6391 N_Case_Expression node.
6393 2011-08-01 Robert Dewar <dewar@adacore.com>
6395 * sem_ch6.adb: Minor code reorganization.
6396 * sem_util.adb: Minor reformatting.
6398 2011-08-01 Pascal Obry <obry@adacore.com>
6400 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6401 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6403 2011-08-01 Yannick Moy <moy@adacore.com>
6405 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6406 literal or operator symbol which is prefixed
6407 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6408 mode on access attributes.
6409 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6410 that concatenation operands are properly restricted in formal mode
6411 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6412 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6413 result of the concatenation has a type different from String.
6414 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6415 Analyze_Quantified_Expression, Analyze_Slice,
6416 Analyze_Null): issue an error in formal mode on unsupported constructs
6418 (Analyze_Block_Statement): only issue error on source block statement
6419 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6420 function which returns the last node in a list of nodes for which
6421 Comes_From_Source returns True, if any
6422 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6423 Last_Source_Node_In_Sequence
6424 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6425 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6426 mode on unsupported constructs
6427 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6428 rest of the actions may be needed later on since the error is marked as
6430 * sinfo.ads: Typos in comments.
6432 2011-08-01 Pascal Obry <obry@adacore.com>
6434 * projects.texi: Minor editing.
6436 2011-08-01 Yannick Moy <moy@adacore.com>
6438 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6439 insertion character ~~
6440 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6441 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6442 with insertion character ~~
6443 (Set_Msg_Text): treat insertion character ~~
6444 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6445 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6446 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6447 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6448 errors related to the formal language restriction not serious
6449 (insertion character |).
6450 * par.adb (Par): set formal language for error messages if needed
6451 * sem_ch6.adb (Check_Missing_Return): take into account possible
6452 generated statements at the end of the function
6453 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6454 enumeration value to define a new pragma SPARK_95
6455 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6456 SPARK_Version): new type and variables to store the SPARK version
6458 (SPARK_Mode): return True when SPARK_Version is set
6459 * par-prag.adb: Correct indentation
6460 (Prag): take Pragma_SPARK_95 into account
6461 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6464 2011-08-01 Robert Dewar <dewar@adacore.com>
6466 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6467 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6468 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6470 2011-08-01 Pascal Obry <obry@adacore.com>
6472 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6473 Target_Name to Get_Path call.
6474 (Parse_Single_Project): Likewise.
6475 (Post_Parse_Context_Clause): Likewise.
6476 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6477 Call Initialise_Project_Path with the proper Target_Name.
6478 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6480 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6481 with the proper Target_Name.
6482 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6484 (Parse_Project_And_Apply_Config): Likewise.
6485 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6486 This is fine as this part of the code is supporting only native
6488 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6489 is fine as this part of the code is supporting only native compilation.
6491 2011-08-01 Yannick Moy <moy@adacore.com>
6493 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6494 of homonym, unless the homonym is one of the cases allowed in SPARK
6495 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6496 package declaration occurring after a body.
6498 2011-08-01 Robert Dewar <dewar@adacore.com>
6500 * checks.adb, exp_ch4.adb: Minor reformatting.
6502 2011-08-01 Javier Miranda <miranda@adacore.com>
6504 * einfo.ads (Access_Disp_Table): Fix documentation.
6505 (Dispatch_Table_Wrappers): Fix documentation.
6507 2011-08-01 Pascal Obry <obry@adacore.com>
6509 * prj-env.adb, prj-env.ads: Minor reformatting.
6511 2011-08-01 Yannick Moy <moy@adacore.com>
6513 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6514 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6515 procedures out of these packages.
6516 * errout.ads, errout.adb
6517 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6518 procedures in of this package
6519 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6520 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6521 on misplaced later vs initial declarations, like in Ada 83
6522 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6523 formal mode on attribute of private type whose full type declaration
6525 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6526 package declaration inside a package specification
6527 (Analyze_Full_Type_Declaration): issue error in formal mode on
6528 controlled type or discriminant type
6529 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6530 user-defined operator means that it should come from the source
6531 (New_Overloaded_Entity): issue error in formal mode on overloaded
6533 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6535 2011-08-01 Thomas Quinot <quinot@adacore.com>
6537 * atree.adb: Minor reformatting.
6538 * checks.adb: Minor reformatting.
6540 2011-08-01 Vincent Celier <celier@adacore.com>
6542 * s-parame-vms-ia64.ads: Fix typo in comment
6544 * s-parame-vms-restrict.ads: Removed, unused.
6546 2011-08-01 Javier Miranda <miranda@adacore.com>
6549 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6551 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6552 * sem_ch3.ads, sem_ch3.adb
6553 (Is_Constant_Bound): New extended version of the subprogram that was
6554 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6555 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6556 * sem_aux.ads (Constant_Value): Fix typo in comment.
6557 * checks.adb (Generate_Index_Checks): New implementation which, for
6558 array objects with constant bounds, generates the runtime check
6559 referencing the bounds of the array type. For other cases this routine
6560 provides its previous behavior obtaining such values from the array
6562 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6564 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6565 we cannot have semantic interpretations of the new node.
6567 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6569 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6572 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6574 * sem_ch8.adb: Minor code editing.
6575 * s-vxwext.adb: Remove trailing space.
6576 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6577 consistency with other files.
6579 2011-08-01 Thomas Quinot <quinot@adacore.com>
6581 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6583 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6585 * par-ch10.adb: reject parameterized expressions as compilation unit.
6586 * sem_ch4.adb: handle properly conditional expression with overloaded
6587 then_clause and no else_clause.
6589 2011-08-01 Tristan Gingold <gingold@adacore.com>
6591 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6592 like done by System.Aux_DEC.
6593 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6595 2011-08-01 Yannick Moy <moy@adacore.com>
6597 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6598 missing label at end of declaration (subprogram or package)
6599 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6600 of positional and named parameter association
6601 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6602 Error_Msg_SP which adds a prefix to the error message giving the name
6603 of the formal language analyzed
6604 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6605 access result type in subprogram, unconstrained array as result type,.
6606 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6608 * sem_ch8.adb: Code clean up.
6610 2011-08-01 Javier Miranda <miranda@adacore.com>
6612 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6613 * einfo.ads (Access_Disp_Table): Fix documentation.
6614 (Dispatch_Table_Wrappers): Fix documentation.
6615 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6616 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6617 to enforce the documentation of this attribute.
6618 (Set_Is_Interface): Cleanup the assertion.
6619 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6620 the Underlying_Type entity before reading attribute Access_Disp_Table.
6621 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6622 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6623 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6624 the Underlying_Type entity before reading attribute Access_Disp_Table.
6625 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6626 Locate the Underlying_Type entity before reading attribute
6629 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6631 * s-poosiz.ads: Additional overriding indicators.
6633 2011-08-01 Yannick Moy <moy@adacore.com>
6635 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6637 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6638 parameter specification does not include a subtype mark.
6639 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6640 formal mode on abstract subprogram.
6641 (Analyze_Subprogram_Specification): issue error in formal mode on
6642 user-defined operator.
6643 (Process_Formals): issue error in formal mode on access parameter and
6645 * sem_ch9.adb (Analyze_Abort_Statement,
6646 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6647 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6648 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6649 Analyze_Requeue, Analyze_Selective_Accept,
6650 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6651 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6652 issue error in formal mode on user-defined raise statement.
6654 2011-08-01 Thomas Quinot <quinot@adacore.com>
6656 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6657 declaration being hidden when overriding an implicit inherited
6659 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6660 (-gnats), do not complain about a source file that contains only a
6663 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6665 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6666 variable if already set.
6668 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6670 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6671 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6672 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6673 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6674 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6675 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6676 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6677 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6678 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6679 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6680 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6681 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6682 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6683 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6684 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6685 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6686 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6687 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6688 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6689 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6690 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6691 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6692 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6693 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6694 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6695 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6696 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6697 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6698 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6699 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6700 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6701 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6702 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6703 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6704 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6705 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6706 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6707 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6708 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6709 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6710 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6711 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6712 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6713 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6714 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6715 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6716 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6717 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6718 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6719 Use GNAT instead of GNARL.
6721 2011-08-01 Bob Duff <duff@adacore.com>
6723 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6724 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6725 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6728 2011-08-01 Yannick Moy <moy@adacore.com>
6730 * debug.adb (d.D) reverve flag for the SPARK mode
6731 (d.E) reverve flag for SPARK generation mode
6732 (d.F) reverve flag for Why generation mode
6733 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6734 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6735 functions which return True when the corresponding modes are set
6736 (Formal_Language): return "spark" or "alfa" when in formal verification
6738 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6739 Error_Msg to prefix the error message with a tag giving the formal
6741 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6742 message with a tag giving the formal language
6743 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6745 (Analyze_Case_Statement): issue error in formal mode on case statement
6746 with a single "others" case alternative
6747 (Analyze_Exit_Statement): issue errors in formal mode on exit
6748 statements which do not respect SPARK restrictions
6749 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6750 (Check_Unreachable_Code): always issue an error (not a warning) in
6751 formal mode on unreachable code (concerns both code after an infinite
6752 loop and after an unconditional jump, both not allowed in SPARK)
6753 * sem_ch6.adb (Analyze_Return_Statement): add call to
6754 Set_Return_Present for a procedure containing a return statement
6755 (already done for functions in Analyze_Function_Return)
6756 (Analyze_Function_Return): issue error in formal mode on extended
6757 return or if return is not last statement in function
6758 (Check_Missing_Return): issue error in formal mode if function does
6759 not end with return or if procedure contains a return
6760 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6761 function to detect if there is an inner scope of its parameter S which
6764 2011-08-01 Thomas Quinot <quinot@adacore.com>
6766 * sem_ch6.ads: Minor reformatting.
6768 2011-08-01 Javier Miranda <miranda@adacore.com>
6770 * sem_util.adb (Abstract_Interface_List): Complete condition when
6771 processing private type declarations to avoid reading unavailable
6773 (Is_Synchronized_Tagged_Type): Complete condition when processing
6774 private extension declaration nodes to avoid reading unavailable
6777 2011-08-01 Thomas Quinot <quinot@adacore.com>
6779 * sem_ch3.adb: Minor reformatting.
6781 2011-08-01 Thomas Quinot <quinot@adacore.com>
6783 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6784 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6785 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6786 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6787 for VMS, instead parametrize the common implementation with
6788 System.Parameters declarations.
6790 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6792 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6794 2011-08-01 Tristan Gingold <gingold@adacore.com>
6796 * seh_init.c: Fix SEH handler installation on win64.
6798 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6800 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6801 double analysis of an anonymous access to subprogram, because it can
6802 lead to improper sharing of profiles and a back-end crash.
6804 2011-08-01 Robert Dewar <dewar@adacore.com>
6806 * make.adb, sem_ch4.adb: Minor reformatting.
6807 * gcc-interface/Make-lang.in: Update dependencies.
6808 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6810 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6812 * gnat_rm.texi: Fix definition of Long_Integer.
6814 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6816 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6817 to prevent storage exhaustion.
6818 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6819 finalized is a function body, insert the cleanup code before the final
6820 return statement, to prevent spurious warnings.
6821 * s-pooglo.ads: add overriding indicator.
6823 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6825 * sem_ch4.adb (Operator_Check): improve error message when both a
6826 with_clause and a use_clause are needed to make operator usage legal.
6827 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6828 determine whether a compilation unit is visible within an other,
6829 either through a with_clause in the current unit, or a with_clause in
6830 its library unit or one one of its parents.
6832 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6834 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6835 over an arbitrary expression of an array or container type.
6836 * lib-xref.adb: clarify comment.
6838 2011-08-01 Bob Duff <duff@adacore.com>
6840 * einfo.ads: Minor reformatting.
6841 * debug.adb: Minor comment improvement.
6843 2011-08-01 Javier Miranda <miranda@adacore.com>
6845 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6846 consider hidden subprograms as valid candidates.
6848 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6850 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6852 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6854 * gnat_ugn.texi: Fix typo.
6856 2011-08-01 Robert Dewar <dewar@adacore.com>
6858 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6859 lib-xref.adb: Minor reformatting
6861 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6863 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6864 when to generate a call to Move_Final_List.
6865 (Has_Controlled_Parts): Remove this function.
6867 2011-08-01 Geert Bosch <bosch@adacore.com>
6869 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6872 2011-08-01 Thomas Quinot <quinot@adacore.com>
6874 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6875 explicit raise of a predefined exception as Comes_From_Source if the
6876 original N_Raise_Statement comes from source.
6878 2011-08-01 Robert Dewar <dewar@adacore.com>
6880 * sinfo.ads: Add comment.
6881 * sem_ch6.adb: Minor reformatting.
6883 2011-08-01 Robert Dewar <dewar@adacore.com>
6885 * freeze.adb (Freeze_Entity): Refine check for bad component size
6886 clause to avoid rejecting confirming clause when atomic/aliased present.
6888 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6890 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6891 better determine whether an entity reference is a write.
6892 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6894 * lib-xref.adb (Output_References): Do no suppress a read reference at
6895 the same location as an immediately preceeding modify-reference, to
6896 handle properly in-out actuals.
6898 2011-08-01 Tristan Gingold <gingold@adacore.com>
6900 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6902 2011-08-01 Quentin Ochem <ochem@adacore.com>
6904 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6905 heap to compute the result.
6907 2011-08-01 Robert Dewar <dewar@adacore.com>
6909 * atree.ads: Minor reformatting.
6911 2011-08-01 Emmanuel Briot <briot@adacore.com>
6913 * g-expect.adb (Get_Command_Output): Fix memory leak.
6915 2011-08-01 Geert Bosch <bosch@adacore.com>
6917 * cstand.adb (P_Float_Type): New procedure to print the definition of
6918 predefined fpt types.
6919 (P_Mixed_Name): New procedure to print a name using mixed case
6920 (Print_Standard): Use P_Float_Type for printing floating point types
6921 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6922 precision IEEE float.
6924 2011-08-01 Thomas Quinot <quinot@adacore.com>
6926 * sem_ch3.adb: Minor reformatting.
6928 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6930 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6931 the completion of a generic function, insert the new body rather than
6932 rewriting the original.
6934 2011-08-01 Yannick Moy <moy@adacore.com>
6936 * sinfo.ads, errout.ads: Typos in comments.
6938 2011-08-01 Robert Dewar <dewar@adacore.com>
6940 * par-endh.adb: Minor reformatting.
6942 2011-08-01 Robert Dewar <dewar@adacore.com>
6944 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6945 (Pre_Post_Aspects): New subtype.
6946 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6947 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6948 * par-ch7.adb (P_Package): Remove Decl parameter
6949 (P_Package): Handle new syntax for aspects (before IS)
6950 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6952 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6953 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6954 (P_Package): Remove Decl parameter
6955 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6957 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6959 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6960 * sinfo.ads: Document new syntax for aspects in packages etc.
6961 * sprint.adb: Handle new syntax of aspects before IS in package
6963 2011-08-01 Thomas Quinot <quinot@adacore.com>
6965 * atree.ads: Minor reformatting.
6966 * sem_prag.adb: Minor reformatting.
6968 2011-08-01 Robert Dewar <dewar@adacore.com>
6970 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6971 case expr alternative.
6973 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6975 * sem_ch12.adb: Fix typo.
6977 2011-08-01 Geert Bosch <bosch@adacore.com>
6979 * sem_prag.adb (Check_No_Link_Name): New procedure.
6980 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6981 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6982 instead of Standard_Long_Long_Float_Size global. Preparation for
6983 eventual removal of per type constants.
6984 * exp_util.ads (Get_Stream_Size): New function returning the stream
6985 size value of subtype E.
6986 * exp_util.adb (Get_Stream_Size): Implement new function.
6987 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6989 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6991 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6993 2011-08-01 Geert Bosch <bosch@adacore.com>
6995 * cstand.adb: Fix comments.
6996 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6999 2011-08-01 Robert Dewar <dewar@adacore.com>
7001 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
7003 2011-08-01 Geert Bosch <bosch@adacore.com>
7005 * atree.ads: Fix comment.
7007 2011-08-01 Robert Dewar <dewar@adacore.com>
7009 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
7010 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
7011 * par.adb: Add with for Namet.Sp.
7012 * par-tchk.adb: Minor reformatting.
7014 2011-08-01 Vincent Celier <celier@adacore.com>
7016 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
7017 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
7018 of the init procedure of a SAL.
7019 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
7022 2011-08-01 Thomas Quinot <quinot@adacore.com>
7024 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
7027 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7029 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
7031 2011-08-01 Thomas Quinot <quinot@adacore.com>
7033 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
7034 conformant with its spec (return True only for types that have
7035 an overriding Initialize primitive operation that prevents them from
7036 having preelaborable initialization).
7037 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
7038 initialization for controlled types in Ada 2005 or later mode.
7040 2011-08-01 Robert Dewar <dewar@adacore.com>
7042 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
7044 (Same_Aspect): New function.
7045 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
7046 Type_Invariant, Precondition, Postcondition.
7047 * snames.ads-tmpl: Add Name_Type_Invariant.
7049 2011-08-01 Robert Dewar <dewar@adacore.com>
7051 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
7053 (Freeze_All_Ent): Fix error in handling inherited aspects.
7054 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
7055 already analyzed, but don't skip entire processing of a declaration,
7056 that's wrong in some cases of declarations being rewritten.
7057 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
7058 Don't delay for integer, string literals
7059 Treat predicates in usual manner for delay, remove special case code,
7061 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
7062 (Build_Predicate_Function): Update saved expression in aspect
7063 (Build_Invariant_Procedure): Update saved expression in aspect
7064 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
7065 of replacement of discriminant references if the reference is simple.
7067 2011-08-01 Robert Dewar <dewar@adacore.com>
7069 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
7070 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
7071 Static_Predicate and Dynamic_Predicate.
7072 (Build_Predicate_Function): Add processing for Static_Predicate
7073 and Dynamic_Predicate.
7074 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
7075 (From_Static_Predicate): New flag
7076 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
7078 2011-08-01 Robert Dewar <dewar@adacore.com>
7080 * usage.adb: Documentation cleanup for Ada version modes in usage.
7081 * expander.adb: Minor reformatting.
7083 2011-08-01 Robert Dewar <dewar@adacore.com>
7085 * atree.ads: Minor comment fix.
7086 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
7087 a-witeio.ads, sem_prag.adb: Minor reformatting.
7089 2011-08-01 Doug Rupp <rupp@adacore.com>
7091 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
7092 pointers. Use descrip.h header file for convenience. Add some
7095 2011-08-01 Robert Dewar <dewar@adacore.com>
7097 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
7098 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
7099 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
7101 (Check_Aspect_At_End_Of_Declarations): New procedure
7102 (Analye_Aspect_Specification): Minor changes for above procedures
7103 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
7104 specification node as well.
7106 2011-08-01 Pascal Obry <obry@adacore.com>
7108 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
7109 Windows files. Use GetFilesAttributes() in this case to check for file
7110 existence instead of returning with an error code.
7112 2011-08-01 Vincent Celier <celier@adacore.com>
7114 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
7115 High is above Source length.
7117 2011-08-01 Robert Dewar <dewar@adacore.com>
7119 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
7121 2011-08-01 Robert Dewar <dewar@adacore.com>
7123 * aspects.ads (Boolean_Aspects): New subtype.
7124 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
7125 for derived types in cases where the parent type and derived type have
7127 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
7128 with aspects when parent type also has aspects.
7129 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
7130 boolean expression at this point).
7131 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
7132 accordance with final decision on the Ada 2012 feature.
7133 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
7135 2011-08-01 Matthew Heaney <heaney@adacore.com>
7137 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7139 2011-08-01 Pascal Obry <obry@adacore.com>
7141 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7142 Fix Replace_Slice when High is above current string size.
7143 (Replace_Slice): Fix DL computation when High is above current
7146 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7148 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7150 2011-08-01 Matthew Heaney <heaney@adacore.com>
7152 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7155 2011-08-01 Pascal Obry <obry@adacore.com>
7157 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7160 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7162 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7163 access to protected subprograms in generic bodies.
7164 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7165 protected type, indicate that the convention of the subprogram is
7166 Convention_Protected, because it may be used in subsequent declarations
7167 within the protected declaration.
7169 2011-08-01 Vincent Celier <celier@adacore.com>
7171 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7172 and "final" procedures when the name of the library is "ada", to avoid
7173 duplicate symbols "adainit" and "adafinal" in executables.
7175 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7177 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7178 quantified expression that appears within a postcondition and uses the
7179 Ada2012 'Result attribute.
7181 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7183 * init.c (__gnat_error_handler): Cast reason to int.
7184 (__gnat_install_handler): Explain sa_sigaction use.
7186 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7188 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7189 subprogram has copy-in copy-out parameters, try to promote the mode of
7190 the return type if it is passed in registers.
7192 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7194 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7195 left operand as addressable.
7197 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7199 * gcc-interface/gigi.h (build_function_stub): Remove.
7200 (build_return_expr): Likewise.
7201 (convert_vms_descriptor): Declare.
7202 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7203 (build_function_stub): Move to...
7204 * gcc-interface/utils2.c (build_return_expr): Move to...
7205 * gcc-interface/trans.c (build_function_stub): ...here.
7206 (build_return_expr): ...here.
7207 (Subprogram_Body_to_gnu): Add local variable for language_function.
7208 Disconnect the parameter attributes cache, if any, once done with it.
7209 Call end_subprog_body only after setting the end_locus.
7210 Build the stub associated with the function, if any, at the very end.
7211 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7212 variables and streamline control flow.
7214 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7217 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7220 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7223 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7224 Assign to act.sa_sigaction.
7225 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7226 current->return_address to char * before arithmetic.
7228 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7230 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7231 Correct argument types.
7232 Extract code from reason.
7233 (__gnat_install_handler): Assign to act.sa_sigaction.
7235 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7237 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7238 (GNAT1_OBJS): ...here.
7240 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7243 * g-socthi-mingw.adb (Fill): Fix formatting.
7245 * gcc-interface/gigi.h: Move around comment.
7247 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7250 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7252 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7255 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7257 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7259 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7260 range comparison if Pmode is SImode.
7262 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7263 Eric Botcazou <ebotcazou@adacore.com>
7265 * adadecode.c: Wrap up in extern "C" block.
7266 * adadecode.h: Likewise.
7267 * adaint.c: Likewise. Remove 'const' keyword.
7268 * adaint.h: Likewise.
7270 * atree.h: Likewise.
7272 * cstreams.c: Likewise.
7276 * final.c: Likewise.
7278 * initialize.c: Likewise.
7280 * namet.h: Likewise.
7281 * nlists.h: Likewise.
7282 * raise.c: Likewise.
7283 * raise.h: Likewise.
7284 * repinfo.h: Likewise.
7285 * seh_init.c: Likewise.
7286 * targext.c: Likewise.
7287 * tracebak.c: Likewise.
7288 * uintp.h: Likewise.
7289 * urealp.h: Likewise.
7290 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7291 * xsinfo.adb: Likewise.
7292 * xsnamest.adb: Likewise.
7293 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7294 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7295 * gcc-interface/misc.c: Likewise.
7296 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7297 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7298 ada/targext.o here...
7299 (GNAT_ADA_OBJS): ...and not here.
7300 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7301 (GNATBIND_OBJS): Reorder.
7303 2011-07-07 Richard Henderson <rth@redhat.com>
7305 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7306 dwarf2out_frame_init.
7308 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7310 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7312 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7315 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7317 2011-07-06 Richard Guenther <rguenther@suse.de>
7319 * gcc-interface/misc.c (gnat_init): Merge calls to
7320 build_common_tree_nodes and build_common_tree_nodes_2.
7321 Re-initialize boolean_false_node.
7323 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7324 Olivier Hainque <hainque@adacore.com>
7325 Nicolas Setton <setton@adacore.com>
7327 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7328 the type according to the ARTIFICIAL_P parameter.
7329 (create_type_decl): Likewise.
7330 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7332 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7334 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7335 (gnatbind): Likewise.
7337 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7339 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7341 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7343 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7344 local variable throughout. Remove useless call to Base_Type.
7345 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7346 Take it also into account for the volatileness of the field. Set the
7347 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7349 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7351 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7352 on a dereference built for a by-ref object if it has an address clause.
7354 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7356 * einfo.ads (Address_Taken): Document use for the second argument of
7357 Asm_Input and Asm_Output attributes.
7358 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7359 argument is an entity name, then set Address_Taken on it.
7360 <Attribute_Asm_Output>: Likewise.
7361 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7362 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7363 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7364 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7366 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7369 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7371 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7373 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7374 (ada/utils.o): Update dependencies.
7375 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7376 ../../../libcpp/libcpp.a.
7377 * gcc-interface/utils.c: Include common/common-target.h.
7378 (process_attributes): Use targetm_common.have_named_sections.
7380 2011-06-07 Richard Guenther <rguenther@suse.de>
7382 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7385 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7387 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7388 TREE_THIS_NOTRAP flag.
7390 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7392 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7395 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7397 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7398 constants whose full view has discriminants specially.
7400 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7402 * gcc-interface/utils.c: Include diagnostic.h.
7403 (gnat_write_global_declarations): Output debug information for all
7404 global type declarations before finalizing the compilation unit.
7405 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7407 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7409 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7411 2011-05-25 Kai Tietz <ktietz@redhat.com>
7413 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7414 initialization instead of const/none-const pointer assignment.
7416 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7418 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7419 $(EXTRA_GNAT1_OBJS).
7420 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7421 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7422 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7423 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7424 libcommon-target.a instead of prefix.o.
7426 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7429 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7431 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7433 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7434 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7435 instead of version.o.
7437 2011-05-18 Kai Tietz <ktietz@redhat.com>
7439 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7440 boolean_false_node instead of integer_zero_node.
7441 (convert_with_check): Likewise.
7442 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7444 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7446 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7447 type of the parameter is an unconstrained array, convert the actual to
7448 the type of the formal in the In Out and Out cases as well.
7450 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7452 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7453 call build_function_type_array or build_varargs_function_type_array
7455 (create_subprog_type): Don't call build_function_type; call
7456 build_function_type_vec instead.
7458 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7460 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7461 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7462 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7464 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7466 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7468 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7469 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7471 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7473 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7475 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7477 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7478 instead of accessing TYPE_ARG_TYPES directly.
7479 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7481 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7484 * gcc-interface/gigi.h (get_variant_part): Declare.
7485 * gcc-interface/decl.c (get_variant_part): Make global.
7486 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7487 types have the same constant size, are record types and T1 has a
7488 variant part while T2 doesn't.
7490 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7492 * gcc-interface/utils.c (begin_subprog_body): Do not call
7494 (end_subprog_body): Likewise.
7496 2011-05-04 Richard Guenther <rguenther@suse.de>
7498 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7500 (pos_to_constructor): Likewise.
7502 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7503 Eric Botcazou <ebotcazou@adacore.com>
7505 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7506 of build_function_type. Adjust calls to...
7507 (build_raise_check): ...this. Do not take a void_tree parameter.
7508 Call build_function_type_list instead of build_function_type.
7509 Fix head comment and swap couple of conditional blocks.
7511 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7513 * gnatvsn.ads (Library_Version): Bump to 4.7.
7514 (Current_Year): Bump to 2011.
7516 2011-04-29 Michael Matz <matz@suse.de>
7518 * gcc-interface/misc.c (gnat_handle_option): Set
7519 warn_maybe_uninitialized.
7521 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7523 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7524 the Watson/McCabe paper.
7526 2011-04-23 Jim Meyering <meyering@redhat.com>
7528 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7530 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7532 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7535 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7537 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7539 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7540 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7541 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7542 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7543 <all>: Do not set flags on the reused DECL node coming from an alias.
7544 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7545 don't need debug info here...
7546 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7547 (gigi): Adjust calls to create_subprog_decl.
7548 (build_raise_check): Likewise.
7549 (establish_gnat_vms_condition_handler): Likewise.
7550 (Compilation_Unit_to_gnu): Likewise.
7551 (gnat_to_gnu): Likewise.
7553 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7555 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7556 (NO_REORDER_ADAFLAGS): New variable.
7557 (EXTRA_GNATTOOLS): Always define.
7558 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7559 Clean up and adjust list of files compiled with special options.
7560 * gcc-interface/Make-lang.in: Likewise.
7561 (ada/decl.o): Cosmetical change.
7562 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7564 2011-04-20 Jim Meyering <meyering@redhat.com>
7566 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7568 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7570 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7571 $(CFLAGS) on the link line.
7573 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7575 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7576 padded type built for the return type if it is unconstrained.
7578 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7580 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7582 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7584 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7585 before calling TREE_CHAIN.
7586 * gcc-interface/misc.c (gnat_init_ts): New function.
7587 (LANG_HOOKS_INIT_TS): Define.
7589 2011-04-12 Martin Jambor <mjambor@suse.cz>
7591 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7592 instead of cgraph_node.
7594 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7596 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7597 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7600 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7602 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7603 of aggregate types that contain a placeholder.
7605 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7607 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7609 (handle_type_generic_attribute): Likewise.
7611 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7614 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7616 2011-04-04 Kai Tietz <ktietz@redhat.com>
7619 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7622 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7624 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7625 type case, do not strip a padding type around the array type.
7627 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7629 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7632 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7634 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7635 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7636 code for -feliminate-unused-debug-types.
7637 (gnat_post_options): Likewise.
7639 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7641 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7642 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7645 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7647 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7648 DECL_ARTIFICIAL flag on enumeration types.
7650 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7652 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7653 fat pointer types artificial unconditionally.
7654 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7657 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7659 * gcc-interface/gigi.h (get_dummy_type): Declare.
7660 (build_dummy_unc_pointer_types): Likewise.
7661 (finish_fat_pointer_type): Likewise.
7662 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7663 fat pointer type has been built, complete it in place.
7664 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7665 and thin pointers. Remove useless variable.
7666 (finish_fat_pointer_type): Make global and move to...
7667 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7668 (get_dummy_type): New function.
7669 (build_dummy_unc_pointer_types): Likewise.
7670 (gnat_pushdecl): Propage the name to the anonymous variants only.
7671 (update_pointer_to): Only adjust the pointer types in the unconstrained
7674 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7676 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7677 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7678 if this is a Taft amendment type and the full declaration is available.
7679 * gcc-interface/trans.c (process_type): Likewise.
7680 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7681 (process_freeze_entity): Likewise.
7682 * gcc-interface/utils.c (dummy_global): New static variable.
7683 (gnat_write_global_declarations): If there are types declared as used
7684 at the global level, insert them in the global hash table.
7686 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7688 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7689 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7690 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7692 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7693 flag of the type accordingly.
7694 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7696 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7698 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7699 finalizing types when updating the pointers to the designated type.
7700 <all>: Finalize the deferred types even if we didn't defer processing
7701 of incomplete types in this invocation.
7703 2011-04-01 Olivier Hainque <hainque@adacore.com>
7704 Nicolas Setton <setton@adacore.com>
7705 Eric Botcazou <ebotcazou@adacore.com>
7707 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7708 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7710 2011-03-28 Kai Tietz <ktietz@redhat.com>
7712 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7714 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7715 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7717 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7719 2011-03-28 Tristan Gingold <gingold@adacore.com>
7722 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7723 Use ada output of gnatbind.
7724 (ada/b_gnatb.adb): Ditto.
7725 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7726 (ada.mostlyclean, ada.stage1)
7727 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7728 (ada.stagefeedback): Adjust.
7729 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7730 Use ada output of gnatbind.
7731 (b_gnatm.adb): Ditto.
7732 (b_gnatl.o, b_gnatm.o): New rules.
7734 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7736 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7737 for the padded type built to support a specified size or alignment.
7739 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7741 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7742 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7743 unconditionally to the end of the unit when the designated type is
7745 <all>: Rename local variable. Attempt to un-defer types only and do it
7746 for limited_with'ed types as well.
7747 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7748 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7749 consistently and remove redundant call to finalize_from_with_types.
7751 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7753 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7754 subprograms without a previous spec declared in the same unit.
7755 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7756 subprograms at the end of the unit instead of at the beginning.
7757 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7758 isn't public for the special handling of non-inline functions nested
7759 inside inline external functions.
7761 2011-03-25 Jeff Law <law@redhat.com>
7763 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7765 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7767 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7768 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7769 to compute Set_Size_Depends_On_Discriminant.
7770 (Layout_Type): Call it on array types in back-end layout mode.
7771 * sem_util.adb (Requires_Transient_Scope): Return true for array
7772 types only if the size depends on the value of discriminants.
7773 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7774 type if the RHS is a call to a function that returns an unconstrained
7775 type with default discriminant.
7777 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7779 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7780 non-conversion to the nominal result type at the end.
7782 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7784 * gcc-interface/trans.c (create_temporary): New function taken from...
7785 (create_init_temporary): ...here. Call it.
7786 (call_to_gnu): Create the temporary for the return value early, if any.
7787 Create it for a function with copy-in/copy-out parameters if there is
7788 no target; in other cases of copy-in/copy-out, use another temporary.
7789 Push the new binding level lazily. Add and rename local variables.
7791 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7793 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7795 (set_rm_size): Likewise.
7797 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7799 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7800 for the padded type built in order to support a specified alignment.
7801 Fix incorrect formatting.
7803 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7806 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7808 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7810 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7811 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7812 to the end of the list. Adjust recursive call. Rename local variable.
7813 If REORDER is true, reorder components of the record type.
7814 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7815 components_to_record and adjust the parameter list.
7817 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7819 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7820 disabled, use the variable for bounds of loop iteration scheme.
7822 2011-03-21 Kai Tietz <ktietz@redhat.com>
7825 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7827 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7829 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7830 out whether the expression is read-only. Short-circuit placeholder
7831 case and rename a couple of local variables.
7833 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7835 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7836 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7837 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7838 (convert): Deal with conversions from a smaller form type specially.
7840 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7842 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7843 its argument, except for the special -I- switch.
7845 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7847 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7850 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7852 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7854 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7856 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7858 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7859 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7860 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7861 Do not generate the check directly, instead instantiate the template
7862 check present in the descriptor.
7863 (make_descriptor_field): Move around.
7864 (build_vms_descriptor32): Build a template check in the POINTER field.
7865 (build_vms_descriptor): Remove useless suffixes.
7866 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7868 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7871 * targext.c: Include target files if IN_RTS is defined.
7873 2011-01-26 Richard Guenther <rguenther@suse.de>
7876 * targext.c: Include config.h.
7877 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7880 2011-01-04 Pascal Obry <obry@adacore.com>
7881 Eric Botcazou <ebotcazou@adacore.com>
7883 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7885 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7887 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7888 end-of-case on the end label and its associated gotos, if any.
7890 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7892 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7893 expressions of the parameter cache within the statement group of
7896 2011-01-04 Olivier Hainque <hainque@adacore.com>
7897 Eric Botcazou <ebotcazou@adacore.com>
7899 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7900 (set_end_locus_from_node): New function.
7901 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7902 make and the function end_locus.
7903 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7904 for the elaboration subprogram.
7905 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7906 set the end_locus of the expression as well.
7908 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7911 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7912 variables that are referenced in exception handlers volatile.
7916 Copyright (C) 2011 Free Software Foundation, Inc.
7918 Copying and distribution of this file, with or without modification,
7919 are permitted in any medium without royalty provided the copyright
7920 notice and this notice are preserved.
7922 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7923 - fix bugs in the description of Source_Trace;
7924 - get rid of UNIT_NAME;
7926 2011-08-02 Javier Miranda <miranda@adacore.com>
7929 (Build_Dispatching_Requeue): Adding support for VM targets
7930 since we cannot directly reference the Tag entity.
7931 * exp_sel.adb (Build_K): Adding support for VM targets.
7932 (Build_S_Assignment): Adding support for VM targets.
7934 (Default_Prim_Op_Position): In VM targets do not restrict availability
7935 of predefined interface primitives to compiling in Ada 2005 mode.
7936 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7937 restricted to compiling in Ada 2005 mode.
7938 (Make_VM_TSD): Generate code that declares and initializes the OSD
7939 record. Needed to support dispatching calls through synchronized
7942 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7943 primitives associated with synchronized interfaces.
7944 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7945 primitives associated with synchronized interfaces.
7947 2011-08-02 Yannick Moy <moy@adacore.com>
7949 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7950 statements hidden in SPARK if preceded by the HIDE directive
7951 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7952 exception handlers as hidden in SPARK if preceded by the HIDE directive
7953 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7954 if starting with the HIDE directive
7955 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7956 starting with the HIDE directive; mark the declarations in a private
7957 part as hidden in SPARK if the private part starts with the HIDE
7959 * restrict.adb, restrict.ads
7960 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7961 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7962 argument node belongs to a part which is hidden in SPARK
7963 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7964 parts in SPARK; protect the possibly costly call to
7965 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7966 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7967 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7968 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7970 (Scan): recognize special comment starting with '#' and followed by
7971 SPARK keyword "hide" as a HIDE directive.
7973 2011-08-02 Yannick Moy <moy@adacore.com>
7975 * types.ads, erroutc.ads: Minor reformatting.
7977 2011-08-02 Vincent Celier <celier@adacore.com>
7979 * link.c: Add response file support for cross platforms.
7981 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7983 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7984 in an association, set parent field of copy before partial analysis.
7985 * sem_res.adb (Resolve_Slice): create reference to itype only when
7986 expansion is enabled.
7988 2011-08-02 Yannick Moy <moy@adacore.com>
7990 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7991 for new flag denoting which subprogram bodies are in ALFA
7992 * restrict.adb, sem_ch7.adb: Update comment
7993 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7994 sem_ch9.adb, sem_res.adb: Add calls to
7995 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7996 * sem_ch6.adb (Analyze_Function_Return): add calls to
7997 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7998 middle of the body, and extended return.
7999 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8000 False when missing return.
8001 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8002 to True for subprograms whose spec is in ALFA. Remove later on the flag
8003 on the entity used for a subprogram body when there exists a separate
8005 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8006 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8007 False, otherwise do nothing.
8009 2011-08-02 Robert Dewar <dewar@adacore.com>
8011 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8013 2011-08-02 Yannick Moy <moy@adacore.com>
8015 * sem_ch4.ads: minor formatting.
8017 2011-08-02 Yannick Moy <moy@adacore.com>
8019 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8020 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8021 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8022 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8023 opt.ads: cleanup of SPARK mode
8025 2011-08-02 Yannick Moy <moy@adacore.com>
8027 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8029 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8030 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8032 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8033 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8034 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8035 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8037 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8039 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8040 functions whose return type is not in ALFA.
8041 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8043 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8044 parameter's type is not in ALFA.
8045 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8048 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8050 * sem_ch6 (Analyze_Expression_Function): treat the function as
8051 Inline_Always, and introduce a subprogram declaration for it when it is
8053 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8054 expression functions, so that the back-end can determine whether they
8055 can in fact be inlined.
8056 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8057 a function body comes from an expression function.
8059 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8061 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8062 null exclusions to test Can_Never_Be_Null on the anonymous access types
8063 of the formals rather than testing the formals themselves. Exclude this
8064 check in cases where the Old_Formal is marked as a controlling formal,
8065 to avoid issuing spurious errors for bodies completing dispatching
8066 operations (due to the flag not getting set on controlling access
8067 formals in body specs).
8068 (Find_Corresponding_Spec): When checking full and subtype conformance of
8069 subprogram bodies in instances, pass Designated and E in that order, for
8070 consistency with the expected order of the formals (New_Id followed by
8073 2011-08-02 Robert Dewar <dewar@adacore.com>
8075 * sem_ch8.adb: Minor reformatting.
8077 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8079 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8080 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8081 primitive operations of class-wide actuals.
8083 2011-08-02 Javier Miranda <miranda@adacore.com>
8085 * exp_atag.ads, exp_atag.adb
8086 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8087 since its value is implicitly passed in argument Typ.
8088 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8089 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8090 Build_Common_Dispatching_Select_Statements.
8092 2011-08-02 Robert Dewar <dewar@adacore.com>
8094 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8095 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8098 2011-08-02 Robert Dewar <dewar@adacore.com>
8100 * sem_res.adb: Minor reformatting.
8101 * sem_prag.adb: Minor reformatting.
8103 2011-08-02 Javier Miranda <miranda@adacore.com>
8105 * exp_atag.adb, exp_atags.ads
8106 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8107 by the tagged type Entity. Required to use this routine in the VM
8108 targets since we do not have available the Tag entity in the VM
8111 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8112 Ada.Tags has not been previously loaded.
8114 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8115 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8117 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8118 view of enclosing scopes. Required to handle enclosing scopes that
8119 are synchronized types whose full view is a task type.
8121 (Build_VM_TSDs): Minor code improvement to avoid generating and
8122 analyzing lists with empty nodes.
8123 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8124 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8125 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8126 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8127 (Make_Select_Specific_Data_Table): Add support for VM targets.
8128 (Make_VM_TSD): Generate code to initialize the SSD structure of
8131 2011-08-02 Yannick Moy <moy@adacore.com>
8133 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8134 cross-references section in ALI.
8135 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8136 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8138 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8139 subprogram or package entity of a node
8140 (Is_Local_Reference_Type): new function returns True for references
8141 selected in local cross-references.
8142 (Lt): function extracted from Lt in Output_References
8143 (Write_Entity_Name): function extracted from Output_References
8144 (Generate_Definition): generate reference with type 'D' for definition
8145 of objects (object declaration and parameter specification), with
8146 appropriate locations and units, for use in local cross-references.
8147 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8148 references of type 'I' for initialization in object definition.
8149 (Output_References): move part of function Lt and procedure
8150 Write_Entity_Name outside of the body. Ignore references of types 'D'
8151 and 'I' introduced for local cross-references.
8152 (Output_Local_References): new procedure to output the local
8153 cross-references sections.
8154 (Lref_Entity_Status): new array defining whether an entity is a local
8155 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8156 with 'I' type when initialization expression is present.
8157 * get_scos.adb, get_scos.ads: Correct comments and typos
8159 2011-08-02 Javier Miranda <miranda@adacore.com>
8161 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8163 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8165 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8168 2011-08-02 Vincent Celier <celier@adacore.com>
8170 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8171 (No_Space_Img): New function
8172 (Find_Excluded_Sources): When reading from a file, record the file name
8173 and the line number for each excluded source.
8174 (Mark_Excluded_Sources): When reporting an error, if the excluded
8175 sources were read from a file, include file name and line number in
8178 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8180 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8182 2011-08-02 Robert Dewar <dewar@adacore.com>
8184 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8186 2011-08-02 Javier Miranda <miranda@adacore.com>
8188 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8189 generation of TSDs to the DOTNET compiler.
8190 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8191 generation of TSDs to the DOTNET compiler.
8193 2011-08-02 Javier Miranda <miranda@adacore.com>
8195 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8196 record of all the tagged types declared inside library level package
8197 declarations, library level package bodies or library level subprograms.
8198 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8199 associated with a given tagged type.
8200 (Build_VM_TSDs): New subprogram.
8201 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8202 compilation units that are subprograms.
8203 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8204 compilation units that are package bodies.
8205 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8206 units that are a package declaration or a package instantiation.
8207 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8208 reorganization to improve the error generated by the frontend when the
8209 function Ada.Tags.Secondary_Tag is not available.
8210 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8211 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8213 2011-08-02 Javier Miranda <miranda@adacore.com>
8215 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8217 2011-08-02 Robert Dewar <dewar@adacore.com>
8219 * s-imenne.ads: Minor reformatting.
8221 2011-08-02 Robert Dewar <dewar@adacore.com>
8223 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8224 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8225 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8227 2011-08-02 Robert Dewar <dewar@adacore.com>
8229 * einfo.ads (Materialize_Entity): Document this is only for renamings
8230 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8231 required debug information in the case where we transform the object
8232 declaration into a renaming declaration.
8233 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8235 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8238 2011-08-02 Robert Dewar <dewar@adacore.com>
8240 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8241 Suppress_Init_Procs.
8242 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8243 Suppress_Initialization/Initialization_Suppressed.
8244 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8245 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8246 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8247 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8249 2011-08-02 Robert Dewar <dewar@adacore.com>
8251 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8254 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8256 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8257 only have inheritable classwide pre/postconditions.
8259 2011-08-02 Javier Miranda <miranda@adacore.com>
8261 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8262 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8263 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8264 checks if the external tag of a type is the same as the external tag
8265 of some other declaration.
8267 2011-08-02 Thomas Quinot <quinot@adacore.com>
8269 * s-taskin.ads: Minor reformatting.
8271 2011-08-02 Emmanuel Briot <briot@adacore.com>
8273 * g-comlin.adb (Display_Help): swap the order in which it prints the
8274 short help and the general usage.
8276 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8278 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8279 the aspect declarations and attach them to the generic copy for
8280 subsequent analysis.
8281 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8282 declarations of the generic tree to the new subprogram declarations.
8283 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8284 conditions that apply to a subprogram instance.
8286 2011-08-02 Robert Dewar <dewar@adacore.com>
8288 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8290 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8292 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8293 private type with a tagged full view is not derived in the immediate
8294 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8296 2011-08-02 Robert Dewar <dewar@adacore.com>
8298 * exp_ch4.adb: Minor reformatting.
8300 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8302 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8303 Ada2012 iterator, the loop will be rewritten during expansion into a
8304 while loop with a cursor and an element declaration. Do not analyze the
8305 body in this case, because if the container is for indefinite types the
8306 actual subtype of the elements will only be determined when the cursor
8307 declaration is analyzed.
8309 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8311 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8312 size/alignment related attributes in CodePeer_Mode.
8314 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8316 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8317 Prepend_Element, since this can result in the operation getting the
8318 wrong slot in the full type's dispatch table if the full type has
8319 inherited operations. The incomplete type's operation will get added
8320 to the proper position in the full type's primitives
8321 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8322 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8323 dispatching operations, since there are cases where nonprimitive
8324 subprograms can get added to the list of incomplete dependents (such
8325 as subprograms in nested packages).
8326 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8327 private part when determining whether to add a primitive with a
8328 parameter of a tagged incomplete type to the Private_Dependents list.
8329 Such primitives can also occur in the visible part, and should not have
8330 been excluded from being private dependents.
8331 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8332 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8333 list of a Taft-amendment incomplete type is a primitive before issuing
8334 an error that the full type must appear in the same unit. There are
8335 cases where nonprimitives can be in the list (such as subprograms in
8337 * sem_disp.adb (Derives_From): Use correct condition for checking that
8338 a formal's type is derived from the type of the corresponding formal in
8339 the parent subprogram (the condition was completely wrong). Add
8340 checking that was missing for controlling result types being derived
8341 from the result type of the parent operation.
8343 2011-08-02 Yannick Moy <moy@adacore.com>
8345 * errout.adb (First_Node): minor renaming
8346 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8349 2011-08-02 Yannick Moy <moy@adacore.com>
8351 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8352 before accessing operands.
8353 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8354 decide whether an initialization expression respects SPARK rules, as
8355 the plain node is the expanded one. This allows for more valid warnings
8357 * gnat_rm.texi: Minor update.
8359 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8361 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8364 2011-08-02 Robert Dewar <dewar@adacore.com>
8366 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8368 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8370 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8371 loop statements and the element renaming declaration with a block when
8372 the element type is controlled.
8374 2011-08-02 Yannick Moy <moy@adacore.com>
8376 * sinfo.ads: Minor formatting.
8378 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8380 * sem_aggr.adb (Add_Association): if the association has a box and no
8381 expression, use the Sloc of the aggregate itself for the new
8383 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8386 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8388 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8389 When a container is provided via a function call, generate a renaming
8390 of the function result. This avoids the creation of a transient scope
8391 and the premature finalization of the container.
8392 * exp_ch7.adb (Is_Container_Cursor): Removed.
8393 (Wrap_Transient_Declaration): Remove the supression of the finalization
8394 of the list controller when the declaration denotes a container cursor,
8397 2011-08-02 Yannick Moy <moy@adacore.com>
8399 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8400 node is from source, instead of the original node being from source.
8402 (Resolve_Array_Aggregate): refine the check for a static expression, to
8403 recognize also static ranges
8404 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8405 Array_Type_Declaration): postpone the test for the type being a subtype
8406 mark after the type has been resolved, so that component-selection and
8407 expanded-name are discriminated.
8408 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8409 to distinguish the case of an iteration scheme, so that an error is
8410 issed on a non-static range in SPARK except in an iteration scheme.
8411 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8412 In_Iter_Schm = True.
8413 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8414 user-defined operators so that they are allowed in renaming
8416 (Find_Selected_Component): refine the check for prefixing of operators
8417 so that they are allowed in renaming. Move the checks for restrictions
8418 on selector name after analysis discriminated between
8419 component-selection and expanded-name.
8420 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8421 concatenation argument of string type if it is static.
8422 * sem_util.adb, sem_util.ads
8423 (Check_Later_Vs_Basic_Declarations): add a new function
8424 Is_Later_Declarative_Item to decice which declarations are allowed as
8425 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8426 mode, add that renamings are considered as later items.
8427 (Enclosing_Package): new function to return the enclosing package
8428 (Enter_Name): correct the rule for homonyms in SPARK
8429 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8430 from source (result of expansion) to avoid issuing wrong warnings.
8432 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8434 * errout.adb: On anything but an expression First_Node returns its
8437 2011-08-02 Pascal Obry <obry@adacore.com>
8439 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8441 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8443 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8444 Set the associated loop as the related expression of internally
8446 * exp_ch7.adb (Is_Container_Cursor): New routine.
8447 (Wrap_Transient_Declaration): Supress the finalization of the list
8448 controller when the declaration denotes a container cursor.
8450 2011-08-02 Yannick Moy <moy@adacore.com>
8452 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8454 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8455 expression is a simple expression. This check cannot be performed in
8456 the semantics, so just drop it.
8457 (P_Index_Or_Discriminant_Constraint): move check that the index or
8458 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8459 semantics. Other cases were previously checked in the semantics.
8460 * par-ch4.adb (P_Name): move checks that a selector name is not
8461 character literal or an operator symbol to Find_Selected_Component in
8463 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8464 declarations are not placed after later declarations in a separate
8465 procedure in Sem_Util (possibly not the best choice?), to be used both
8466 during parsing, for Ada 83 mode, and during semantic analysis, for
8468 * par-endh.adb (Check_End): move check that end label is not missing
8469 to Process_End_Label in the semantics
8470 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8471 the special case for SPARK restriction
8472 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8473 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8474 parameter Force to issue the error message even on internal node (used
8475 for generated end label). Call Check_Restriction to check when an error
8476 must be issued. In SPARK mode, issue an error message even if the
8477 restriction is not set.
8478 (Check_Restriction): new procedure with an additional out parameter to
8479 inform the caller that a message has been issued
8480 * sem_aggr.adb: Minor modification of message
8481 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8482 instead of issuing an error message directly
8483 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8484 declarations are not placed after later declarations, by calling
8485 Check_Later_Vs_Basic_Declarations
8486 (Analyze_Subtype_Declaration): move here the check that an index or
8487 discriminant constraint must be a subtype mark. Change the check that
8488 a subtype of String must start at one so that it works on subtype marks.
8489 * sem_ch4.adb (Analyze_Call): move here the check that a named
8490 association cannot follow a positional one in a call
8491 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8492 instead of issuing an error message directly
8493 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8494 selector name is not a character literal or an operator symbol. Move
8495 here the check that the prefix of an expanded name cannot be a
8496 subprogram or a loop statement.
8497 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8498 procedure called from parsing and semantics to check that basic
8499 declarations are not placed after later declarations
8500 (Process_End_Label): move here the check that end label is not missing
8502 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8504 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8505 representation clause in codepeer mode, since it confuses CodePeer and
8506 does not bring useful info.
8508 2011-08-02 Ed Falis <falis@adacore.com>
8510 * init.c: initialize fp hw on MILS.
8512 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8514 * errout.adb (First_Node): for bodies, return the node itself (small
8515 optimization). For other nodes, do not check source_unit if the node
8516 comes from Standard.
8518 2011-08-02 Robert Dewar <dewar@adacore.com>
8520 * exp_ch3.adb: Minor comment additions.
8521 * sem_ch13.adb: Minor reformatting.
8523 2011-08-02 Pascal Obry <obry@adacore.com>
8525 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8527 2011-08-02 Robert Dewar <dewar@adacore.com>
8529 * sem_attr.adb: Minor reformatting.
8531 2011-08-02 Robert Dewar <dewar@adacore.com>
8533 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8534 (Has_Default_Component_Value): Removed
8535 * einfo.ads Comment updates
8536 (Has_Default_Aspect): Replaces Has_Default_Value
8537 (Has_Default_Component_Value): Removed
8539 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8541 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8542 (Get_Simple_Init_Val): Handle Default_Value aspect
8543 (Needs_Simple_Initialization): Handle Default_Value aspect
8544 * exp_ch3.ads: Needs_Simple_Initialization
8545 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8546 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8548 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8549 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8550 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8552 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8554 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8555 package containing iteration primitives.
8556 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8558 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8560 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8561 "of", pre-analyze expression in case it is a function call with
8562 finalization actions that must be placed ahead of the loop.
8563 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8564 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8566 2011-08-02 Geert Bosch <bosch@adacore.com>
8568 * cstand.adb (Create_Float_Types): Only consider C's long double for
8569 Long_Long_Float, in addition to double.
8571 2011-08-02 Robert Dewar <dewar@adacore.com>
8573 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8574 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8575 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8578 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8580 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8583 2011-08-02 Javier Miranda <miranda@adacore.com>
8585 * einfo.ads, einfo.adb
8586 (Original_Access_Type): Move this attribute to Node26 since there was
8587 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8588 which causes conflicts and breaks the generation of the .NET compiler.
8589 (Interface_Name): Add missing documentation on JGNAT only uses of
8592 2011-08-02 Geert Bosch <bosch@adacore.com>
8594 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8595 (Find_Back_End_Float_Type): Likewise
8596 (Create_Back_End_Float_Types): Likewise
8597 (Create_Float_Types): Likewise
8598 (Register_Float_Type): Likewise
8599 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8600 Nlist and split out type selection in new local Find_Base_Type function.
8601 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8603 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8605 2011-08-02 Robert Dewar <dewar@adacore.com>
8607 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8609 * opt.ads: Minor comment change.
8610 * sem_ch12.adb: Minor code reorganization.
8612 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8614 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8615 subtype's list of rep items to the list on the full subtype in the case
8616 where the lists are the same.
8618 2011-08-02 Geert Bosch <bosch@adacore.com>
8620 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8621 using the one from System.Strings, which also deallocates all strings.
8623 2011-08-02 Geert Bosch <bosch@adacore.com>
8625 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8627 * gcc-interface/Make-lang.in: Update dependencies.
8629 2011-08-02 Olivier Hainque <hainque@adacore.com>
8631 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8634 2011-08-02 Javier Miranda <miranda@adacore.com>
8636 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8637 associated with anonymous access to subprograms.
8639 2011-08-02 Geert Bosch <bosch@adacore.com>
8642 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8643 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8644 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8645 (Add_Symbol_Definition): Move to switch-c.adb
8646 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8647 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8648 (Add_Symbol_Definition): Move to switch-c.adb.
8649 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8651 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8653 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8654 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8656 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8657 (Add_Symbol_Definition): Moved from Prepcomp.
8658 * switch-c.ads: Update copyright notice. Use String_List instead of
8659 Argument_List, removing dependency on System.OS_Lib.
8661 2011-08-02 Yannick Moy <moy@adacore.com>
8663 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8664 mode on initialization expression which does not respect SPARK
8666 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8667 if the tree referenced by its argument represents an initialization
8668 expression in SPARK, suitable for initializing an object in an object
8671 2011-08-02 Javier Miranda <miranda@adacore.com>
8673 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8674 internally generated access to subprogram with its associated protected
8676 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8678 2011-08-02 Geert Bosch <bosch@adacore.com>
8680 * cstand.adb (Register_Float_Type): Print information about type to
8681 register, if the Debug_Flag_Dot_B is set.
8682 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8683 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8684 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8685 with a requested precision of more than Max_Digits digits and no more
8686 than Max_Base_Digits digits, if a range specification is present and the
8687 Predefined_Float_Types list has a suitable type to derive from.
8688 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8689 case of type completion with pragma Import
8691 (Process_Import_Predefined_Type): Processing to complete a type
8692 with pragma Import. Currently supports floating point types only.
8693 (Set_Convention_From_Pragma): Do nothing without underlying type.
8694 (Process_Convention): Guard against absence of underlying type,
8695 which may happen when importing incomplete types.
8696 (Process_Import_Or_Interface): Handle case of importing predefined
8697 types. Tweak error message.
8699 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8701 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8702 functions to previous change. Reorganize code slightly.
8704 2011-08-02 Geert Bosch <bosch@adacore.com>
8706 * back_end.ads (Register_Type_Proc): New call back procedure type for
8707 allowing the back end to provide information about available types.
8708 (Register_Back_End_Types): New procedure to register back end types.
8709 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8711 * cstand.adb (Back_End_Float_Types): New list for floating point types
8712 supported by the back end.
8713 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8714 (Copy_Float_Type): New procedure to make new copies of predefined types.
8715 (Register_Float_Type): New call back procedure to populate the BEFT list
8716 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8717 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8718 (Create_Float_Types): New procedure to create entities for floating
8719 point types predefined in Standard, and put these and any remaining
8720 BEFTs on the Predefined_Float_Types list.
8721 * stand.ads (Predefined_Float_Types): New list for predefined floating
8722 point types that do not have declarations in package Standard.
8724 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8726 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8727 entity node for the unit containing the parameter.
8728 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8729 (Add_Inlined_Subprogram): Likewise.
8730 * gcc-interface/Make-lang.in: Update dependencies.
8732 2011-08-02 Thomas Quinot <quinot@adacore.com>
8734 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8737 2011-08-02 Geert Bosch <bosch@adacore.com>
8739 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8741 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8743 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8744 computed value of Base_Type.
8746 2011-08-02 Yannick Moy <moy@adacore.com>
8748 * restrict.adb (Check_Restriction): issue an error for any use of
8749 class-wide, even if the No_Dispatch restriction is not set.
8750 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8751 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8752 when completing a private extension, the type named in the private part
8753 is not the same as that named in the visible part.
8754 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8755 of an inherited primitive operations of a tagged type or type extension
8756 that returns the tagged type.
8757 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8758 function which returns True for an implicit operation inherited by the
8759 derived type declaration for the argument type.
8760 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8763 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8765 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8766 Process_Bounds, to perform analysis with expansion of a range or an
8767 expression that is the iteration scheme for a loop.
8768 (Analyze_Iterator_Specification): If domain of iteration is given by a
8769 function call with a controlled result, as is the case if call returns
8770 a predefined container, ensure that finalization actions are properly
8772 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8774 2011-08-02 Javier Miranda <miranda@adacore.com>
8776 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8777 * gcc-interface/Make-lang.in: Update dependencies.
8779 2011-08-02 Javier Miranda <miranda@adacore.com>
8781 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8782 determine if the analysis is performed using N or Original_Node (N).
8783 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8784 functionality of routine Is_Variable avoids code duplication.
8785 * checks.adb (Determine_Range): Handle temporaries generated by
8786 Remove_Side_Effects.
8788 2011-08-02 Javier Miranda <miranda@adacore.com>
8790 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8791 expansion of the condition. Required since the previous analysis was
8792 done with expansion disabled (see Resolve_Quantified_Expression) and
8793 hence checks were not inserted and record comparisons have not been
8796 2011-08-02 Ed Falis <falis@adacore.com>
8798 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8801 2011-08-02 Bob Duff <duff@adacore.com>
8803 * opt.ads: Minor comment fix.
8805 2011-08-02 Bob Duff <duff@adacore.com>
8807 * sem_ch12.adb (Analyze_Package_Instantiation,
8808 Analyze_Subprogram_Instantiation): Turn off style checking while
8809 analyzing an instance. Whatever style checks that apply to the generic
8810 unit should apply, so it makes no sense to apply them in an instance.
8811 This was causing trouble when compiling an instance of a runtime
8812 unit that violates the -gnatyO switch.
8813 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8814 one of the two case statements, causing spurious errors.
8816 2011-08-02 Robert Dewar <dewar@adacore.com>
8818 * uname.adb: Minor reformatting.
8819 * gnatcmd.adb: Minor reformatting.
8820 * exp_attr.adb: Minor reformatting.
8822 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8824 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8825 No_Dispatching_Calls, do not look for the Assign primitive, because
8826 predefined primitives are not created in this case.
8828 2011-08-02 Bob Duff <duff@adacore.com>
8830 * stylesw.ads: Minor comment fixes.
8832 2011-08-02 Robert Dewar <dewar@adacore.com>
8834 * freeze.adb (Add_To_Result): New procedure.
8836 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8838 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8839 time, if the specific run-time routines for handling streams of strings
8840 are not available, use the default mechanism.
8842 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8844 * s-regpat.ads: Fix typo.
8846 2011-08-02 Vincent Celier <celier@adacore.com>
8848 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8849 not null, call it to create the in memory config project file without
8850 parsing an existing default config project file.
8852 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8854 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8856 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8858 * sem_elim.adb: an abstract subprogram does not need an eliminate
8859 pragma for its descendant to be eliminable.
8861 2011-08-02 Ed Falis <falis@adacore.com>
8863 * init.c: revert to handling before previous checkin for VxWorks
8864 * s-intman-vxworks.adb: delete unnecessary declarations related to
8865 using Ada interrupt facilities for handling signals.
8866 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8867 * s-intman-vxworks.ads: Import __gnat_install_handler as
8868 Initialize_Interrupts.
8869 * s-taprop-vxworks.adb: Delete Signal_Mask.
8870 (Abort_Handler): change construction of mask to unblock exception
8873 2011-08-02 Jerome Guitton <guitton@adacore.com>
8875 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8876 Debug_Raise_Exception before propagation starts.
8878 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8880 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8881 to Restriction_Check_Required.
8882 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8883 * sem_res.adb (Resolve_Call): Likewise.
8884 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8886 2011-08-02 Bob Duff <duff@adacore.com>
8888 * stylesw.ads: Update comment.
8889 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8890 * errout.ads: Remove obsolete comment.
8892 2011-08-02 Javier Miranda <miranda@adacore.com>
8894 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8895 (Set_Is_Safe_To_Reevaluate): new procedure.
8896 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8897 assignment is allowed on safe-to-reevaluate variables.
8898 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8899 temporary created to remove side effects in expressions that use
8900 the secondary stack as safe-to-reevaluate.
8901 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8902 variables that are not true constants.
8904 2011-08-02 Robert Dewar <dewar@adacore.com>
8906 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8907 sem_res.adb, sem_ch6.adb: Minor reformatting.
8909 2011-08-02 Jerome Guitton <guitton@adacore.com>
8911 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8913 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8915 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8916 not set Overridden_Operation if subprogram is an initialization
8919 2011-08-02 Yannick Moy <moy@adacore.com>
8921 * par-ch6.adb: Correct obsolete name in comments
8922 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8923 which takes two message arguments (existing function takes one), with
8924 second message used for continuation.
8925 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8926 block statements that originate from a source block statement, not
8927 generated block statements
8928 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8929 symmetry with procedure case
8930 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8931 function to issue an error in formal mode if a package specification
8932 contains more than one tagged type or type extension.
8933 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8934 parameters matching formals of tagged types are objects (or ancestor
8935 type conversions of objects), not general expressions. Issue an error
8936 on view conversions that are not involving ancestor conversion of an
8938 (Resolve_Type_Conversion): in formal mode, issue an error on the
8939 operand of an ancestor type conversion which is not an object
8940 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8941 procedure so that it works also for actuals of function calls
8942 (Is_Actual_Tagged_Parameter): new function which determines if its
8943 argument is an actual parameter of a formal of tagged type in a
8945 (Is_SPARK_Object_Reference): new function which determines if the tree
8946 referenced by its argument represents an object in SPARK
8948 2011-08-02 Robert Dewar <dewar@adacore.com>
8950 * sem_ch3.adb: Minor reformatting
8951 Minor comment addition
8952 Minor error msg text change
8954 2011-08-02 Javier Miranda <miranda@adacore.com>
8956 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8957 function. Used to be more precise when we generate a variable plus one
8958 assignment to remove side effects in the evaluation of the Bound
8960 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8961 of the bound expression to force its re-analysis and thus expand the
8962 associated transient scope (if required). Code cleanup replacing the
8963 previous code that declared the constant entity by an invocation to
8964 routine Force_Evaluation which centralizes this work in the frontend.
8966 2011-08-02 Robert Dewar <dewar@adacore.com>
8968 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8969 (Base_Type): Now uses improved Is_Base_Type function
8970 * einfo.ads (Base_Type): Inline this function
8972 2011-08-02 Robert Dewar <dewar@adacore.com>
8974 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8975 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8977 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8979 * gcc-interface/Make-lang.in: Update dependencies.
8980 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8983 2011-08-02 Yannick Moy <moy@adacore.com>
8985 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8986 non-simple expression used in delta constraint
8987 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8988 index constraint which is not a subtype mark
8989 * par.adb: With and use Restrict
8990 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8991 mode on component type which is not a subtype mark and default
8992 expression on component
8993 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8994 of string which does not have a lower index bound equal to 1
8995 (Array_Type_Declaration): issue an error in formal mode on index or
8996 component type which is not a subtype mark, and on aliased keyword on
8998 (Derived_Type_Declaration): issue an error in formal mode on interface,
8999 limited or abstract type
9000 (Record_Type_Declaration): issue an error in formal mode on interface
9001 (Record_Type_Definition): issue an error in formal mode on tagged types
9002 and type extensions not declared in the specification of a library unit
9003 package; on null non-tagged record; on variant part
9005 2011-08-02 Vincent Celier <celier@adacore.com>
9007 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9008 not declared for qualified library project when Library_Name is not
9009 declared, but Library_Dir is.
9011 2011-08-02 Robert Dewar <dewar@adacore.com>
9013 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9014 pragmas (affects aspects [Component_]Default_Value
9015 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9016 component type for the resolution
9018 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9020 * einfo.adb (Base_Type): Tune implementation for speed.
9022 2011-08-02 Robert Dewar <dewar@adacore.com>
9024 * freeze.adb: Minor reformatting.
9026 2011-08-02 Thomas Quinot <quinot@adacore.com>
9028 * scos.ads: Update comments.
9030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9032 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9033 base type, because the parent may be a subtype of a private type whose
9034 convention is established in a private part.
9036 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9038 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9039 statement in a block when the expansion of the return expression has
9040 created a finalization chain.
9041 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9042 with the parent node.
9043 Add N_Extended_Return_Statement to handle the case where a transient
9044 object declaration appears in the Return_Object_Declarations list of
9045 an extended return statement.
9047 2011-08-02 Matthew Gingell <gingell@adacore.com>
9049 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9050 unused parameter 'name'.
9052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9054 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9055 inherited operation, check whether its alias, which is the source
9056 operastion that it renames, has been marked eliminated.
9058 2011-08-02 Javier Miranda <miranda@adacore.com>
9060 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9061 in-mode parameter whose type is an access type since it can be used to
9062 modify its designated object. Enforce code that handles as safe an
9063 access type that is not access-to-constant but it is the result of a
9064 previous removal of side-effects.
9065 (Remove_Side_Effects): Minor code reorganization of cases which require
9066 no action. Done to incorporate documentation on new cases uncovered
9067 working in this ticket: no action needed if this routine was invoked
9068 too early and the nodes are not yet decorated.
9069 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9070 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9071 were issued with actuals that are implicitly provided by
9074 2011-08-02 Robert Dewar <dewar@adacore.com>
9076 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9078 2011-08-02 Yannick Moy <moy@adacore.com>
9080 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9081 to issue an error in formal mode on attribute not supported in this mode
9082 (Analyze_Attribute): issue errors on standard attributes not supported
9084 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9085 comment, and issue error in formal mode on modulus which is not a power
9087 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9089 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9091 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9092 operator on modular type (except 'not').
9094 2011-08-02 Robert Dewar <dewar@adacore.com>
9096 * gnat_rm.texi: Minor reformatting.
9098 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9100 * s-osinte-linux.ads: Minor comment update and reformatting.
9101 * i-cexten.ads: Make this unit pure, as for its parent.
9102 Will allow its usage in more contexts if needed.
9104 2011-08-02 Robert Dewar <dewar@adacore.com>
9106 * s-utf_32.ads: Minor comment fix.
9108 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9110 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9111 operation of a tagged synchronized type, handle the case where the
9112 controlling argument is overloaded.
9114 2011-08-02 Yannick Moy <moy@adacore.com>
9116 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9117 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9118 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9119 SPARK mode and formal verification mode on processing SPARK restriction
9120 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9121 requiring consistency checking.
9123 2011-08-02 Robert Dewar <dewar@adacore.com>
9125 * sem_res.adb: Minor reformatting.
9127 2011-08-02 Robert Dewar <dewar@adacore.com>
9129 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9130 a-cforse.ads: Remove unneeded with of Ada.Containers
9131 Remove commented out pragma Inline's
9132 Move specifications of new subprograms to the actual specs
9134 2011-08-02 Yannick Moy <moy@adacore.com>
9136 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9137 a-cforse.ads: Update comments.
9139 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9141 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9143 2011-08-02 Robert Dewar <dewar@adacore.com>
9145 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9146 a-cforse.ads, a-cofove.ads: Minor reformatting.
9148 2011-08-02 Claire Dross <dross@adacore.com>
9150 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9151 a-cofove.ads: Add comments.
9153 2011-08-02 Yannick Moy <moy@adacore.com>
9155 * gnat_rm.texi: Document formal containers.
9157 2011-08-02 Emmanuel Briot <briot@adacore.com>
9159 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9162 2011-08-02 Robert Dewar <dewar@adacore.com>
9164 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9167 2011-08-02 Robert Dewar <dewar@adacore.com>
9169 * aspects.adb: New aspects Default_Value and Default_Component_Value
9170 New format of Aspect_Names table checks for omitted entries
9171 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9172 handling of boolean aspects for derived types.
9173 New aspects Default_Value and Default_Component_Value
9174 New format of Aspect_Names table checks for omitted entries
9175 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9176 (Has_Default_Value): New flag
9177 (Has_Default_Component_Value): New flag
9178 (Has_Default_Value): New flag
9179 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9181 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9182 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9183 Default_Value and Default_Component_Value
9184 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9185 New aspects Default_Value and Default_Component_Value
9186 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9187 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9189 2011-08-02 Vincent Celier <celier@adacore.com>
9191 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9192 inherit library kind.
9194 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9196 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9199 2011-08-02 Robert Dewar <dewar@adacore.com>
9201 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9203 2011-08-02 Yannick Moy <moy@adacore.com>
9205 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9207 2011-08-02 Robert Dewar <dewar@adacore.com>
9209 * impunit.adb: Add comment.
9211 2011-08-02 Yannick Moy <moy@adacore.com>
9213 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9214 qualification of aggregates in formal mode
9215 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9217 (Resolve_Aggregate): complete the test that an aggregate is adequately
9218 qualified in formal mode
9220 2011-08-02 Pascal Obry <obry@adacore.com>
9222 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9223 * mlib-prj.adb: Supress warning when compiling binder generated file.
9224 (Build_Library): Supress all warnings when compiling the binder
9227 2011-08-02 Yannick Moy <moy@adacore.com>
9229 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9231 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9232 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9233 Add with/use clauses to make Check_Formal_Restriction visible
9235 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9237 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9238 in-parameters when type of the generic formal is private in the generic
9239 spec and non-private in the body.
9241 2011-08-02 Claire Dross <dross@adacore.com>
9243 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9244 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9245 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9246 * impunit.adb, Makefile.rtl: Take new files into account.
9248 2011-08-02 Robert Dewar <dewar@adacore.com>
9250 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9251 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9253 2011-08-02 Yannick Moy <moy@adacore.com>
9255 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9257 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9258 matching static array bounds, taking into account the special case of
9260 * sem_ch3.adb: Typo in comment.
9262 2011-08-02 Yannick Moy <moy@adacore.com>
9264 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9265 which issues an error in formal mode if its argument node is originally
9267 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9268 has a discriminant specification so that it does not include the case
9270 (Derived_Type_Declaration): move here the test that a derived type has a
9271 discriminant specification
9272 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9273 first element of a component association before accessing its choices
9274 (presence of component association is not enough)
9275 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9276 declaration is a library item before accessing the next element in a
9277 list, as library items are not member of lists
9278 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9279 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9280 Check_Formal_Restriction whenever possible.
9282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9284 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9285 reference when needed.
9287 2011-08-02 Bob Duff <duff@adacore.com>
9289 * gnat_ugn.texi: Fix typo.
9291 2011-08-02 Vincent Celier <celier@adacore.com>
9293 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9294 archive file name. Do not use the full path name of archives for Open
9297 2011-08-02 Robert Dewar <dewar@adacore.com>
9299 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9300 Analyze_Aspect_Specifications
9302 (Analyze_Aspect_Specifications): New handling for boolean aspects
9303 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9304 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9305 sequence for Analyze_Aspect_Specifications
9306 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9307 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9309 2011-08-02 Robert Dewar <dewar@adacore.com>
9311 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9312 aspects, since these no longer exist.
9314 2011-08-02 Robert Dewar <dewar@adacore.com>
9316 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9317 semicolon, do not try to see if there are aspects following it.
9318 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9321 2011-08-02 Robert Dewar <dewar@adacore.com>
9323 * sem_ch8.adb, aspects.ads: Minor reformatting.
9325 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9327 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9328 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9330 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9332 2011-08-02 Yannick Moy <moy@adacore.com>
9334 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9335 mode on subprogram declaration outside of package specification, unless
9336 it is followed by a pragma Import
9337 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9338 Access_Type_Declaration): issue error in formal mode on access type
9339 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9341 (Analyze_Object_Declaration): issue error in formal mode on object
9342 declaration which does not respect SPARK restrictions
9343 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9344 declaration which does not respect SPARK restrictions
9345 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9346 error in formal mode on digits or delta constraint
9347 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9348 decimal fixed point type
9349 (Derived_Type_Declaration): issue error in formal mode on derived type
9350 other than type extensions of tagged record types
9351 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9352 with check on access definition
9353 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9354 mode on protected definition.
9355 (Analyze_Task_Definition): issue error in formal mode on task definition
9357 2011-08-02 Robert Dewar <dewar@adacore.com>
9359 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9361 2011-08-02 Javier Miranda <miranda@adacore.com>
9363 * sem_ch6.adb (Can_Override_Operator): New function.
9364 (Verify_Overriding_Indicator): Add missing code to check overriding
9365 indicator in operators. Fixes regression.
9366 (Check_Overriding_Indicator): Minor reformating after replacing the
9367 code that evaluates if the subprogram can override an operator by
9368 invocations to the above new function.
9370 (Write_Field26_Name): Add missing code to ensure that, following
9371 the documentation in einfo.ads, this field is not shown as attribute
9372 "Static_Initialization" on non-dispatching functions.
9374 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9376 * sem_res.adb (Resolve_Call): A call to
9377 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9378 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9379 i.e., when the second parameter is of type Time_Span.
9381 2011-08-02 Vincent Celier <celier@adacore.com>
9383 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9384 with an archive instead of -L<library dir> -l<library name>.
9386 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9388 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9389 mark the base types In_Use in addition to making the operations
9392 2011-08-02 Ed Falis <falis@adacore.com>
9394 * init.c: add and setup __gnat_signal_mask for the exception signals
9395 * s-inmaop-vxworks.adb: new file.
9396 * s-intman-vxworks.adb: remove unnecessary initializations and
9398 * s-intman-vxworks.ads: remove unnecessary variable
9399 * s-taprop-vxworks.adb: simplify signal initialization
9401 2011-08-02 Robert Dewar <dewar@adacore.com>
9403 * sem_ch8.adb: Minor code reorganization, comment updates.
9405 2011-08-02 Robert Dewar <dewar@adacore.com>
9407 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9408 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9410 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9411 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9413 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9415 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9416 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9417 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9418 use_type_clauses, to handle more efficiently use_type and use_all_type
9420 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9421 Ada2012 Use_All_Type clause.
9422 (Use_Class_Wide_Operations): new procedure.
9424 2011-08-02 Robert Dewar <dewar@adacore.com>
9426 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9427 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9428 expression to expression function.
9430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9432 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9433 if types are compatible.
9435 2011-08-02 Yannick Moy <moy@adacore.com>
9437 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9438 returns True if its argument array types have same dimension and same
9439 static bounds at each index.
9440 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9441 OUT or IN OUT paramaters which are not view conversions in SPARK.
9442 (Resolve_Arithmetic_Op): issue an error in formal mode on
9443 multiplication or division with operands of fixed point types which are
9444 not qualified or explicitly converted.
9445 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9446 Boolean or array type (except String) operands.
9447 (Resolve_Equality_Op): issue an error in formal mode on equality
9448 operators for array types other than String with non-matching static
9450 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9451 for array types with non-matching static bounds. Factorize the code in
9452 Matching_Static_Array_Bounds.
9453 (Resolve_Qualified_Expression): issue an error in formal mode on
9454 qualified expressions for array types with non-matching static bounds.
9455 (Resolve_Type_Conversion): issue an error in formal mode on type
9456 conversion for array types with non-matching static bounds
9458 2011-08-02 Robert Dewar <dewar@adacore.com>
9460 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9462 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9464 * par-ch9.adb: save location of entry for proper error message.
9466 2011-08-02 Javier Miranda <miranda@adacore.com>
9468 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9469 (Use_Full_View) which permits this routine to climb through the
9470 ancestors using the full-view of private parents.
9471 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9472 Use_Full_View to true in calls to Is_Ancestor.
9473 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9474 true in call to Is_Ancestor.
9475 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9476 Use_Full_View to true in call to Is_Ancestor.
9477 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9478 call to Is_Ancestor.
9479 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9480 Use_Full_View to true in calls to Is_Ancestor.
9481 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9482 Make_Select_Specific_Data_Table, Register_Primitive,
9483 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9484 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9485 to true in call to Is_Ancestor.
9486 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9487 Use_Full_View to true in calls to Is_Ancestor.
9489 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9490 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9492 2011-08-02 Robert Dewar <dewar@adacore.com>
9494 * gnat_rm.texi: Minor reformatting.
9495 * sem_prag.adb: Minor reformatting.
9497 2011-08-02 Tristan Gingold <gingold@adacore.com>
9499 * vms_data.ads: Add VMS qualifier for -gnateP.
9501 2011-08-02 Robert Dewar <dewar@adacore.com>
9503 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9504 * par-ch7.adb (P_Package): Proper placement of aspects for package
9506 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9507 (End_Statements): Add Is_Sloc parameterr
9508 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9509 (Check_End): Ad Is_Sloc parameter
9510 (End_Statements): Add Is_Sloc parameterr
9512 2011-08-02 Vincent Celier <celier@adacore.com>
9514 * ug_words: Add VMS qualifier equivalent to -gnateP:
9515 /SYMBOL_PREPROCESSING.
9517 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9519 * gnat-style.texi: For hexadecimal numeric literals the typical
9520 grouping of digits is 4 to represent 2 bytes.
9521 A procedure spec which is split into several lines is indented two
9524 2011-08-02 Yannick Moy <moy@adacore.com>
9526 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9527 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9528 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9530 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9531 choice in array aggregate
9532 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9534 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9535 positional and named aggregate for record, or others in record
9536 aggregate, or multiple choice in record aggregate
9537 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9538 array operands to logical operations AND, OR and XOR do not have the
9539 same static lower and higher bounds
9540 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9542 2011-08-01 Robert Dewar <dewar@adacore.com>
9544 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9545 Replaces Last_Source_Node_In_Sequence.
9546 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9547 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9548 parens and blank in string (this was inconsistently implemented).
9550 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9551 blank in string (this was inconsistently implemented).
9553 (Set_Global_Switches): Set formal mode switches appropriately
9554 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9556 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9557 call Set_Error_Msg_Lang to set "spark" as language name.
9558 * par.adb: Remove unnecessary call to set formal language for errout
9559 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9560 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9562 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9563 calls to it, moved after resolution so that types are known
9564 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9565 result of concatenation is not of type String
9566 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9567 concatenation is not properly restricted
9568 * gnat_rm.texi: Add doc on pragma Spark_95.
9569 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9570 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9571 * gcc-interface/Make-lang.in: Update dependencies.
9573 2011-08-01 Javier Miranda <miranda@adacore.com>
9575 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9576 condition that detects if the overridden operation must replace an
9579 2011-08-01 Javier Miranda <miranda@adacore.com>
9581 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9582 code declarations inserted by Insert_Actions in each alternative of the
9583 N_Case_Expression node.
9585 2011-08-01 Robert Dewar <dewar@adacore.com>
9587 * sem_ch6.adb: Minor code reorganization.
9588 * sem_util.adb: Minor reformatting.
9590 2011-08-01 Pascal Obry <obry@adacore.com>
9592 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9593 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9595 2011-08-01 Yannick Moy <moy@adacore.com>
9597 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9598 literal or operator symbol which is prefixed
9599 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9600 mode on access attributes.
9601 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9602 that concatenation operands are properly restricted in formal mode
9603 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9604 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9605 result of the concatenation has a type different from String.
9606 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9607 Analyze_Quantified_Expression, Analyze_Slice,
9608 Analyze_Null): issue an error in formal mode on unsupported constructs
9610 (Analyze_Block_Statement): only issue error on source block statement
9611 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9612 function which returns the last node in a list of nodes for which
9613 Comes_From_Source returns True, if any
9614 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9615 Last_Source_Node_In_Sequence
9616 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9617 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9618 mode on unsupported constructs
9619 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9620 rest of the actions may be needed later on since the error is marked as
9622 * sinfo.ads: Typos in comments.
9624 2011-08-01 Pascal Obry <obry@adacore.com>
9626 * projects.texi: Minor editing.
9628 2011-08-01 Yannick Moy <moy@adacore.com>
9630 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9631 insertion character ~~
9632 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9633 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9634 with insertion character ~~
9635 (Set_Msg_Text): treat insertion character ~~
9636 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9637 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9638 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9639 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9640 errors related to the formal language restriction not serious
9641 (insertion character |).
9642 * par.adb (Par): set formal language for error messages if needed
9643 * sem_ch6.adb (Check_Missing_Return): take into account possible
9644 generated statements at the end of the function
9645 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9646 enumeration value to define a new pragma SPARK_95
9647 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9648 SPARK_Version): new type and variables to store the SPARK version
9650 (SPARK_Mode): return True when SPARK_Version is set
9651 * par-prag.adb: Correct indentation
9652 (Prag): take Pragma_SPARK_95 into account
9653 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9656 2011-08-01 Robert Dewar <dewar@adacore.com>
9658 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9659 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9660 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9662 2011-08-01 Pascal Obry <obry@adacore.com>
9664 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9665 Target_Name to Get_Path call.
9666 (Parse_Single_Project): Likewise.
9667 (Post_Parse_Context_Clause): Likewise.
9668 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9669 Call Initialise_Project_Path with the proper Target_Name.
9670 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9672 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9673 with the proper Target_Name.
9674 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9676 (Parse_Project_And_Apply_Config): Likewise.
9677 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9678 This is fine as this part of the code is supporting only native
9680 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9681 is fine as this part of the code is supporting only native compilation.
9683 2011-08-01 Yannick Moy <moy@adacore.com>
9685 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9686 of homonym, unless the homonym is one of the cases allowed in SPARK
9687 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9688 package declaration occurring after a body.
9690 2011-08-01 Robert Dewar <dewar@adacore.com>
9692 * checks.adb, exp_ch4.adb: Minor reformatting.
9694 2011-08-01 Javier Miranda <miranda@adacore.com>
9696 * einfo.ads (Access_Disp_Table): Fix documentation.
9697 (Dispatch_Table_Wrappers): Fix documentation.
9699 2011-08-01 Pascal Obry <obry@adacore.com>
9701 * prj-env.adb, prj-env.ads: Minor reformatting.
9703 2011-08-01 Yannick Moy <moy@adacore.com>
9705 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9706 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9707 procedures out of these packages.
9708 * errout.ads, errout.adb
9709 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9710 procedures in of this package
9711 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9712 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9713 on misplaced later vs initial declarations, like in Ada 83
9714 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9715 formal mode on attribute of private type whose full type declaration
9717 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9718 package declaration inside a package specification
9719 (Analyze_Full_Type_Declaration): issue error in formal mode on
9720 controlled type or discriminant type
9721 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9722 user-defined operator means that it should come from the source
9723 (New_Overloaded_Entity): issue error in formal mode on overloaded
9725 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9727 2011-08-01 Thomas Quinot <quinot@adacore.com>
9729 * atree.adb: Minor reformatting.
9730 * checks.adb: Minor reformatting.
9732 2011-08-01 Vincent Celier <celier@adacore.com>
9734 * s-parame-vms-ia64.ads: Fix typo in comment
9736 * s-parame-vms-restrict.ads: Removed, unused.
9738 2011-08-01 Javier Miranda <miranda@adacore.com>
9741 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9743 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9744 * sem_ch3.ads, sem_ch3.adb
9745 (Is_Constant_Bound): New extended version of the subprogram that was
9746 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9747 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9748 * sem_aux.ads (Constant_Value): Fix typo in comment.
9749 * checks.adb (Generate_Index_Checks): New implementation which, for
9750 array objects with constant bounds, generates the runtime check
9751 referencing the bounds of the array type. For other cases this routine
9752 provides its previous behavior obtaining such values from the array
9754 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9756 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9757 we cannot have semantic interpretations of the new node.
9759 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9761 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9764 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9766 * sem_ch8.adb: Minor code editing.
9767 * s-vxwext.adb: Remove trailing space.
9768 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9769 consistency with other files.
9771 2011-08-01 Thomas Quinot <quinot@adacore.com>
9773 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9775 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9777 * par-ch10.adb: reject parameterized expressions as compilation unit.
9778 * sem_ch4.adb: handle properly conditional expression with overloaded
9779 then_clause and no else_clause.
9781 2011-08-01 Tristan Gingold <gingold@adacore.com>
9783 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9784 like done by System.Aux_DEC.
9785 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9787 2011-08-01 Yannick Moy <moy@adacore.com>
9789 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9790 missing label at end of declaration (subprogram or package)
9791 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9792 of positional and named parameter association
9793 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9794 Error_Msg_SP which adds a prefix to the error message giving the name
9795 of the formal language analyzed
9796 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9797 access result type in subprogram, unconstrained array as result type,.
9798 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9800 * sem_ch8.adb: Code clean up.
9802 2011-08-01 Javier Miranda <miranda@adacore.com>
9804 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9805 * einfo.ads (Access_Disp_Table): Fix documentation.
9806 (Dispatch_Table_Wrappers): Fix documentation.
9807 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9808 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9809 to enforce the documentation of this attribute.
9810 (Set_Is_Interface): Cleanup the assertion.
9811 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9812 the Underlying_Type entity before reading attribute Access_Disp_Table.
9813 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9814 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9815 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9816 the Underlying_Type entity before reading attribute Access_Disp_Table.
9817 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9818 Locate the Underlying_Type entity before reading attribute
9821 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9823 * s-poosiz.ads: Additional overriding indicators.
9825 2011-08-01 Yannick Moy <moy@adacore.com>
9827 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9829 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9830 parameter specification does not include a subtype mark.
9831 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9832 formal mode on abstract subprogram.
9833 (Analyze_Subprogram_Specification): issue error in formal mode on
9834 user-defined operator.
9835 (Process_Formals): issue error in formal mode on access parameter and
9837 * sem_ch9.adb (Analyze_Abort_Statement,
9838 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9839 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9840 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9841 Analyze_Requeue, Analyze_Selective_Accept,
9842 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9843 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9844 issue error in formal mode on user-defined raise statement.
9846 2011-08-01 Thomas Quinot <quinot@adacore.com>
9848 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9849 declaration being hidden when overriding an implicit inherited
9851 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9852 (-gnats), do not complain about a source file that contains only a
9855 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9857 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9858 variable if already set.
9860 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9862 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9863 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9864 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9865 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9866 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9867 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9868 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9869 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9870 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9871 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9872 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9873 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9874 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9875 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9876 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9877 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9878 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9879 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9880 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9881 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9882 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9883 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9884 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9885 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9886 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9887 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9888 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9889 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9890 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9891 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9892 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9893 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9894 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9895 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9896 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9897 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9898 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9899 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9900 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9901 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9902 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9903 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9904 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9905 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9906 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9907 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9908 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9909 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9910 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9911 Use GNAT instead of GNARL.
9913 2011-08-01 Bob Duff <duff@adacore.com>
9915 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9916 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9917 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9920 2011-08-01 Yannick Moy <moy@adacore.com>
9922 * debug.adb (d.D) reverve flag for the SPARK mode
9923 (d.E) reverve flag for SPARK generation mode
9924 (d.F) reverve flag for Why generation mode
9925 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9926 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9927 functions which return True when the corresponding modes are set
9928 (Formal_Language): return "spark" or "alfa" when in formal verification
9930 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9931 Error_Msg to prefix the error message with a tag giving the formal
9933 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9934 message with a tag giving the formal language
9935 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9937 (Analyze_Case_Statement): issue error in formal mode on case statement
9938 with a single "others" case alternative
9939 (Analyze_Exit_Statement): issue errors in formal mode on exit
9940 statements which do not respect SPARK restrictions
9941 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9942 (Check_Unreachable_Code): always issue an error (not a warning) in
9943 formal mode on unreachable code (concerns both code after an infinite
9944 loop and after an unconditional jump, both not allowed in SPARK)
9945 * sem_ch6.adb (Analyze_Return_Statement): add call to
9946 Set_Return_Present for a procedure containing a return statement
9947 (already done for functions in Analyze_Function_Return)
9948 (Analyze_Function_Return): issue error in formal mode on extended
9949 return or if return is not last statement in function
9950 (Check_Missing_Return): issue error in formal mode if function does
9951 not end with return or if procedure contains a return
9952 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9953 function to detect if there is an inner scope of its parameter S which
9956 2011-08-01 Thomas Quinot <quinot@adacore.com>
9958 * sem_ch6.ads: Minor reformatting.
9960 2011-08-01 Javier Miranda <miranda@adacore.com>
9962 * sem_util.adb (Abstract_Interface_List): Complete condition when
9963 processing private type declarations to avoid reading unavailable
9965 (Is_Synchronized_Tagged_Type): Complete condition when processing
9966 private extension declaration nodes to avoid reading unavailable
9969 2011-08-01 Thomas Quinot <quinot@adacore.com>
9971 * sem_ch3.adb: Minor reformatting.
9973 2011-08-01 Thomas Quinot <quinot@adacore.com>
9975 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9976 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9977 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9978 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9979 for VMS, instead parametrize the common implementation with
9980 System.Parameters declarations.
9982 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9984 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9986 2011-08-01 Tristan Gingold <gingold@adacore.com>
9988 * seh_init.c: Fix SEH handler installation on win64.
9990 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9992 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9993 double analysis of an anonymous access to subprogram, because it can
9994 lead to improper sharing of profiles and a back-end crash.
9996 2011-08-01 Robert Dewar <dewar@adacore.com>
9998 * make.adb, sem_ch4.adb: Minor reformatting.
9999 * gcc-interface/Make-lang.in: Update dependencies.
10000 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10002 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10004 * gnat_rm.texi: Fix definition of Long_Integer.
10006 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10008 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10009 to prevent storage exhaustion.
10010 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10011 finalized is a function body, insert the cleanup code before the final
10012 return statement, to prevent spurious warnings.
10013 * s-pooglo.ads: add overriding indicator.
10015 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10017 * sem_ch4.adb (Operator_Check): improve error message when both a
10018 with_clause and a use_clause are needed to make operator usage legal.
10019 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10020 determine whether a compilation unit is visible within an other,
10021 either through a with_clause in the current unit, or a with_clause in
10022 its library unit or one one of its parents.
10024 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10026 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10027 over an arbitrary expression of an array or container type.
10028 * lib-xref.adb: clarify comment.
10030 2011-08-01 Bob Duff <duff@adacore.com>
10032 * einfo.ads: Minor reformatting.
10033 * debug.adb: Minor comment improvement.
10035 2011-08-01 Javier Miranda <miranda@adacore.com>
10037 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10038 consider hidden subprograms as valid candidates.
10040 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10042 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10044 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10046 * gnat_ugn.texi: Fix typo.
10048 2011-08-01 Robert Dewar <dewar@adacore.com>
10050 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10051 lib-xref.adb: Minor reformatting
10053 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10055 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10056 when to generate a call to Move_Final_List.
10057 (Has_Controlled_Parts): Remove this function.
10059 2011-08-01 Geert Bosch <bosch@adacore.com>
10061 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10062 "," in choice list.
10064 2011-08-01 Thomas Quinot <quinot@adacore.com>
10066 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10067 explicit raise of a predefined exception as Comes_From_Source if the
10068 original N_Raise_Statement comes from source.
10070 2011-08-01 Robert Dewar <dewar@adacore.com>
10072 * sinfo.ads: Add comment.
10073 * sem_ch6.adb: Minor reformatting.
10075 2011-08-01 Robert Dewar <dewar@adacore.com>
10077 * freeze.adb (Freeze_Entity): Refine check for bad component size
10078 clause to avoid rejecting confirming clause when atomic/aliased present.
10080 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10082 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10083 better determine whether an entity reference is a write.
10084 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10086 * lib-xref.adb (Output_References): Do no suppress a read reference at
10087 the same location as an immediately preceeding modify-reference, to
10088 handle properly in-out actuals.
10090 2011-08-01 Tristan Gingold <gingold@adacore.com>
10092 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10094 2011-08-01 Quentin Ochem <ochem@adacore.com>
10096 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10097 heap to compute the result.
10099 2011-08-01 Robert Dewar <dewar@adacore.com>
10101 * atree.ads: Minor reformatting.
10103 2011-08-01 Emmanuel Briot <briot@adacore.com>
10105 * g-expect.adb (Get_Command_Output): Fix memory leak.
10107 2011-08-01 Geert Bosch <bosch@adacore.com>
10109 * cstand.adb (P_Float_Type): New procedure to print the definition of
10110 predefined fpt types.
10111 (P_Mixed_Name): New procedure to print a name using mixed case
10112 (Print_Standard): Use P_Float_Type for printing floating point types
10113 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10114 precision IEEE float.
10116 2011-08-01 Thomas Quinot <quinot@adacore.com>
10118 * sem_ch3.adb: Minor reformatting.
10120 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10122 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10123 the completion of a generic function, insert the new body rather than
10124 rewriting the original.
10126 2011-08-01 Yannick Moy <moy@adacore.com>
10128 * sinfo.ads, errout.ads: Typos in comments.
10130 2011-08-01 Robert Dewar <dewar@adacore.com>
10132 * par-endh.adb: Minor reformatting.
10134 2011-08-01 Robert Dewar <dewar@adacore.com>
10136 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10137 (Pre_Post_Aspects): New subtype.
10138 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10139 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10140 * par-ch7.adb (P_Package): Remove Decl parameter
10141 (P_Package): Handle new syntax for aspects (before IS)
10142 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10144 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10145 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10146 (P_Package): Remove Decl parameter
10147 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10149 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10151 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10152 * sinfo.ads: Document new syntax for aspects in packages etc.
10153 * sprint.adb: Handle new syntax of aspects before IS in package
10155 2011-08-01 Thomas Quinot <quinot@adacore.com>
10157 * atree.ads: Minor reformatting.
10158 * sem_prag.adb: Minor reformatting.
10160 2011-08-01 Robert Dewar <dewar@adacore.com>
10162 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10163 case expr alternative.
10165 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10167 * sem_ch12.adb: Fix typo.
10169 2011-08-01 Geert Bosch <bosch@adacore.com>
10171 * sem_prag.adb (Check_No_Link_Name): New procedure.
10172 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10173 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10174 instead of Standard_Long_Long_Float_Size global. Preparation for
10175 eventual removal of per type constants.
10176 * exp_util.ads (Get_Stream_Size): New function returning the stream
10177 size value of subtype E.
10178 * exp_util.adb (Get_Stream_Size): Implement new function.
10179 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10181 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10183 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10185 2011-08-01 Geert Bosch <bosch@adacore.com>
10187 * cstand.adb: Fix comments.
10188 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10189 count of arguments.
10191 2011-08-01 Robert Dewar <dewar@adacore.com>
10193 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10195 2011-08-01 Geert Bosch <bosch@adacore.com>
10197 * atree.ads: Fix comment.
10199 2011-08-01 Robert Dewar <dewar@adacore.com>
10201 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10202 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10203 * par.adb: Add with for Namet.Sp.
10204 * par-tchk.adb: Minor reformatting.
10206 2011-08-01 Vincent Celier <celier@adacore.com>
10208 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10209 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10210 of the init procedure of a SAL.
10211 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10214 2011-08-01 Thomas Quinot <quinot@adacore.com>
10216 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10219 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10221 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10223 2011-08-01 Thomas Quinot <quinot@adacore.com>
10225 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10226 conformant with its spec (return True only for types that have
10227 an overriding Initialize primitive operation that prevents them from
10228 having preelaborable initialization).
10229 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10230 initialization for controlled types in Ada 2005 or later mode.
10232 2011-08-01 Robert Dewar <dewar@adacore.com>
10234 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10236 (Same_Aspect): New function.
10237 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10238 Type_Invariant, Precondition, Postcondition.
10239 * snames.ads-tmpl: Add Name_Type_Invariant.
10241 2011-08-01 Robert Dewar <dewar@adacore.com>
10243 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10245 (Freeze_All_Ent): Fix error in handling inherited aspects.
10246 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10247 already analyzed, but don't skip entire processing of a declaration,
10248 that's wrong in some cases of declarations being rewritten.
10249 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10250 Don't delay for integer, string literals
10251 Treat predicates in usual manner for delay, remove special case code,
10253 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10254 (Build_Predicate_Function): Update saved expression in aspect
10255 (Build_Invariant_Procedure): Update saved expression in aspect
10256 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10257 of replacement of discriminant references if the reference is simple.
10259 2011-08-01 Robert Dewar <dewar@adacore.com>
10261 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10262 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10263 Static_Predicate and Dynamic_Predicate.
10264 (Build_Predicate_Function): Add processing for Static_Predicate
10265 and Dynamic_Predicate.
10266 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10267 (From_Static_Predicate): New flag
10268 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10270 2011-08-01 Robert Dewar <dewar@adacore.com>
10272 * usage.adb: Documentation cleanup for Ada version modes in usage.
10273 * expander.adb: Minor reformatting.
10275 2011-08-01 Robert Dewar <dewar@adacore.com>
10277 * atree.ads: Minor comment fix.
10278 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10279 a-witeio.ads, sem_prag.adb: Minor reformatting.
10281 2011-08-01 Doug Rupp <rupp@adacore.com>
10283 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10284 pointers. Use descrip.h header file for convenience. Add some
10287 2011-08-01 Robert Dewar <dewar@adacore.com>
10289 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10290 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10291 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10293 (Check_Aspect_At_End_Of_Declarations): New procedure
10294 (Analye_Aspect_Specification): Minor changes for above procedures
10295 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10296 specification node as well.
10298 2011-08-01 Pascal Obry <obry@adacore.com>
10300 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10301 Windows files. Use GetFilesAttributes() in this case to check for file
10302 existence instead of returning with an error code.
10304 2011-08-01 Vincent Celier <celier@adacore.com>
10306 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10307 High is above Source length.
10309 2011-08-01 Robert Dewar <dewar@adacore.com>
10311 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10313 2011-08-01 Robert Dewar <dewar@adacore.com>
10315 * aspects.ads (Boolean_Aspects): New subtype.
10316 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10317 for derived types in cases where the parent type and derived type have
10319 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10320 with aspects when parent type also has aspects.
10321 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10322 boolean expression at this point).
10323 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10324 accordance with final decision on the Ada 2012 feature.
10325 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10327 2011-08-01 Matthew Heaney <heaney@adacore.com>
10329 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10331 2011-08-01 Pascal Obry <obry@adacore.com>
10333 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10334 Fix Replace_Slice when High is above current string size.
10335 (Replace_Slice): Fix DL computation when High is above current
10338 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10340 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10342 2011-08-01 Matthew Heaney <heaney@adacore.com>
10344 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10347 2011-08-01 Pascal Obry <obry@adacore.com>
10349 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10352 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10354 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10355 access to protected subprograms in generic bodies.
10356 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10357 protected type, indicate that the convention of the subprogram is
10358 Convention_Protected, because it may be used in subsequent declarations
10359 within the protected declaration.
10361 2011-08-01 Vincent Celier <celier@adacore.com>
10363 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10364 and "final" procedures when the name of the library is "ada", to avoid
10365 duplicate symbols "adainit" and "adafinal" in executables.
10367 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10369 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10370 quantified expression that appears within a postcondition and uses the
10371 Ada2012 'Result attribute.
10373 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10375 * init.c (__gnat_error_handler): Cast reason to int.
10376 (__gnat_install_handler): Explain sa_sigaction use.
10378 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10380 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10381 subprogram has copy-in copy-out parameters, try to promote the mode of
10382 the return type if it is passed in registers.
10384 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10386 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10387 left operand as addressable.
10389 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10391 * gcc-interface/gigi.h (build_function_stub): Remove.
10392 (build_return_expr): Likewise.
10393 (convert_vms_descriptor): Declare.
10394 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10395 (build_function_stub): Move to...
10396 * gcc-interface/utils2.c (build_return_expr): Move to...
10397 * gcc-interface/trans.c (build_function_stub): ...here.
10398 (build_return_expr): ...here.
10399 (Subprogram_Body_to_gnu): Add local variable for language_function.
10400 Disconnect the parameter attributes cache, if any, once done with it.
10401 Call end_subprog_body only after setting the end_locus.
10402 Build the stub associated with the function, if any, at the very end.
10403 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10404 variables and streamline control flow.
10406 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10409 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10410 g-trasym-dwarf.adb.
10412 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10415 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10416 Assign to act.sa_sigaction.
10417 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10418 current->return_address to char * before arithmetic.
10420 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10422 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10423 Correct argument types.
10424 Extract code from reason.
10425 (__gnat_install_handler): Assign to act.sa_sigaction.
10427 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10429 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10430 (GNAT1_OBJS): ...here.
10432 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10435 * g-socthi-mingw.adb (Fill): Fix formatting.
10437 * gcc-interface/gigi.h: Move around comment.
10439 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10442 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10444 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10447 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10449 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10451 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10452 range comparison if Pmode is SImode.
10454 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10455 Eric Botcazou <ebotcazou@adacore.com>
10457 * adadecode.c: Wrap up in extern "C" block.
10458 * adadecode.h: Likewise.
10459 * adaint.c: Likewise. Remove 'const' keyword.
10460 * adaint.h: Likewise.
10461 * argv.c: Likewise.
10462 * atree.h: Likewise.
10464 * cstreams.c: Likewise.
10466 * exit.c: Likewise.
10468 * final.c: Likewise.
10469 * init.c: Likewise.
10470 * initialize.c: Likewise.
10471 * link.c: Likewise.
10472 * namet.h: Likewise.
10473 * nlists.h: Likewise.
10474 * raise.c: Likewise.
10475 * raise.h: Likewise.
10476 * repinfo.h: Likewise.
10477 * seh_init.c: Likewise.
10478 * targext.c: Likewise.
10479 * tracebak.c: Likewise.
10480 * uintp.h: Likewise.
10481 * urealp.h: Likewise.
10482 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10483 * xsinfo.adb: Likewise.
10484 * xsnamest.adb: Likewise.
10485 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10486 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10487 * gcc-interface/misc.c: Likewise.
10488 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10489 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10490 ada/targext.o here...
10491 (GNAT_ADA_OBJS): ...and not here.
10492 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10493 (GNATBIND_OBJS): Reorder.
10495 2011-07-07 Richard Henderson <rth@redhat.com>
10497 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10498 dwarf2out_frame_init.
10500 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10502 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10504 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10507 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10509 2011-07-06 Richard Guenther <rguenther@suse.de>
10511 * gcc-interface/misc.c (gnat_init): Merge calls to
10512 build_common_tree_nodes and build_common_tree_nodes_2.
10513 Re-initialize boolean_false_node.
10515 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10516 Olivier Hainque <hainque@adacore.com>
10517 Nicolas Setton <setton@adacore.com>
10519 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10520 the type according to the ARTIFICIAL_P parameter.
10521 (create_type_decl): Likewise.
10522 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10524 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10526 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10527 (gnatbind): Likewise.
10529 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10531 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10533 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10535 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10536 local variable throughout. Remove useless call to Base_Type.
10537 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10538 Take it also into account for the volatileness of the field. Set the
10539 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10541 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10543 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10544 on a dereference built for a by-ref object if it has an address clause.
10546 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10548 * einfo.ads (Address_Taken): Document use for the second argument of
10549 Asm_Input and Asm_Output attributes.
10550 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10551 argument is an entity name, then set Address_Taken on it.
10552 <Attribute_Asm_Output>: Likewise.
10553 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10554 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10555 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10556 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10558 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10560 PR middle-end/46500
10561 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10563 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10565 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10566 (ada/utils.o): Update dependencies.
10567 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10568 ../../../libcpp/libcpp.a.
10569 * gcc-interface/utils.c: Include common/common-target.h.
10570 (process_attributes): Use targetm_common.have_named_sections.
10572 2011-06-07 Richard Guenther <rguenther@suse.de>
10574 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10577 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10579 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10580 TREE_THIS_NOTRAP flag.
10582 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10584 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10587 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10589 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10590 constants whose full view has discriminants specially.
10592 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10594 * gcc-interface/utils.c: Include diagnostic.h.
10595 (gnat_write_global_declarations): Output debug information for all
10596 global type declarations before finalizing the compilation unit.
10597 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10599 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10601 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10603 2011-05-25 Kai Tietz <ktietz@redhat.com>
10605 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10606 initialization instead of const/none-const pointer assignment.
10608 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10610 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10611 $(EXTRA_GNAT1_OBJS).
10612 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10613 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10614 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10615 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10616 libcommon-target.a instead of prefix.o.
10618 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10621 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10623 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10625 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10626 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10627 instead of version.o.
10629 2011-05-18 Kai Tietz <ktietz@redhat.com>
10631 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10632 boolean_false_node instead of integer_zero_node.
10633 (convert_with_check): Likewise.
10634 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10636 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10638 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10639 type of the parameter is an unconstrained array, convert the actual to
10640 the type of the formal in the In Out and Out cases as well.
10642 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10644 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10645 call build_function_type_array or build_varargs_function_type_array
10647 (create_subprog_type): Don't call build_function_type; call
10648 build_function_type_vec instead.
10650 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10652 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10653 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10654 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10656 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10658 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10660 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10661 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10663 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10665 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10667 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10669 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10670 instead of accessing TYPE_ARG_TYPES directly.
10671 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10673 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10676 * gcc-interface/gigi.h (get_variant_part): Declare.
10677 * gcc-interface/decl.c (get_variant_part): Make global.
10678 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10679 types have the same constant size, are record types and T1 has a
10680 variant part while T2 doesn't.
10682 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10684 * gcc-interface/utils.c (begin_subprog_body): Do not call
10686 (end_subprog_body): Likewise.
10688 2011-05-04 Richard Guenther <rguenther@suse.de>
10690 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10692 (pos_to_constructor): Likewise.
10694 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10695 Eric Botcazou <ebotcazou@adacore.com>
10697 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10698 of build_function_type. Adjust calls to...
10699 (build_raise_check): ...this. Do not take a void_tree parameter.
10700 Call build_function_type_list instead of build_function_type.
10701 Fix head comment and swap couple of conditional blocks.
10703 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10705 * gnatvsn.ads (Library_Version): Bump to 4.7.
10706 (Current_Year): Bump to 2011.
10708 2011-04-29 Michael Matz <matz@suse.de>
10710 * gcc-interface/misc.c (gnat_handle_option): Set
10711 warn_maybe_uninitialized.
10713 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10715 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10716 the Watson/McCabe paper.
10718 2011-04-23 Jim Meyering <meyering@redhat.com>
10720 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10722 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10724 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10727 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10729 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10731 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10732 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10733 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10734 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10735 <all>: Do not set flags on the reused DECL node coming from an alias.
10736 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10737 don't need debug info here...
10738 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10739 (gigi): Adjust calls to create_subprog_decl.
10740 (build_raise_check): Likewise.
10741 (establish_gnat_vms_condition_handler): Likewise.
10742 (Compilation_Unit_to_gnu): Likewise.
10743 (gnat_to_gnu): Likewise.
10745 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10747 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10748 (NO_REORDER_ADAFLAGS): New variable.
10749 (EXTRA_GNATTOOLS): Always define.
10750 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10751 Clean up and adjust list of files compiled with special options.
10752 * gcc-interface/Make-lang.in: Likewise.
10753 (ada/decl.o): Cosmetical change.
10754 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10756 2011-04-20 Jim Meyering <meyering@redhat.com>
10758 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10760 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10762 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10763 $(CFLAGS) on the link line.
10765 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10767 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10768 padded type built for the return type if it is unconstrained.
10770 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10772 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10774 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10776 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10777 before calling TREE_CHAIN.
10778 * gcc-interface/misc.c (gnat_init_ts): New function.
10779 (LANG_HOOKS_INIT_TS): Define.
10781 2011-04-12 Martin Jambor <mjambor@suse.cz>
10783 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10784 instead of cgraph_node.
10786 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10788 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10789 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10792 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10794 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10795 of aggregate types that contain a placeholder.
10797 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10799 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10801 (handle_type_generic_attribute): Likewise.
10803 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10806 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10808 2011-04-04 Kai Tietz <ktietz@redhat.com>
10811 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10814 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10816 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10817 type case, do not strip a padding type around the array type.
10819 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10821 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10824 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10826 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10827 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10828 code for -feliminate-unused-debug-types.
10829 (gnat_post_options): Likewise.
10831 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10833 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10834 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10837 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10839 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10840 DECL_ARTIFICIAL flag on enumeration types.
10842 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10844 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10845 fat pointer types artificial unconditionally.
10846 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10849 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10851 * gcc-interface/gigi.h (get_dummy_type): Declare.
10852 (build_dummy_unc_pointer_types): Likewise.
10853 (finish_fat_pointer_type): Likewise.
10854 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10855 fat pointer type has been built, complete it in place.
10856 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10857 and thin pointers. Remove useless variable.
10858 (finish_fat_pointer_type): Make global and move to...
10859 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10860 (get_dummy_type): New function.
10861 (build_dummy_unc_pointer_types): Likewise.
10862 (gnat_pushdecl): Propage the name to the anonymous variants only.
10863 (update_pointer_to): Only adjust the pointer types in the unconstrained
10866 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10868 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10869 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10870 if this is a Taft amendment type and the full declaration is available.
10871 * gcc-interface/trans.c (process_type): Likewise.
10872 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10873 (process_freeze_entity): Likewise.
10874 * gcc-interface/utils.c (dummy_global): New static variable.
10875 (gnat_write_global_declarations): If there are types declared as used
10876 at the global level, insert them in the global hash table.
10878 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10880 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10881 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10882 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10884 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10885 flag of the type accordingly.
10886 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10888 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10890 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10891 finalizing types when updating the pointers to the designated type.
10892 <all>: Finalize the deferred types even if we didn't defer processing
10893 of incomplete types in this invocation.
10895 2011-04-01 Olivier Hainque <hainque@adacore.com>
10896 Nicolas Setton <setton@adacore.com>
10897 Eric Botcazou <ebotcazou@adacore.com>
10899 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10900 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10902 2011-03-28 Kai Tietz <ktietz@redhat.com>
10904 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10906 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10907 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10909 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10911 2011-03-28 Tristan Gingold <gingold@adacore.com>
10914 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10915 Use ada output of gnatbind.
10916 (ada/b_gnatb.adb): Ditto.
10917 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10918 (ada.mostlyclean, ada.stage1)
10919 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10920 (ada.stagefeedback): Adjust.
10921 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10922 Use ada output of gnatbind.
10923 (b_gnatm.adb): Ditto.
10924 (b_gnatl.o, b_gnatm.o): New rules.
10926 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10928 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10929 for the padded type built to support a specified size or alignment.
10931 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10933 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10934 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10935 unconditionally to the end of the unit when the designated type is
10937 <all>: Rename local variable. Attempt to un-defer types only and do it
10938 for limited_with'ed types as well.
10939 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10940 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10941 consistently and remove redundant call to finalize_from_with_types.
10943 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10945 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10946 subprograms without a previous spec declared in the same unit.
10947 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10948 subprograms at the end of the unit instead of at the beginning.
10949 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10950 isn't public for the special handling of non-inline functions nested
10951 inside inline external functions.
10953 2011-03-25 Jeff Law <law@redhat.com>
10955 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10957 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10959 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10960 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10961 to compute Set_Size_Depends_On_Discriminant.
10962 (Layout_Type): Call it on array types in back-end layout mode.
10963 * sem_util.adb (Requires_Transient_Scope): Return true for array
10964 types only if the size depends on the value of discriminants.
10965 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10966 type if the RHS is a call to a function that returns an unconstrained
10967 type with default discriminant.
10969 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10971 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10972 non-conversion to the nominal result type at the end.
10974 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10976 * gcc-interface/trans.c (create_temporary): New function taken from...
10977 (create_init_temporary): ...here. Call it.
10978 (call_to_gnu): Create the temporary for the return value early, if any.
10979 Create it for a function with copy-in/copy-out parameters if there is
10980 no target; in other cases of copy-in/copy-out, use another temporary.
10981 Push the new binding level lazily. Add and rename local variables.
10983 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10985 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10987 (set_rm_size): Likewise.
10989 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10991 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10992 for the padded type built in order to support a specified alignment.
10993 Fix incorrect formatting.
10995 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10998 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11000 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11002 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11003 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11004 to the end of the list. Adjust recursive call. Rename local variable.
11005 If REORDER is true, reorder components of the record type.
11006 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11007 components_to_record and adjust the parameter list.
11009 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11011 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11012 disabled, use the variable for bounds of loop iteration scheme.
11014 2011-03-21 Kai Tietz <ktietz@redhat.com>
11017 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11019 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11021 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11022 out whether the expression is read-only. Short-circuit placeholder
11023 case and rename a couple of local variables.
11025 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11027 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11028 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11029 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11030 (convert): Deal with conversions from a smaller form type specially.
11032 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11034 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11035 its argument, except for the special -I- switch.
11037 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11039 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11042 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11044 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11046 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11048 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11050 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11051 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11052 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11053 Do not generate the check directly, instead instantiate the template
11054 check present in the descriptor.
11055 (make_descriptor_field): Move around.
11056 (build_vms_descriptor32): Build a template check in the POINTER field.
11057 (build_vms_descriptor): Remove useless suffixes.
11058 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11060 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11063 * targext.c: Include target files if IN_RTS is defined.
11065 2011-01-26 Richard Guenther <rguenther@suse.de>
11068 * targext.c: Include config.h.
11069 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11072 2011-01-04 Pascal Obry <obry@adacore.com>
11073 Eric Botcazou <ebotcazou@adacore.com>
11075 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11077 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11079 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11080 end-of-case on the end label and its associated gotos, if any.
11082 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11084 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11085 expressions of the parameter cache within the statement group of
11086 the CICO mechanism.
11088 2011-01-04 Olivier Hainque <hainque@adacore.com>
11089 Eric Botcazou <ebotcazou@adacore.com>
11091 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11092 (set_end_locus_from_node): New function.
11093 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11094 make and the function end_locus.
11095 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11096 for the elaboration subprogram.
11097 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11098 set the end_locus of the expression as well.
11100 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11103 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11104 variables that are referenced in exception handlers volatile.
11108 Copyright (C) 2011 Free Software Foundation, Inc.
11110 Copying and distribution of this file, with or without modification,
11111 are permitted in any medium without royalty provided the copyright
11112 notice and this notice are preserved.