1 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch13.adb: Additional semantic checks for aspects involved in
6 2011-08-29 Matthew Heaney <heaney@adacore.com>
8 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
9 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
11 (Ancestor_Find): ditto.
13 2011-08-29 Thomas Quinot <quinot@adacore.com>
15 * par-endh.adb: Minor reformatting.
17 2011-08-29 Tristan Gingold <gingold@adacore.com>
19 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
20 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
21 (Adjust_N_CLeanups_For): Remove.
22 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
24 (Propgate_Exception): Adjust.
25 * raise-gcc.c: Add a few static/const.
26 (Adjust_N_Cleanups_For): Remove declaration.
27 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
29 2011-08-29 Ed Schonberg <schonberg@adacore.com>
31 * sem_ch8.adb: Use type of function return when rewriting as object
34 2011-08-29 Gary Dismukes <dismukes@adacore.com>
36 * sem_type.adb: Minor reformatting.
38 2011-08-29 Robert Dewar <dewar@adacore.com>
40 * makeutl.adb: Minor reformatting.
42 2011-08-29 Ed Schonberg <schonberg@adacore.com>
44 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
45 function call of a limited type, the expansion of the renaming is
46 complicated by the presence of various temporaries and subtypes that
47 capture constraints of the renamed object.
48 Rewrite node as an object declaration, whose expansion is simpler.
49 Given that the object is limited there is no copy involved and no
52 2011-08-29 Robert Dewar <dewar@adacore.com>
54 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
55 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
57 2011-08-29 Tristan Gingold <gingold@adacore.com>
59 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
60 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
61 system-linux-hppa.ads, system-linux-s390.ads,
62 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
63 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
64 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
65 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
66 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
67 system-solaris-sparc.ads, system-lynxos-x86.ads,
68 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
69 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
70 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
71 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
72 system-vxworks-x86.ads: Remove GCC_ZCX_Support
73 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
74 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
75 * opt.ads: Adjust comment.
76 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
77 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
78 * system.ads: Move GCC_ZCX_Support to obsolete entries.
80 2011-08-29 Emmanuel Briot <briot@adacore.com>
82 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
83 file name is specified on the gnatmake or gprbuild command line, and
84 before we search for that file in the project.
86 2011-08-29 Ed Schonberg <schonberg@adacore.com>
88 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
89 used to determine whether a possible interpretation for an overloadable
90 entity is declared within the current instantiation and should be
91 included in the candidate set.
93 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
95 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
97 2011-08-29 Ed Schonberg <schonberg@adacore.com>
99 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
100 access subtype is access_to_subprogram, when applying checks for
103 2011-08-29 Matthew Heaney <heaney@adacore.com>
105 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
106 for sibling when common parent.
108 2011-08-29 Thomas Quinot <quinot@adacore.com>
110 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
113 2011-08-29 Ed Schonberg <schonberg@adacore.com>
115 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
116 for the return type when in ASIS mode.
118 2011-08-29 Vincent Celier <celier@adacore.com>
120 * make.adb (Gnatmake): Get the default search dirs, then the target
121 parameters after getting the Builder switches, as the Builder switches
122 may include --RTS= and that could change the default search dirs.
124 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
126 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
127 Make_Final_Call. Move the processing for class-wide types before the
128 processing for derivations from [Limited_]Controlled.
129 (Make_Final_Call): Move the processing for class-wide types before the
130 processing for derivations from [Limited_]Controlled.
131 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
132 Add code to account for alignments larger than the list header. Add a
133 comment illustrating the structure of the allocated object + padding +
135 (Deallocate_Any_Controlled): Add code to account for alignments larger
136 than the list header.
138 2011-08-29 Ed Schonberg <schonberg@adacore.com>
140 * sinfo.ads, sinfo.adb: New node kind
141 N_Formal_Incomplete_Type_Definition, related flags.
142 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
143 Parse formal incomplete types.
144 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
146 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
147 Formal incomplete types do not need completion.
148 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
149 Validate_Incomplete_Type_Instance): New procedures to handle formal
151 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
152 that corresponds to a formal incomplete type.
153 * sprint.adb: Handle formal incomplete type declarations.
154 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
157 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
159 * a-fihema.ads, a-fihema.adb: Unit removed.
160 * a-undesu.ads, a-undesu.adb: New unit implementing
161 Ada.Unchecked_Deallocate_Subpool.
162 * einfo.adb: Remove Associated_Collection from the node usage.
163 Add Finalization_Master to the node usage.
164 (Associated_Collection): Removed.
165 (Finalization_Master): New routine.
166 (Set_Associated_Collection): Removed.
167 (Set_Finalization_Master): New routine.
168 (Write_Field23_Name): Remove Associated_Collection from the output. Add
169 Finalization_Master to the output.
170 * einfo.ads: Remove attribute Associated_Collection and its uses in
172 Add new attribute Finalization_Master along with its uses in entitites.
173 (Associated_Collection): Removed along with its pragma import.
174 (Finalization_Master): New routine along with a pragma import.
175 (Set_Associated_Collection): Removed along with its pragma import.
176 (Set_Finalization_Master): New routine along with a pragma import.
177 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
178 Build_Finalization_Collection with Build_Finalization_Master.
179 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
180 before the bodies of the predefined routines. Add comment explaining
181 this. Replace call to Build_Finalization_Collection with
182 Build_Finalization_Master.
183 (Freeze_Type): Replace call to Build_Finalization_Collection with
184 Build_Finalization_Master.
185 (Make_Finalize_Address_Body): Comment reformatting.
186 (Make_Predefined_Primitive_Specs): Code reformatting.
187 (Stream_Operation_OK): Update comment mentioning finalization
188 collections. Replace RE_Finalization_Collection with
189 RE_Finalization_Master.
190 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
191 Associated_Collection with Finalization_Master. Replace call to
192 Build_Finalization_Collection with Build_Finalization_Master.
193 (Expand_Allocator_Expression): Replace call to Associated_Collection
194 with Finalization_Master. Replace call to Set_Associated_Collection with
195 Set_Finalization_Master. Remove the generation of
196 Set_Finalize_Address_Ptr.
197 (Expand_N_Allocator): Replace call to Associated_Collection with
198 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
199 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
200 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
201 comment on usage. Replace call to Needs_BIP_Collection with
202 Needs_BIP_Finalization_Master Remplace BIP_Collection with
203 BIP_Finalization_Master. Update all comments which mention finalization
204 collections. Replace Associated_Collection with
205 Finalization_Master. Replace Build_Finalization_Collection with
206 Build_Finalization_Master.
207 (BIP_Formal_Suffix): Update BIP_Collection's case.
208 (Build_Heap_Allocator): Update the related comment. Rename local
209 variable Collect to Fin_Mas_Id and update its occurrences. Update
210 comments which mention finalization collections. Replace
211 Set_Associated_Collection with Set_Finalization_Master.
212 (Expand_Call): Update the code which detects a special piece of library
214 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
215 Add_Collection_Actual_To_Build_In_Place_Call with
216 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
217 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
218 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
219 Add_Collection_Actual_To_Build_In_Place_Call with
220 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
221 (Make_Build_In_Place_Call_In_Assignment): Replace call to
222 Add_Collection_Actual_To_Build_In_Place_Call with
223 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
224 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
225 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
226 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
227 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
228 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
229 Replace call to Set_Associated_Collection with Set_Finalization_Master.
230 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
231 Replace the call to Associated_Collection with Finalization_Master.
232 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
233 Update the way finalization master names are generated. Update the
234 retrieval of the correct access type which will carry the pool and
236 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
237 (Make_Finalize_Address_Body): Abstract types do not need
238 Finalize_Address. Code reformatting.
239 (Make_Finalize_Address_Stmts): Update comment on usage.
240 (Make_Set_Finalize_Address_Ptr_Call): Removed.
241 (Process_Declarations): Update comments.
242 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
243 Build_Finalization_Master. Update associated comment.
244 (Make_Set_Finalize_Address_Ptr_Call): Removed.
245 * exp_ch13.adb: Update comments which mention finalization collections.
246 (Expand_N_Free_Statement): Replace the call to Associated_Collection
247 with Finalization_Master.
248 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
249 create calls to routines Allocate_Any_Controlled and
250 Deallocate_Any_Controlled.
251 (Find_Finalize_Address): New routine.
252 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
254 (Requires_Cleanup_Actions): Update the comment on freeze node
256 * exp_util.ads: Remove comment on generated code for
257 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
258 is better to simply look in the body.
259 * freeze.adb (Freeze_All): Update the comment of finalization
260 collections. Replace the call to Associated_Collection with
261 Finalization_Master. Replace the call to Build_Finalization_Collection
262 with Build_Finalization_Master.
263 * impunit.adb: Add a-undesu and s-stposu to the list of units.
264 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
266 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
267 Ada.Finalization. Add processing for children of System.Storage_Pools.
268 * rtsfind.ads: Remove the naming of second level children of
270 Remove Ada_Finalization_Heap_Management from the list of units.
271 Remove subtype Ada_Finalization_Child.
272 Remove the following subprogram entities:
276 RE_Finalization_Collection
277 RE_Finalization_Collection_Ptr
278 RE_Set_Finalize_Address_Ptr
280 Add the naming of second level children of System.Storage_Pools.
281 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
283 Add subtype System_Storage_Pools_Child.
284 Add the following subprogram entities to System.Finalization_Masters:
286 RE_Finalization_Master
287 RE_Finalization_Master_Ptr
289 Add the following subprogram entities to System.Storage_Pools.Subpools:
291 RE_Allocate_Any_Controlled
292 RE_Deallocate_Any_Controlled
293 RE_Root_Storage_Pool_With_Subpools
297 Move the following subprogram entities from
298 Ada.Finalization.Heap_Management to System.Finalization_Masters:
300 RE_Add_Offset_To_Address
305 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
306 Set_Associated_Collection with Set_Finalization_Master.
307 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
308 BIP_Finalization_Master is created.
309 * s-finmas.adb: New unit System.Finalization_Masters.
310 * s-finmas.ads: New unit System.Finalization_Masters.
311 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
312 * s-stposu.ads, s-stposu.adb: New unit implementing
313 System.Storage_Pools.Subpools.
315 2011-08-29 Bob Duff <duff@adacore.com>
317 * tbuild.adb: Add assertion.
319 2011-08-29 Thomas Quinot <quinot@adacore.com>
321 * s-pooglo.adb: Minor reformatting.
323 2011-08-29 Ed Schonberg <schonberg@adacore.com>
325 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
326 an indexed component of a packed array whose element type is a record
327 with a representation clause different from that of the right-hand
328 side, generate a temporary to minimuze the number of bit-field
329 operations generated.
331 2011-08-29 Ed Schonberg <schonberg@adacore.com>
333 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
334 declarations, and thus are likely insertion points for actions.
336 2011-08-29 Bob Duff <duff@adacore.com>
338 * einfo.ads: Minor comment fix.
340 2011-08-29 Robert Dewar <dewar@adacore.com>
342 * frontend.adb, gnat1drv.adb: Minor reformatting.
344 2011-08-29 Tristan Gingold <gingold@adacore.com>
346 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
347 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
348 space in front of the header.
350 2011-08-29 Johannes Kanig <kanig@adacore.com>
352 * frontend.adb (Frontend): Exit after creating Standard package when
354 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
357 2011-08-29 Robert Dewar <dewar@adacore.com>
359 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
360 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
361 snames.ads-tmpl: Minor reformatting.
363 2011-08-29 Philippe Gil <gil@adacore.com>
365 * prj.adb (Reset_Units_In_Table): New procedure.
366 Reset units to avoid access to freed memory.
368 2011-08-29 Thomas Quinot <quinot@adacore.com>
370 * get_scos.adb: When reading a P statement SCO without a pragma name
371 (from an older ALI file), ensure that the Pragma_Name component is set
372 to Unknown_Pragma (not left uninitialized).
374 2011-08-29 Vincent Celier <celier@adacore.com>
376 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
377 modified to compute correctly the object path of a SAL project that is
378 extending another library project.
379 (Write_Path_File): New procedure.
380 * makeutl.ads (Directories): New table moved from Buildgpr
381 (Get_Directories): New procedure moved from Buildgpr
382 (Write_Path_File): New procedure
383 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
384 paths before binding SALs, instead of Set_Ada_Paths.
385 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
387 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
388 (Current_Source_Path_File_Of): New function
389 (Set_Current_Object_Path_File_Of): New procedure
390 (Current_Source_Object_File_Of): New function
391 (Set_Current_Object_Path_File_Of): New procedure
392 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
393 (Current_Source_Path_File_Of): New function
394 (Set_Current_Object_Path_File_Of): New procedure
395 (Current_Source_Object_File_Of): New function
396 (Set_Current_Object_Path_File_Of): New procedure
398 2011-08-29 Ed Schonberg <schonberg@adacore.com>
400 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
401 packed entity, use a bit-field assignment only if there is no change of
404 2011-08-29 Thomas Quinot <quinot@adacore.com>
406 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
407 Is_RTU instead of using Chars comparisons.
409 2011-08-29 Thomas Quinot <quinot@adacore.com>
411 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
412 temporary object if the actual is constrained, and the discriminants
413 read from the stream don't match.
415 2011-08-29 Tristan Gingold <gingold@adacore.com>
417 * sem_attr.adb, exp_attr.adb: Add handling of
418 Attribute_System_Allocator_Alignment
419 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
420 Attribute_System_Allocator_Alignment.
421 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
422 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
423 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
424 get_target_system_allocator_alignment.
426 2011-08-29 Arnaud Charlet <charlet@adacore.com>
428 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
431 2011-08-29 Arnaud Charlet <charlet@adacore.com>
433 * exp_ch3.adb (In_Runtime): Fix typo.
435 2011-08-29 Bob Duff <duff@adacore.com>
437 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
439 2011-08-29 Ed Schonberg <schonberg@adacore.com>
441 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
442 and a separate tag assignment is generated, ensure that the tag
443 assignment is analyzed.
445 2011-08-29 Ed Schonberg <schonberg@adacore.com>
447 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
448 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
449 of statement lists that may contain local declarations.
450 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
451 duplicate the triggering statements needed for the expansion of this
452 construct, when the trigger is a dispatching call to a synchronized
455 2011-08-29 Arnaud Charlet <charlet@adacore.com>
457 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
458 * bindgen.adb: Add comments.
459 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
462 2011-08-29 Robert Dewar <dewar@adacore.com>
464 * exp_attr.adb: Minor reformatting.
465 Minor code reorganization and commenting.
466 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
469 2011-08-29 Thomas Quinot <quinot@adacore.com>
471 * get_scos.adb: Ignore chaining indicators not currently supported
474 2011-08-29 Arnaud Charlet <charlet@adacore.com>
476 * system.ads: Minor editing.
478 2011-08-29 Arnaud Charlet <charlet@adacore.com>
480 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
482 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
483 Attribute_Elab_Subp_Body.
484 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
485 * sem_util.adb: Update comments.
487 2011-08-29 Thomas Quinot <quinot@adacore.com>
489 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
490 pragma name for each SCO statement corresponding to a pragma.
492 2011-08-29 Arnaud Charlet <charlet@adacore.com>
494 * opt.ads: Minor editing.
496 2011-08-29 Yannick Moy <moy@adacore.com>
498 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
499 that only made sense for CodePeer mode.
501 2011-08-29 Jose Ruiz <ruiz@adacore.com>
503 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
504 which is no longer used.
505 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
506 handling of the 64-bit division check.
507 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
509 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
512 2011-08-29 Thomas Quinot <quinot@adacore.com>
514 * get_scos.adb: Minor reformatting.
516 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
518 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
519 statement list is wrapped in a block, the block is explicitly analyzed
520 in order to properly redecorate the entities and create a servicing
523 2011-08-29 Tristan Gingold <gingold@adacore.com>
525 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
526 (Set_Zero_Cost_Handling): Remove.
528 2011-08-29 Thomas Quinot <quinot@adacore.com>
530 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
532 2011-08-29 Geert Bosch <bosch@adacore.com>
534 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
535 instruction, as the latter may produce -0.0, which is not a valid VAX
537 (Neg_G): Likewise for VAX F float.
539 2011-08-29 Robert Dewar <dewar@adacore.com>
541 * exp_util.adb: Minor reformatting.
543 2011-08-29 Yannick Moy <moy@adacore.com>
545 * sem_ch3.adb: Minor comment update.
547 2011-08-29 Thomas Quinot <quinot@adacore.com>
549 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
552 2011-08-29 Thomas Quinot <quinot@adacore.com>
554 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
555 current statement sequence on a generic instantiation or a subprogram
558 2011-08-29 Robert Dewar <dewar@adacore.com>
560 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
563 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
565 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
566 Correct the check which involves the freeze node of a controlled or
567 access-to-controlled type.
569 2011-08-29 Geert Bosch <bosch@adacore.com>
571 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
573 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
576 2011-08-29 Yannick Moy <moy@adacore.com>
578 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
579 for every index type and component type that is not a subtype_mark.
580 (Process_Subtype): Set Etype of subtype.
582 2011-08-29 Robert Dewar <dewar@adacore.com>
584 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
585 reorganization. Minor reformatting.
587 2011-08-29 Steve Baird <baird@adacore.com>
589 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
590 for CodePeer and ALFA modes.
592 2011-08-29 Ed Schonberg <schonberg@adacore.com>
594 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
595 that comes from an enclosing scope if it is not the renaming of an
596 actual, to handle properly a spurious ambiguity in an instance.
598 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
600 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
601 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
602 use it instead of the Esize of the first parameter.
603 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
605 <Size>: Likewise. Call it for composite types on the RM size.
607 2011-08-29 Yannick Moy <moy@adacore.com>
609 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
610 * sem_util.adb (Unique_Name): Correct behaviour for names of
613 2011-08-29 Yannick Moy <moy@adacore.com>
615 * sem_prag.adb (Check_Precondition_Postcondition): In formal
616 verification mode, analyze pragma expression for correctness, for
617 pre/post on library-level subprogram, as it is not expanded later.
619 2011-08-29 Yannick Moy <moy@adacore.com>
621 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
622 in formal verification.
624 2011-08-29 Thomas Quinot <quinot@adacore.com>
626 * sem_util.adb: Minor reformatting.
627 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
629 * par_sco.ads, par_sco.adb: Update comments.
631 2011-08-29 Yannick Moy <moy@adacore.com>
633 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
634 associated getter/setter.
635 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
637 2011-08-29 Vincent Celier <celier@adacore.com>
639 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
640 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
641 with declarations for Language_Kind and Dependency_Kind for Ada.
642 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
643 (Process_Compiler): Take into account the new attributes Dependency_Kind
645 (Check_Configuration): Check if language kind is unit based, not if the
646 language name is Ada.
647 (Process_Exceptions_Unit_Based): Ditto
648 (Add_Language): Remove default additions of language and dependency kind
649 * prj.ads: Minor comment change
650 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
652 2011-08-29 Johannes Kanig <kanig@adacore.com>
654 * debug.adb: Update comments.
656 2011-08-24 Joseph Myers <joseph@codesourcery.com>
658 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
659 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
660 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
661 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
662 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
664 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
666 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
667 (GNATLIBCFLAGS_FOR_C): Replace
668 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
669 (gnatlib-shared-default, gnatlib-shared-dual-win32)
670 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
671 (gnatlib-sjlj, gnatlib-zcx): Likewise.
673 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
675 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
677 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
679 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
681 2011-08-05 Nicolas Roche <roche@adacore.com>
683 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
684 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
686 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
688 2011-08-05 Matthew Heaney <heaney@adacore.com>
690 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
691 subprogram bodies declared out-of-order.
693 2011-08-05 Yannick Moy <moy@adacore.com>
695 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
696 entities directly in package Standard, otherwise skip the standard
699 2011-08-05 Robert Dewar <dewar@adacore.com>
701 * a-cbmutr.adb: Minor reformatting
702 (Allocate_Node): refactor node allocation algorithm
704 2011-08-05 Robert Dewar <dewar@adacore.com>
706 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
707 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
709 (Analyze_Pragma, case Check_Policy): Ditto.
710 * sem_prag.ads (Check_Disabled): New function
711 * snames.ads-tmpl: Add Name_Disable.
713 2011-08-05 Robert Dewar <dewar@adacore.com>
715 * gnat_rm.texi: Document implementation-defined policy DISABLE for
716 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
718 2011-08-05 Ed Schonberg <schonberg@adacore.com>
720 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
721 that appears in a generic formal part and applies to a formal
724 2011-08-05 Robert Dewar <dewar@adacore.com>
726 * a-cbmutr.ads: Minor reformatting.
728 2011-08-05 Matthew Heaney <heaney@adacore.com>
730 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
731 to check count, check sign of value instead.
732 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
733 (Copy_Subtree): allocate copy of source element
734 (Equal_Subtree): compare elements, not access objects
736 2011-08-05 Vincent Celier <celier@adacore.com>
738 * gnat_ugn.texi: Fix VMS alternative.
740 2011-08-05 Thomas Quinot <quinot@adacore.com>
742 * sem_ch11.adb: Add comment.
744 2011-08-05 Robert Dewar <dewar@adacore.com>
746 * exp_util.adb: Minor comment fix.
748 2011-08-05 Robert Dewar <dewar@adacore.com>
750 * scng.adb (Error_Unterminated_String): Improve flag position when
753 2011-08-05 Matthew Heaney <heaney@adacore.com>
755 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
757 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
758 multiway tree containers.
760 2011-08-05 Robert Dewar <dewar@adacore.com>
762 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
763 * stylesw.adb: Implement -gnatyC to control comment spacing
764 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
766 * usage.adb: Add line for -gnatyC.
768 2011-08-05 Robert Dewar <dewar@adacore.com>
770 * gnat_ugn.texi: Document -gnatyC.
771 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
772 synonym for COMMENTS2).
774 2011-08-05 Robert Dewar <dewar@adacore.com>
776 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
777 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
778 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
779 a-comutr.ads, lib-xref.adb: Minor reformatting.
781 2011-08-05 Robert Dewar <dewar@adacore.com>
783 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
784 warning if there is an exception handler present.
786 2011-08-05 Pascal Obry <obry@adacore.com>
788 * a-iteint.ads: Fix copyright year.
790 2011-08-05 Thomas Quinot <quinot@adacore.com>
792 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
793 statement SCO for a USE clause or a representation clause.
795 2011-08-05 Yannick Moy <moy@adacore.com>
797 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
798 between body and spec for stub.
799 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
800 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
801 pragma precondition or postcondition, for which the enclosing
802 subprogram or package in the AST is not the desired one, return empty.
804 2011-08-05 Thomas Quinot <quinot@adacore.com>
806 * g-expect.adb: Minor reformatting.
808 2011-08-05 Bob Duff <duff@adacore.com>
810 * a-fihema.adb: Comment out OS_Lib.
812 2011-08-05 Matthew Heaney <heaney@adacore.com>
814 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
815 (unbounded multiway tree containers) and a-iteint.ads.
816 * a-comutr.ads, a-comutr.adb:
817 This is the new Ada 2012 unit for unbounded multiway tree containers
818 * a-cimutr.ads, a-cimutr.adb
819 This is the new Ada 2012 unit for indefinite multiway tree containers
820 * a-iteint.ads: New file.
822 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
824 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
826 2011-08-05 Bob Duff <duff@adacore.com>
828 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
830 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
832 2011-08-05 Ed Schonberg <schonberg@adacore.com>
834 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
835 general indexing aspects of Ada2012. Called when analyzing indexed
836 components when other interpretations fail.
837 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
838 in an expression context where overloading is meaningful. This excludes
839 the occurrence in an aspect specification (efficiency only).
840 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
841 related to iterators can be set by an attribute specification, but
843 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
844 Constant_Indexing and Variable_Indexing.
845 (Check_Indexing_Functions): New procedure to perform legality checks.
846 Additional semantic checks at end of declarations.
848 2011-08-05 Sergey Rybin <rybin@adacore.com>
850 * tree_io.ads: Update ASIS_Version_Number because of the change of the
851 order of calling Tree_Write/Tree_Read routines made for aspects.
853 2011-08-05 Bob Duff <duff@adacore.com>
855 * a-fihema.adb (Finalize): Fix race condition.
857 2011-08-05 Yannick Moy <moy@adacore.com>
859 * sem_ch12.adb (Analyze_Package_Instantiation,
860 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
863 2011-08-05 Ed Schonberg <schonberg@adacore.com>
865 * sem_type.adb (Specific_Type): in an instance, the type-specific
866 operand of an equality check that involves null may have a private
867 type. Use full view to determine legality of construct.
869 2011-08-05 Vincent Celier <celier@adacore.com>
871 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
872 delete or close the file when the call to gnatmake was successful.
874 2011-08-05 Yannick Moy <moy@adacore.com>
876 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
877 Global_Discard_Names.
879 2011-08-05 Ed Schonberg <schonberg@adacore.com>
881 * sinfo.ads: comments on use of entity field for aspect specifications.
883 2011-08-05 Ed Schonberg <schonberg@adacore.com>
885 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
886 node is not itself an entity but a selected component, it is a
887 rewritten parameterless call to an en enclosing synchronized operation,
888 and this expansion will be performed again in the instance, so there is
889 no global information to preserve.
891 2011-08-05 Javier Miranda <miranda@adacore.com>
893 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
894 for renamings of predefined primitives.
895 (In_Predef_Prims_DT): New subprogram.
897 2011-08-05 Ed Schonberg <schonberg@adacore.com>
899 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
900 possible interpretation of name is a reference type, add an
901 interpretation that is the designated type of the reference
902 discriminant of that type.
903 * sem_res.adb (resolve): If the interpretation imposed by context is an
904 implicit dereference, rewrite the node as the deference of the
905 reference discriminant.
906 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
907 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
908 parent type or base type.
909 * sem_ch4.adb (Process_Indexed_Component,
910 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
911 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
912 Check for implicit dereference.
913 (List_Operand_Interps): Indicate when an implicit dereference is
915 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
917 2011-08-05 Thomas Quinot <quinot@adacore.com>
919 * scos.ads: Update documentation of SCO table. Pragma statements can now
920 be marked as disabled (using 'p' instead of 'P' as the statement kind).
921 * par_sco.ads, par_sco.adb: Implement the above change.
922 (Process_Decisions_Defer): Generate a P decision for the first parameter
923 of a dyadic pragma Debug.
924 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
926 * put_scos.adb: Code simplification based on above change.
928 2011-08-05 Robert Dewar <dewar@adacore.com>
930 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
931 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
932 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
933 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
935 2011-08-05 Bob Duff <duff@adacore.com>
937 * a-stunau.ads, g-spipat.adb: Update comments.
939 2011-08-05 Bob Duff <duff@adacore.com>
941 * a-fihema.ads: Minor comment fix.
942 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
944 (Attach, Detach): Remove some unnecessary code.
945 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
947 2011-08-05 Bob Duff <duff@adacore.com>
949 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
950 allocation for Objects component. This simplifies the code somewhat. It
951 is also a little more efficient in the not-so-unusual case where there
952 are no controlled objects allocated.
953 Make Finalization_Started flag atomic.
954 (Finalize): Avoid unnecessary detachment of items from the list.
955 (pcol): Minor cleanup.
957 2011-08-05 Ed Schonberg <schonberg@adacore.com>
959 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
960 package whose name is the same as that of the generic unit, or its
963 2011-08-05 Bob Duff <duff@adacore.com>
965 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
966 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
969 2011-08-05 Arnaud Charlet <charlet@adacore.com>
971 * make.adb (Linking_Phase): No longer need to set source search path
972 before calling gnatlink in CodePeer mode.
973 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
974 gcc in CodePeer mode, since the binder generated file no longer has a
976 * switch.ads, switch.adb (Is_Language_Switch): Removed.
977 * switch-c.adb: Update comment.
979 2011-08-05 Thomas Quinot <quinot@adacore.com>
981 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
983 2011-08-05 Nicolas Roche <roche@adacore.com>
985 * gnat_ugn.texi: Fix minor syntax error issue.
987 2011-08-05 Vincent Celier <celier@adacore.com>
989 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
990 delete or close the file when the call to gnatmake returns a non
991 successful return code.
993 2011-08-05 Ed Schonberg <schonberg@adacore.com>
995 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
996 check, indicate that the copy of the original node does not come from
997 source, to prevent an infinite recursion of the expansion.
999 2011-08-05 Johannes Kanig <kanig@adacore.com>
1001 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
1002 VC generation for subprogram bodies.
1004 2011-08-05 Yannick Moy <moy@adacore.com>
1007 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
1008 the base type with the smallest allowed base type.
1010 2011-08-05 Sergey Rybin <rybin@adacore.com>
1012 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
1015 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1017 * sem_ch12.ads: minor comment updates.
1019 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1021 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
1022 instantiation and a formal package the compiler generates a package
1023 renaming declaration so that the generic name within the declaration
1024 is interpreted as a renaming of the instance. At the end of a formal
1025 package declaration, this renaming must become invisible.
1027 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1029 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
1030 comparison and rely on concrete entities instead.
1032 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1034 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
1035 and discriminants, to indicate that the type has an access discriminant
1036 that supports implicit dereference.
1037 * snames.ads-tmpl: Add names of aspects and attributes related to
1038 Ada2012 iterators: constant_indexing, default_iterator,
1039 iterator_element, implicit_dereference, variable_indexing.
1040 * aspects.ads, aspects.adb: entries for iterator-related aspects.
1041 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
1042 iterator-related aspects.
1043 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
1045 2011-08-05 Sergey Rybin <rybin@adacore.com>
1047 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
1048 metrics in gnatmetric to cover new kinds of coupling mentrics.
1050 2011-08-05 Steve Baird <baird@adacore.com>
1052 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
1053 of calling the user-defined main subprogram.
1054 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
1055 is set) Call_Main_Subprogram ahead of, as opposed to
1057 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
1058 generation of a "with" of the user-defined main subprogram.
1059 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
1060 (which is now called from Gen_Main instead).
1062 2011-08-05 Emmanuel Briot <briot@adacore.com>
1064 * projects.texi: Added reference to the Makefile package.
1066 2011-08-05 Thomas Quinot <quinot@adacore.com>
1068 * exp_ch7.adb: Minor comment rewording.
1070 2011-08-05 Ed Falis <falis@adacore.com>
1072 * env.c: Fix comment.
1074 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1076 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
1077 character comparison and rely on concrete entities instead.
1079 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1081 * sem_ch3.adb: (Check_Private_Overriding): better error message,
1082 suggested by AI95-0068.
1084 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
1086 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
1087 the two potential initialization calls. This accounts for any
1088 access-before-elaboration checks which may precede the initialization
1090 (Next_Suitable_Statement): New routine. Returns the next real statement
1091 after the input node while skipping generated checks.
1092 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
1093 with comment on usage.
1094 Do not generate Elaborate_All when the trigger is a finalization call
1095 coming from a type init proc.
1096 (Check_Elab_Call): Propagate the initialization procedure context to
1097 subsequent calls to Check_A_Call.
1098 (Check_Internal_Call_Continue): Propagate the initialization procedure
1099 context to subsequent calls to Check_Elab_Call.
1100 (Is_Finalization_Procedure): New routine. Returns True if the input
1101 entity denotes a [Deep_]Finalize routine.
1102 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
1103 along with comment on usage.
1105 2011-08-05 Vadim Godunko <godunko@adacore.com>
1107 * s-atocou.ads: Add list of supported platforms.
1109 2011-08-05 Yannick Moy <moy@adacore.com>
1111 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
1113 * opt.ads (Disable_ALI_File): new Boolean flag
1114 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
1116 2011-08-05 Ed Falis <falis@adacore.com>
1118 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
1119 environ is properly defined.
1121 2011-08-05 Vincent Celier <celier@adacore.com>
1123 * make.adb (Compilation_Phase): Exit immediately when all objects have
1124 been found up to date, to avoid multiple exit messages.
1125 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
1126 same project for languages with no compiler.
1127 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
1129 2011-08-05 Robert Dewar <dewar@adacore.com>
1131 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
1132 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
1133 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
1134 s-atocou-builtin.adb: Minor reformatting.
1136 2011-08-05 Yannick Moy <moy@adacore.com>
1138 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
1139 if the node to wrap is a pragma check, this node and enclosed
1140 expression are not expanded, so do not apply any transformations here.
1141 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
1142 introducing transient scopes.
1144 2011-08-05 Jose Ruiz <ruiz@adacore.com>
1146 * adaint.c (__gnat_set_writable, __gnat_set_readable,
1147 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
1148 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
1149 routine is available, so we use the default implementation of these
1151 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
1152 support for copying attributes on VxWorks 6.
1154 2011-08-05 Yannick Moy <moy@adacore.com>
1156 * debug.adb: Remove use of -gnatd.D.
1157 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
1158 * opt.ads: Simplify variables for ALFA mode, to keep one only
1159 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
1162 2011-08-05 Vincent Celier <celier@adacore.com>
1164 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
1165 Builder'Default_Switches.
1167 2011-08-05 Vincent Celier <celier@adacore.com>
1169 * makeusg.adb: Add lines for --create-map-file switches.
1171 2011-08-05 Ed Schonberg <schonberg@adacore.com>
1173 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
1174 profile is incomplete and the full view is available, replace it with
1176 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
1177 incomplete, freezing the subprogram is delayed until the full view is
1179 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
1180 fixed-point multiplication operator and the predefined operator is
1181 resolved in favor of the user-defined one.
1183 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1185 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
1188 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1190 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
1191 whether a type lacks user-defined Read or Write operations, or has a
1192 component that lacks them.
1193 * sem_attr.adb (Check_Stream_Attribute): if restriction
1194 No_Default_Stream_Attributes is active, verify that all subcomponent
1195 types of the target have user-defined stream operations, and report
1197 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
1198 * exp_strm.adb: Build_Elementary_Input_Call,
1199 Build_Elementary_Write_Call): remove checks for restriction
1200 No_Default_Stream_Attributes, now checked in semantics.
1202 2011-08-04 Vincent Celier <celier@adacore.com>
1204 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
1205 switches on the command line, look for all valid --RTS switches in the
1206 Builder switches and for each language use the first runtime name found
1207 to invoke gprconfig.
1208 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
1209 command line and there is no auto-configuration.
1210 (Runtime_Name_Set_For): New function.
1212 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1214 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
1215 elaborate initialization expression for variable Abort when processing
1216 a package body or a declaration.
1217 (Create_Finalizer): Propagate the package context when creating the
1218 exception-related variables.
1219 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
1220 For_Package along with usage comment.
1222 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1224 * gcc-interface/Makefile.in: Clean up targets.
1225 Enable new package for atomic counters and copy-on-write implementation
1226 of unbounded strings on x86 platforms.
1227 * gcc-interface/Make-lang.in: Update dependencies.
1229 2011-08-04 Robert Dewar <dewar@adacore.com>
1231 * exp_ch7.adb: Minor reformatting.
1233 2011-08-04 Robert Dewar <dewar@adacore.com>
1235 * exp_strm.adb: Minor reformatting.
1237 2011-08-04 Vadim Godunko <godunko@adacore.com>
1239 * s-atocou.adb: Replace by dummy version and use on targets where atomic
1240 operations are not supported.
1241 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
1242 * s-atocou-x86.adb: New file.
1243 * Makefile.rtl: Add s-atocou.o file
1245 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1247 * make.adb (Compile): Move setting of CodePeer_Mode to ...
1248 (Compilation_Phase): ... here.
1249 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
1251 2011-08-04 Thomas Quinot <quinot@adacore.com>
1253 * Make-generated.in: Fix minor typo in comment.
1255 2011-08-04 Thomas Quinot <quinot@adacore.com>
1257 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
1260 2011-08-04 Robert Dewar <dewar@adacore.com>
1262 * a-coinho.adb: Minor reformatting.
1264 2011-08-04 Robert Dewar <dewar@adacore.com>
1266 * a-coinho.ads: Minor reformatting.
1268 2011-08-04 Vadim Godunko <godunko@adacore.com>
1270 * s-atocou.ads, s-atocou.adb: New files.
1271 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
1272 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
1273 direct use of GCC's atomic builtins and replace them by use of new
1274 atomic counter package.
1276 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1278 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
1280 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1282 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
1283 with a call to Get_External_Tag.
1284 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
1285 subprogram usage. Remove the guard against package declarations and
1286 bodies since Build_Cleanup_Statements is no longer invoked in that
1288 (Build_Components): Initialize Tagged_Type_Stmts when the context
1289 contains at least one library-level tagged type.
1290 (Build_Finalizer): New local variables Has_Tagged_Types and
1291 Tagged_Type_Stmts along with associated comments on usage. Update the
1292 logic to include tagged type processing.
1293 (Create_Finalizer): Insert all library-level tagged type unregistration
1294 code before the jump block circuitry.
1295 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
1296 (Expand_N_Package_Declaration): Remove the call to
1297 Build_Cleanup_Statements.
1298 (Process_Tagged_Type_Declaration): New routine. Generate a call to
1299 unregister the external tag of a tagged type.
1300 (Processing_Actions): Reimplemented to handle tagged types.
1301 (Process_Declarations): Detect the declaration of a library-level
1302 tagged type and carry out the appropriate actions.
1303 (Unregister_Tagged_Types): Removed. The machinery has been directly
1304 merged with Build_Finalizer.
1306 2011-08-04 Robert Dewar <dewar@adacore.com>
1308 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
1309 gnatls.adb, exp_ch3.adb: Minor reformatting.
1311 2011-08-04 Marc Sango <sango@adacore.com>
1313 * sem_attr.adb (Analyze_Attribute): Replace the message
1314 "invisible attribute of}" of the spark restriction violation in
1315 attribute reference by the simple message "invisible attribute of type".
1316 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
1317 two insertion characters: '&' and '}'.
1319 2011-08-04 Vadim Godunko <godunko@adacore.com>
1321 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1322 * a-coinho.ads, a-coinho.adb: New file.
1323 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1325 2011-08-04 Nicolas Roche <roche@adacore.com>
1327 * alfa_test.adb: Not all ali files are containing alfa information even
1328 if compiled with -gnatd.F. So suppress warning about missing ALFA
1331 2011-08-04 Yannick Moy <moy@adacore.com>
1333 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1335 * put_alfa.adb: Check that scope name is not empty.
1337 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1339 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1340 Needs_Elementary_Stream_Operation, to determine whether user-defined
1341 Read and Write attributes are available for the elementary components
1342 of the given type. If only the predefined attributes are available,
1343 then when restriction No_Default_Stream_Attributes is active the
1344 predefined stream attributes for the composite type cannot be created.
1346 2011-08-04 Robert Dewar <dewar@adacore.com>
1348 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1349 Put routines in alpha order
1351 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1353 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1354 * gcc-interface/Make-lang.in: Update dependencies.
1356 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1358 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1359 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1362 2011-08-04 Robert Dewar <dewar@adacore.com>
1364 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1365 lib-xref-alfa.adb: Minor reformatting.
1367 2011-08-04 Marc Sango <sango@adacore.com>
1369 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1370 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1371 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1374 2011-08-04 Tristan Gingold <gingold@adacore.com>
1376 * bindgen.adb (Gen_Adainit_C): Remove.
1377 (Gen_Adafinal_C): Ditto.
1378 (Gen_Elab_Externals_C): Ditto.
1379 (Gen_Elab_Calls_C): Ditto.
1380 (Gen_Elab_Order_C): Ditto.
1381 (Gen_Elab_Defs_C): Ditto.
1382 (Gen_Finalize_Library_C): Ditto.
1383 (Gen_Finalize_Library_Defs_C): Ditto.
1384 (Gen_Main_C): Ditto.
1385 (Gen_Output_File_C): Ditto.
1386 (Gen_Restrictions_C): Ditto.
1387 (Gen_Versions_C): Ditto.
1388 (Write_Info_Ada_C): Ditto.
1389 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1390 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1391 Always call Gen_Output_File_Ada.
1392 * gnatlink.adb (Begin_Info): Now a constant.
1394 (Ada_Bind_File): Remove
1395 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1396 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1397 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1398 * opt.ads (Ada_Bind_File): Remove.
1400 2011-08-04 Thomas Quinot <quinot@adacore.com>
1402 * projects.texi: Document target-specific directory in default project
1405 2011-08-04 Thomas Quinot <quinot@adacore.com>
1407 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1410 2011-08-04 Yannick Moy <moy@adacore.com>
1412 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1413 opt.ads, lib-xref.ads: Code clean up.
1415 2011-08-04 Yannick Moy <moy@adacore.com>
1417 * gnat_rm.texi: Update description of Test_Case
1418 * gnat_ugn.texi: Typo.
1420 2011-08-04 Ed Falis <falis@adacore.com>
1422 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1424 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1426 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1427 it is of type Root_Controlled. This action eliminates fields Prev and
1428 Next from type equality.
1430 2011-08-04 Yannick Moy <moy@adacore.com>
1432 * lib-xref-alfa.adb: Correct typo.
1434 2011-08-04 Matthew Heaney <heaney@adacore.com>
1436 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1439 2011-08-04 Yannick Moy <moy@adacore.com>
1441 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1442 (Analyze_Pragma): allow static string expression for name of Test_Case,
1443 instead of simply string literals.
1444 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1447 2011-08-04 Vincent Celier <celier@adacore.com>
1449 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1450 case suffixes to find truncated main sources.
1452 2011-08-04 Tristan Gingold <gingold@adacore.com>
1454 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1455 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1456 (Compute_Current_Task): Ditto.
1458 2011-08-04 Tristan Gingold <gingold@adacore.com>
1460 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1462 2011-08-04 Yannick Moy <moy@adacore.com>
1464 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1465 library-level constant.
1466 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1467 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1468 used as selector of parameter association, in ALFA mode.
1470 2011-08-04 Robert Dewar <dewar@adacore.com>
1472 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1473 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1476 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1478 * make.adb (Linking_Phase): Set source search path before calling
1479 gnatlink in CodePeer mode.
1481 2011-08-04 Javier Miranda <miranda@adacore.com>
1483 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1484 Remove code which takes care of building TSDs.
1485 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1486 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1487 the accessibility check in VM targets.
1488 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1489 (Building_Static_DT): Now returns false for VM targets.
1490 (Build_VM_TSDs): Removed.
1491 (Expand_Interface_Conversion): Generate missing runtime check for
1492 conversions to interface types whose target type is unknown at compile
1494 (Make_VM_TSD): Add missing code to disable the generation of calls to
1495 Check_TSD if the tagged type is not defined at library level, or not
1496 has a representation clause specifying its external tag, or -gnatdQ is
1498 * exp_disp.ads (Build_VM_TSDs): Removed.
1499 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1500 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1501 register primitives in the dispatch tables in VM targets.
1502 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1503 initialization of class-wide interface objects in VM targets.
1504 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1507 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1509 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1510 when dotnet-ld cannot be found.
1512 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1514 * bindgen.adb: Simplify significantly generation of binder body file in
1516 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1517 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1520 2011-08-04 Yannick Moy <moy@adacore.com>
1522 * sem_prag.adb, sem.ads: Code cleanup.
1524 2011-08-04 Tristan Gingold <gingold@adacore.com>
1526 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1527 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1528 results if possible.
1529 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1530 * gnat_ugn.texi: Update dynamic stack usage section.
1532 2011-08-04 Steve Baird <baird@adacore.com>
1534 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1535 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1536 contains only a call to the user-defined main subprogram.
1537 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1538 call the "wrapper" subprogram instead of directly
1539 calling the user-defined main subprogram.
1541 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1543 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1544 alternatives of a case statement for controlled objects. Rename local
1545 variable A to Dead_Alt.
1546 (Expand_N_If_Statement): Check the then and else statements of an if
1547 statement for controlled objects. Check the then statements of all
1548 elsif parts of an if statement for controlled objects.
1549 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1551 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1552 detects a loop associated with the expansion of an array object.
1553 Augment the processing of the loop statements to account for a possible
1554 wrap done by Process_Statements_For_Controlled_Objects.
1555 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1556 statements and abortable part of an asynchronous select for controlled
1558 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1559 conditional entry call for controlled objects.
1560 (Expand_N_Selective_Accept): Check the alternatives of a selective
1561 accept for controlled objects.
1562 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1563 alternatives of a timed entry call for controlled objects.
1564 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1565 exception handler for controlled objects.
1566 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1567 Add formal parameter Nested_Constructs along with its associated
1569 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1570 Requires_Cleanup_Actions.
1571 (Process_Statements_For_Controlled_Objects): New routine.
1572 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1573 routine. Inspect a node which contains a non-handled sequence of
1574 statements for controlled objects. If such an object is found, the
1575 statements are wrapped in a block.
1577 2011-08-04 Bob Duff <duff@adacore.com>
1579 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1580 need to compare with Class_Wide_Type (T2), in order to get at the
1581 original class-wide type node.
1582 * sem_type.ads (Covers): Improve the comment.
1583 * einfo.ads (Class_Wide_Type): Improve the comment.
1584 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1585 the type of the Deref.
1587 2011-08-04 Yannick Moy <moy@adacore.com>
1589 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1590 separate declarations.
1591 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1592 check identifier of pragma argument.
1593 (Chain_TC): check that no other test case associated to the same entity
1594 share the same name.
1595 (Check_Test_Case): disallow test case inside subprogram body
1596 (Analyze_Pragma): correct call to check identifier and not argument
1597 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1598 function gets name from test case pragma.
1600 2011-08-04 Yannick Moy <moy@adacore.com>
1602 * gnat_rm.texi: Document new pragma and aspect.
1603 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1604 (No_Duplicates_Allowed): new constant array defining whether duplicates
1605 aspects of each kind can appear on the same declaration.
1606 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1607 field, which points to a node holding the previous Spec_PPC_List.
1608 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1609 through the indirection with Contract.
1610 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1611 * par-prag.adb (Prag): do nothing on Test_Case pragma
1612 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1614 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1615 component Ensures of Test_Case.
1616 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1617 (Analyze_Generic_Subprogram_Declaration,
1618 Analyze_Subprogram_Instantiation,
1619 Analyze_Abstract_Subprogram_Declaration,
1620 Analyze_Subprogram_Body_Helper,
1621 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1622 insert contract in subprogram node at point of definition
1624 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1625 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1626 corresponding pragma
1627 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1628 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1629 similar to the analysis of pre/post
1630 (Derive_Subprogram): insert contract in subprogram node at point of
1632 * sem_prag.adb, sem_prag.ads
1633 (Check_Arg_Is_String_Literal, Check_Identifier):
1634 new checking procedures to be called in treatment of pragmas
1635 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1636 pragma is well-formed. This does not check currently that 'Result is
1637 used only in the Ensures component of a Test_Case.
1638 (Analyze_Pragma): add case for Test_Case
1639 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1640 components of a Test_Case.
1641 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1642 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1643 pragma, treated as spec expressions.
1644 (Sig_Flags): add value -1 for Test_Case.
1645 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1646 Get_Requires_From_Test_Case_Pragma): getters for both expression
1647 components of a Test_Case.
1648 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1649 indirection between an entry or [generic] subprogram entity and its
1650 pre/post + test-cases.
1651 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1652 get/set for fields of an N_Contract node.
1653 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1654 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1655 names and pragma for Test_Case.
1656 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1658 2011-08-04 Vincent Celier <celier@adacore.com>
1660 * gnat_ugn.texi: Improve documentation of gnatmake switch
1661 --source-info-file=.
1663 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1665 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1666 type). Initialize Atyp to the appropriate type which is later checked
1667 for completion. Rewrite the assertion associated with private type
1670 2011-08-04 Ed Falis <falis@adacore.com>
1672 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1673 initialize the number of CPUs.
1675 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1677 * sem_type.adb (Disambiguate): New subsidiary routine
1678 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1679 equality on an anonymous access type whose designated type is private
1680 does not lead to an ambiguity with the universal access equality
1681 operator in the body or child units of the defining package. The same
1682 is true for a multiplication operator on a private type completed with
1685 2011-08-04 Javier Miranda <miranda@adacore.com>
1687 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1688 (Normalize_Scalars_Config): Removed.
1690 (Register_Opt_Config_Switches): Remove registering config values of
1691 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1692 (Restore_Opt_Config_Switches): Remove code which restores the values of
1693 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1694 Init_Or_Norm_Scalars.
1695 (Save_Opt_Config_Switches): Remove code which saves values of
1696 Init_Or_Norm_Scalars and Normalize_Scalars.
1697 (Set_Opt_Config_Switches): Remove code which restores config values of
1698 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1699 Init_Or_Norm_Scalars.
1701 2011-08-04 Yannick Moy <moy@adacore.com>
1703 * frontend.adb (Frontend): remove previous patch to avoid full
1704 qualification in ALFA mode.
1705 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1706 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1707 unique name for an entity, which could be used to identify the entity
1708 across compilation units.
1710 2011-08-04 Thomas Quinot <quinot@adacore.com>
1713 (Initialize_Default_Project_Path): Add target specific directory
1714 ($prefix/$target/lib/gnat) in front of project path in all cases
1715 (making gnatmake's behaviour consistent with gprbuild).
1716 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1717 Pass target name from Sdefault to project subsystem.
1718 * gnatls.adb: Show new target specific default project directory.
1720 2011-08-04 Johannes Kanig <kanig@adacore.com>
1722 * cstand.adb: Add Information to Identifier in Standard
1723 (Identifer_For): Set Entity to the corresponding entity
1725 2011-08-04 Sergey Rybin <rybin@adacore.com>
1727 * gnat_ugn.texi: Update doc on gnatcheck.
1729 2011-08-04 Yannick Moy <moy@adacore.com>
1731 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1734 2011-08-04 Yannick Moy <moy@adacore.com>
1736 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1737 performing expansion.
1738 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1739 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1740 it is not called in ALFA mode.
1742 2011-08-04 Emmanuel Briot <briot@adacore.com>
1744 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1745 after all, so removed.
1747 2011-08-04 Sergey Rybin <rybin@adacore.com>
1749 * vms_data.ads: Add missing VMS qualifiers.
1751 2011-08-04 Emmanuel Briot <briot@adacore.com>
1753 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1754 the list of files on the command line after processing it through
1757 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1759 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1760 processing for .NET/JVM. These targets can now benefit from
1761 Raise_From_Controlled_Operation and they share the same processing with
1763 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1764 These targets need transient scopes in order to properly finalize short
1765 lived controlled objects.
1766 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1767 NET/JVM. These targets can now benefit from
1768 Raise_From_Controlled_Operation and they share the same processing with
1771 2011-08-04 Geert Bosch <bosch@adacore.com>
1773 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1775 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1777 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1778 Expand_Record_Aggregate, to determine whether aggregate must be
1779 expanded into assignments. This is the case if the ancestor part is
1780 private, regarless of the setting of the flag Has_Private_Ancestor.
1782 2011-08-04 Ed Falis <falis@adacore.com>
1784 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1786 2011-08-04 Bob Duff <duff@adacore.com>
1788 * sinfo.ads: Fix comment.
1790 2011-08-04 Steve Baird <baird@adacore.com>
1792 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1793 choose a package name in much the same way as is
1794 done for JGNAT when VM_Target /= No_VM, except that
1795 a slightly more distinctive prefix string is used.
1797 2011-08-04 Emmanuel Briot <briot@adacore.com>
1799 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1800 gnatmake command line.
1801 This behavior was never documented (and was supported only because of
1802 an early bug in the code). This case might lead to ambiguous cases
1803 (between unit names and truncated base names without suffixes).
1805 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1807 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1808 Remove the external tag of a tagged type from the internal hash table.
1809 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1810 expanded usage of the routine. Strenghten the check for Is_Master. Add
1811 processing for tagged types.
1812 (Build_Finalizer): Create all the necessary lists used in finalizer
1813 creation when the processed context is a package that may contain
1815 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1816 Requires_Cleanup_Actions.
1817 (Expand_N_Package_Body): Package bodies may need clean up code
1818 depending on whether they contain tagged types.
1819 (Expand_N_Package_Declaration): Package declarations may need clean up
1820 code depending on whether they contain tagged types.
1821 (Unregister_Tagged_Types): New routine. Search through a list of
1822 declarations or statements, looking for non-abstract Ada tagged types.
1823 For each such type, generate code to unregister the external tag.
1824 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1825 Requires_Cleanup_Actions.
1826 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1827 through a list of declarations or statements looking for non-abstract
1828 Ada tagged types or controlled objects.
1829 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1830 Requires_Cleanup_Actions.
1831 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1832 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1835 2011-08-04 Vincent Celier <celier@adacore.com>
1837 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1838 has Ada sources, not project Project, because if the root project
1839 Project has no sources of its own, all projects will be deemed without
1842 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1844 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1845 of the No_Param_Proc acc-to-subp type used for initialization of
1846 __gnat_finalize_library_objects so that it's declared at library level
1847 rather than nested inside of the adainit routine.
1849 2011-08-04 Javier Miranda <miranda@adacore.com>
1851 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1852 if the tagged type has a representation clause which specifies its
1855 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1857 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1858 Remove previous procedure with that name.
1859 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1861 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1862 subtype mark, the ancestor cannot have unknown discriminants.
1863 (Resolve_Record_Aggregate): if the type has invisible components
1864 because of a private ancestor, the aggregate is illegal.
1866 2011-08-04 Vincent Celier <celier@adacore.com>
1868 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1869 account switches -gnat2005, -gnat12 and -gnat2012.
1871 2011-08-04 Bob Duff <duff@adacore.com>
1873 * s-tasdeb.ads: Minor comment fix.
1875 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1877 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1879 * switch.ads, switch.adb (Is_Language_Switch): New function.
1881 2011-08-04 Vincent Celier <celier@adacore.com>
1883 * switch-c.adb: Minor comment addition.
1885 2011-08-04 Vincent Celier <celier@adacore.com>
1887 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1888 ending with '=' is followed by a space (missing file name).
1890 2011-08-04 Pascal Obry <obry@adacore.com>
1892 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1894 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1896 * sem_ch12.adb (Analyze_Associations): New routine
1897 Check_Overloaded_Formal_Subprogram to reject a formal package when
1898 there is a named association or a box initialisation for an overloaded
1899 formal subprogram of the corresponding generic.
1901 2011-08-04 Yannick Moy <moy@adacore.com>
1903 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1904 * get_alfa.adb, put_alfa.adb: Read and write new component of
1906 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1908 2011-08-04 Pascal Obry <obry@adacore.com>
1910 * urealp.adb: Minor reformatting.
1912 2011-08-04 Tristan Gingold <gingold@adacore.com>
1914 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1915 Handle the case when Cleanup_Protected_Object returns Empty.
1917 2011-08-04 Yannick Moy <moy@adacore.com>
1919 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1921 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1923 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1924 call, ignore functions.
1926 2011-08-04 Geert Bosch <bosch@adacore.com>
1928 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1931 2011-08-04 Emmanuel Briot <briot@adacore.com>
1933 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1934 as an index for Builder'Switches. This conforms to the documentation.
1935 * make.adb (Insert_Project_Sources): avoid duplicate code
1937 2011-08-04 Emmanuel Briot <briot@adacore.com>
1939 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1940 name on the command line (for instance "../dummy"), never assume it can
1943 2011-08-04 Tristan Gingold <gingold@adacore.com>
1945 * bindgen.adb: Remove code the reference or create the
1946 Break_Start/__gnat_break_start procedure.
1947 * s-stalib.adb (Break_Start): Removed.
1949 2011-08-04 Emmanuel Briot <briot@adacore.com>
1951 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1952 shared with gprbuild.
1954 2011-08-04 Yannick Moy <moy@adacore.com>
1956 * par-ch4.adb (P_Primary): preferentially issue an error message about
1957 a missing parenthesis arount a conditional or case expression in Ada
1958 2012 mode, if we detect that the alignment is not correct for a
1961 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1963 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1964 tag-to-class-wide conversion as needing finalization actions.
1965 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1966 a tag-to-class-wide conversion as needing finalization actions.
1967 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1968 conversion does not need finalization actions.
1969 (Is_Tag_To_CW_Conversion): New routine.
1970 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1971 whether an object is the result of a tag-to-class-wide conversion.
1973 2011-08-04 Yannick Moy <moy@adacore.com>
1975 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1976 the left-hand-side and right-hand-side of a conjunct are inserted when
1977 translating a pre- or postcondition
1978 * sem_ch6.adb: Correct typo in comment
1980 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1982 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1983 Unchecked_Conversion and Unchecked_Deallocation.
1985 2011-08-04 Thomas Quinot <quinot@adacore.com>
1987 * make.adb: Minor reformatting.
1989 2011-08-04 Emmanuel Briot <briot@adacore.com>
1991 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1992 sources in the project and its imported projects, but not in the whole
1995 2011-08-04 Emmanuel Briot <briot@adacore.com>
1997 * make.adb: Remove debug trace.
1999 2011-08-04 Vincent Celier <celier@adacore.com>
2001 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
2002 path in canonical form, to be able to compare path names on platforms
2003 such as Windows or Darwin.
2005 2011-08-04 Thomas Quinot <quinot@adacore.com>
2007 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
2008 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
2009 * scos.ads: Update documentation accordingly.
2010 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
2013 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2015 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
2016 attribute only if prefix type is scalar.
2018 2011-08-04 Emmanuel Briot <briot@adacore.com>
2020 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
2021 in gnatmake for specifying mains on the command line that do not belong
2022 to the main project. These mains must currently all belong to the same
2024 (Ultimate_Extension_Of): removed, since duplicated
2025 Ultimate_Extending_Project.
2027 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2029 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
2031 (CodePeer_Mode_String): New.
2032 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
2034 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
2035 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
2036 mode, since no useful elaboration subprogram is needed by CodePeer.
2037 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
2038 In this mode, compile binder file with -gnatC and do stop after this
2041 2011-08-04 Vincent Celier <celier@adacore.com>
2043 * exp_ch7.adb: Minor comment fix.
2045 2011-08-04 Robert Dewar <dewar@adacore.com>
2047 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
2048 exp_ch4.adb, makeutl.adb: Minor reformatting.
2050 2011-08-04 Emmanuel Briot <briot@adacore.com>
2052 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
2053 Create several new subprograms to move code out of Make. This makes the
2054 code more readable, removes code duplication, and is a preparation work
2055 for adding support for aggregate projects.
2057 2011-08-04 Tristan Gingold <gingold@adacore.com>
2059 * s-po32gl.ads, s-po32gl.adb: New files.
2060 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
2061 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
2062 (Build_Finalization_Collection): Use it.
2063 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
2064 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
2066 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
2067 * gcc-interface/Make-lang.in: Update dependencies.
2069 2011-08-04 Emmanuel Briot <briot@adacore.com>
2071 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
2074 2011-08-04 Emmanuel Briot <briot@adacore.com>
2076 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
2077 command line is not a file name, also check whether it could be a unit
2080 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2082 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
2083 the header of the finalization routine.
2084 If the unit has no finalizer but is a body whose spec has one, then
2085 generate the decrement of the elaboration entity only.
2086 If the unit has a finalizer and is a spec, then do not generate the
2087 decrement of the elaboration entity.
2088 (Gen_Finalize_Library_C): Likewise.
2090 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2092 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
2093 (Bounds_Size_Expression): Removed.
2094 (Double_Alignment_Of): New subsidiary routine.
2095 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
2096 for a hole in the dope vector of unconstrained arrays due to different
2097 index and element alignments.
2099 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2101 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
2102 raise program_error because body has not been seen yet.
2104 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2106 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
2109 2011-08-04 Vincent Celier <celier@adacore.com>
2111 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
2113 2011-08-04 Yannick Moy <moy@adacore.com>
2115 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
2116 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
2118 2011-08-04 Thomas Quinot <quinot@adacore.com>
2120 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
2121 instantiation in RCI.
2123 2011-08-04 Emmanuel Briot <briot@adacore.com>
2125 * make.adb: Share more code with gprbuild
2127 2011-08-04 Emmanuel Briot <briot@adacore.com>
2129 * projects.texi: Added documentation for the IDE'Gnat project file
2132 2011-08-04 Nicolas Roche <roche@adacore.com>
2134 * gnat_rm.texi: Minor editing.
2136 2011-08-04 Javier Miranda <miranda@adacore.com>
2138 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
2139 and the library case for VM targets.
2140 (Gen_Adainit_Ada): Likewise.
2142 2011-08-04 Robert Dewar <dewar@adacore.com>
2144 * g-altive.ads: Minor comment updates.
2145 * prj-nmsc.adb: Minor reformatting.
2147 2011-08-04 Javier Miranda <miranda@adacore.com>
2150 (Normalize_Scalars_Config): Value of the configuration switch set by
2151 pragma Normalize_Scalars when it appears in the gnat.adc file.
2152 (Normalize_Scalars): New field for record Config_Switches_Type. Used
2153 to save and restore settings of this pragma.
2155 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
2156 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
2158 2011-08-04 Vincent Celier <celier@adacore.com>
2160 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
2162 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2164 * makeutl.adb: Minor reformatting.
2166 2011-08-04 Olivier Hainque <hainque@adacore.com>
2168 * g-altive.ads: Update comments to reflect that only the soft
2169 binding is available today.
2171 2011-08-04 Robert Dewar <dewar@adacore.com>
2173 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
2174 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
2175 * gcc-interface/Make-lang.in: Update dependencies.
2177 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2179 * prj-env.adb: Remove local debug traces.
2181 2011-08-04 Yannick Moy <moy@adacore.com>
2183 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
2184 was used instead of Hi_OK, which could cause a read of an uninitialized
2185 value later on. Detected while working on the new warning.
2186 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
2188 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
2189 in more cases, in order to detect more unreferenced values.
2190 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
2191 object for expression, if any.
2193 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2195 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
2196 the operand types instead of the Esize.
2198 2011-08-04 Steve Baird <baird@adacore.com>
2200 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
2201 enable CodePeer_Mode.
2202 * bindusg.adb (Display): Add help message describing -P binder switch.
2203 * gnat_ugn.texi: Document -P binder switch.
2204 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
2205 user-defined main program directly.
2206 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
2207 user-defined main program in the context clause of the package body.
2209 2011-08-04 Yannick Moy <moy@adacore.com>
2211 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
2212 duplicate of Defining_Entity
2213 (Get_Unique_Entity_For_Decl): rename function into
2214 Unique_Defining_Entity
2215 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
2216 (Formal_Proof_On): remove synthesized flag
2217 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2218 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
2219 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
2220 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
2221 Annotate (Formal_Proof)
2223 2011-08-04 Emmanuel Briot <briot@adacore.com>
2225 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
2226 source files with non-standard naming schemes, in imported projects
2228 2011-08-04 Emmanuel Briot <briot@adacore.com>
2230 * makeutl.adb (Complete_Mains): when a multi-unit source file is
2231 specified on the gprbuild command line, we need to compile all units
2232 within that file, not just the first one we find
2233 Fix error message for mains that are not found.
2235 2011-08-04 Thomas Quinot <quinot@adacore.com>
2237 * sem_ch6.adb: Update comment.
2238 * sem_ch12.adb: Minor reformatting.
2240 2011-08-04 Bob Duff <duff@adacore.com>
2242 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
2243 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
2244 race condition whose symptom is to fail to lock Parent. That, in turn,
2245 causes Parent.Awake_Count to be accessed without locking Parent, which
2246 causes another race condition whose symptom is that Parent.Awake_Count
2247 can be off by 1 (either too high or too low). The solution is to lock
2248 Parent unconditionally, and then lock Acceptor, before reading
2249 Acceptor.Terminate_Alternative.
2251 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2253 * debug.adb: Update comment.
2255 2011-08-04 Robert Dewar <dewar@adacore.com>
2257 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
2258 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
2259 exp_ch6.adb: Minor reformatting.
2261 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2263 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
2266 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2268 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
2270 2011-08-04 Thomas Quinot <quinot@adacore.com>
2272 * sinfo.ads: Minor reformatting.
2274 2011-08-04 Emmanuel Briot <briot@adacore.com>
2276 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
2277 even if there is no location.
2279 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2281 * sem_res.adb, sem_ch4.adb: move check for restriction
2282 No_Task_Hierarchy to resolve_allocator.
2284 2011-08-04 Thomas Quinot <quinot@adacore.com>
2286 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
2287 This flag of N_Pragma nodes is not used, remove it as well as all of
2288 the associated circuitry.
2290 2011-08-04 Javier Miranda <miranda@adacore.com>
2292 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
2293 runtime check on duplicated externa tags
2294 * debug.adb Document switch -gnatdQ.
2296 2011-08-04 Gary Dismukes <dismukes@adacore.com>
2298 * a-fihema.ads: Minor typo fix.
2300 2011-08-04 Yannick Moy <moy@adacore.com>
2302 * sem_ch10.adb: Minor comment update.
2304 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2306 * einfo.adb: Update the node field usage to reflect the renaming of
2307 Return_Flag to Return_ Flag_Or_Transient_Decl.
2308 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
2309 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
2310 (Write_Field15_Name): Change Return_Flag to
2311 Return_Flag_Or_Transient_Decl.
2312 * einfo.ads: Rename node field Return_Flag to
2313 Return_Flag_Or_Transient_Decl. Update the associated comment and all
2314 occurrences in entities.
2315 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
2316 associated Inline pragma.
2317 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2318 associated Inline pragma.
2319 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2321 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2322 Return_Flag and Set_Return_Flag.
2323 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2324 objects generated for controlled transients declared inside an
2325 Exception_With_Actions. Update the calls to Return_Flag.
2326 (Process_Object_Declaration): Add code to add a null guard for hook
2327 objects generated for controlled transients declared inside an
2328 Exception_With_Actions. Update related comment.
2329 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2330 objects generated for controlled transients declared inside an
2331 Exception_With_Actions. Update the calls to Return_Flag.
2332 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2334 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2336 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2337 positional aggregate.
2339 2011-08-04 Vincent Celier <celier@adacore.com>
2341 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2342 SLOC only for pragmas.
2344 2011-08-04 Emmanuel Briot <briot@adacore.com>
2346 * projects.texi: Minor typo fix.
2348 2011-08-04 Emmanuel Briot <briot@adacore.com>
2350 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2351 on case-sensitive file systems.
2353 2011-08-04 Thomas Quinot <quinot@adacore.com>
2355 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2356 nested in a disabled pragma.
2357 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2358 enclosing pragma, if any, for X decisions.
2360 2011-08-04 Thomas Quinot <quinot@adacore.com>
2362 * sem_prag.adb: Minor reformatting.
2364 2011-08-04 Vincent Celier <celier@adacore.com>
2366 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2367 allowed in no run time mode.
2369 2011-08-04 Vincent Celier <celier@adacore.com>
2371 * make.adb (Check): When -gnatc is used, check for the source file
2372 inside the ALI file with a canonical case file name.
2374 2011-08-04 Emmanuel Briot <briot@adacore.com>
2376 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2377 overriding the separator.
2379 2011-08-04 Robert Dewar <dewar@adacore.com>
2381 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2382 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2384 2011-08-04 Robert Dewar <dewar@adacore.com>
2386 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2388 2011-08-04 Yannick Moy <moy@adacore.com>
2390 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2391 'Result only appears in postcondition of function.
2393 2011-08-04 Thomas Quinot <quinot@adacore.com>
2395 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2396 external tag, include the value of the external tag in the exception
2399 2011-08-04 Yannick Moy <moy@adacore.com>
2401 * sem_attr.adb (Result): modify error message for misplaced 'Result
2403 2011-08-04 Sergey Rybin <rybin@adacore.com>
2405 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2406 clear that the second argument must be an identifier.
2408 2011-08-04 Thomas Quinot <quinot@adacore.com>
2410 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2411 -fpreserve-control-flow, insert an IF statement on the barrier
2412 condition to ensure that a conditional branch instruction is generated.
2414 2011-08-04 Emmanuel Briot <briot@adacore.com>
2416 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2417 (Processing_Flags.Ignore_Missing_With): new flag.
2419 2011-08-04 Emmanuel Briot <briot@adacore.com>
2421 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2422 Source_List_File on case-insensitive systems where the file is actually
2423 on a case-sensitive file system (NFS,...).
2425 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2427 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2428 function return contains a controlled [extension] aggregate and the
2429 return statement is not part of a handled sequence of statements, wrap
2430 the return in a block. This ensures that all controlled temporaries
2431 generated during aggregate resolution will be picked up by the
2432 finalization machinery.
2434 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2436 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2437 components, freeze type before resolution, to ensure that default
2438 initializations are present for all components.
2439 * sem_res.adb (Resolve_Actuals): the designated object of an
2440 accces-to-constant type is a legal actual in a call to an
2441 initialization procedure.
2443 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2445 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2446 N_Unchecked_Type_Conversion to the possible containers of a renamed
2449 2011-08-04 Yannick Moy <moy@adacore.com>
2451 * par-ch13.adb (Aspect_Specifications_Present): recognize
2452 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2453 is issued in Strict mode.
2454 * par.adb: Fix typos in comments.
2456 2011-08-04 Yannick Moy <moy@adacore.com>
2458 * sem_attr.adb (Result): modify error message to take into account Post
2459 aspect when compiling Ada 2012 (or newer) code.
2461 2011-08-04 Nicolas Roche <roche@adacore.com>
2463 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2464 remove need for GCC exceptions.
2466 2011-08-04 Vincent Celier <celier@adacore.com>
2468 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2469 project, not the source file name.
2470 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2471 excluded, continue looking. This excluded source will only be returned
2472 if there is no other source with the same base name that is not locally
2475 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2477 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2478 private and one of the operands is a real literal, use a qualified
2479 expression rather than a conversion which is not meaningful to the
2482 2011-08-04 Yannick Moy <moy@adacore.com>
2484 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2485 corresponding aspect X'Class are allowed, proceed with analysis of the
2486 aspect instead of skipping it.
2488 2011-08-04 Tristan Gingold <gingold@adacore.com>
2490 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2491 This will allow to have an Ada implementation for the subprogram.
2493 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2495 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2496 completion and aspects are present, apply them to the entity for the
2497 type which is currently the partial view, but which is the one that
2499 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2500 applies to a partial view, indicate that the full view has predicates
2501 and delayed aspects.
2502 (Replace_Type_Reference): Handle properly predicates that apply to the
2503 full view of a private completion.
2505 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2507 * layout.adb (Layout_Type): For composite types, do not set Esize.
2508 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2510 (Size_Known): Look at the RM size of components instead of the Esize.
2511 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2512 issue warning and activate Implicit_Packing.
2513 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2514 if the Esize is not known.
2515 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2516 for elementary types only.
2517 (Analyze_Record_Representation_Clause): Look at the RM size instead
2518 of the Esize to issue errors.
2519 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2521 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2523 Look at the RM size instead of the Esize for types if the latter is
2525 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2527 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2529 * sem_type.adb: proper handling of equality not involving anonymous
2532 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2534 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2535 Vis_Decls. When creating a library-level finalizer for a package spec,
2536 both the declaration and body of the finalizer are inserted either in
2537 the visible or private declarations of the package spec.
2539 2011-08-04 Javier Miranda <miranda@adacore.com>
2541 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2542 use of the full-view of a type when invoking Is_Ancestor.
2543 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2544 the full-view of private parents is requested, then use also the
2545 full-view of the parent of the first derivation.
2547 2011-08-04 Tristan Gingold <gingold@adacore.com>
2549 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2550 instead of the locally imported procedure.
2551 * s-taprop-mingw.adb (Enter_Task): Ditto.
2552 * s-valrea.adb (Scan_Real): Ditto.
2553 * s-imgrea.adb (Set_Image_Real): Ditto.
2554 * s-flocon.ads: Make the package pure.
2556 2011-08-04 Thomas Quinot <quinot@adacore.com>
2558 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2559 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2560 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2561 New subprogram, moved here from...
2562 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2563 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2564 rewriting of the last argument into a procedure call statement here...
2565 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2568 2011-08-04 Thomas Quinot <quinot@adacore.com>
2570 * par_sco.adb: Minor reformatting.
2572 2011-08-04 Robert Dewar <dewar@adacore.com>
2574 * erroutc.adb: Minor reformatting.
2576 2011-08-04 Thomas Quinot <quinot@adacore.com>
2578 * par_sco.adb: Comment update.
2580 2011-08-04 Tristan Gingold <gingold@adacore.com>
2582 * s-flocon.ads: New file.
2583 * g-flocon.ads: Now a renaming of s-flocon.
2584 * Makefile.rtl: Add s-flocon.o
2586 2011-08-04 Javier Miranda <miranda@adacore.com>
2588 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2589 constrained, do not attempt to build a subtype of it.
2591 2011-08-04 Yannick Moy <moy@adacore.com>
2593 * errout.ads Change comments: remove 'R'M as an example where quotes
2594 are needed; add ALFA as another case where quotes are not needed
2595 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2596 case where quotes are not needed.
2597 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2598 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2599 Remove all occurrences of 'A'L'F'A
2601 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2603 * sem_ch13.adb: check legality of invariant pragma.
2605 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2607 * bindgen.adb: Add comments.
2609 2011-08-04 Yannick Moy <moy@adacore.com>
2611 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2613 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2614 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2616 2011-08-04 Robert Dewar <dewar@adacore.com>
2618 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2619 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2620 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2622 2011-08-04 Thomas Quinot <quinot@adacore.com>
2624 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2626 2011-08-04 Thomas Quinot <quinot@adacore.com>
2629 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2632 2011-08-04 Robert Dewar <dewar@adacore.com>
2634 * einfo.ads, exp_ch4.adb: Minor reformatting.
2636 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2638 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2640 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2642 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2643 type in all cases to compute list of primitive operations, because full
2644 view may be an itype that is not attached to the list of declarations.
2646 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2648 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2649 library has already been finalized.
2650 (Gen_Adafinal_C): Likewise.
2651 (Gen_Adainit_Ada): Generate an early return if the library has
2652 already been elaborated.
2653 (Gen_Adainit_C): Likewise.
2654 (Gen_Output_File_Ada): Generate an elaboration flag.
2655 (Gen_Output_File_C): Likewise.
2657 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2659 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2660 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2661 built in the first place.
2662 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2663 for CodePeer because Finalize_Address was not built to begin with.
2664 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2666 2011-08-04 Pascal Obry <obry@adacore.com>
2668 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2669 filenames, this ensures unicity of filenames across processes.
2671 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2673 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2674 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2675 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2676 Add False as the actual to From_Abort in the generated call to
2677 Raise_From_Controlled_Operation.
2679 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2681 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2682 so that the ali file name can be retrieved from outside of this package.
2683 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2684 doing nothing in the general case, but used to update the object file
2685 timestamp if directly generated by the backend.
2686 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2687 to a later time than the ali file one.
2689 2011-08-04 Yannick Moy <moy@adacore.com>
2691 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2692 entities whose body contains an Annotate pragma which forces formal
2694 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2695 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2696 Mark_Non_ALFA_Subprogram to pass in a message and node.
2697 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2698 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2699 surrounding subprogram.
2700 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2701 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2702 as not in ALFA is annotated with Formal_Proof being On, then an error
2703 is issued based on the additional parameters for message and node.
2704 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2705 * gcc-interface/Make-lang.in: Update dependencies.
2707 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2709 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2710 Finalize_Address when CodePeer is enabled.
2712 2011-08-04 Pascal Obry <obry@adacore.com>
2714 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2715 the latter returns a pointer to a static buffer which is deallocated
2716 at the end of the routine.
2718 2011-08-04 Yannick Moy <moy@adacore.com>
2720 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2721 after index creation; mark unconstrained base array type generated as
2722 being in/not in ALFA as well
2723 (Make_Index): mark subtype created as in/not in ALFA
2724 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2725 over a loop as in/not in ALFA, depending on its type and form of loop
2728 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2730 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2731 directly to False on .NET and JVM.
2733 2011-08-04 Yannick Moy <moy@adacore.com>
2735 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2736 constraint that subtype must come from source code to be in ALFA, so
2737 that anonymous subtypes can be in ALFA too.
2739 2011-08-04 Yannick Moy <moy@adacore.com>
2741 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2742 reference for ALFA mode.
2743 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2744 procedure public so as to use it from formal verification back-end.
2746 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2748 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2749 invalid checks of the Parameter, making Remove_Switch not working
2752 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2754 * targparm.ads: Update header: no run-time exception is needed on this
2757 2011-08-04 Vincent Celier <celier@adacore.com>
2759 * a-fihema.adb: Use System.IO instead of GNAT.IO
2761 2011-08-04 Thomas Quinot <quinot@adacore.com>
2763 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2764 are forbidden in Compiler_Unit mode.
2766 2011-08-04 Robert Dewar <dewar@adacore.com>
2768 * sem_util.adb: Minor reformatting.
2770 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2772 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2773 library-level finalizers.
2774 (Gen_Finalize_Library_C): Update the import string for library-level
2776 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2777 library-level finalizer.
2778 * exp_ch7.adb: Remove with and use clauses for Stringt.
2779 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2780 Spec_Decl. Add local variable Body_Id. The names of library-level
2781 finalizers are now manually fully qualified and are no longer external.
2782 A single name is now capable of servicing .NET, JVM and non-VM targets.
2783 Pragma Export is no longer required to provide visibility for the name.
2784 (Create_Finalizer_String): Removed.
2785 (New_Finalizer_Name): New routine which mimics New_..._Name.
2787 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2789 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2790 elaboration counter to Standard_Short_Integer.
2791 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2792 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2793 (Gen_Elab_Externals_C): Likewise.
2795 2011-08-04 Ed Falis <falis@adacore.com>
2797 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2798 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2799 system-vxworks-mips.ads, system-vxworks-x86.ads
2800 (Always_Compatible_Rep): set to False for all VxWorks targets.
2802 2011-08-04 Robert Dewar <dewar@adacore.com>
2804 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2805 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2806 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2807 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2808 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2809 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2810 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2811 Minor reformatting and code reorganization.
2813 2011-08-04 Emmanuel Briot <briot@adacore.com>
2815 * projects.texi: Added doc for aggregate projects.
2817 2011-08-04 Emmanuel Briot <briot@adacore.com>
2819 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2820 Add support for overriding the Project_Path in aggregate projects.
2822 2011-08-04 Robert Dewar <dewar@adacore.com>
2824 * a-cofove.ads: Minor reformatting.
2826 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2828 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2829 on the generated code.
2830 (Build_Finalize_Statements): Update the comment on the generated code.
2831 (Build_Initialize_Statements): Update the comment on the generated code.
2832 (Build_Object_Declarations): Add local variable Result. The object
2833 declarations are now built in sequence.
2834 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2837 2011-08-04 Robert Dewar <dewar@adacore.com>
2839 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2841 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2843 * einfo.ads (Elaboration_Entity): Document new definition and use.
2844 (Elaboration_Entity_Required): Adjust to above change.
2845 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2846 * exp_ch12.adb: And with and use for Snames.
2847 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2848 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2849 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2850 <Check_Unit_Name>: Deal with N_Expanded_Name.
2851 <Attribute_Elaborated>: Extend to all unit names.
2852 * sem_elab.adb: And with and use for Uintp.
2853 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2854 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2855 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2856 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2857 from Gen_Adainit_Ada.
2858 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2859 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2860 case, do not call System.Standard_Library.Adafinal; instead call
2861 finalize_library if needed.
2862 (Gen_Adafinal_C): Likewise.
2863 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2864 non-main program case.
2865 (Gen_Adainit_C): Generate a couple of external declarations here.
2866 In the main program case, set SSL.Finalize_Library_Objects.
2867 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2868 (Gen_Elab_Calls_C): Likewise.
2869 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2870 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2871 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2873 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2874 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2876 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2877 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2878 of external declarations. Call Gen_Finalize_Library_C.
2880 2011-08-04 Emmanuel Briot <briot@adacore.com>
2882 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2883 Compute_Compilation_Phases): new subprogram.
2884 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2885 The number of mains as well as the various compilation phases that
2886 need to be run are now project tree specific, since various
2887 aggregated trees might have different requirements. In particular,
2888 they do not all require bind or link phases.
2890 2011-08-04 Emmanuel Briot <briot@adacore.com>
2892 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2893 (Project_Tree_Appdata): New type.
2894 It is now possible to associate application-specific data to a project
2895 tree. In particular, this is used in the gprbuild builder to avoid a
2896 number of global tables and htables, especially now that there can be
2897 several project trees loaded at once because of aggregate projects.
2898 (Debug_Name): new procedure.
2899 * projects.texi: Clarify syntax of "**" for Source_Dirs
2901 2011-08-03 Emmanuel Briot <briot@adacore.com>
2903 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2904 the "roots" for a main.
2905 (Fill_From_Project): add support for aggregate projects. Main units
2906 in aggregated projects are now automatically added in the list of
2907 files to build (although this fails later on in gprbuild, because
2908 these files are not using the root proejct tree, so this needs
2910 * gcc-interface/Make-lang.in: Update dependencies.
2912 2011-08-03 Yannick Moy <moy@adacore.com>
2914 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2915 conditional expression in ALFA.
2916 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2917 expressions as not in ALFA.
2919 2011-08-03 Robert Dewar <dewar@adacore.com>
2921 * a-cofove.adb: Minor reformatting.
2923 2011-08-03 Emmanuel Briot <briot@adacore.com>
2925 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2926 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2928 These packages are more logically placed in the Queue package, since
2929 they manipulate the queue. It is also likely that they can be adapted
2930 for gnatmake, thus sharing more code.
2931 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2932 that we could move the above.
2934 2011-08-03 Emmanuel Briot <briot@adacore.com>
2936 * errutil.adb (Finalize): clean up the list of error messages on exit.
2937 Calling this subprogram multiple times will no longer show duplicate
2938 error messages on stderr.
2940 2011-08-03 Emmanuel Briot <briot@adacore.com>
2942 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2943 Getopt_Switches when we have already define a command line
2946 2011-08-03 Yannick Moy <moy@adacore.com>
2948 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2949 in ALFA. Instead, they are considered as assertions to prove.
2950 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2951 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2952 if they have no ELSE part, or if they occur in pre- and postconditions,
2953 where the Condition cannot have side-effects in ALFA
2954 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2955 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2956 Instead, include type conversion between scalar types in ALFA.
2957 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2958 if-and-only-if its type is in ALFA.
2960 2011-08-03 Thomas Quinot <quinot@adacore.com>
2962 * scos.adb, get_scos.adb, put_scos.adb
2963 New code letter for decisions: G (entry guard)
2965 (Traverse_Subprogram_Body): Rename to...
2966 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2967 (Traverse_Protected_Body): New subprogram
2968 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2969 protected bodies and entry bodies.
2971 2011-08-03 Yannick Moy <moy@adacore.com>
2973 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2974 entities with get/set subprograms, which is set on procedure entities
2975 generated by the compiler for a postcondition.
2976 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2977 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2978 entity for a declaration
2979 (Get_Unique_Entity_For_Decl): new function returning an entity which
2980 represents a declaration, so that matching spec and body have the same
2983 2011-08-03 Robert Dewar <dewar@adacore.com>
2985 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2986 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2988 2011-08-03 Yannick Moy <moy@adacore.com>
2990 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2991 library-level because retriction No_Implicit_Dynamic_Code in the
2992 front-end prevents its definition as a local subprogram
2993 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2994 for reuse in other contexts
2995 (Traverse_Declarations_Or_Statements,
2996 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2997 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2998 procedures take a callback parameter to be called on all declarations
3000 (Traverse_All_Compilation_Units): new generic function to traverse a
3001 compilation unit and call a callback parameter on all declarations
3003 2011-08-03 Javier Miranda <miranda@adacore.com>
3005 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
3006 in Java since they are always enclosed in a namespace that
3007 differentiates them, and overloaded entities are supported by the VM.
3009 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3011 * checks.adb (Determine_Range): If a computed bound of an operation is
3012 outside the range of the base type of the expression, and overflow
3013 checks are enabled, the result is unknown and cannot be used for any
3014 subsequent constant folding.
3015 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
3016 unknown, so is the result of the comparison.
3018 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3020 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
3021 From_Abort. When finalization was triggered by an abort, propagate
3022 Standard'Abort_Signal rather than Program_Error.
3023 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
3025 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
3026 From_Abort. When finalization was triggered by an abort, propagate
3027 Standard'Abort_Signal rather than Program_Error.
3028 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
3030 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
3031 Abort_Id. Update the calls to Build_Object_Declarations and
3032 Build_Raise_Statement to include Abort_Id.
3033 (Build_Adjust_Statements): New local variable Abort_Id. Update the
3034 calls to Build_Object_Declarations and Build_Raise_Statement to include
3036 (Build_Finalize_Statements): New local variable Abort_Id. Update the
3037 calls to Build_Object_Declarations and Build_Raise_Statement to include
3039 (Build_Components): Create an entity for Abort_Id when exceptions are
3040 allowed on the target.
3041 (Build_Finalizer): New local variable Abort_Id.
3042 (Build_Initialize_Statements): New local variable Abort_Id. Update the
3043 calls to Build_Object_Declarations and Build_Raise_Statement to include
3045 (Build_Object_Declarations): Add new formal Abort_Id. Create the
3046 declaration of flag Abort_Id to preserve the original abort status
3047 before finalization code is executed.
3048 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
3049 runtime routine Raise_From_Controlled_Operation.
3050 (Create_Finalizer): Update the call to Build_Raise_Statement to include
3051 Abort_Id. Update the call to Build_Object_Declarations to include
3052 Abort_Id. Update the layout of the finalizer body.
3053 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
3054 (Process_Transient_Objects): New local variable Abort_Id. Remove the
3055 clunky code to create all flags and objects related to
3056 exception propagation and replace it with a call to
3057 Build_Object_Declarations. Update the call to Build_Raise_Statement to
3059 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
3060 Add new formal Abort_Id and associated comment on its use.
3061 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
3063 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
3064 Remove the clunky code to create all flags and objects related to
3065 exception propagation and replace it with a call to
3066 Build_Object_Declarations. Update the call to Build_Raise_Statement.
3068 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3070 * s-tassta.adb: Fix minor typos.
3072 2011-08-03 Robert Dewar <dewar@adacore.com>
3074 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
3075 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
3077 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3079 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
3080 to packages. This ensures that the finalizer body will not end up
3081 inside the freeze node.
3082 (Process_Declarations): Add code to detect whether a freeze node has a
3083 nested finalization collection.
3085 2011-08-03 Pascal Obry <obry@adacore.com>
3087 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
3088 (Current_Session): Return a not null access to Session_Type.
3089 (Default_Session): Likewise.
3091 2011-08-03 Robert Dewar <dewar@adacore.com>
3093 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
3094 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
3096 2011-08-03 Pascal Obry <obry@adacore.com>
3098 * g-awk.ads: Minor comment fix.
3100 2011-08-03 Sergey Rybin <rybin@adacore.com>
3102 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3103 the tree structure related to discriminant constraints.
3104 Original_Discriminant cannot be used any more for computing the
3105 defining name for the reference to a discriminant.
3107 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3109 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
3110 function is not visibly tagged, this is not a dispatching call and
3111 therfore is not Tag_Indeterminate, even if the function is marked as
3112 dispatching on result.
3114 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3116 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
3117 (Expand_N_Free_Statement): Add a guard to protect against run-times
3118 which do not support controlled types.
3119 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
3120 against run-times which do not support controlled types.
3121 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
3122 against run-times which do not support controlled types.
3123 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
3124 against run-times which do not support controlled types.
3125 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
3126 protect against run-times which do not support controlled types.
3128 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3130 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
3131 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
3133 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3135 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
3136 modified in the source, to prevent spurious warnings when compiling
3139 2011-08-03 Thomas Quinot <quinot@adacore.com>
3141 * a-except-2005.adb: Minor reformatting.
3143 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3145 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
3146 is a renaming declaration in the private part of a package, do not emit
3147 a warning that the with_clause could be moved because the renaming may
3148 be used in the body or in a child unit.
3150 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3152 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3153 Propagate the Comes_From_Source attribute from the original return
3154 object to the renaming.
3156 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3158 * exp_ch7.adb (Build_Raise_Statement): Do not call
3159 Raise_From_Controlled_Operation when this routine is not present in
3160 the run-time library.
3161 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
3162 libraries (Ravenscar), tasks are non-terminating, and protected objects
3163 and tasks can only appear at library level, so we do not want
3164 finalization of protected objects nor tasks.
3165 * exp_intr.adb: Minor clarification in comment.
3166 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
3167 Gen_Output_File_C): Remove references to finalization of library-level
3168 objects when using restricted run-time libraries.
3170 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3172 * sem_ch3.adb (Build_Discriminant_Constraints): Set
3173 Original_Discriminant only if the parent type is a generic formal.
3175 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3177 * exp_ch13.adb: Add with and use clause for Targparm;
3178 (Expand_N_Free_Statement): Prevent the generation of a custom
3179 Deallocate on .NET/JVM targets since this requires pools and address
3181 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
3182 .NET/JVM targets, attach the newly allocated object to the access
3183 type's finalization collection. Do not generate a call to
3184 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
3185 exist in the runtime.
3186 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
3187 create a custom Allocate for object that do not require initialization.
3188 Attach a newly allocated object to the access type's finalization
3189 collection on .NET/JVM.
3190 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
3191 assignment of controlled types on .NET/JVM. The two hidden pointers
3192 Prev and Next and stored and later restored after the assignment takes
3194 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
3195 kludge for .NET/JVM to recognize a particular piece of code coming from
3196 Heap_Management and change the call to Finalize into Deep_Finalize.
3197 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
3198 finalization collections on .NET/JVM only for types derived from
3199 Controlled. Separate the association of storage pools with a collection
3200 and only allow it on non-.NET/JVM targets.
3201 (Make_Attach_Call): New routine.
3202 (Make_Detach_Call): New routine.
3203 (Process_Object_Declarations): Suppress the generation of
3204 build-in-place return object clean up code on .NET/JVM since it uses
3206 * exp_ch7.ads (Make_Attach_Call): New routine.
3207 (Make_Detach_Call): New routine.
3208 * exp_intr.adb Add with and use clause for Targparm.
3209 (Expand_Unc_Deallocation): Detach a controlled object from a collection
3210 on .NET/JVM targets.
3211 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
3212 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
3213 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
3214 names used in finalization.
3216 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3218 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
3219 (Attach, Detach): Lock the current task when chaining an object onto a
3222 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
3224 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
3225 Rewritten to create the message strings when the exception is not
3226 raised by an abort during finalization.
3227 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
3228 Raise_From_Controlled_Operation and update its associated comment.
3229 * a-fihema.ads, a-fihema.adb: New GNAT unit.
3230 Ada.Finalization.Heap_Management provides key functionality
3231 associated with controlled objects on the heap, their creation,
3232 finalization and reclamation. Type Finalization_Collection is
3233 effectively a wrapper which sits ontop of a storage pool and performs
3234 all necessary bookkeeping for all the objects it contains. Each
3235 access-to-controlled or access-to-class-wide type receives a collection
3236 as part of its expansion. The compiler generates buffer code and
3237 invokes Allocate / Deallocate to create and destroy allocated
3239 * a-finali.adb ("="): Removed.
3240 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
3241 fields Prev and Next.
3242 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
3243 A library unit with at least one controlled object on the library level
3244 has a special finalizer which is invoked by the binder. To signal this,
3245 ali files carry field PF.
3246 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
3247 associated comment on field usage.
3248 * a-tags.adb (Get_RC_Offset): Removed.
3249 (Needs_Finalization): New routine.
3250 * a-tags.ads: Update the structure of the GNAT dispatch tables.
3251 Dispatch tables now carry field Needs_Finalization which provides
3252 runtime indication whether a type is controlled or has controlled
3253 components or both. Remove field RC_Offset.
3254 (Get_RC_Offset): Removed along with its associated pragma Export.
3255 Since tagged types with controlled components no longer carry hidden
3256 field _controller, the special mechanism to retrieve its location is no
3258 (Needs_Finalization): New routine.
3259 * atree.ads, atree.adb (Elist24): New routine.
3260 (Set_Elist24): New routine.
3261 * atree.h: Add a define clause for Elist24.
3262 * bindgen.adb New library-level variable Lib_Final_Built.
3263 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
3264 presence of a VM target, the routine generates calls to the proper
3265 library finalization routine.
3266 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
3267 targets. Set the correct library finalization routine depending on
3268 whether the library has controlled objects or this is a VM compilation.
3269 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
3270 to library-level finalizers of compiled units in reverse order of
3271 elaboration. It also produces exception management code and reraises a
3272 potential exception after all units have been finalized.
3273 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
3274 library-level finalizers of compiled units in reverse order of
3276 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
3277 definitions of all library-level finalizers available to the compilation
3278 (Gen_Main_Ada): Directly call Adafinal which now contails all target
3280 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
3281 System.Standard_Library.Adafinal directly. If the library needs
3282 finalization actions, create the sequence of finalization calls.
3283 (Gen_Output_File_Ada): Alphabetize local variables and constants.
3284 Generate a with clause for System.Soft_Links when compiling for a VM.
3285 Remove the code which imports System.Standard_Library.Adafinal as
3286 Do_Finalize. Generate the library finalization routine.
3287 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
3288 If the library needs finalization actions, create all the definitions
3289 of library- level finalizers.
3290 (Has_Finalizer): New routine. Determines whether at least one compiled
3291 unit has a library-level finalizer.
3292 Add type Qualification_Mode.
3293 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
3294 * einfo.adb: New usage of field 15 as Return_Flag.
3295 Remove Finalization_Chain_Entity from the usages of field 19.
3296 Remove Associated_Final_Chain from the usages of field 23.
3297 New usage of field 23 as Associated_Collection.
3298 New usage of field 24 as Finalizer.
3299 New usage of flag 252 as Is_Processed_Transient.
3300 (Associated_Final_Chain): Removed.
3301 (Associated_Collection): New routine.
3302 (Finalization_Chain_Entity): Removed.
3303 (Finalizer): New routine.
3304 (Is_Finalizer): New routine.
3305 (Is_Processed_Transient): New routine.
3306 (Return_Flag): New routine.
3307 (Set_Associated_Final_Chain): Removed.
3308 (Set_Associated_Collection): New routine.
3309 (Set_Finalization_Chain_Entity): Removed.
3310 (Set_Finalizer): New routine.
3311 (Set_Is_Processed_Transient): New routine.
3312 (Set_Return_Flag): New routine.
3313 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
3315 (Write_Field8_Name): Alphabetize the output.
3316 (Write_Field11_Name): Alphabetize the output.
3317 (Write_Field12_Name): Alphabetize the output.
3318 (Write_Field13_Name): Alphabetize the output.
3319 (Write_Field14_Name): Alphabetize the output.
3320 (Write_Field15_Name): Alphabetize the output.
3321 (Write_Field16_Name): Alphabetize the output.
3322 (Write_Field17_Name): Alphabetize the output.
3323 (Write_Field18_Name): Alphabetize the output.
3324 (Write_Field19_Name): Alphabetize the output. Remove the output of
3325 Finalization_Chain_Entity.
3326 (Write_Field20_Name): Alphabetize the output.
3327 (Write_Field21_Name): Alphabetize the output.
3328 (Write_Field22_Name): Alphabetize the output.
3329 (Write_Field23_Name): Alphabetize the output. Remove the output of
3330 Associated_Final_Chain. Add output for Associated_Collection.
3331 (Write_Field24_Name): Alphabetize the output.
3332 (Write_Field25_Name): Add output for Finalizer.
3333 (Write_Field26_Name): Alphabetize the output.
3334 (Write_Field27_Name): Alphabetize the output.
3335 (Write_Field28_Name): Alphabetize the output.
3336 * einfo.ads: Add new field description for Associated_Collection and
3338 Remove Associated_Final_Chain and its uses in nodes.
3339 Remove Finalization_Chain_Entity and its uses in nodes.
3340 Add new field description for Finalizer and its uses in nodes.
3341 Add new synthesized attribute Is_Finalizer.
3342 Add new flag description for Is_Processed_Transient and its uses in
3344 Add new field description for Return_Flag and its uses in nodes.
3345 (Associated_Final_Chain): Removed along with its pragma Inline.
3346 (Associated_Collection): New routine and pragma Inline.
3347 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3348 (Finalizer): New routine and pragma Inline.
3349 (Is_Finalizer): New routine and pragma Inline.
3350 (Is_Processed_Transient): New routine and pragma Inline.
3351 (Return_Flag): New routine and pragma Inline.
3352 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3353 (Set_Associated_Collection): New routine and pragma Inline.
3354 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3355 (Set_Finalizer): New routine and pragma Inline.
3356 (Set_Is_Processed_Transient): New routine and pragma Inline.
3357 (Set_Return_Flag): New routine and pragma Inline.
3358 * exp_aggr.adb: Alphabetize subprograms.
3359 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3360 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3361 associated comments. Remove local variables External_Final_List and
3363 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3364 Ancestor. Remove the retrieval of finalization lists. Update the call to
3366 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3367 lists. Update the call to Late_Expansion.
3368 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3369 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3370 (Gen_Assign): Remove the retrieval of the finalization list used to
3371 build the assignment. Update the calls to Make_Init_Call and
3373 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3374 Remove the mechanism to determine attachment levels and finalization
3375 list retrieval. Remove the processing for coextensions.
3376 (Init_Controller): Removed. Controllers no longer exist.
3377 (Late_Expansion): Remove formals Flist and Obj along with their
3378 associated comments. Update the calls to Build_Record_Aggr_Code and
3379 Build_Array_Aggr_Code.
3380 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3381 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3382 appear in entry bodies, protected subprograms and task bodies.
3383 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3384 * exp_ch3.adb (Add_Final_Chain): Removed.
3385 (Build_Array_Init_Proc): Alphabetize local variables.
3386 (Build_Assignment): Alphabetize local variables. Update the call to
3388 (Build_Class_Wide_Master): Rename local variables to better reflect
3390 (Build_Discriminant_Assignments): Code reformatting.
3391 (Build_Init_Call_Thru): Code reformatting.
3392 (Build_Init_Procedure): Code reformatting. Generate a special version
3393 of Deep_Finalize which is capable of finalizing all initialized
3394 components and ignore the rest.
3395 (Build_Init_Statements): Rename local variables to better reflect their
3397 Reimplement the mechanism to include the creation and update of an index
3398 variable called a "counter". It is used as a bookmark for tracing
3399 initialized and non-initialized components.
3400 (Build_Initialization_Call): Remove local variable Controller_Typ.
3401 Alphabetize all local variables. Remove the initialization of the
3402 record controller and update the call to Make_Init_Call.
3403 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3404 New local variable Counter.
3405 (Constrain_Array): Alphabetize.
3406 (Expand_Freeze_Array_Type): Create a collection instead of a
3408 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3409 Finalize_Address which is used in conjunction with allocated controlled
3411 (Expand_N_Object_Declaration): Remove the creation of a finalization
3412 list for anonymous access types. Update the calls to Make_Init_Call and
3414 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3415 retrieval of finalization lists. Remove the expansion of the record
3416 controller. Create TSS primitive Finalize_Address used in conjunction
3417 with controlled objects on the heap. Create finalization collections
3418 for access-to-controlled record components.
3419 (Expand_Record_Controller): Removed.
3420 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3421 class-wide types now requires additional processing. Create
3422 finalization collections for access-to-controlled types.
3423 (Increment_Counter): New routine.
3424 (Make_Counter): New routine.
3425 (Make_Eq_If): Remove the mention of Name_uController.
3426 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3427 types coming from System.Finalization_Root.
3428 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3429 (Predefined_Primitive_Bodies): There is no longer need to skip types
3430 coming from System.Finalization_Root.
3431 (Stream_Operation_OK): Do not generate stream routines for
3432 type Ada.Finalization.Heap_Management.Finalization_Collection.
3433 * exp_ch3.ads: Alphabetize subprograms.
3434 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3435 Add with and use clause for Lib.
3436 (Complete_Coextension_Finalization): Removed.
3437 (Complete_Controlled_Allocation): New routine. Create a finalization
3438 collection for anonymous access-to-controlled types. Create a custom
3439 Allocate which interfaces with the back end and the machinery in
3441 (Expand_Allocator_Expression): Add necessary calls to
3442 Complete_Controlled_Allocation. Remove the retrieval of finalization
3443 lists. Update the calls to Make_Adjust_Call. Generate a call to
3444 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3445 the associated collection.
3446 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3447 Code clean up. Remove the retrieval of finalization lists and
3449 Update the call to Make_Init_Call. Generate a call to
3450 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3451 the associated collection.
3452 (Get_Allocator_Final_List): Removed. Finalization lists are not
3454 (Suitable_Element): Remove the mention of Name_uController.
3455 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3456 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3457 the left hand side, carry out the assignment and adjust the left hand
3459 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3460 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3461 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3462 BIP_Collection and BIPcollection.
3463 (Build_Heap_Allocator): New routine used to allocate the return object
3464 of a build-in-place function onto a collection.
3465 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3466 (Expand_Call): Do not replace direct calls to Deep routines with their
3468 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3469 and update their occurrences. Add a special return flag to monitor the
3470 [ab]normal execution of the function. The flag is set right before the
3472 Rewrite the mechanism used to allocate a build-in-place return object
3473 on the heap or on a storage pool.
3474 (Is_Direct_Deep_Call): New routine.
3475 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3476 build-in-place function call instead of a final list. Build a call to
3477 Set_Finalize_Address_Ptr to decorate the associated collection.
3478 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3479 order to name the build-in-place function call's result for later
3480 finalization. Add a collection to a build-in-place function call
3481 instead of a final list.
3482 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3483 build-in-place function call instead of a final list. Remove the code
3484 which moves one final list and transforms it into the actual in a
3485 nested build-in-place call.
3486 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3487 build-in-place function call instead of a final list.
3488 (Move_Final_List): Removed.
3489 (Needs_BIP_Collection): New routine.
3490 (Needs_BIP_Final_List): Removed.
3491 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3492 enumeration type BIP_Formal_Kind.
3493 Update the related comment.
3494 (Needs_BIP_Collection): New routine.
3495 (Needs_BIP_Final_List): Removed.
3496 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3497 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3498 majority of subprograms in this unit. Add Name_Finalize_Address to
3499 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3500 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3501 statements for an array type.
3502 (Build_Adjust_Statements): Create the adjust statements for a record
3504 (Build_Cleanup_Statements): New routine. A procedure which given any
3505 construct containing asynchronous calls, references to _master, or is a
3506 task body, a task allocation or a protected body produces the necessary
3507 runtime calls to clean up these constructs.
3508 (Build_Exception_Handler): New routine.
3509 (Build_Final_List): Removed.
3510 (Build_Finalization_Collection): New routine. A core procedure which
3511 creates a collection to service heap allocated controlled objects
3512 associated with an access-to-controlled type.
3513 (Build_Finalize_Statements): Create the finalization statements for a
3515 (Build_Finalizer): New routine. A core procedure which given any
3516 construct with declarations and/or statements detects all objects which
3517 need any type of clean up (controlled objects, protected objects) and
3518 generates all necessary code to clean up the said objects in the proper
3520 (Build_Finalizer_Call): New routine.
3521 (Build_Initialize_Statements): Create the initialization statements for
3522 an array type. The generated routine contains code to finalize partially
3524 (Build_Object_Declarations): New routine.
3525 (Build_Raise_Statement): New routine.
3526 (Clean_Simple_Protected_Objects): Removed.
3527 (Controller_Component): Removed.
3528 (Enclosing_Function): New routine.
3529 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3530 either declarations or statements or both.
3531 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3532 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3534 (Find_Final_List): Removed.
3535 (Global_Flist_Ref): Removed.
3536 (In_Finalization_Root): Removed.
3537 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3538 scope in terms of tree nodes. Process all transient variables within
3540 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3541 generated after the adjust.
3542 (Make_Attach_Call): Removed.
3543 (Make_Call): New routine.
3544 (Make_Clean): Removed.
3545 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3547 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3549 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3551 (Make_Final_Call): Modified to simply create a call to either
3552 Deep_Finalize or Finalize.
3553 (Make_Finalize_Address_Body): New routine.
3554 (Make_Finalize_Address_Stmts): New routine. A function which produces
3555 TSS primitive Finalize_Address used in conjunction with heap allocated
3557 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3558 (Make_Init_Call): Rewritten. There is no longer an attach call
3559 generated after initialization.
3560 (Make_Local_Deep_Finalize): New routine.
3561 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3562 (Make_Transient_Block): Remove the finalization list retrieval and
3564 (Needs_Finalization): Moved to Exp_Util.
3565 (Parent_Field_Type): New routine.
3566 (Preprocess_Components): New routine.
3567 (Process_Transient_Objects): New routine.
3568 (Wrap_HSS_In_Block): New routine.
3569 (Wrap_Transient_Declaration): Remove finalization list management and
3570 controller insertion.
3571 (Wrap_Transient_Expression): Code reformatting.
3572 (Wrap_Transient_Statement): Code reformatting.
3573 * exp_ch7.ads (Build_Final_List): Removed.
3574 (Build_Finalization_Collection): New routine.
3575 (Build_Raise_Statement): New routine.
3576 (Controller_Component): Removed.
3577 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3578 (Find_Final_List): Removed.
3579 (In_Finalization_Root): Removed.
3580 (Is_Simple_Protected_Type): Update related comment.
3581 (Make_Adjust_Call): New parameter profile and associated comments.
3582 (Make_Attach_Call): Removed.
3583 (Make_Final_Call): New parameter profile and associated comments.
3584 (Make_Finalize_Address_Body): New routine.
3585 (Make_Init_Call): New parameter profile and associated comments.
3586 (Make_Local_Deep_Finalize): New routine.
3587 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3588 (Needs_Finalization): Moved to Exp_Util.
3589 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3590 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3591 (Find_Protection_Type): Moved to Exp_Util.
3592 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3593 (Make_DT): Update sequence of dispatch table initialization. Remove the
3594 initialization of field RC_Offset. Add initialization of field Needs_
3596 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3597 Reimplement how an object is first finalized, then deallocated.
3598 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3600 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3601 Register TSS_Finalize_Address with type TSS_Names.
3602 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3603 procedure provides the interface between an allocation / deallocation
3604 and the support machinery in Ada.Finalization.Heap_Management.
3605 (Find_Init_Call): Code reformatting.
3606 (Find_Init_Call_In_List): Code reformatting.
3607 (Find_Protection_Type): Moved from Exp_Ch9.
3608 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3609 (Has_Controlled_Coextensions): Removed.
3610 (Has_Controlled_Objects): New routine.
3611 (In_Library_Level_Package_Body): New routine.
3612 (Insert_Action_After): New routine.
3613 (Is_Finalizable_Transient): New routine. This predicate determines
3614 whether an object declaration is one of the many variants of controlled
3616 (Is_Null_Access_BIP_Func_Call): New routine.
3617 (Is_Non_BIP_Func_Call): New routine.
3618 (Is_Related_To_Func_Return): New routine.
3619 (Needs_Finalization): Moved from Exp_Ch7.
3620 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3621 (Find_Protection_Type): Moved from Exp_Ch9.
3622 (Has_Controlled_Coextensions): Removed.
3623 (Has_Controlled_Objects): New routine.
3624 (In_Library_Level_Package_Body): New routine.
3625 (Insert_Action_After): New routine.
3626 (Is_Finalizable_Transient): New routine.
3627 (Is_Null_Access_BIP_Func_Call): New routine.
3628 (Is_Non_BIP_Func_Call): New routine.
3629 (Is_Related_To_Func_Return): New routine.
3630 (Needs_Finalization): Moved from Exp_ch7.
3631 * expander.adb (Expand): Add a case for N_Free_Statement.
3632 * freeze.adb (Freeze_All): Replace the generation of a finalization
3633 list with a collection for access-to-controlled types.
3634 (Freeze_Entity): Code reformatting.
3635 (Freeze_Record_Type): Remove the freezing of a record controller
3637 (Freeze_Subprogram): Code reformatting.
3638 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3640 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3641 has a library-level finalizer.
3642 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3643 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3644 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3645 files. Add a-fihema to the list of object files.
3647 Alphabetize the associations in type Is_Parameterless_Attribute.
3648 * rtsfind.ads: Ada.Finalization_List.Controller and
3649 System.Finalization_Implementation are no longer a GNAT unit.
3650 Update the range of type Ada_Finalization_Child. Remove the following
3651 recoverable entities:
3653 RE_Attach_To_Final_List
3657 RE_Finalizable_Ptr_Ptr
3658 RE_Global_Final_List
3659 RE_Limited_Record_Controller
3662 RE_Record_Controller
3663 RE_Simple_List_Controller
3665 Add the following recoverable entities:
3667 RE_Add_Offset_To_Address
3671 RE_Exception_Identity
3672 RE_Finalization_Collection
3673 RE_Finalization_Collection_Ptr
3674 RE_Needs_Finalization
3675 RE_Save_Library_Occurrence
3676 RE_Set_Finalize_Address_Ptr
3677 RE_Set_Storage_Pool_Ptr
3679 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3681 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3682 (First_Stored_Discriminant): Remove the mention of Name_uController.
3683 * sem_aux.ads: Comment reformatting.
3684 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3685 to redecorate an already existing class-wide type.
3686 (Decorate_Tagged_Type): New parameter profile and associated comment.
3687 Create a "shadow class-wide type" for a shadow entity.
3688 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3689 of the final chain along with the associated comment.
3690 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3691 Full_Desig and set it to the full view of the designated type.
3692 Initialize the finalization collection to empty.
3693 (Build_Derived_Record_Type): Alphabetize local variables. Code
3695 (Collect_Fixed_Components): Remove the mention of Name_uController.
3696 (Create_Constrained_Components): Remove the mention of Name_uController.
3697 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3698 class-wide type of a shadow entity.
3699 (Process_Full_View): Update the machinery which marks type
3700 Limited_Controlled's entity as limited.
3701 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3702 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3703 list, instead make a collection build-in-place formal.
3704 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3705 a designated type in order to establish a match between the renaming
3706 and the renamed entity.
3707 (Find_Selected_Component): Add guard to prevent spurious exceptions
3708 from being raised on .NET/JVM.
3709 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3710 to the list of primitive that need special processing. Update arrays
3711 C_Names and D_Names.
3712 (Replace_Types): Handle class-wide types.
3713 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3714 different parameter profile, look at the first formal.
3715 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3716 use clauses for Exp_Util.
3717 * sem_res.adb: Remove with and use clauses for Elists.
3718 (Propagate_Coextensions): Removed.
3719 (Resolve_Allocator): Do not propagate the list of coextensions from one
3720 allocator to another.
3721 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3722 Deaccessed_T to Desig_Typ.
3723 (Enter_Name): Remove the mention of Name_uController.
3724 (Gather_Components): Remove the mention of Name_uController.
3725 (Incomplete_Or_Private_View): New routine.
3726 (Is_Coextension_Root): Removed.
3727 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3728 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3729 (Is_Coextension_Root): Removed.
3730 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3731 Controlled types are now derived from a null tagged record. Remove
3732 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3733 * sinfo.adb (Coextensions): Removed.
3734 (Set_Coextensions): Removed.
3735 * sinfo.ads: Remove Coextensions from the explanation of node fields
3736 and its uses in nodes.
3737 Update the field usage of N_Allocator.
3738 (Coextensions): Removed along with its pragma Inline.
3739 (Set_Coextensions): Removed along with its pragma Inline.
3740 * snames.ads-tmpl: Remove names
3745 Name_uLocal_Final_List
3746 Name_Finalization_Root
3753 Name_Finalize_Address
3754 * s-pooglo.adb (Allocate): Add overriding indicator.
3755 (Deallocate): Add overriding indicator.
3756 (Storage_Size): Add overriding indicator.
3757 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3758 than Finalize_Global_List.
3759 (Null_Finalize_Global_List): Removed.
3760 (Save_Library_Occurrence): New routine.
3761 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3762 initialization. Add variable Finalize_Library_Objects along with its
3763 pragma Export. Add variables Library_Exception and
3764 Library_Exception_Set along with their pragma Export.
3765 (Null_Finalize_Global_List): Removed.
3766 (Save_Library_Occurrence): New routine.
3767 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3768 rather than Finalize_Global_List.
3769 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3770 of the constructed node.
3772 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3774 * link.c: Include "auto-host.h" before system headers.
3776 2011-08-03 Vincent Celier <celier@adacore.com>
3778 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3779 that are not extended. Do not check if a library project that is
3780 extended should be regenerated. Do not add to table Library_Paths the
3781 libraries that are in extended projects. Link only with libraries that
3782 are in libray projects that are not extended.
3783 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3784 for a library project that is extended.
3786 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3788 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3789 conforming subprogram renamings that appear to be completions if they
3790 are not fully conformant.
3791 Such renamings are homographs but not completions.
3792 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3793 names in a subprogram renaming that appears in an instance.
3795 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3797 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3798 not immutably limited, build actual subtype from expression to provide
3799 proper bounds to caller.
3801 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3803 * sem_ch8.adb: Minor comment correction.
3805 2011-08-03 Thomas Quinot <quinot@adacore.com>
3807 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3808 returning a limited array, use an extended return statement.
3810 2011-08-03 Vincent Celier <celier@adacore.com>
3812 * make.adb (Initialize): If --subdirs= is used, but no project file is
3813 specified, attempt to create the specify subdir if it does not already
3814 exist and use it as the object directory as if -D had been specified.
3816 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3818 * s-tpopsp-vms.adb: New file.
3819 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3820 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3822 2011-08-03 Emmanuel Briot <briot@adacore.com>
3824 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3827 2011-08-03 Yannick Moy <moy@adacore.com>
3829 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3830 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3831 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3832 detect that an array has static bounds.
3834 2011-08-03 Thomas Quinot <quinot@adacore.com>
3836 * exp_dist.adb: Minor reformatting.
3838 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3840 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3841 (ATCB_Key): Removed, not always used.
3843 2011-08-03 Emmanuel Briot <briot@adacore.com>
3845 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3846 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3847 most remaining global variables.
3849 2011-08-03 Robert Dewar <dewar@adacore.com>
3851 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3852 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3855 2011-08-03 Javier Miranda <miranda@adacore.com>
3857 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3858 that must be passed by copy in VM targets.
3860 2011-08-03 Emmanuel Briot <briot@adacore.com>
3862 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3863 duplicates a similar htable now in the project tree.
3865 2011-08-03 Claire Dross <dross@adacore.com>
3867 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3868 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3869 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3870 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3871 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3872 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3873 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3876 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3878 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3879 (ATCB_Key): Removed, not always used.
3880 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3882 * s-tpopsp-tls.adb: New file.
3883 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3884 x86/x64/ia64/powerpc/sparc Linux.
3886 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3888 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3889 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3891 2011-08-03 Thomas Quinot <quinot@adacore.com>
3893 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3894 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3895 Fix type selection for mapping integer types to PolyORB types.
3897 2011-08-03 Bob Duff <duff@adacore.com>
3899 * sem_ch7.adb: Minor comment clarification.
3901 2011-08-03 Bob Duff <duff@adacore.com>
3903 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3904 an error analyzing a choice, skip further processing. Further
3905 processing could cause a crash or cascade errors.
3907 2011-08-03 Emmanuel Briot <briot@adacore.com>
3909 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3910 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3911 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3912 prj-env.ads (Shared_Project_Tree_Data): new type
3913 An aggregate project and its aggregated trees need to share the common
3914 data structures used for lists of strings, packages,... This makes the
3915 code simpler since otherwise we have to pass the root tree (also used
3916 for the configuration file data) in addition to the current project
3917 tree. This also avoids ambiguities as to which tree should be used.
3918 And finally this saves a bit of memory.
3919 (For_Every_Project_Imported): new parameter Tree.
3920 Since aggregated projects are using a different tree, we need to let
3921 the caller know which tree to use to manipulate the returned project.
3923 2011-08-03 Robert Dewar <dewar@adacore.com>
3925 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3926 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3927 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3928 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3930 2011-08-03 Javier Miranda <miranda@adacore.com>
3932 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3933 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3935 2011-08-03 Bob Duff <duff@adacore.com>
3937 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3940 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3942 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3943 g-sehash.ads: Fix typo. Update header.
3945 2011-08-03 Thomas Quinot <quinot@adacore.com>
3947 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3950 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3952 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3953 prefixes of private types along with records, since the selector may be
3955 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3956 private types along with records, since the selector may be a
3959 2011-08-03 Emmanuel Briot <briot@adacore.com>
3961 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
3963 2011-08-03 Javier Miranda <miranda@adacore.com>
3965 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3966 Tagged_Type_Expansion.
3968 2011-08-03 Yannick Moy <moy@adacore.com>
3970 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3971 violation when the argument of concatenation is the name of a
3974 2011-08-03 Emmanuel Briot <briot@adacore.com>
3976 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3977 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3978 (Process_Declarative_Items): new parameter Child_Env.
3980 2011-08-03 Yannick Moy <moy@adacore.com>
3982 * alfa.ads: Update format of ALFA section in ALI file in order to
3983 add a mapping from bodies to specs when both are present.
3984 (ALFA_Scope_Record): Add components for spec file/scope.
3985 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3987 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3988 collected, fill in the spec information when relevant.
3989 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
3992 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3994 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3995 code unit to decide whether to add internally generated subprograms.
3997 2011-08-03 Javier Miranda <miranda@adacore.com>
3999 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
4000 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
4001 be handled by copy in VM targets.
4003 2011-08-03 Emmanuel Briot <briot@adacore.com>
4005 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
4006 code with Makeutl.Get_Switches.
4007 * prj-tree.adb: Update comment.
4009 2011-08-03 Thomas Quinot <quinot@adacore.com>
4011 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
4012 subprogram with a limited formal that does not support external
4015 2011-08-03 Yannick Moy <moy@adacore.com>
4017 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
4019 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
4020 not from current unit in two phases, because it is not possible to
4021 change the table while iterating over its content.
4022 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
4024 2011-08-03 Sergey Rybin <rybin@adacore.com>
4026 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
4027 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
4029 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4031 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
4032 and the component type is composite, this is ambiguous for predefined
4033 concatenation, but if the node is not overloaded and the entity is a use
4034 -defined function its profile can be used to resolve that aggregate.
4036 2011-08-03 Robert Dewar <dewar@adacore.com>
4038 * exp_ch4.adb: Minor code cleanup.
4040 2011-08-03 Thomas Quinot <quinot@adacore.com>
4042 * exp_dist.adb: Do not generate distribution stubs if serious errors
4043 have been diagnosed.
4045 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4047 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
4048 the first formal of a primitive operation, go to the base type to
4049 handle properly an access to a derived type with constrained
4051 * sem_type.adb (Disambiguate): an immediately visible operator hides a
4052 user-defined function that is only use-visible.
4054 2011-08-03 Robert Dewar <dewar@adacore.com>
4056 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
4057 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
4058 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
4059 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
4060 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
4061 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
4062 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
4063 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
4065 2011-08-03 Robert Dewar <dewar@adacore.com>
4067 * repinfo.adb (List_Mechanism): Add handling of
4068 Convention_Ada_Pass_By_XXX.
4069 * sem_mech.adb (Set_Mechanism): Ditto.
4070 * sem_prag.adb (Process_Convention): Add entries for
4071 Convention_Ada_Pass_By_XXX.
4072 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
4074 2011-08-03 Pascal Obry <obry@adacore.com>
4076 * makeutl.adb: Minor reformatting.
4078 2011-08-03 Vincent Celier <celier@adacore.com>
4081 (Get_File_Name) If the file cannot be found when there are no config
4082 pragmas file and May_Fail is True, return No_File instead of the file
4083 name, to be consistent.
4085 2011-08-03 Pascal Obry <obry@adacore.com>
4087 * adaint.c (__gnat_is_executable_file_attr): Avoid access
4090 2011-08-03 Javier Miranda <miranda@adacore.com>
4093 (Same_Representation): In VM targets the representation of arrays with
4094 aliased components differs from arrays with non-aliased components.
4096 2011-08-03 Emmanuel Briot <briot@adacore.com>
4098 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
4099 not systematically lower case attribute indexes that contain no "."
4100 Fix definition of several Naming attributes, which take
4101 a unit name as index and therefore should be case insensitive.
4102 Minor refactoring (reduce length of variable names).
4104 2011-08-03 Emmanuel Briot <briot@adacore.com>
4106 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
4108 2011-08-03 Emmanuel Briot <briot@adacore.com>
4110 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
4111 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
4112 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
4113 prj-tree.ads (Prj.Tree.Environment): new type.
4115 2011-08-03 Emmanuel Briot <briot@adacore.com>
4117 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
4118 prj-tree.adb, prj-tree.ads (Environment): new type.
4120 2011-08-03 Emmanuel Briot <briot@adacore.com>
4122 * prj-tree.ads: Remove unused variable.
4124 2011-08-03 Yannick Moy <moy@adacore.com>
4126 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
4127 issuing messages related to SPARK restriction violation.
4129 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4131 * sem_ch6.adb: guard against error nodes in return statements.
4133 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4135 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
4136 a warning can only appear on a configuration file, so emit warning
4137 without further checks.
4139 2011-08-03 Arnaud Charlet <charlet@adacore.com>
4141 * s-interr.ads: add overriding keyword.
4143 2011-08-03 Geert Bosch <bosch@adacore.com>
4145 * exp_attr.adb: Fix minor typo.
4147 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4149 * par-ch4.adb: improve error recovery.
4151 2011-08-03 Emmanuel Briot <briot@adacore.com>
4153 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
4154 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
4157 2011-08-03 Emmanuel Briot <briot@adacore.com>
4159 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
4160 "external" as an attribute name in aggregate projects.
4162 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4164 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
4165 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
4166 from 0, so we need to adjust.
4168 2011-08-03 Emmanuel Briot <briot@adacore.com>
4170 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
4171 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
4173 2011-08-03 Yannick Moy <moy@adacore.com>
4175 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
4176 restriction on overloaded entity if the entity is not an operator.
4178 2011-08-03 Yannick Moy <moy@adacore.com>
4180 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
4181 restrict.ads: Rename remaining Check_Formal_Restriction* into
4182 Check_SPARK_Restriction*.
4184 2011-08-03 Emmanuel Briot <briot@adacore.com>
4186 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
4187 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
4189 (Project_Empty): removed
4190 (Empty_Project): new parameter Qualifier
4191 This is used to have fields specific to aggregate projects, cleaner
4192 New field to store the list of aggregated projects.
4193 (Check_Aggregate_Project): removed
4194 (Process_Aggregated_Projects, Free): new subprograms.
4196 2011-08-03 Olivier Hainque <hainque@adacore.com>
4198 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
4200 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4202 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
4203 explicit dereference of an unconstrained type, create a constrained
4204 subtype for it, as is done for function calls that return an
4207 2011-08-03 Thomas Quinot <quinot@adacore.com>
4209 * g-pehage.adb (Finalize): Avoid possible double-free.
4211 2011-08-03 Steve Baird <baird@adacore.com>
4213 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
4214 Elab_Spec/Body attrs in CodePeer_Mode.
4216 2011-08-03 Javier Miranda <miranda@adacore.com>
4218 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
4219 low bound is not known at compile time but they have no others choice.
4220 Done because in this case the bounds can be obtained directly from the
4223 2011-08-03 Ed Falis <falis@adacore.com>
4225 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
4226 on VxWorks SMP. Remove unusable constant ANY_CPU.
4228 2011-08-03 Emmanuel Briot <briot@adacore.com>
4230 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
4231 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
4232 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
4233 Prj.Env.Initialize_Empty): new subprograms
4234 (Get_Env, Find_Project): remove parameter Target_Name.
4236 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4238 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
4239 as a condition for the delayed call to Derived_Subprograms done for the
4240 case of the rewriting of a derived type that constrains the
4241 discriminants of its parent type.
4242 Avoids redundant subprogram derivations for private subtype derivations.
4244 2011-08-03 Javier Miranda <miranda@adacore.com>
4246 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
4247 Build_Record_Aggr_Code.
4248 (Build_Record_Aggr_Code): Add missing support to initialize hidden
4249 discriminants in extension aggregates.
4251 2011-08-03 Emmanuel Briot <briot@adacore.com>
4253 * prj-pp.adb (Print): also output project qualifiers, since in
4254 particular "aggregate" is mandatory in an aggregate project.
4256 2011-08-03 Emmanuel Briot <briot@adacore.com>
4258 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
4259 (Debug_Output): new function.
4261 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4263 * gnat_ugn.texi: Document -Wstack-usage.
4264 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
4266 2011-08-03 Thomas Quinot <quinot@adacore.com>
4268 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
4269 have keyword LIMITED.
4271 2011-08-03 Yannick Moy <moy@adacore.com>
4273 * alfa.adb, alfa.ads, alfa_test.adb: New files.
4274 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
4275 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
4276 section (does not happen in compiler, only if code directly calls
4278 * get_alfa.adb, get_alfa.ads: New files.
4279 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
4281 * lib-xref-alfa.adb: New file.
4282 * lib-xref.adb, lib-xref.ads
4283 (Xref_Entry): redefine information needed in cross-references for ALFA.
4284 Push ALFA treatments in separated local package.
4285 (Enclosing_Subpragram_Or_Package): treat specially subprogram
4286 identifiers. Return entity of package body instead of spec. Return
4287 Empty for a scope with no location.
4288 (Generate_Reference): adapt to new components for ALFA information.
4289 Remove the need for D references on definitions.
4290 (Is_Local_Reference): moved to ALFA local package
4291 (Output_References): extract subfunction as Extract_Source_Name
4292 (Output_Local_References): remove procedure, replaced by filtering of
4293 cross-references in package ALFA and printing in Put_ALFA.
4294 (Write_Entity_Name): remove procedure
4295 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
4296 print exact name of entity as it appears in source file
4297 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
4298 * put_alfa.adb, put_alfa.ads: New files.
4299 * xref_lib.adb (Search_Xref): protect read of cross-references against
4300 reading other sections of the ALI file, in gnatxref
4301 (Search): protect read of cross-references against reading other
4302 sections of the ALI file, in gnatfind.
4303 * gcc-interface/Make-lang.in: Update dependencies.
4305 2011-08-03 Thomas Quinot <quinot@adacore.com>
4307 * sem_ch3.adb: Minor reformatting.
4309 2011-08-03 Jose Ruiz <ruiz@adacore.com>
4311 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
4312 raising an exception.
4314 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4316 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
4317 type, always use 1 as the lower bound or string, even if lower bound of
4318 context is not static, to handle properly null strings in a non-static
4321 2011-08-03 Bob Duff <duff@adacore.com>
4323 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4324 always legal on the right-hand side of an assignment statement; there
4325 is always an applicable index constraint in this case. Therefore, the
4326 check for Pkind = N_Assignment_Statement is now unconditional -- it
4327 doesn't depend on whether Is_Constrained (Typ).
4329 2011-08-03 Robert Dewar <dewar@adacore.com>
4331 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4333 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4335 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4336 for an itype created within a generic unit.
4338 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4340 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4341 suppresses all inlining.
4343 2011-08-03 Robert Dewar <dewar@adacore.com>
4345 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4346 exp_aggr.adb: Minor reformatting.
4348 2011-08-03 Thomas Quinot <quinot@adacore.com>
4350 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4351 tagged assignment when discriminant checks are suppressed. This is
4352 useless and extremely costly in terms of static stack usage.
4354 2011-08-03 Bob Duff <duff@adacore.com>
4356 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4357 of generics, because this leads to the wrong entity in the wrong scope,
4358 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4360 (Process_Interface_Name): Follow Alias for instances of generics, to
4361 correct for the above change.
4363 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4365 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4366 is an integer literal it is always safe to replace the reference. In
4367 addition, if the reference appears in the generated code for an object
4368 declaration it is necessary to copy because otherwise the reference
4369 might be to the uninitilized value of the discriminant of the object
4372 2011-08-03 Pascal Obry <obry@adacore.com>
4374 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4375 ACL used, in this case we want to check for ending .exe, not .exe
4376 anywhere in the path.
4378 2011-08-03 Sergey Rybin <rybin@adacore.com>
4380 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4381 the tree structure (semantic decoration of references to record
4384 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4386 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4387 choices of a named array aggregate, bail out when any choices are
4388 marked as Errors_Posted.
4390 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4392 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4393 in which entity is frozen, to handle properly loop variables in
4396 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4398 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4399 subtype is not static, compute the upper bound using attributes, to
4400 handle properly index types that are not integer types.
4402 2011-08-03 Bob Duff <duff@adacore.com>
4404 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4405 Update copyright notice.
4407 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4409 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4410 Original_Discriminant if within an instance.
4411 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4413 2011-08-03 Thomas Quinot <quinot@adacore.com>
4415 * einfo.ads: Minor reformatting.
4417 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4419 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4420 composite type with an unfrozen subcomponent, in the profile of a
4421 primitive operation.
4423 2011-08-03 Robert Dewar <dewar@adacore.com>
4425 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4427 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4429 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4430 unconstrained type with discriminants is initialized with an aggregate,
4431 use the constrained subtype of the aggregate as the type of the object,
4432 because it is immutable, and this allows the back-end to generate no
4433 code for the object declaration.
4435 2011-08-03 Robert Dewar <dewar@adacore.com>
4437 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4438 comparison operand is variable, and turns out to be zero or negative.
4440 2011-08-03 Javier Miranda <miranda@adacore.com>
4443 (Expand_Dispatching_Constructor_Call): Disable expansion of
4444 code required for native targets. Done to avoid generating
4445 references to unavailable runtime entities in VM targets.
4447 (Expand_N_Object_Declaration): Add missing support to handle
4448 the explicit initialization of class-wide interface objects.
4451 2011-08-03 Matthew Heaney <heaney@adacore.com>
4453 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4455 2011-08-03 Matthew Heaney <heaney@adacore.com>
4457 * a-cbdlli.adb (Splice): move source items from first to last
4459 2011-08-03 Yannick Moy <moy@adacore.com>
4461 * sem_util.ads: comment added.
4463 2011-08-03 Javier Miranda <miranda@adacore.com>
4466 (Expand_Record_Aggregate): In VM targets disable the expansion into
4467 assignments of aggregates whose type is not known at compile time.
4469 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4471 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4472 protected entries and task entries, to build the proper renaming
4473 declaration for entry formals, used in debugging.
4474 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4475 parameters in the same way.
4477 2011-08-02 Robert Dewar <dewar@adacore.com>
4479 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4480 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4481 code reorganization.
4483 2011-08-02 Robert Dewar <dewar@adacore.com>
4485 * debug.adb: Debug flag d.P to suppress length comparison optimization
4486 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4487 comparison of Length by comparing First/Last instead.
4489 2011-08-02 Matthew Heaney <heaney@adacore.com>
4491 * a-cobove.ads: Code clean up.
4493 2011-08-02 Vincent Celier <celier@adacore.com>
4495 * adaint.c (file_names_case_sensitive_cache): New static int.
4496 (__gnat_get_file_names_case_sensitive): Cache the return value in
4497 file_names_case_sensitive_cache at the first invocation, to avoid
4498 multiple calls to getenv.
4500 2011-08-02 Bob Duff <duff@adacore.com>
4502 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4504 2011-08-02 Yannick Moy <moy@adacore.com>
4506 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4507 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4508 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4509 indicate that we are in a precondition or postcondition. This is used in
4510 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4511 decide whether to flag the spec or body of the current subprogram as
4514 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4516 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4518 * a-extiin.ads: New file.
4520 2011-08-02 Bob Duff <duff@adacore.com>
4522 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4523 now raises Name_Error instead of Use_Error in certain cases. The other
4524 parts of this AI were already implemented properly.
4526 2011-08-02 Vincent Celier <celier@adacore.com>
4528 * link.c: Only import "auto-host.h" when building the gnattools.
4530 2011-08-02 Yannick Moy <moy@adacore.com>
4532 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4533 which calls a local subprogram, so extract subprogram
4534 from Mark_Non_ALFA_Subprogram_Body.
4536 2011-08-02 Javier Miranda <miranda@adacore.com>
4539 (Extract_Dispatching_Call): If the type of the dispatching object is an
4540 access type then return an explicit dereference in the Object out-mode
4543 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4545 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4546 compatibility checks for all indexes of an array subtype, not just the
4547 first. Reset Has_Dynamic_Range_Check on the subtype before each
4548 potential check to ensure that Insert_Range_Checks will not elide any
4549 of the dynamic checks.
4551 2011-08-02 Yannick Moy <moy@adacore.com>
4553 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4554 SPARK restriction at parsing time.
4555 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4556 directive only if the SPARK restriction is set for this unit.
4558 2011-08-02 Yannick Moy <moy@adacore.com>
4560 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4561 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4562 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4563 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4564 Mark_Non_ALFA_Subprogram_Body.
4565 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4568 2011-08-02 Yannick Moy <moy@adacore.com>
4570 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4573 2011-08-02 Robert Dewar <dewar@adacore.com>
4575 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4576 exp_ch3.adb: Minor reformatting.
4578 2011-08-02 Emmanuel Briot <briot@adacore.com>
4580 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4581 files, not any regular file.
4582 (__gnat_locate_file_with_predicate): new subprogram.
4584 2011-08-02 Yannick Moy <moy@adacore.com>
4586 * sinfo.adb, sinfo.ads: Restrict the use of flags
4587 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4588 nodes, plus N_Subtype_Declaration for the 2nd one.
4590 2011-08-02 Sergey Rybin <rybin@adacore.com>
4592 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4593 - fix bugs in the description of Source_Trace;
4594 - get rid of UNIT_NAME;
4596 2011-08-02 Javier Miranda <miranda@adacore.com>
4599 (Build_Dispatching_Requeue): Adding support for VM targets
4600 since we cannot directly reference the Tag entity.
4601 * exp_sel.adb (Build_K): Adding support for VM targets.
4602 (Build_S_Assignment): Adding support for VM targets.
4604 (Default_Prim_Op_Position): In VM targets do not restrict availability
4605 of predefined interface primitives to compiling in Ada 2005 mode.
4606 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4607 restricted to compiling in Ada 2005 mode.
4608 (Make_VM_TSD): Generate code that declares and initializes the OSD
4609 record. Needed to support dispatching calls through synchronized
4612 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4613 primitives associated with synchronized interfaces.
4614 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4615 primitives associated with synchronized interfaces.
4617 2011-08-02 Yannick Moy <moy@adacore.com>
4619 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4620 statements hidden in SPARK if preceded by the HIDE directive
4621 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4622 exception handlers as hidden in SPARK if preceded by the HIDE directive
4623 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4624 if starting with the HIDE directive
4625 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4626 starting with the HIDE directive; mark the declarations in a private
4627 part as hidden in SPARK if the private part starts with the HIDE
4629 * restrict.adb, restrict.ads
4630 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4631 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4632 argument node belongs to a part which is hidden in SPARK
4633 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4634 parts in SPARK; protect the possibly costly call to
4635 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4636 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4637 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4638 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4640 (Scan): recognize special comment starting with '#' and followed by
4641 SPARK keyword "hide" as a HIDE directive.
4643 2011-08-02 Yannick Moy <moy@adacore.com>
4645 * types.ads, erroutc.ads: Minor reformatting.
4647 2011-08-02 Vincent Celier <celier@adacore.com>
4649 * link.c: Add response file support for cross platforms.
4651 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4653 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4654 in an association, set parent field of copy before partial analysis.
4655 * sem_res.adb (Resolve_Slice): create reference to itype only when
4656 expansion is enabled.
4658 2011-08-02 Yannick Moy <moy@adacore.com>
4660 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4661 for new flag denoting which subprogram bodies are in ALFA
4662 * restrict.adb, sem_ch7.adb: Update comment
4663 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4664 sem_ch9.adb, sem_res.adb: Add calls to
4665 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4666 * sem_ch6.adb (Analyze_Function_Return): add calls to
4667 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4668 middle of the body, and extended return.
4669 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4670 False when missing return.
4671 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4672 to True for subprograms whose spec is in ALFA. Remove later on the flag
4673 on the entity used for a subprogram body when there exists a separate
4675 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4676 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4677 False, otherwise do nothing.
4679 2011-08-02 Robert Dewar <dewar@adacore.com>
4681 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4683 2011-08-02 Yannick Moy <moy@adacore.com>
4685 * sem_ch4.ads: minor formatting.
4687 2011-08-02 Yannick Moy <moy@adacore.com>
4689 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4690 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4691 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4692 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4693 opt.ads: cleanup of SPARK mode
4695 2011-08-02 Yannick Moy <moy@adacore.com>
4697 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4699 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4700 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4702 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4703 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4704 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4705 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4707 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4709 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4710 functions whose return type is not in ALFA.
4711 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4713 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4714 parameter's type is not in ALFA.
4715 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4718 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4720 * sem_ch6 (Analyze_Expression_Function): treat the function as
4721 Inline_Always, and introduce a subprogram declaration for it when it is
4723 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4724 expression functions, so that the back-end can determine whether they
4725 can in fact be inlined.
4726 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4727 a function body comes from an expression function.
4729 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4731 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4732 null exclusions to test Can_Never_Be_Null on the anonymous access types
4733 of the formals rather than testing the formals themselves. Exclude this
4734 check in cases where the Old_Formal is marked as a controlling formal,
4735 to avoid issuing spurious errors for bodies completing dispatching
4736 operations (due to the flag not getting set on controlling access
4737 formals in body specs).
4738 (Find_Corresponding_Spec): When checking full and subtype conformance of
4739 subprogram bodies in instances, pass Designated and E in that order, for
4740 consistency with the expected order of the formals (New_Id followed by
4743 2011-08-02 Robert Dewar <dewar@adacore.com>
4745 * sem_ch8.adb: Minor reformatting.
4747 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4749 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4750 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4751 primitive operations of class-wide actuals.
4753 2011-08-02 Javier Miranda <miranda@adacore.com>
4755 * exp_atag.ads, exp_atag.adb
4756 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4757 since its value is implicitly passed in argument Typ.
4758 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4759 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4760 Build_Common_Dispatching_Select_Statements.
4762 2011-08-02 Robert Dewar <dewar@adacore.com>
4764 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4765 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4768 2011-08-02 Robert Dewar <dewar@adacore.com>
4770 * sem_res.adb: Minor reformatting.
4771 * sem_prag.adb: Minor reformatting.
4773 2011-08-02 Javier Miranda <miranda@adacore.com>
4775 * exp_atag.adb, exp_atags.ads
4776 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4777 by the tagged type Entity. Required to use this routine in the VM
4778 targets since we do not have available the Tag entity in the VM
4781 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4782 Ada.Tags has not been previously loaded.
4784 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4785 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4787 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4788 view of enclosing scopes. Required to handle enclosing scopes that
4789 are synchronized types whose full view is a task type.
4791 (Build_VM_TSDs): Minor code improvement to avoid generating and
4792 analyzing lists with empty nodes.
4793 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4794 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4795 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4796 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4797 (Make_Select_Specific_Data_Table): Add support for VM targets.
4798 (Make_VM_TSD): Generate code to initialize the SSD structure of
4801 2011-08-02 Yannick Moy <moy@adacore.com>
4803 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4804 cross-references section in ALI.
4805 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4806 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4808 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4809 subprogram or package entity of a node
4810 (Is_Local_Reference_Type): new function returns True for references
4811 selected in local cross-references.
4812 (Lt): function extracted from Lt in Output_References
4813 (Write_Entity_Name): function extracted from Output_References
4814 (Generate_Definition): generate reference with type 'D' for definition
4815 of objects (object declaration and parameter specification), with
4816 appropriate locations and units, for use in local cross-references.
4817 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4818 references of type 'I' for initialization in object definition.
4819 (Output_References): move part of function Lt and procedure
4820 Write_Entity_Name outside of the body. Ignore references of types 'D'
4821 and 'I' introduced for local cross-references.
4822 (Output_Local_References): new procedure to output the local
4823 cross-references sections.
4824 (Lref_Entity_Status): new array defining whether an entity is a local
4825 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4826 with 'I' type when initialization expression is present.
4827 * get_scos.adb, get_scos.ads: Correct comments and typos
4829 2011-08-02 Javier Miranda <miranda@adacore.com>
4831 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4833 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4835 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4838 2011-08-02 Vincent Celier <celier@adacore.com>
4840 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4841 (No_Space_Img): New function
4842 (Find_Excluded_Sources): When reading from a file, record the file name
4843 and the line number for each excluded source.
4844 (Mark_Excluded_Sources): When reporting an error, if the excluded
4845 sources were read from a file, include file name and line number in
4848 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4850 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4852 2011-08-02 Robert Dewar <dewar@adacore.com>
4854 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4856 2011-08-02 Javier Miranda <miranda@adacore.com>
4858 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4859 generation of TSDs to the DOTNET compiler.
4860 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4861 generation of TSDs to the DOTNET compiler.
4863 2011-08-02 Javier Miranda <miranda@adacore.com>
4865 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4866 record of all the tagged types declared inside library level package
4867 declarations, library level package bodies or library level subprograms.
4868 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4869 associated with a given tagged type.
4870 (Build_VM_TSDs): New subprogram.
4871 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4872 compilation units that are subprograms.
4873 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4874 compilation units that are package bodies.
4875 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4876 units that are a package declaration or a package instantiation.
4877 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4878 reorganization to improve the error generated by the frontend when the
4879 function Ada.Tags.Secondary_Tag is not available.
4880 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4881 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4883 2011-08-02 Javier Miranda <miranda@adacore.com>
4885 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4887 2011-08-02 Robert Dewar <dewar@adacore.com>
4889 * s-imenne.ads: Minor reformatting.
4891 2011-08-02 Robert Dewar <dewar@adacore.com>
4893 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4894 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4895 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4897 2011-08-02 Robert Dewar <dewar@adacore.com>
4899 * einfo.ads (Materialize_Entity): Document this is only for renamings
4900 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4901 required debug information in the case where we transform the object
4902 declaration into a renaming declaration.
4903 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4905 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4908 2011-08-02 Robert Dewar <dewar@adacore.com>
4910 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4911 Suppress_Init_Procs.
4912 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4913 Suppress_Initialization/Initialization_Suppressed.
4914 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4915 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4916 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4917 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4919 2011-08-02 Robert Dewar <dewar@adacore.com>
4921 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4924 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4926 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4927 only have inheritable classwide pre/postconditions.
4929 2011-08-02 Javier Miranda <miranda@adacore.com>
4931 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4932 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4933 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4934 checks if the external tag of a type is the same as the external tag
4935 of some other declaration.
4937 2011-08-02 Thomas Quinot <quinot@adacore.com>
4939 * s-taskin.ads: Minor reformatting.
4941 2011-08-02 Emmanuel Briot <briot@adacore.com>
4943 * g-comlin.adb (Display_Help): swap the order in which it prints the
4944 short help and the general usage.
4946 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4948 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4949 the aspect declarations and attach them to the generic copy for
4950 subsequent analysis.
4951 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4952 declarations of the generic tree to the new subprogram declarations.
4953 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4954 conditions that apply to a subprogram instance.
4956 2011-08-02 Robert Dewar <dewar@adacore.com>
4958 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4960 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4962 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4963 private type with a tagged full view is not derived in the immediate
4964 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4966 2011-08-02 Robert Dewar <dewar@adacore.com>
4968 * exp_ch4.adb: Minor reformatting.
4970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4972 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4973 Ada2012 iterator, the loop will be rewritten during expansion into a
4974 while loop with a cursor and an element declaration. Do not analyze the
4975 body in this case, because if the container is for indefinite types the
4976 actual subtype of the elements will only be determined when the cursor
4977 declaration is analyzed.
4979 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4981 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4982 size/alignment related attributes in CodePeer_Mode.
4984 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4986 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4987 Prepend_Element, since this can result in the operation getting the
4988 wrong slot in the full type's dispatch table if the full type has
4989 inherited operations. The incomplete type's operation will get added
4990 to the proper position in the full type's primitives
4991 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4992 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4993 dispatching operations, since there are cases where nonprimitive
4994 subprograms can get added to the list of incomplete dependents (such
4995 as subprograms in nested packages).
4996 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4997 private part when determining whether to add a primitive with a
4998 parameter of a tagged incomplete type to the Private_Dependents list.
4999 Such primitives can also occur in the visible part, and should not have
5000 been excluded from being private dependents.
5001 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
5002 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
5003 list of a Taft-amendment incomplete type is a primitive before issuing
5004 an error that the full type must appear in the same unit. There are
5005 cases where nonprimitives can be in the list (such as subprograms in
5007 * sem_disp.adb (Derives_From): Use correct condition for checking that
5008 a formal's type is derived from the type of the corresponding formal in
5009 the parent subprogram (the condition was completely wrong). Add
5010 checking that was missing for controlling result types being derived
5011 from the result type of the parent operation.
5013 2011-08-02 Yannick Moy <moy@adacore.com>
5015 * errout.adb (First_Node): minor renaming
5016 * restrict.adb (Check_Formal_Restriction): put restriction warning on
5019 2011-08-02 Yannick Moy <moy@adacore.com>
5021 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
5022 before accessing operands.
5023 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
5024 decide whether an initialization expression respects SPARK rules, as
5025 the plain node is the expanded one. This allows for more valid warnings
5027 * gnat_rm.texi: Minor update.
5029 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5031 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
5034 2011-08-02 Robert Dewar <dewar@adacore.com>
5036 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
5038 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5040 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
5041 loop statements and the element renaming declaration with a block when
5042 the element type is controlled.
5044 2011-08-02 Yannick Moy <moy@adacore.com>
5046 * sinfo.ads: Minor formatting.
5048 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5050 * sem_aggr.adb (Add_Association): if the association has a box and no
5051 expression, use the Sloc of the aggregate itself for the new
5053 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
5056 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5058 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
5059 When a container is provided via a function call, generate a renaming
5060 of the function result. This avoids the creation of a transient scope
5061 and the premature finalization of the container.
5062 * exp_ch7.adb (Is_Container_Cursor): Removed.
5063 (Wrap_Transient_Declaration): Remove the supression of the finalization
5064 of the list controller when the declaration denotes a container cursor,
5067 2011-08-02 Yannick Moy <moy@adacore.com>
5069 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
5070 node is from source, instead of the original node being from source.
5072 (Resolve_Array_Aggregate): refine the check for a static expression, to
5073 recognize also static ranges
5074 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
5075 Array_Type_Declaration): postpone the test for the type being a subtype
5076 mark after the type has been resolved, so that component-selection and
5077 expanded-name are discriminated.
5078 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
5079 to distinguish the case of an iteration scheme, so that an error is
5080 issed on a non-static range in SPARK except in an iteration scheme.
5081 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
5082 In_Iter_Schm = True.
5083 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
5084 user-defined operators so that they are allowed in renaming
5086 (Find_Selected_Component): refine the check for prefixing of operators
5087 so that they are allowed in renaming. Move the checks for restrictions
5088 on selector name after analysis discriminated between
5089 component-selection and expanded-name.
5090 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
5091 concatenation argument of string type if it is static.
5092 * sem_util.adb, sem_util.ads
5093 (Check_Later_Vs_Basic_Declarations): add a new function
5094 Is_Later_Declarative_Item to decice which declarations are allowed as
5095 later items, in the two different modes Ada 83 and SPARK. In the SPARK
5096 mode, add that renamings are considered as later items.
5097 (Enclosing_Package): new function to return the enclosing package
5098 (Enter_Name): correct the rule for homonyms in SPARK
5099 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
5100 from source (result of expansion) to avoid issuing wrong warnings.
5102 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5104 * errout.adb: On anything but an expression First_Node returns its
5107 2011-08-02 Pascal Obry <obry@adacore.com>
5109 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
5111 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5113 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
5114 Set the associated loop as the related expression of internally
5116 * exp_ch7.adb (Is_Container_Cursor): New routine.
5117 (Wrap_Transient_Declaration): Supress the finalization of the list
5118 controller when the declaration denotes a container cursor.
5120 2011-08-02 Yannick Moy <moy@adacore.com>
5122 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
5124 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
5125 expression is a simple expression. This check cannot be performed in
5126 the semantics, so just drop it.
5127 (P_Index_Or_Discriminant_Constraint): move check that the index or
5128 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
5129 semantics. Other cases were previously checked in the semantics.
5130 * par-ch4.adb (P_Name): move checks that a selector name is not
5131 character literal or an operator symbol to Find_Selected_Component in
5133 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
5134 declarations are not placed after later declarations in a separate
5135 procedure in Sem_Util (possibly not the best choice?), to be used both
5136 during parsing, for Ada 83 mode, and during semantic analysis, for
5138 * par-endh.adb (Check_End): move check that end label is not missing
5139 to Process_End_Label in the semantics
5140 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
5141 the special case for SPARK restriction
5142 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
5143 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
5144 parameter Force to issue the error message even on internal node (used
5145 for generated end label). Call Check_Restriction to check when an error
5146 must be issued. In SPARK mode, issue an error message even if the
5147 restriction is not set.
5148 (Check_Restriction): new procedure with an additional out parameter to
5149 inform the caller that a message has been issued
5150 * sem_aggr.adb: Minor modification of message
5151 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
5152 instead of issuing an error message directly
5153 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
5154 declarations are not placed after later declarations, by calling
5155 Check_Later_Vs_Basic_Declarations
5156 (Analyze_Subtype_Declaration): move here the check that an index or
5157 discriminant constraint must be a subtype mark. Change the check that
5158 a subtype of String must start at one so that it works on subtype marks.
5159 * sem_ch4.adb (Analyze_Call): move here the check that a named
5160 association cannot follow a positional one in a call
5161 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
5162 instead of issuing an error message directly
5163 * sem_ch8.adb (Find_Selected_Component): move here the check that a
5164 selector name is not a character literal or an operator symbol. Move
5165 here the check that the prefix of an expanded name cannot be a
5166 subprogram or a loop statement.
5167 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
5168 procedure called from parsing and semantics to check that basic
5169 declarations are not placed after later declarations
5170 (Process_End_Label): move here the check that end label is not missing
5172 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5174 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
5175 representation clause in codepeer mode, since it confuses CodePeer and
5176 does not bring useful info.
5178 2011-08-02 Ed Falis <falis@adacore.com>
5180 * init.c: initialize fp hw on MILS.
5182 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5184 * errout.adb (First_Node): for bodies, return the node itself (small
5185 optimization). For other nodes, do not check source_unit if the node
5186 comes from Standard.
5188 2011-08-02 Robert Dewar <dewar@adacore.com>
5190 * exp_ch3.adb: Minor comment additions.
5191 * sem_ch13.adb: Minor reformatting.
5193 2011-08-02 Pascal Obry <obry@adacore.com>
5195 * make.adb, makeutl.adb: Removes some superfluous directory separator.
5197 2011-08-02 Robert Dewar <dewar@adacore.com>
5199 * sem_attr.adb: Minor reformatting.
5201 2011-08-02 Robert Dewar <dewar@adacore.com>
5203 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
5204 (Has_Default_Component_Value): Removed
5205 * einfo.ads Comment updates
5206 (Has_Default_Aspect): Replaces Has_Default_Value
5207 (Has_Default_Component_Value): Removed
5209 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
5211 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
5212 (Get_Simple_Init_Val): Handle Default_Value aspect
5213 (Needs_Simple_Initialization): Handle Default_Value aspect
5214 * exp_ch3.ads: Needs_Simple_Initialization
5215 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
5216 * par-prag.adb (Pragma_Default[_Component]Value) Removed
5218 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
5219 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
5220 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
5222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5224 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
5225 package containing iteration primitives.
5226 exp_ch5.adb (Expand_Iterator_Loop): ditto.
5228 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5230 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
5231 "of", pre-analyze expression in case it is a function call with
5232 finalization actions that must be placed ahead of the loop.
5233 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
5234 on an Ada2012 iterator, insert them ahead of the rewritten loop.
5236 2011-08-02 Geert Bosch <bosch@adacore.com>
5238 * cstand.adb (Create_Float_Types): Only consider C's long double for
5239 Long_Long_Float, in addition to double.
5241 2011-08-02 Robert Dewar <dewar@adacore.com>
5243 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
5244 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
5245 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
5248 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5250 * sem_attr.adb: handle properly 'Result when it is a prefix of an
5253 2011-08-02 Javier Miranda <miranda@adacore.com>
5255 * einfo.ads, einfo.adb
5256 (Original_Access_Type): Move this attribute to Node26 since there was
5257 an undocumented use of Node21 in E_Access_Subprogram_Type entities
5258 which causes conflicts and breaks the generation of the .NET compiler.
5259 (Interface_Name): Add missing documentation on JGNAT only uses of
5262 2011-08-02 Geert Bosch <bosch@adacore.com>
5264 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
5265 (Find_Back_End_Float_Type): Likewise
5266 (Create_Back_End_Float_Types): Likewise
5267 (Create_Float_Types): Likewise
5268 (Register_Float_Type): Likewise
5269 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
5270 Nlist and split out type selection in new local Find_Base_Type function.
5271 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
5273 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
5275 2011-08-02 Robert Dewar <dewar@adacore.com>
5277 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
5279 * opt.ads: Minor comment change.
5280 * sem_ch12.adb: Minor code reorganization.
5282 2011-08-02 Gary Dismukes <dismukes@adacore.com>
5284 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
5285 subtype's list of rep items to the list on the full subtype in the case
5286 where the lists are the same.
5288 2011-08-02 Geert Bosch <bosch@adacore.com>
5290 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
5291 using the one from System.Strings, which also deallocates all strings.
5293 2011-08-02 Geert Bosch <bosch@adacore.com>
5295 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
5297 * gcc-interface/Make-lang.in: Update dependencies.
5299 2011-08-02 Olivier Hainque <hainque@adacore.com>
5301 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
5304 2011-08-02 Javier Miranda <miranda@adacore.com>
5306 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
5307 associated with anonymous access to subprograms.
5309 2011-08-02 Geert Bosch <bosch@adacore.com>
5312 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
5313 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
5314 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
5315 (Add_Symbol_Definition): Move to switch-c.adb
5316 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
5317 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5318 (Add_Symbol_Definition): Move to switch-c.adb.
5319 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5321 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5323 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5324 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5326 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5327 (Add_Symbol_Definition): Moved from Prepcomp.
5328 * switch-c.ads: Update copyright notice. Use String_List instead of
5329 Argument_List, removing dependency on System.OS_Lib.
5331 2011-08-02 Yannick Moy <moy@adacore.com>
5333 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5334 mode on initialization expression which does not respect SPARK
5336 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5337 if the tree referenced by its argument represents an initialization
5338 expression in SPARK, suitable for initializing an object in an object
5341 2011-08-02 Javier Miranda <miranda@adacore.com>
5343 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5344 internally generated access to subprogram with its associated protected
5346 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5348 2011-08-02 Geert Bosch <bosch@adacore.com>
5350 * cstand.adb (Register_Float_Type): Print information about type to
5351 register, if the Debug_Flag_Dot_B is set.
5352 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5353 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5354 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5355 with a requested precision of more than Max_Digits digits and no more
5356 than Max_Base_Digits digits, if a range specification is present and the
5357 Predefined_Float_Types list has a suitable type to derive from.
5358 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5359 case of type completion with pragma Import
5361 (Process_Import_Predefined_Type): Processing to complete a type
5362 with pragma Import. Currently supports floating point types only.
5363 (Set_Convention_From_Pragma): Do nothing without underlying type.
5364 (Process_Convention): Guard against absence of underlying type,
5365 which may happen when importing incomplete types.
5366 (Process_Import_Or_Interface): Handle case of importing predefined
5367 types. Tweak error message.
5369 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5371 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5372 functions to previous change. Reorganize code slightly.
5374 2011-08-02 Geert Bosch <bosch@adacore.com>
5376 * back_end.ads (Register_Type_Proc): New call back procedure type for
5377 allowing the back end to provide information about available types.
5378 (Register_Back_End_Types): New procedure to register back end types.
5379 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5381 * cstand.adb (Back_End_Float_Types): New list for floating point types
5382 supported by the back end.
5383 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5384 (Copy_Float_Type): New procedure to make new copies of predefined types.
5385 (Register_Float_Type): New call back procedure to populate the BEFT list
5386 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5387 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5388 (Create_Float_Types): New procedure to create entities for floating
5389 point types predefined in Standard, and put these and any remaining
5390 BEFTs on the Predefined_Float_Types list.
5391 * stand.ads (Predefined_Float_Types): New list for predefined floating
5392 point types that do not have declarations in package Standard.
5394 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5396 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5397 entity node for the unit containing the parameter.
5398 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5399 (Add_Inlined_Subprogram): Likewise.
5400 * gcc-interface/Make-lang.in: Update dependencies.
5402 2011-08-02 Thomas Quinot <quinot@adacore.com>
5404 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5407 2011-08-02 Geert Bosch <bosch@adacore.com>
5409 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5411 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5413 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5414 computed value of Base_Type.
5416 2011-08-02 Yannick Moy <moy@adacore.com>
5418 * restrict.adb (Check_Restriction): issue an error for any use of
5419 class-wide, even if the No_Dispatch restriction is not set.
5420 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5421 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5422 when completing a private extension, the type named in the private part
5423 is not the same as that named in the visible part.
5424 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5425 of an inherited primitive operations of a tagged type or type extension
5426 that returns the tagged type.
5427 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5428 function which returns True for an implicit operation inherited by the
5429 derived type declaration for the argument type.
5430 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5433 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5435 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5436 Process_Bounds, to perform analysis with expansion of a range or an
5437 expression that is the iteration scheme for a loop.
5438 (Analyze_Iterator_Specification): If domain of iteration is given by a
5439 function call with a controlled result, as is the case if call returns
5440 a predefined container, ensure that finalization actions are properly
5442 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5444 2011-08-02 Javier Miranda <miranda@adacore.com>
5446 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5447 * gcc-interface/Make-lang.in: Update dependencies.
5449 2011-08-02 Javier Miranda <miranda@adacore.com>
5451 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5452 determine if the analysis is performed using N or Original_Node (N).
5453 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5454 functionality of routine Is_Variable avoids code duplication.
5455 * checks.adb (Determine_Range): Handle temporaries generated by
5456 Remove_Side_Effects.
5458 2011-08-02 Javier Miranda <miranda@adacore.com>
5460 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5461 expansion of the condition. Required since the previous analysis was
5462 done with expansion disabled (see Resolve_Quantified_Expression) and
5463 hence checks were not inserted and record comparisons have not been
5466 2011-08-02 Ed Falis <falis@adacore.com>
5468 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5471 2011-08-02 Bob Duff <duff@adacore.com>
5473 * opt.ads: Minor comment fix.
5475 2011-08-02 Bob Duff <duff@adacore.com>
5477 * sem_ch12.adb (Analyze_Package_Instantiation,
5478 Analyze_Subprogram_Instantiation): Turn off style checking while
5479 analyzing an instance. Whatever style checks that apply to the generic
5480 unit should apply, so it makes no sense to apply them in an instance.
5481 This was causing trouble when compiling an instance of a runtime
5482 unit that violates the -gnatyO switch.
5483 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5484 one of the two case statements, causing spurious errors.
5486 2011-08-02 Robert Dewar <dewar@adacore.com>
5488 * uname.adb: Minor reformatting.
5489 * gnatcmd.adb: Minor reformatting.
5490 * exp_attr.adb: Minor reformatting.
5492 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5494 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5495 No_Dispatching_Calls, do not look for the Assign primitive, because
5496 predefined primitives are not created in this case.
5498 2011-08-02 Bob Duff <duff@adacore.com>
5500 * stylesw.ads: Minor comment fixes.
5502 2011-08-02 Robert Dewar <dewar@adacore.com>
5504 * freeze.adb (Add_To_Result): New procedure.
5506 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5508 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5509 time, if the specific run-time routines for handling streams of strings
5510 are not available, use the default mechanism.
5512 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5514 * s-regpat.ads: Fix typo.
5516 2011-08-02 Vincent Celier <celier@adacore.com>
5518 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5519 not null, call it to create the in memory config project file without
5520 parsing an existing default config project file.
5522 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5524 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5526 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5528 * sem_elim.adb: an abstract subprogram does not need an eliminate
5529 pragma for its descendant to be eliminable.
5531 2011-08-02 Ed Falis <falis@adacore.com>
5533 * init.c: revert to handling before previous checkin for VxWorks
5534 * s-intman-vxworks.adb: delete unnecessary declarations related to
5535 using Ada interrupt facilities for handling signals.
5536 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5537 * s-intman-vxworks.ads: Import __gnat_install_handler as
5538 Initialize_Interrupts.
5539 * s-taprop-vxworks.adb: Delete Signal_Mask.
5540 (Abort_Handler): change construction of mask to unblock exception
5543 2011-08-02 Jerome Guitton <guitton@adacore.com>
5545 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5546 Debug_Raise_Exception before propagation starts.
5548 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5550 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5551 to Restriction_Check_Required.
5552 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5553 * sem_res.adb (Resolve_Call): Likewise.
5554 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5556 2011-08-02 Bob Duff <duff@adacore.com>
5558 * stylesw.ads: Update comment.
5559 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5560 * errout.ads: Remove obsolete comment.
5562 2011-08-02 Javier Miranda <miranda@adacore.com>
5564 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5565 (Set_Is_Safe_To_Reevaluate): new procedure.
5566 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5567 assignment is allowed on safe-to-reevaluate variables.
5568 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5569 temporary created to remove side effects in expressions that use
5570 the secondary stack as safe-to-reevaluate.
5571 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5572 variables that are not true constants.
5574 2011-08-02 Robert Dewar <dewar@adacore.com>
5576 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5577 sem_res.adb, sem_ch6.adb: Minor reformatting.
5579 2011-08-02 Jerome Guitton <guitton@adacore.com>
5581 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5583 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5585 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5586 not set Overridden_Operation if subprogram is an initialization
5589 2011-08-02 Yannick Moy <moy@adacore.com>
5591 * par-ch6.adb: Correct obsolete name in comments
5592 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5593 which takes two message arguments (existing function takes one), with
5594 second message used for continuation.
5595 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5596 block statements that originate from a source block statement, not
5597 generated block statements
5598 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5599 symmetry with procedure case
5600 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5601 function to issue an error in formal mode if a package specification
5602 contains more than one tagged type or type extension.
5603 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5604 parameters matching formals of tagged types are objects (or ancestor
5605 type conversions of objects), not general expressions. Issue an error
5606 on view conversions that are not involving ancestor conversion of an
5608 (Resolve_Type_Conversion): in formal mode, issue an error on the
5609 operand of an ancestor type conversion which is not an object
5610 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5611 procedure so that it works also for actuals of function calls
5612 (Is_Actual_Tagged_Parameter): new function which determines if its
5613 argument is an actual parameter of a formal of tagged type in a
5615 (Is_SPARK_Object_Reference): new function which determines if the tree
5616 referenced by its argument represents an object in SPARK
5618 2011-08-02 Robert Dewar <dewar@adacore.com>
5620 * sem_ch3.adb: Minor reformatting
5621 Minor comment addition
5622 Minor error msg text change
5624 2011-08-02 Javier Miranda <miranda@adacore.com>
5626 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5627 function. Used to be more precise when we generate a variable plus one
5628 assignment to remove side effects in the evaluation of the Bound
5630 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5631 of the bound expression to force its re-analysis and thus expand the
5632 associated transient scope (if required). Code cleanup replacing the
5633 previous code that declared the constant entity by an invocation to
5634 routine Force_Evaluation which centralizes this work in the frontend.
5636 2011-08-02 Robert Dewar <dewar@adacore.com>
5638 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5639 (Base_Type): Now uses improved Is_Base_Type function
5640 * einfo.ads (Base_Type): Inline this function
5642 2011-08-02 Robert Dewar <dewar@adacore.com>
5644 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5645 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5647 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5649 * gcc-interface/Make-lang.in: Update dependencies.
5650 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5653 2011-08-02 Yannick Moy <moy@adacore.com>
5655 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5656 non-simple expression used in delta constraint
5657 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5658 index constraint which is not a subtype mark
5659 * par.adb: With and use Restrict
5660 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5661 mode on component type which is not a subtype mark and default
5662 expression on component
5663 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5664 of string which does not have a lower index bound equal to 1
5665 (Array_Type_Declaration): issue an error in formal mode on index or
5666 component type which is not a subtype mark, and on aliased keyword on
5668 (Derived_Type_Declaration): issue an error in formal mode on interface,
5669 limited or abstract type
5670 (Record_Type_Declaration): issue an error in formal mode on interface
5671 (Record_Type_Definition): issue an error in formal mode on tagged types
5672 and type extensions not declared in the specification of a library unit
5673 package; on null non-tagged record; on variant part
5675 2011-08-02 Vincent Celier <celier@adacore.com>
5677 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5678 not declared for qualified library project when Library_Name is not
5679 declared, but Library_Dir is.
5681 2011-08-02 Robert Dewar <dewar@adacore.com>
5683 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5684 pragmas (affects aspects [Component_]Default_Value
5685 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5686 component type for the resolution
5688 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5690 * einfo.adb (Base_Type): Tune implementation for speed.
5692 2011-08-02 Robert Dewar <dewar@adacore.com>
5694 * freeze.adb: Minor reformatting.
5696 2011-08-02 Thomas Quinot <quinot@adacore.com>
5698 * scos.ads: Update comments.
5700 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5702 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5703 base type, because the parent may be a subtype of a private type whose
5704 convention is established in a private part.
5706 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5708 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5709 statement in a block when the expansion of the return expression has
5710 created a finalization chain.
5711 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5712 with the parent node.
5713 Add N_Extended_Return_Statement to handle the case where a transient
5714 object declaration appears in the Return_Object_Declarations list of
5715 an extended return statement.
5717 2011-08-02 Matthew Gingell <gingell@adacore.com>
5719 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5720 unused parameter 'name'.
5722 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5724 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5725 inherited operation, check whether its alias, which is the source
5726 operastion that it renames, has been marked eliminated.
5728 2011-08-02 Javier Miranda <miranda@adacore.com>
5730 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5731 in-mode parameter whose type is an access type since it can be used to
5732 modify its designated object. Enforce code that handles as safe an
5733 access type that is not access-to-constant but it is the result of a
5734 previous removal of side-effects.
5735 (Remove_Side_Effects): Minor code reorganization of cases which require
5736 no action. Done to incorporate documentation on new cases uncovered
5737 working in this ticket: no action needed if this routine was invoked
5738 too early and the nodes are not yet decorated.
5739 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5740 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5741 were issued with actuals that are implicitly provided by
5744 2011-08-02 Robert Dewar <dewar@adacore.com>
5746 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5748 2011-08-02 Yannick Moy <moy@adacore.com>
5750 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5751 to issue an error in formal mode on attribute not supported in this mode
5752 (Analyze_Attribute): issue errors on standard attributes not supported
5754 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5755 comment, and issue error in formal mode on modulus which is not a power
5757 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5759 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5761 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5762 operator on modular type (except 'not').
5764 2011-08-02 Robert Dewar <dewar@adacore.com>
5766 * gnat_rm.texi: Minor reformatting.
5768 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5770 * s-osinte-linux.ads: Minor comment update and reformatting.
5771 * i-cexten.ads: Make this unit pure, as for its parent.
5772 Will allow its usage in more contexts if needed.
5774 2011-08-02 Robert Dewar <dewar@adacore.com>
5776 * s-utf_32.ads: Minor comment fix.
5778 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5780 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5781 operation of a tagged synchronized type, handle the case where the
5782 controlling argument is overloaded.
5784 2011-08-02 Yannick Moy <moy@adacore.com>
5786 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5787 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5788 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5789 SPARK mode and formal verification mode on processing SPARK restriction
5790 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5791 requiring consistency checking.
5793 2011-08-02 Robert Dewar <dewar@adacore.com>
5795 * sem_res.adb: Minor reformatting.
5797 2011-08-02 Robert Dewar <dewar@adacore.com>
5799 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5800 a-cforse.ads: Remove unneeded with of Ada.Containers
5801 Remove commented out pragma Inline's
5802 Move specifications of new subprograms to the actual specs
5804 2011-08-02 Yannick Moy <moy@adacore.com>
5806 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5807 a-cforse.ads: Update comments.
5809 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5811 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5813 2011-08-02 Robert Dewar <dewar@adacore.com>
5815 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5816 a-cforse.ads, a-cofove.ads: Minor reformatting.
5818 2011-08-02 Claire Dross <dross@adacore.com>
5820 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5821 a-cofove.ads: Add comments.
5823 2011-08-02 Yannick Moy <moy@adacore.com>
5825 * gnat_rm.texi: Document formal containers.
5827 2011-08-02 Emmanuel Briot <briot@adacore.com>
5829 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5832 2011-08-02 Robert Dewar <dewar@adacore.com>
5834 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5837 2011-08-02 Robert Dewar <dewar@adacore.com>
5839 * aspects.adb: New aspects Default_Value and Default_Component_Value
5840 New format of Aspect_Names table checks for omitted entries
5841 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5842 handling of boolean aspects for derived types.
5843 New aspects Default_Value and Default_Component_Value
5844 New format of Aspect_Names table checks for omitted entries
5845 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5846 (Has_Default_Value): New flag
5847 (Has_Default_Component_Value): New flag
5848 (Has_Default_Value): New flag
5849 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5851 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5852 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5853 Default_Value and Default_Component_Value
5854 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5855 New aspects Default_Value and Default_Component_Value
5856 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5857 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5859 2011-08-02 Vincent Celier <celier@adacore.com>
5861 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5862 inherit library kind.
5864 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5866 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5869 2011-08-02 Robert Dewar <dewar@adacore.com>
5871 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5873 2011-08-02 Yannick Moy <moy@adacore.com>
5875 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5877 2011-08-02 Robert Dewar <dewar@adacore.com>
5879 * impunit.adb: Add comment.
5881 2011-08-02 Yannick Moy <moy@adacore.com>
5883 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5884 qualification of aggregates in formal mode
5885 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5887 (Resolve_Aggregate): complete the test that an aggregate is adequately
5888 qualified in formal mode
5890 2011-08-02 Pascal Obry <obry@adacore.com>
5892 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5893 * mlib-prj.adb: Supress warning when compiling binder generated file.
5894 (Build_Library): Supress all warnings when compiling the binder
5897 2011-08-02 Yannick Moy <moy@adacore.com>
5899 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5901 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5902 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5903 Add with/use clauses to make Check_Formal_Restriction visible
5905 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5907 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5908 in-parameters when type of the generic formal is private in the generic
5909 spec and non-private in the body.
5911 2011-08-02 Claire Dross <dross@adacore.com>
5913 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5914 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5915 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5916 * impunit.adb, Makefile.rtl: Take new files into account.
5918 2011-08-02 Robert Dewar <dewar@adacore.com>
5920 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5921 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5923 2011-08-02 Yannick Moy <moy@adacore.com>
5925 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5927 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5928 matching static array bounds, taking into account the special case of
5930 * sem_ch3.adb: Typo in comment.
5932 2011-08-02 Yannick Moy <moy@adacore.com>
5934 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5935 which issues an error in formal mode if its argument node is originally
5937 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5938 has a discriminant specification so that it does not include the case
5940 (Derived_Type_Declaration): move here the test that a derived type has a
5941 discriminant specification
5942 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5943 first element of a component association before accessing its choices
5944 (presence of component association is not enough)
5945 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5946 declaration is a library item before accessing the next element in a
5947 list, as library items are not member of lists
5948 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5949 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5950 Check_Formal_Restriction whenever possible.
5952 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5954 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5955 reference when needed.
5957 2011-08-02 Bob Duff <duff@adacore.com>
5959 * gnat_ugn.texi: Fix typo.
5961 2011-08-02 Vincent Celier <celier@adacore.com>
5963 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5964 archive file name. Do not use the full path name of archives for Open
5967 2011-08-02 Robert Dewar <dewar@adacore.com>
5969 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5970 Analyze_Aspect_Specifications
5972 (Analyze_Aspect_Specifications): New handling for boolean aspects
5973 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5974 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5975 sequence for Analyze_Aspect_Specifications
5976 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5977 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5979 2011-08-02 Robert Dewar <dewar@adacore.com>
5981 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5982 aspects, since these no longer exist.
5984 2011-08-02 Robert Dewar <dewar@adacore.com>
5986 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5987 semicolon, do not try to see if there are aspects following it.
5988 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5991 2011-08-02 Robert Dewar <dewar@adacore.com>
5993 * sem_ch8.adb, aspects.ads: Minor reformatting.
5995 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5997 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5998 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
6000 (Analyze_Aspect_Specifications): ...here. Call above procedure.
6002 2011-08-02 Yannick Moy <moy@adacore.com>
6004 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
6005 mode on subprogram declaration outside of package specification, unless
6006 it is followed by a pragma Import
6007 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
6008 Access_Type_Declaration): issue error in formal mode on access type
6009 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
6011 (Analyze_Object_Declaration): issue error in formal mode on object
6012 declaration which does not respect SPARK restrictions
6013 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
6014 declaration which does not respect SPARK restrictions
6015 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
6016 error in formal mode on digits or delta constraint
6017 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
6018 decimal fixed point type
6019 (Derived_Type_Declaration): issue error in formal mode on derived type
6020 other than type extensions of tagged record types
6021 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
6022 with check on access definition
6023 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
6024 mode on protected definition.
6025 (Analyze_Task_Definition): issue error in formal mode on task definition
6027 2011-08-02 Robert Dewar <dewar@adacore.com>
6029 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
6031 2011-08-02 Javier Miranda <miranda@adacore.com>
6033 * sem_ch6.adb (Can_Override_Operator): New function.
6034 (Verify_Overriding_Indicator): Add missing code to check overriding
6035 indicator in operators. Fixes regression.
6036 (Check_Overriding_Indicator): Minor reformating after replacing the
6037 code that evaluates if the subprogram can override an operator by
6038 invocations to the above new function.
6040 (Write_Field26_Name): Add missing code to ensure that, following
6041 the documentation in einfo.ads, this field is not shown as attribute
6042 "Static_Initialization" on non-dispatching functions.
6044 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6046 * sem_res.adb (Resolve_Call): A call to
6047 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
6048 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
6049 i.e., when the second parameter is of type Time_Span.
6051 2011-08-02 Vincent Celier <celier@adacore.com>
6053 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
6054 with an archive instead of -L<library dir> -l<library name>.
6056 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6058 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
6059 mark the base types In_Use in addition to making the operations
6062 2011-08-02 Ed Falis <falis@adacore.com>
6064 * init.c: add and setup __gnat_signal_mask for the exception signals
6065 * s-inmaop-vxworks.adb: new file.
6066 * s-intman-vxworks.adb: remove unnecessary initializations and
6068 * s-intman-vxworks.ads: remove unnecessary variable
6069 * s-taprop-vxworks.adb: simplify signal initialization
6071 2011-08-02 Robert Dewar <dewar@adacore.com>
6073 * sem_ch8.adb: Minor code reorganization, comment updates.
6075 2011-08-02 Robert Dewar <dewar@adacore.com>
6077 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
6078 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
6080 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
6081 (Matching_Static_Array_Bounds): Moved here from Sem_Res
6083 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6085 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
6086 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
6087 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
6088 use_type_clauses, to handle more efficiently use_type and use_all_type
6090 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
6091 Ada2012 Use_All_Type clause.
6092 (Use_Class_Wide_Operations): new procedure.
6094 2011-08-02 Robert Dewar <dewar@adacore.com>
6096 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
6097 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
6098 expression to expression function.
6100 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6102 * sem_ch4.adb: transform simple Ada2012 membership into equality only
6103 if types are compatible.
6105 2011-08-02 Yannick Moy <moy@adacore.com>
6107 * sem_res.adb (Matching_Static_Array_Bounds): new function which
6108 returns True if its argument array types have same dimension and same
6109 static bounds at each index.
6110 (Resolve_Actuals): issue an error in formal mode on actuals passed as
6111 OUT or IN OUT paramaters which are not view conversions in SPARK.
6112 (Resolve_Arithmetic_Op): issue an error in formal mode on
6113 multiplication or division with operands of fixed point types which are
6114 not qualified or explicitly converted.
6115 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
6116 Boolean or array type (except String) operands.
6117 (Resolve_Equality_Op): issue an error in formal mode on equality
6118 operators for array types other than String with non-matching static
6120 (Resolve_Logical_Op): issue an error in formal mode on logical operators
6121 for array types with non-matching static bounds. Factorize the code in
6122 Matching_Static_Array_Bounds.
6123 (Resolve_Qualified_Expression): issue an error in formal mode on
6124 qualified expressions for array types with non-matching static bounds.
6125 (Resolve_Type_Conversion): issue an error in formal mode on type
6126 conversion for array types with non-matching static bounds
6128 2011-08-02 Robert Dewar <dewar@adacore.com>
6130 * par-ch10.adb: Minor code reorganization (use Nkind_In).
6132 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6134 * par-ch9.adb: save location of entry for proper error message.
6136 2011-08-02 Javier Miranda <miranda@adacore.com>
6138 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
6139 (Use_Full_View) which permits this routine to climb through the
6140 ancestors using the full-view of private parents.
6141 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
6142 Use_Full_View to true in calls to Is_Ancestor.
6143 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
6144 true in call to Is_Ancestor.
6145 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
6146 Use_Full_View to true in call to Is_Ancestor.
6147 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
6148 call to Is_Ancestor.
6149 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
6150 Use_Full_View to true in calls to Is_Ancestor.
6151 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
6152 Make_Select_Specific_Data_Table, Register_Primitive,
6153 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
6154 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
6155 to true in call to Is_Ancestor.
6156 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
6157 Use_Full_View to true in calls to Is_Ancestor.
6159 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
6160 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
6162 2011-08-02 Robert Dewar <dewar@adacore.com>
6164 * gnat_rm.texi: Minor reformatting.
6165 * sem_prag.adb: Minor reformatting.
6167 2011-08-02 Tristan Gingold <gingold@adacore.com>
6169 * vms_data.ads: Add VMS qualifier for -gnateP.
6171 2011-08-02 Robert Dewar <dewar@adacore.com>
6173 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
6174 * par-ch7.adb (P_Package): Proper placement of aspects for package
6176 * par-endh.adb (Check_End): Ad Is_Sloc parameter
6177 (End_Statements): Add Is_Sloc parameterr
6178 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
6179 (Check_End): Ad Is_Sloc parameter
6180 (End_Statements): Add Is_Sloc parameterr
6182 2011-08-02 Vincent Celier <celier@adacore.com>
6184 * ug_words: Add VMS qualifier equivalent to -gnateP:
6185 /SYMBOL_PREPROCESSING.
6187 2011-08-02 Jose Ruiz <ruiz@adacore.com>
6189 * gnat-style.texi: For hexadecimal numeric literals the typical
6190 grouping of digits is 4 to represent 2 bytes.
6191 A procedure spec which is split into several lines is indented two
6194 2011-08-02 Yannick Moy <moy@adacore.com>
6196 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
6197 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
6198 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
6200 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
6201 choice in array aggregate
6202 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
6204 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
6205 positional and named aggregate for record, or others in record
6206 aggregate, or multiple choice in record aggregate
6207 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
6208 array operands to logical operations AND, OR and XOR do not have the
6209 same static lower and higher bounds
6210 * sem_ch5.adb, sinfo.ads: Correct typos in comments
6212 2011-08-01 Robert Dewar <dewar@adacore.com>
6214 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
6215 Replaces Last_Source_Node_In_Sequence.
6216 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
6217 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
6218 parens and blank in string (this was inconsistently implemented).
6220 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
6221 blank in string (this was inconsistently implemented).
6223 (Set_Global_Switches): Set formal mode switches appropriately
6224 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
6226 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
6227 call Set_Error_Msg_Lang to set "spark" as language name.
6228 * par.adb: Remove unnecessary call to set formal language for errout
6229 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
6230 appropriately and call Set_Error_Msg_Lang to set "spark" as language
6232 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
6233 calls to it, moved after resolution so that types are known
6234 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
6235 result of concatenation is not of type String
6236 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
6237 concatenation is not properly restricted
6238 * gnat_rm.texi: Add doc on pragma Spark_95.
6239 * gcc-interface/Makefile.in: Remove obsolete target pairs for
6240 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
6241 * gcc-interface/Make-lang.in: Update dependencies.
6243 2011-08-01 Javier Miranda <miranda@adacore.com>
6245 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
6246 condition that detects if the overridden operation must replace an
6249 2011-08-01 Javier Miranda <miranda@adacore.com>
6251 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
6252 code declarations inserted by Insert_Actions in each alternative of the
6253 N_Case_Expression node.
6255 2011-08-01 Robert Dewar <dewar@adacore.com>
6257 * sem_ch6.adb: Minor code reorganization.
6258 * sem_util.adb: Minor reformatting.
6260 2011-08-01 Pascal Obry <obry@adacore.com>
6262 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
6263 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
6265 2011-08-01 Yannick Moy <moy@adacore.com>
6267 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
6268 literal or operator symbol which is prefixed
6269 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
6270 mode on access attributes.
6271 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
6272 that concatenation operands are properly restricted in formal mode
6273 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
6274 Analyze_Concatenation_Operand. Issue an error in formal mode if the
6275 result of the concatenation has a type different from String.
6276 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
6277 Analyze_Quantified_Expression, Analyze_Slice,
6278 Analyze_Null): issue an error in formal mode on unsupported constructs
6280 (Analyze_Block_Statement): only issue error on source block statement
6281 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
6282 function which returns the last node in a list of nodes for which
6283 Comes_From_Source returns True, if any
6284 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
6285 Last_Source_Node_In_Sequence
6286 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
6287 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
6288 mode on unsupported constructs
6289 * sem_ch9.adb Do not return after issuing error in formal mode, as the
6290 rest of the actions may be needed later on since the error is marked as
6292 * sinfo.ads: Typos in comments.
6294 2011-08-01 Pascal Obry <obry@adacore.com>
6296 * projects.texi: Minor editing.
6298 2011-08-01 Yannick Moy <moy@adacore.com>
6300 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
6301 insertion character ~~
6302 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
6303 (Set_Error_Msg_Lang): new procedure which fixes the language for use
6304 with insertion character ~~
6305 (Set_Msg_Text): treat insertion character ~~
6306 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
6307 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
6308 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
6309 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
6310 errors related to the formal language restriction not serious
6311 (insertion character |).
6312 * par.adb (Par): set formal language for error messages if needed
6313 * sem_ch6.adb (Check_Missing_Return): take into account possible
6314 generated statements at the end of the function
6315 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
6316 enumeration value to define a new pragma SPARK_95
6317 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6318 SPARK_Version): new type and variables to store the SPARK version
6320 (SPARK_Mode): return True when SPARK_Version is set
6321 * par-prag.adb: Correct indentation
6322 (Prag): take Pragma_SPARK_95 into account
6323 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6326 2011-08-01 Robert Dewar <dewar@adacore.com>
6328 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6329 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6330 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6332 2011-08-01 Pascal Obry <obry@adacore.com>
6334 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6335 Target_Name to Get_Path call.
6336 (Parse_Single_Project): Likewise.
6337 (Post_Parse_Context_Clause): Likewise.
6338 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6339 Call Initialise_Project_Path with the proper Target_Name.
6340 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6342 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6343 with the proper Target_Name.
6344 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6346 (Parse_Project_And_Apply_Config): Likewise.
6347 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6348 This is fine as this part of the code is supporting only native
6350 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6351 is fine as this part of the code is supporting only native compilation.
6353 2011-08-01 Yannick Moy <moy@adacore.com>
6355 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6356 of homonym, unless the homonym is one of the cases allowed in SPARK
6357 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6358 package declaration occurring after a body.
6360 2011-08-01 Robert Dewar <dewar@adacore.com>
6362 * checks.adb, exp_ch4.adb: Minor reformatting.
6364 2011-08-01 Javier Miranda <miranda@adacore.com>
6366 * einfo.ads (Access_Disp_Table): Fix documentation.
6367 (Dispatch_Table_Wrappers): Fix documentation.
6369 2011-08-01 Pascal Obry <obry@adacore.com>
6371 * prj-env.adb, prj-env.ads: Minor reformatting.
6373 2011-08-01 Yannick Moy <moy@adacore.com>
6375 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6376 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6377 procedures out of these packages.
6378 * errout.ads, errout.adb
6379 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6380 procedures in of this package
6381 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6382 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6383 on misplaced later vs initial declarations, like in Ada 83
6384 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6385 formal mode on attribute of private type whose full type declaration
6387 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6388 package declaration inside a package specification
6389 (Analyze_Full_Type_Declaration): issue error in formal mode on
6390 controlled type or discriminant type
6391 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6392 user-defined operator means that it should come from the source
6393 (New_Overloaded_Entity): issue error in formal mode on overloaded
6395 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6397 2011-08-01 Thomas Quinot <quinot@adacore.com>
6399 * atree.adb: Minor reformatting.
6400 * checks.adb: Minor reformatting.
6402 2011-08-01 Vincent Celier <celier@adacore.com>
6404 * s-parame-vms-ia64.ads: Fix typo in comment
6406 * s-parame-vms-restrict.ads: Removed, unused.
6408 2011-08-01 Javier Miranda <miranda@adacore.com>
6411 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6413 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6414 * sem_ch3.ads, sem_ch3.adb
6415 (Is_Constant_Bound): New extended version of the subprogram that was
6416 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6417 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6418 * sem_aux.ads (Constant_Value): Fix typo in comment.
6419 * checks.adb (Generate_Index_Checks): New implementation which, for
6420 array objects with constant bounds, generates the runtime check
6421 referencing the bounds of the array type. For other cases this routine
6422 provides its previous behavior obtaining such values from the array
6424 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6426 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6427 we cannot have semantic interpretations of the new node.
6429 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6431 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6434 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6436 * sem_ch8.adb: Minor code editing.
6437 * s-vxwext.adb: Remove trailing space.
6438 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6439 consistency with other files.
6441 2011-08-01 Thomas Quinot <quinot@adacore.com>
6443 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6445 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6447 * par-ch10.adb: reject parameterized expressions as compilation unit.
6448 * sem_ch4.adb: handle properly conditional expression with overloaded
6449 then_clause and no else_clause.
6451 2011-08-01 Tristan Gingold <gingold@adacore.com>
6453 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6454 like done by System.Aux_DEC.
6455 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6457 2011-08-01 Yannick Moy <moy@adacore.com>
6459 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6460 missing label at end of declaration (subprogram or package)
6461 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6462 of positional and named parameter association
6463 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6464 Error_Msg_SP which adds a prefix to the error message giving the name
6465 of the formal language analyzed
6466 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6467 access result type in subprogram, unconstrained array as result type,.
6468 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6470 * sem_ch8.adb: Code clean up.
6472 2011-08-01 Javier Miranda <miranda@adacore.com>
6474 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6475 * einfo.ads (Access_Disp_Table): Fix documentation.
6476 (Dispatch_Table_Wrappers): Fix documentation.
6477 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6478 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6479 to enforce the documentation of this attribute.
6480 (Set_Is_Interface): Cleanup the assertion.
6481 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6482 the Underlying_Type entity before reading attribute Access_Disp_Table.
6483 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6484 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6485 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6486 the Underlying_Type entity before reading attribute Access_Disp_Table.
6487 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6488 Locate the Underlying_Type entity before reading attribute
6491 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6493 * s-poosiz.ads: Additional overriding indicators.
6495 2011-08-01 Yannick Moy <moy@adacore.com>
6497 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6499 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6500 parameter specification does not include a subtype mark.
6501 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6502 formal mode on abstract subprogram.
6503 (Analyze_Subprogram_Specification): issue error in formal mode on
6504 user-defined operator.
6505 (Process_Formals): issue error in formal mode on access parameter and
6507 * sem_ch9.adb (Analyze_Abort_Statement,
6508 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6509 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6510 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6511 Analyze_Requeue, Analyze_Selective_Accept,
6512 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6513 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6514 issue error in formal mode on user-defined raise statement.
6516 2011-08-01 Thomas Quinot <quinot@adacore.com>
6518 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6519 declaration being hidden when overriding an implicit inherited
6521 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6522 (-gnats), do not complain about a source file that contains only a
6525 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6527 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6528 variable if already set.
6530 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6532 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6533 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6534 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6535 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6536 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6537 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6538 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6539 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6540 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6541 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6542 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6543 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6544 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6545 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6546 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6547 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6548 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6549 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6550 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6551 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6552 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6553 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6554 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6555 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6556 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6557 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6558 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6559 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6560 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6561 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6562 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6563 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6564 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6565 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6566 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6567 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6568 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6569 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6570 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6571 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6572 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6573 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6574 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6575 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6576 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6577 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6578 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6579 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6580 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6581 Use GNAT instead of GNARL.
6583 2011-08-01 Bob Duff <duff@adacore.com>
6585 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6586 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6587 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6590 2011-08-01 Yannick Moy <moy@adacore.com>
6592 * debug.adb (d.D) reverve flag for the SPARK mode
6593 (d.E) reverve flag for SPARK generation mode
6594 (d.F) reverve flag for Why generation mode
6595 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6596 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6597 functions which return True when the corresponding modes are set
6598 (Formal_Language): return "spark" or "alfa" when in formal verification
6600 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6601 Error_Msg to prefix the error message with a tag giving the formal
6603 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6604 message with a tag giving the formal language
6605 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6607 (Analyze_Case_Statement): issue error in formal mode on case statement
6608 with a single "others" case alternative
6609 (Analyze_Exit_Statement): issue errors in formal mode on exit
6610 statements which do not respect SPARK restrictions
6611 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6612 (Check_Unreachable_Code): always issue an error (not a warning) in
6613 formal mode on unreachable code (concerns both code after an infinite
6614 loop and after an unconditional jump, both not allowed in SPARK)
6615 * sem_ch6.adb (Analyze_Return_Statement): add call to
6616 Set_Return_Present for a procedure containing a return statement
6617 (already done for functions in Analyze_Function_Return)
6618 (Analyze_Function_Return): issue error in formal mode on extended
6619 return or if return is not last statement in function
6620 (Check_Missing_Return): issue error in formal mode if function does
6621 not end with return or if procedure contains a return
6622 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6623 function to detect if there is an inner scope of its parameter S which
6626 2011-08-01 Thomas Quinot <quinot@adacore.com>
6628 * sem_ch6.ads: Minor reformatting.
6630 2011-08-01 Javier Miranda <miranda@adacore.com>
6632 * sem_util.adb (Abstract_Interface_List): Complete condition when
6633 processing private type declarations to avoid reading unavailable
6635 (Is_Synchronized_Tagged_Type): Complete condition when processing
6636 private extension declaration nodes to avoid reading unavailable
6639 2011-08-01 Thomas Quinot <quinot@adacore.com>
6641 * sem_ch3.adb: Minor reformatting.
6643 2011-08-01 Thomas Quinot <quinot@adacore.com>
6645 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6646 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6647 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6648 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6649 for VMS, instead parametrize the common implementation with
6650 System.Parameters declarations.
6652 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6654 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6656 2011-08-01 Tristan Gingold <gingold@adacore.com>
6658 * seh_init.c: Fix SEH handler installation on win64.
6660 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6662 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6663 double analysis of an anonymous access to subprogram, because it can
6664 lead to improper sharing of profiles and a back-end crash.
6666 2011-08-01 Robert Dewar <dewar@adacore.com>
6668 * make.adb, sem_ch4.adb: Minor reformatting.
6669 * gcc-interface/Make-lang.in: Update dependencies.
6670 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6672 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6674 * gnat_rm.texi: Fix definition of Long_Integer.
6676 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6678 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6679 to prevent storage exhaustion.
6680 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6681 finalized is a function body, insert the cleanup code before the final
6682 return statement, to prevent spurious warnings.
6683 * s-pooglo.ads: add overriding indicator.
6685 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6687 * sem_ch4.adb (Operator_Check): improve error message when both a
6688 with_clause and a use_clause are needed to make operator usage legal.
6689 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6690 determine whether a compilation unit is visible within an other,
6691 either through a with_clause in the current unit, or a with_clause in
6692 its library unit or one one of its parents.
6694 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6696 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6697 over an arbitrary expression of an array or container type.
6698 * lib-xref.adb: clarify comment.
6700 2011-08-01 Bob Duff <duff@adacore.com>
6702 * einfo.ads: Minor reformatting.
6703 * debug.adb: Minor comment improvement.
6705 2011-08-01 Javier Miranda <miranda@adacore.com>
6707 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6708 consider hidden subprograms as valid candidates.
6710 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6712 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6714 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6716 * gnat_ugn.texi: Fix typo.
6718 2011-08-01 Robert Dewar <dewar@adacore.com>
6720 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6721 lib-xref.adb: Minor reformatting
6723 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6725 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6726 when to generate a call to Move_Final_List.
6727 (Has_Controlled_Parts): Remove this function.
6729 2011-08-01 Geert Bosch <bosch@adacore.com>
6731 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6734 2011-08-01 Thomas Quinot <quinot@adacore.com>
6736 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6737 explicit raise of a predefined exception as Comes_From_Source if the
6738 original N_Raise_Statement comes from source.
6740 2011-08-01 Robert Dewar <dewar@adacore.com>
6742 * sinfo.ads: Add comment.
6743 * sem_ch6.adb: Minor reformatting.
6745 2011-08-01 Robert Dewar <dewar@adacore.com>
6747 * freeze.adb (Freeze_Entity): Refine check for bad component size
6748 clause to avoid rejecting confirming clause when atomic/aliased present.
6750 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6752 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6753 better determine whether an entity reference is a write.
6754 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6756 * lib-xref.adb (Output_References): Do no suppress a read reference at
6757 the same location as an immediately preceeding modify-reference, to
6758 handle properly in-out actuals.
6760 2011-08-01 Tristan Gingold <gingold@adacore.com>
6762 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6764 2011-08-01 Quentin Ochem <ochem@adacore.com>
6766 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6767 heap to compute the result.
6769 2011-08-01 Robert Dewar <dewar@adacore.com>
6771 * atree.ads: Minor reformatting.
6773 2011-08-01 Emmanuel Briot <briot@adacore.com>
6775 * g-expect.adb (Get_Command_Output): Fix memory leak.
6777 2011-08-01 Geert Bosch <bosch@adacore.com>
6779 * cstand.adb (P_Float_Type): New procedure to print the definition of
6780 predefined fpt types.
6781 (P_Mixed_Name): New procedure to print a name using mixed case
6782 (Print_Standard): Use P_Float_Type for printing floating point types
6783 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6784 precision IEEE float.
6786 2011-08-01 Thomas Quinot <quinot@adacore.com>
6788 * sem_ch3.adb: Minor reformatting.
6790 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6792 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6793 the completion of a generic function, insert the new body rather than
6794 rewriting the original.
6796 2011-08-01 Yannick Moy <moy@adacore.com>
6798 * sinfo.ads, errout.ads: Typos in comments.
6800 2011-08-01 Robert Dewar <dewar@adacore.com>
6802 * par-endh.adb: Minor reformatting.
6804 2011-08-01 Robert Dewar <dewar@adacore.com>
6806 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6807 (Pre_Post_Aspects): New subtype.
6808 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6809 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6810 * par-ch7.adb (P_Package): Remove Decl parameter
6811 (P_Package): Handle new syntax for aspects (before IS)
6812 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6814 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6815 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6816 (P_Package): Remove Decl parameter
6817 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6819 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6821 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6822 * sinfo.ads: Document new syntax for aspects in packages etc.
6823 * sprint.adb: Handle new syntax of aspects before IS in package
6825 2011-08-01 Thomas Quinot <quinot@adacore.com>
6827 * atree.ads: Minor reformatting.
6828 * sem_prag.adb: Minor reformatting.
6830 2011-08-01 Robert Dewar <dewar@adacore.com>
6832 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6833 case expr alternative.
6835 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6837 * sem_ch12.adb: Fix typo.
6839 2011-08-01 Geert Bosch <bosch@adacore.com>
6841 * sem_prag.adb (Check_No_Link_Name): New procedure.
6842 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6843 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6844 instead of Standard_Long_Long_Float_Size global. Preparation for
6845 eventual removal of per type constants.
6846 * exp_util.ads (Get_Stream_Size): New function returning the stream
6847 size value of subtype E.
6848 * exp_util.adb (Get_Stream_Size): Implement new function.
6849 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6851 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6853 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6855 2011-08-01 Geert Bosch <bosch@adacore.com>
6857 * cstand.adb: Fix comments.
6858 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6861 2011-08-01 Robert Dewar <dewar@adacore.com>
6863 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6865 2011-08-01 Geert Bosch <bosch@adacore.com>
6867 * atree.ads: Fix comment.
6869 2011-08-01 Robert Dewar <dewar@adacore.com>
6871 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6872 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6873 * par.adb: Add with for Namet.Sp.
6874 * par-tchk.adb: Minor reformatting.
6876 2011-08-01 Vincent Celier <celier@adacore.com>
6878 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6879 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6880 of the init procedure of a SAL.
6881 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6884 2011-08-01 Thomas Quinot <quinot@adacore.com>
6886 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6889 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6891 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6893 2011-08-01 Thomas Quinot <quinot@adacore.com>
6895 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6896 conformant with its spec (return True only for types that have
6897 an overriding Initialize primitive operation that prevents them from
6898 having preelaborable initialization).
6899 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6900 initialization for controlled types in Ada 2005 or later mode.
6902 2011-08-01 Robert Dewar <dewar@adacore.com>
6904 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6906 (Same_Aspect): New function.
6907 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6908 Type_Invariant, Precondition, Postcondition.
6909 * snames.ads-tmpl: Add Name_Type_Invariant.
6911 2011-08-01 Robert Dewar <dewar@adacore.com>
6913 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6915 (Freeze_All_Ent): Fix error in handling inherited aspects.
6916 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6917 already analyzed, but don't skip entire processing of a declaration,
6918 that's wrong in some cases of declarations being rewritten.
6919 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6920 Don't delay for integer, string literals
6921 Treat predicates in usual manner for delay, remove special case code,
6923 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6924 (Build_Predicate_Function): Update saved expression in aspect
6925 (Build_Invariant_Procedure): Update saved expression in aspect
6926 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6927 of replacement of discriminant references if the reference is simple.
6929 2011-08-01 Robert Dewar <dewar@adacore.com>
6931 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6932 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6933 Static_Predicate and Dynamic_Predicate.
6934 (Build_Predicate_Function): Add processing for Static_Predicate
6935 and Dynamic_Predicate.
6936 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6937 (From_Static_Predicate): New flag
6938 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6940 2011-08-01 Robert Dewar <dewar@adacore.com>
6942 * usage.adb: Documentation cleanup for Ada version modes in usage.
6943 * expander.adb: Minor reformatting.
6945 2011-08-01 Robert Dewar <dewar@adacore.com>
6947 * atree.ads: Minor comment fix.
6948 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6949 a-witeio.ads, sem_prag.adb: Minor reformatting.
6951 2011-08-01 Doug Rupp <rupp@adacore.com>
6953 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6954 pointers. Use descrip.h header file for convenience. Add some
6957 2011-08-01 Robert Dewar <dewar@adacore.com>
6959 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6960 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6961 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6963 (Check_Aspect_At_End_Of_Declarations): New procedure
6964 (Analye_Aspect_Specification): Minor changes for above procedures
6965 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6966 specification node as well.
6968 2011-08-01 Pascal Obry <obry@adacore.com>
6970 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6971 Windows files. Use GetFilesAttributes() in this case to check for file
6972 existence instead of returning with an error code.
6974 2011-08-01 Vincent Celier <celier@adacore.com>
6976 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6977 High is above Source length.
6979 2011-08-01 Robert Dewar <dewar@adacore.com>
6981 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6983 2011-08-01 Robert Dewar <dewar@adacore.com>
6985 * aspects.ads (Boolean_Aspects): New subtype.
6986 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6987 for derived types in cases where the parent type and derived type have
6989 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6990 with aspects when parent type also has aspects.
6991 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6992 boolean expression at this point).
6993 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6994 accordance with final decision on the Ada 2012 feature.
6995 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6997 2011-08-01 Matthew Heaney <heaney@adacore.com>
6999 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
7001 2011-08-01 Pascal Obry <obry@adacore.com>
7003 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
7004 Fix Replace_Slice when High is above current string size.
7005 (Replace_Slice): Fix DL computation when High is above current
7008 2011-08-01 Gary Dismukes <dismukes@adacore.com>
7010 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
7012 2011-08-01 Matthew Heaney <heaney@adacore.com>
7014 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
7017 2011-08-01 Pascal Obry <obry@adacore.com>
7019 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
7022 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7024 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
7025 access to protected subprograms in generic bodies.
7026 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
7027 protected type, indicate that the convention of the subprogram is
7028 Convention_Protected, because it may be used in subsequent declarations
7029 within the protected declaration.
7031 2011-08-01 Vincent Celier <celier@adacore.com>
7033 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
7034 and "final" procedures when the name of the library is "ada", to avoid
7035 duplicate symbols "adainit" and "adafinal" in executables.
7037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
7039 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
7040 quantified expression that appears within a postcondition and uses the
7041 Ada2012 'Result attribute.
7043 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7045 * init.c (__gnat_error_handler): Cast reason to int.
7046 (__gnat_install_handler): Explain sa_sigaction use.
7048 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7050 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
7051 subprogram has copy-in copy-out parameters, try to promote the mode of
7052 the return type if it is passed in registers.
7054 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7056 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
7057 left operand as addressable.
7059 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
7061 * gcc-interface/gigi.h (build_function_stub): Remove.
7062 (build_return_expr): Likewise.
7063 (convert_vms_descriptor): Declare.
7064 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
7065 (build_function_stub): Move to...
7066 * gcc-interface/utils2.c (build_return_expr): Move to...
7067 * gcc-interface/trans.c (build_function_stub): ...here.
7068 (build_return_expr): ...here.
7069 (Subprogram_Body_to_gnu): Add local variable for language_function.
7070 Disconnect the parameter attributes cache, if any, once done with it.
7071 Call end_subprog_body only after setting the end_locus.
7072 Build the stub associated with the function, if any, at the very end.
7073 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
7074 variables and streamline control flow.
7076 2011-07-23 Arnaud Charlet <charlet@adacore.com>
7079 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
7082 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7085 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
7086 Assign to act.sa_sigaction.
7087 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
7088 current->return_address to char * before arithmetic.
7090 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7092 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
7093 Correct argument types.
7094 Extract code from reason.
7095 (__gnat_install_handler): Assign to act.sa_sigaction.
7097 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
7099 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
7100 (GNAT1_OBJS): ...here.
7102 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
7105 * g-socthi-mingw.adb (Fill): Fix formatting.
7107 * gcc-interface/gigi.h: Move around comment.
7109 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7112 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
7114 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
7117 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
7119 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
7121 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
7122 range comparison if Pmode is SImode.
7124 2011-07-12 Laurent GUERBY <laurent@guerby.net>
7125 Eric Botcazou <ebotcazou@adacore.com>
7127 * adadecode.c: Wrap up in extern "C" block.
7128 * adadecode.h: Likewise.
7129 * adaint.c: Likewise. Remove 'const' keyword.
7130 * adaint.h: Likewise.
7132 * atree.h: Likewise.
7134 * cstreams.c: Likewise.
7138 * final.c: Likewise.
7140 * initialize.c: Likewise.
7142 * namet.h: Likewise.
7143 * nlists.h: Likewise.
7144 * raise.c: Likewise.
7145 * raise.h: Likewise.
7146 * repinfo.h: Likewise.
7147 * seh_init.c: Likewise.
7148 * targext.c: Likewise.
7149 * tracebak.c: Likewise.
7150 * uintp.h: Likewise.
7151 * urealp.h: Likewise.
7152 * xeinfo.adb: Wrap up generated C code in extern "C" block.
7153 * xsinfo.adb: Likewise.
7154 * xsnamest.adb: Likewise.
7155 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
7156 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
7157 * gcc-interface/misc.c: Likewise.
7158 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
7159 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
7160 ada/targext.o here...
7161 (GNAT_ADA_OBJS): ...and not here.
7162 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
7163 (GNATBIND_OBJS): Reorder.
7165 2011-07-07 Richard Henderson <rth@redhat.com>
7167 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
7168 dwarf2out_frame_init.
7170 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
7172 * gcc-interface/misc.c (gnat_init): Tweak previous change.
7174 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7177 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
7179 2011-07-06 Richard Guenther <rguenther@suse.de>
7181 * gcc-interface/misc.c (gnat_init): Merge calls to
7182 build_common_tree_nodes and build_common_tree_nodes_2.
7183 Re-initialize boolean_false_node.
7185 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
7186 Olivier Hainque <hainque@adacore.com>
7187 Nicolas Setton <setton@adacore.com>
7189 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
7190 the type according to the ARTIFICIAL_P parameter.
7191 (create_type_decl): Likewise.
7192 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
7194 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
7196 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
7197 (gnatbind): Likewise.
7199 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7201 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
7203 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7205 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
7206 local variable throughout. Remove useless call to Base_Type.
7207 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
7208 Take it also into account for the volatileness of the field. Set the
7209 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
7211 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7213 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
7214 on a dereference built for a by-ref object if it has an address clause.
7216 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
7218 * einfo.ads (Address_Taken): Document use for the second argument of
7219 Asm_Input and Asm_Output attributes.
7220 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
7221 argument is an entity name, then set Address_Taken on it.
7222 <Attribute_Asm_Output>: Likewise.
7223 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
7224 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
7225 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
7226 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
7228 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
7231 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
7233 2011-06-14 Joseph Myers <joseph@codesourcery.com>
7235 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
7236 (ada/utils.o): Update dependencies.
7237 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
7238 ../../../libcpp/libcpp.a.
7239 * gcc-interface/utils.c: Include common/common-target.h.
7240 (process_attributes): Use targetm_common.have_named_sections.
7242 2011-06-07 Richard Guenther <rguenther@suse.de>
7244 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
7247 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7249 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
7250 TREE_THIS_NOTRAP flag.
7252 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7254 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
7257 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7259 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
7260 constants whose full view has discriminants specially.
7262 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
7264 * gcc-interface/utils.c: Include diagnostic.h.
7265 (gnat_write_global_declarations): Output debug information for all
7266 global type declarations before finalizing the compilation unit.
7267 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
7269 2011-05-25 Jakub Jelinek <jakub@redhat.com>
7271 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
7273 2011-05-25 Kai Tietz <ktietz@redhat.com>
7275 * adaint.c (__gnat_to_canonical_file_list_next): Use array
7276 initialization instead of const/none-const pointer assignment.
7278 2011-05-24 Joseph Myers <joseph@codesourcery.com>
7280 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
7281 $(EXTRA_GNAT1_OBJS).
7282 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
7283 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
7284 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
7285 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
7286 libcommon-target.a instead of prefix.o.
7288 2011-05-21 Joseph Myers <joseph@codesourcery.com>
7291 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
7293 2011-05-20 Joseph Myers <joseph@codesourcery.com>
7295 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
7296 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
7297 instead of version.o.
7299 2011-05-18 Kai Tietz <ktietz@redhat.com>
7301 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
7302 boolean_false_node instead of integer_zero_node.
7303 (convert_with_check): Likewise.
7304 * gcc-interface/decl.c (choices_to_gnu): Likewise.
7306 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
7308 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
7309 type of the parameter is an unconstrained array, convert the actual to
7310 the type of the formal in the In Out and Out cases as well.
7312 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7314 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
7315 call build_function_type_array or build_varargs_function_type_array
7317 (create_subprog_type): Don't call build_function_type; call
7318 build_function_type_vec instead.
7320 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7322 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7323 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7324 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7326 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7328 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7330 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7331 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7333 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7335 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7337 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7339 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7340 instead of accessing TYPE_ARG_TYPES directly.
7341 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7343 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7346 * gcc-interface/gigi.h (get_variant_part): Declare.
7347 * gcc-interface/decl.c (get_variant_part): Make global.
7348 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7349 types have the same constant size, are record types and T1 has a
7350 variant part while T2 doesn't.
7352 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7354 * gcc-interface/utils.c (begin_subprog_body): Do not call
7356 (end_subprog_body): Likewise.
7358 2011-05-04 Richard Guenther <rguenther@suse.de>
7360 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7362 (pos_to_constructor): Likewise.
7364 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7365 Eric Botcazou <ebotcazou@adacore.com>
7367 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7368 of build_function_type. Adjust calls to...
7369 (build_raise_check): ...this. Do not take a void_tree parameter.
7370 Call build_function_type_list instead of build_function_type.
7371 Fix head comment and swap couple of conditional blocks.
7373 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7375 * gnatvsn.ads (Library_Version): Bump to 4.7.
7376 (Current_Year): Bump to 2011.
7378 2011-04-29 Michael Matz <matz@suse.de>
7380 * gcc-interface/misc.c (gnat_handle_option): Set
7381 warn_maybe_uninitialized.
7383 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7385 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7386 the Watson/McCabe paper.
7388 2011-04-23 Jim Meyering <meyering@redhat.com>
7390 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7392 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7394 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7397 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7399 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7401 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7402 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7403 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7404 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7405 <all>: Do not set flags on the reused DECL node coming from an alias.
7406 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7407 don't need debug info here...
7408 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7409 (gigi): Adjust calls to create_subprog_decl.
7410 (build_raise_check): Likewise.
7411 (establish_gnat_vms_condition_handler): Likewise.
7412 (Compilation_Unit_to_gnu): Likewise.
7413 (gnat_to_gnu): Likewise.
7415 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7417 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7418 (NO_REORDER_ADAFLAGS): New variable.
7419 (EXTRA_GNATTOOLS): Always define.
7420 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7421 Clean up and adjust list of files compiled with special options.
7422 * gcc-interface/Make-lang.in: Likewise.
7423 (ada/decl.o): Cosmetical change.
7424 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7426 2011-04-20 Jim Meyering <meyering@redhat.com>
7428 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7430 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7432 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7433 $(CFLAGS) on the link line.
7435 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7437 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7438 padded type built for the return type if it is unconstrained.
7440 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7442 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7444 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7446 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7447 before calling TREE_CHAIN.
7448 * gcc-interface/misc.c (gnat_init_ts): New function.
7449 (LANG_HOOKS_INIT_TS): Define.
7451 2011-04-12 Martin Jambor <mjambor@suse.cz>
7453 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7454 instead of cgraph_node.
7456 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7458 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7459 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7462 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7464 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7465 of aggregate types that contain a placeholder.
7467 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7469 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7471 (handle_type_generic_attribute): Likewise.
7473 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7476 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7478 2011-04-04 Kai Tietz <ktietz@redhat.com>
7481 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7484 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7486 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7487 type case, do not strip a padding type around the array type.
7489 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7491 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7494 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7496 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7497 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7498 code for -feliminate-unused-debug-types.
7499 (gnat_post_options): Likewise.
7501 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7503 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7504 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7507 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7509 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7510 DECL_ARTIFICIAL flag on enumeration types.
7512 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7514 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7515 fat pointer types artificial unconditionally.
7516 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7519 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7521 * gcc-interface/gigi.h (get_dummy_type): Declare.
7522 (build_dummy_unc_pointer_types): Likewise.
7523 (finish_fat_pointer_type): Likewise.
7524 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7525 fat pointer type has been built, complete it in place.
7526 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7527 and thin pointers. Remove useless variable.
7528 (finish_fat_pointer_type): Make global and move to...
7529 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7530 (get_dummy_type): New function.
7531 (build_dummy_unc_pointer_types): Likewise.
7532 (gnat_pushdecl): Propage the name to the anonymous variants only.
7533 (update_pointer_to): Only adjust the pointer types in the unconstrained
7536 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7538 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7539 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7540 if this is a Taft amendment type and the full declaration is available.
7541 * gcc-interface/trans.c (process_type): Likewise.
7542 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7543 (process_freeze_entity): Likewise.
7544 * gcc-interface/utils.c (dummy_global): New static variable.
7545 (gnat_write_global_declarations): If there are types declared as used
7546 at the global level, insert them in the global hash table.
7548 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7550 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7551 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7552 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7554 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7555 flag of the type accordingly.
7556 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7558 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7560 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7561 finalizing types when updating the pointers to the designated type.
7562 <all>: Finalize the deferred types even if we didn't defer processing
7563 of incomplete types in this invocation.
7565 2011-04-01 Olivier Hainque <hainque@adacore.com>
7566 Nicolas Setton <setton@adacore.com>
7567 Eric Botcazou <ebotcazou@adacore.com>
7569 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7570 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7572 2011-03-28 Kai Tietz <ktietz@redhat.com>
7574 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7576 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7577 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7579 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7581 2011-03-28 Tristan Gingold <gingold@adacore.com>
7584 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7585 Use ada output of gnatbind.
7586 (ada/b_gnatb.adb): Ditto.
7587 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7588 (ada.mostlyclean, ada.stage1)
7589 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7590 (ada.stagefeedback): Adjust.
7591 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7592 Use ada output of gnatbind.
7593 (b_gnatm.adb): Ditto.
7594 (b_gnatl.o, b_gnatm.o): New rules.
7596 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7598 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7599 for the padded type built to support a specified size or alignment.
7601 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7603 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7604 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7605 unconditionally to the end of the unit when the designated type is
7607 <all>: Rename local variable. Attempt to un-defer types only and do it
7608 for limited_with'ed types as well.
7609 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7610 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7611 consistently and remove redundant call to finalize_from_with_types.
7613 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7615 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7616 subprograms without a previous spec declared in the same unit.
7617 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7618 subprograms at the end of the unit instead of at the beginning.
7619 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7620 isn't public for the special handling of non-inline functions nested
7621 inside inline external functions.
7623 2011-03-25 Jeff Law <law@redhat.com>
7625 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7627 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7629 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7630 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7631 to compute Set_Size_Depends_On_Discriminant.
7632 (Layout_Type): Call it on array types in back-end layout mode.
7633 * sem_util.adb (Requires_Transient_Scope): Return true for array
7634 types only if the size depends on the value of discriminants.
7635 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7636 type if the RHS is a call to a function that returns an unconstrained
7637 type with default discriminant.
7639 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7641 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7642 non-conversion to the nominal result type at the end.
7644 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7646 * gcc-interface/trans.c (create_temporary): New function taken from...
7647 (create_init_temporary): ...here. Call it.
7648 (call_to_gnu): Create the temporary for the return value early, if any.
7649 Create it for a function with copy-in/copy-out parameters if there is
7650 no target; in other cases of copy-in/copy-out, use another temporary.
7651 Push the new binding level lazily. Add and rename local variables.
7653 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7655 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7657 (set_rm_size): Likewise.
7659 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7661 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7662 for the padded type built in order to support a specified alignment.
7663 Fix incorrect formatting.
7665 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7668 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7670 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7672 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7673 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7674 to the end of the list. Adjust recursive call. Rename local variable.
7675 If REORDER is true, reorder components of the record type.
7676 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7677 components_to_record and adjust the parameter list.
7679 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7681 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7682 disabled, use the variable for bounds of loop iteration scheme.
7684 2011-03-21 Kai Tietz <ktietz@redhat.com>
7687 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7689 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7691 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7692 out whether the expression is read-only. Short-circuit placeholder
7693 case and rename a couple of local variables.
7695 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7697 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7698 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7699 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7700 (convert): Deal with conversions from a smaller form type specially.
7702 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7704 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7705 its argument, except for the special -I- switch.
7707 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7709 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7712 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7714 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7716 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7718 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7720 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7721 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7722 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7723 Do not generate the check directly, instead instantiate the template
7724 check present in the descriptor.
7725 (make_descriptor_field): Move around.
7726 (build_vms_descriptor32): Build a template check in the POINTER field.
7727 (build_vms_descriptor): Remove useless suffixes.
7728 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7730 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7733 * targext.c: Include target files if IN_RTS is defined.
7735 2011-01-26 Richard Guenther <rguenther@suse.de>
7738 * targext.c: Include config.h.
7739 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7742 2011-01-04 Pascal Obry <obry@adacore.com>
7743 Eric Botcazou <ebotcazou@adacore.com>
7745 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7747 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7749 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7750 end-of-case on the end label and its associated gotos, if any.
7752 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7754 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7755 expressions of the parameter cache within the statement group of
7758 2011-01-04 Olivier Hainque <hainque@adacore.com>
7759 Eric Botcazou <ebotcazou@adacore.com>
7761 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7762 (set_end_locus_from_node): New function.
7763 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7764 make and the function end_locus.
7765 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7766 for the elaboration subprogram.
7767 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7768 set the end_locus of the expression as well.
7770 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7773 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7774 variables that are referenced in exception handlers volatile.
7778 Copyright (C) 2011 Free Software Foundation, Inc.
7780 Copying and distribution of this file, with or without modification,
7781 are permitted in any medium without royalty provided the copyright
7782 notice and this notice are preserved.
7784 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7785 - fix bugs in the description of Source_Trace;
7786 - get rid of UNIT_NAME;
7788 2011-08-02 Javier Miranda <miranda@adacore.com>
7791 (Build_Dispatching_Requeue): Adding support for VM targets
7792 since we cannot directly reference the Tag entity.
7793 * exp_sel.adb (Build_K): Adding support for VM targets.
7794 (Build_S_Assignment): Adding support for VM targets.
7796 (Default_Prim_Op_Position): In VM targets do not restrict availability
7797 of predefined interface primitives to compiling in Ada 2005 mode.
7798 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7799 restricted to compiling in Ada 2005 mode.
7800 (Make_VM_TSD): Generate code that declares and initializes the OSD
7801 record. Needed to support dispatching calls through synchronized
7804 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7805 primitives associated with synchronized interfaces.
7806 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7807 primitives associated with synchronized interfaces.
7809 2011-08-02 Yannick Moy <moy@adacore.com>
7811 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7812 statements hidden in SPARK if preceded by the HIDE directive
7813 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7814 exception handlers as hidden in SPARK if preceded by the HIDE directive
7815 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7816 if starting with the HIDE directive
7817 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7818 starting with the HIDE directive; mark the declarations in a private
7819 part as hidden in SPARK if the private part starts with the HIDE
7821 * restrict.adb, restrict.ads
7822 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7823 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7824 argument node belongs to a part which is hidden in SPARK
7825 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7826 parts in SPARK; protect the possibly costly call to
7827 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7828 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7829 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7830 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7832 (Scan): recognize special comment starting with '#' and followed by
7833 SPARK keyword "hide" as a HIDE directive.
7835 2011-08-02 Yannick Moy <moy@adacore.com>
7837 * types.ads, erroutc.ads: Minor reformatting.
7839 2011-08-02 Vincent Celier <celier@adacore.com>
7841 * link.c: Add response file support for cross platforms.
7843 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7845 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7846 in an association, set parent field of copy before partial analysis.
7847 * sem_res.adb (Resolve_Slice): create reference to itype only when
7848 expansion is enabled.
7850 2011-08-02 Yannick Moy <moy@adacore.com>
7852 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7853 for new flag denoting which subprogram bodies are in ALFA
7854 * restrict.adb, sem_ch7.adb: Update comment
7855 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7856 sem_ch9.adb, sem_res.adb: Add calls to
7857 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7858 * sem_ch6.adb (Analyze_Function_Return): add calls to
7859 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7860 middle of the body, and extended return.
7861 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7862 False when missing return.
7863 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7864 to True for subprograms whose spec is in ALFA. Remove later on the flag
7865 on the entity used for a subprogram body when there exists a separate
7867 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7868 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7869 False, otherwise do nothing.
7871 2011-08-02 Robert Dewar <dewar@adacore.com>
7873 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7875 2011-08-02 Yannick Moy <moy@adacore.com>
7877 * sem_ch4.ads: minor formatting.
7879 2011-08-02 Yannick Moy <moy@adacore.com>
7881 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7882 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7883 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7884 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7885 opt.ads: cleanup of SPARK mode
7887 2011-08-02 Yannick Moy <moy@adacore.com>
7889 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7891 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7892 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7894 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7895 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7896 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7897 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7899 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7901 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7902 functions whose return type is not in ALFA.
7903 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7905 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7906 parameter's type is not in ALFA.
7907 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7910 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7912 * sem_ch6 (Analyze_Expression_Function): treat the function as
7913 Inline_Always, and introduce a subprogram declaration for it when it is
7915 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7916 expression functions, so that the back-end can determine whether they
7917 can in fact be inlined.
7918 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7919 a function body comes from an expression function.
7921 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7923 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7924 null exclusions to test Can_Never_Be_Null on the anonymous access types
7925 of the formals rather than testing the formals themselves. Exclude this
7926 check in cases where the Old_Formal is marked as a controlling formal,
7927 to avoid issuing spurious errors for bodies completing dispatching
7928 operations (due to the flag not getting set on controlling access
7929 formals in body specs).
7930 (Find_Corresponding_Spec): When checking full and subtype conformance of
7931 subprogram bodies in instances, pass Designated and E in that order, for
7932 consistency with the expected order of the formals (New_Id followed by
7935 2011-08-02 Robert Dewar <dewar@adacore.com>
7937 * sem_ch8.adb: Minor reformatting.
7939 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7941 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7942 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7943 primitive operations of class-wide actuals.
7945 2011-08-02 Javier Miranda <miranda@adacore.com>
7947 * exp_atag.ads, exp_atag.adb
7948 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7949 since its value is implicitly passed in argument Typ.
7950 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7951 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7952 Build_Common_Dispatching_Select_Statements.
7954 2011-08-02 Robert Dewar <dewar@adacore.com>
7956 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7957 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7960 2011-08-02 Robert Dewar <dewar@adacore.com>
7962 * sem_res.adb: Minor reformatting.
7963 * sem_prag.adb: Minor reformatting.
7965 2011-08-02 Javier Miranda <miranda@adacore.com>
7967 * exp_atag.adb, exp_atags.ads
7968 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7969 by the tagged type Entity. Required to use this routine in the VM
7970 targets since we do not have available the Tag entity in the VM
7973 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7974 Ada.Tags has not been previously loaded.
7976 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7977 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7979 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7980 view of enclosing scopes. Required to handle enclosing scopes that
7981 are synchronized types whose full view is a task type.
7983 (Build_VM_TSDs): Minor code improvement to avoid generating and
7984 analyzing lists with empty nodes.
7985 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7986 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7987 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7988 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7989 (Make_Select_Specific_Data_Table): Add support for VM targets.
7990 (Make_VM_TSD): Generate code to initialize the SSD structure of
7993 2011-08-02 Yannick Moy <moy@adacore.com>
7995 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7996 cross-references section in ALI.
7997 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7998 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8000 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8001 subprogram or package entity of a node
8002 (Is_Local_Reference_Type): new function returns True for references
8003 selected in local cross-references.
8004 (Lt): function extracted from Lt in Output_References
8005 (Write_Entity_Name): function extracted from Output_References
8006 (Generate_Definition): generate reference with type 'D' for definition
8007 of objects (object declaration and parameter specification), with
8008 appropriate locations and units, for use in local cross-references.
8009 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8010 references of type 'I' for initialization in object definition.
8011 (Output_References): move part of function Lt and procedure
8012 Write_Entity_Name outside of the body. Ignore references of types 'D'
8013 and 'I' introduced for local cross-references.
8014 (Output_Local_References): new procedure to output the local
8015 cross-references sections.
8016 (Lref_Entity_Status): new array defining whether an entity is a local
8017 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8018 with 'I' type when initialization expression is present.
8019 * get_scos.adb, get_scos.ads: Correct comments and typos
8021 2011-08-02 Javier Miranda <miranda@adacore.com>
8023 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8025 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
8027 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
8030 2011-08-02 Vincent Celier <celier@adacore.com>
8032 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
8033 (No_Space_Img): New function
8034 (Find_Excluded_Sources): When reading from a file, record the file name
8035 and the line number for each excluded source.
8036 (Mark_Excluded_Sources): When reporting an error, if the excluded
8037 sources were read from a file, include file name and line number in
8040 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8042 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
8044 2011-08-02 Robert Dewar <dewar@adacore.com>
8046 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
8048 2011-08-02 Javier Miranda <miranda@adacore.com>
8050 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
8051 generation of TSDs to the DOTNET compiler.
8052 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
8053 generation of TSDs to the DOTNET compiler.
8055 2011-08-02 Javier Miranda <miranda@adacore.com>
8057 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
8058 record of all the tagged types declared inside library level package
8059 declarations, library level package bodies or library level subprograms.
8060 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
8061 associated with a given tagged type.
8062 (Build_VM_TSDs): New subprogram.
8063 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
8064 compilation units that are subprograms.
8065 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
8066 compilation units that are package bodies.
8067 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
8068 units that are a package declaration or a package instantiation.
8069 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
8070 reorganization to improve the error generated by the frontend when the
8071 function Ada.Tags.Secondary_Tag is not available.
8072 * rtsfind.ads (RE_Register_TSD): New runtime entity.
8073 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
8075 2011-08-02 Javier Miranda <miranda@adacore.com>
8077 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
8079 2011-08-02 Robert Dewar <dewar@adacore.com>
8081 * s-imenne.ads: Minor reformatting.
8083 2011-08-02 Robert Dewar <dewar@adacore.com>
8085 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
8086 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
8087 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
8089 2011-08-02 Robert Dewar <dewar@adacore.com>
8091 * einfo.ads (Materialize_Entity): Document this is only for renamings
8092 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
8093 required debug information in the case where we transform the object
8094 declaration into a renaming declaration.
8095 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
8097 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
8100 2011-08-02 Robert Dewar <dewar@adacore.com>
8102 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
8103 Suppress_Init_Procs.
8104 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
8105 Suppress_Initialization/Initialization_Suppressed.
8106 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
8107 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
8108 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
8109 * sem_prag.adb: New processing for pragma Suppress_Initialization.
8111 2011-08-02 Robert Dewar <dewar@adacore.com>
8113 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
8116 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8118 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
8119 only have inheritable classwide pre/postconditions.
8121 2011-08-02 Javier Miranda <miranda@adacore.com>
8123 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
8124 * rtsfind.ads (RE_Check_TSD): New runtime entity.
8125 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
8126 checks if the external tag of a type is the same as the external tag
8127 of some other declaration.
8129 2011-08-02 Thomas Quinot <quinot@adacore.com>
8131 * s-taskin.ads: Minor reformatting.
8133 2011-08-02 Emmanuel Briot <briot@adacore.com>
8135 * g-comlin.adb (Display_Help): swap the order in which it prints the
8136 short help and the general usage.
8138 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8140 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
8141 the aspect declarations and attach them to the generic copy for
8142 subsequent analysis.
8143 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
8144 declarations of the generic tree to the new subprogram declarations.
8145 * sem_attr.adb (Check_Precondition_Postcondition): recognize
8146 conditions that apply to a subprogram instance.
8148 2011-08-02 Robert Dewar <dewar@adacore.com>
8150 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
8152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8154 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
8155 private type with a tagged full view is not derived in the immediate
8156 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
8158 2011-08-02 Robert Dewar <dewar@adacore.com>
8160 * exp_ch4.adb: Minor reformatting.
8162 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8164 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
8165 Ada2012 iterator, the loop will be rewritten during expansion into a
8166 while loop with a cursor and an element declaration. Do not analyze the
8167 body in this case, because if the container is for indefinite types the
8168 actual subtype of the elements will only be determined when the cursor
8169 declaration is analyzed.
8171 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8173 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
8174 size/alignment related attributes in CodePeer_Mode.
8176 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8178 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
8179 Prepend_Element, since this can result in the operation getting the
8180 wrong slot in the full type's dispatch table if the full type has
8181 inherited operations. The incomplete type's operation will get added
8182 to the proper position in the full type's primitives
8183 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
8184 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
8185 dispatching operations, since there are cases where nonprimitive
8186 subprograms can get added to the list of incomplete dependents (such
8187 as subprograms in nested packages).
8188 * sem_ch6.adb (Process_Formals): First, remove test for being in a
8189 private part when determining whether to add a primitive with a
8190 parameter of a tagged incomplete type to the Private_Dependents list.
8191 Such primitives can also occur in the visible part, and should not have
8192 been excluded from being private dependents.
8193 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
8194 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
8195 list of a Taft-amendment incomplete type is a primitive before issuing
8196 an error that the full type must appear in the same unit. There are
8197 cases where nonprimitives can be in the list (such as subprograms in
8199 * sem_disp.adb (Derives_From): Use correct condition for checking that
8200 a formal's type is derived from the type of the corresponding formal in
8201 the parent subprogram (the condition was completely wrong). Add
8202 checking that was missing for controlling result types being derived
8203 from the result type of the parent operation.
8205 2011-08-02 Yannick Moy <moy@adacore.com>
8207 * errout.adb (First_Node): minor renaming
8208 * restrict.adb (Check_Formal_Restriction): put restriction warning on
8211 2011-08-02 Yannick Moy <moy@adacore.com>
8213 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
8214 before accessing operands.
8215 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
8216 decide whether an initialization expression respects SPARK rules, as
8217 the plain node is the expanded one. This allows for more valid warnings
8219 * gnat_rm.texi: Minor update.
8221 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8223 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
8226 2011-08-02 Robert Dewar <dewar@adacore.com>
8228 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
8230 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8232 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
8233 loop statements and the element renaming declaration with a block when
8234 the element type is controlled.
8236 2011-08-02 Yannick Moy <moy@adacore.com>
8238 * sinfo.ads: Minor formatting.
8240 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8242 * sem_aggr.adb (Add_Association): if the association has a box and no
8243 expression, use the Sloc of the aggregate itself for the new
8245 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
8248 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8250 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
8251 When a container is provided via a function call, generate a renaming
8252 of the function result. This avoids the creation of a transient scope
8253 and the premature finalization of the container.
8254 * exp_ch7.adb (Is_Container_Cursor): Removed.
8255 (Wrap_Transient_Declaration): Remove the supression of the finalization
8256 of the list controller when the declaration denotes a container cursor,
8259 2011-08-02 Yannick Moy <moy@adacore.com>
8261 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
8262 node is from source, instead of the original node being from source.
8264 (Resolve_Array_Aggregate): refine the check for a static expression, to
8265 recognize also static ranges
8266 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
8267 Array_Type_Declaration): postpone the test for the type being a subtype
8268 mark after the type has been resolved, so that component-selection and
8269 expanded-name are discriminated.
8270 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
8271 to distinguish the case of an iteration scheme, so that an error is
8272 issed on a non-static range in SPARK except in an iteration scheme.
8273 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
8274 In_Iter_Schm = True.
8275 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
8276 user-defined operators so that they are allowed in renaming
8278 (Find_Selected_Component): refine the check for prefixing of operators
8279 so that they are allowed in renaming. Move the checks for restrictions
8280 on selector name after analysis discriminated between
8281 component-selection and expanded-name.
8282 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
8283 concatenation argument of string type if it is static.
8284 * sem_util.adb, sem_util.ads
8285 (Check_Later_Vs_Basic_Declarations): add a new function
8286 Is_Later_Declarative_Item to decice which declarations are allowed as
8287 later items, in the two different modes Ada 83 and SPARK. In the SPARK
8288 mode, add that renamings are considered as later items.
8289 (Enclosing_Package): new function to return the enclosing package
8290 (Enter_Name): correct the rule for homonyms in SPARK
8291 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
8292 from source (result of expansion) to avoid issuing wrong warnings.
8294 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8296 * errout.adb: On anything but an expression First_Node returns its
8299 2011-08-02 Pascal Obry <obry@adacore.com>
8301 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
8303 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8305 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
8306 Set the associated loop as the related expression of internally
8308 * exp_ch7.adb (Is_Container_Cursor): New routine.
8309 (Wrap_Transient_Declaration): Supress the finalization of the list
8310 controller when the declaration denotes a container cursor.
8312 2011-08-02 Yannick Moy <moy@adacore.com>
8314 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
8316 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
8317 expression is a simple expression. This check cannot be performed in
8318 the semantics, so just drop it.
8319 (P_Index_Or_Discriminant_Constraint): move check that the index or
8320 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8321 semantics. Other cases were previously checked in the semantics.
8322 * par-ch4.adb (P_Name): move checks that a selector name is not
8323 character literal or an operator symbol to Find_Selected_Component in
8325 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8326 declarations are not placed after later declarations in a separate
8327 procedure in Sem_Util (possibly not the best choice?), to be used both
8328 during parsing, for Ada 83 mode, and during semantic analysis, for
8330 * par-endh.adb (Check_End): move check that end label is not missing
8331 to Process_End_Label in the semantics
8332 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8333 the special case for SPARK restriction
8334 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8335 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8336 parameter Force to issue the error message even on internal node (used
8337 for generated end label). Call Check_Restriction to check when an error
8338 must be issued. In SPARK mode, issue an error message even if the
8339 restriction is not set.
8340 (Check_Restriction): new procedure with an additional out parameter to
8341 inform the caller that a message has been issued
8342 * sem_aggr.adb: Minor modification of message
8343 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8344 instead of issuing an error message directly
8345 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8346 declarations are not placed after later declarations, by calling
8347 Check_Later_Vs_Basic_Declarations
8348 (Analyze_Subtype_Declaration): move here the check that an index or
8349 discriminant constraint must be a subtype mark. Change the check that
8350 a subtype of String must start at one so that it works on subtype marks.
8351 * sem_ch4.adb (Analyze_Call): move here the check that a named
8352 association cannot follow a positional one in a call
8353 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8354 instead of issuing an error message directly
8355 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8356 selector name is not a character literal or an operator symbol. Move
8357 here the check that the prefix of an expanded name cannot be a
8358 subprogram or a loop statement.
8359 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8360 procedure called from parsing and semantics to check that basic
8361 declarations are not placed after later declarations
8362 (Process_End_Label): move here the check that end label is not missing
8364 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8366 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8367 representation clause in codepeer mode, since it confuses CodePeer and
8368 does not bring useful info.
8370 2011-08-02 Ed Falis <falis@adacore.com>
8372 * init.c: initialize fp hw on MILS.
8374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8376 * errout.adb (First_Node): for bodies, return the node itself (small
8377 optimization). For other nodes, do not check source_unit if the node
8378 comes from Standard.
8380 2011-08-02 Robert Dewar <dewar@adacore.com>
8382 * exp_ch3.adb: Minor comment additions.
8383 * sem_ch13.adb: Minor reformatting.
8385 2011-08-02 Pascal Obry <obry@adacore.com>
8387 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8389 2011-08-02 Robert Dewar <dewar@adacore.com>
8391 * sem_attr.adb: Minor reformatting.
8393 2011-08-02 Robert Dewar <dewar@adacore.com>
8395 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8396 (Has_Default_Component_Value): Removed
8397 * einfo.ads Comment updates
8398 (Has_Default_Aspect): Replaces Has_Default_Value
8399 (Has_Default_Component_Value): Removed
8401 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8403 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8404 (Get_Simple_Init_Val): Handle Default_Value aspect
8405 (Needs_Simple_Initialization): Handle Default_Value aspect
8406 * exp_ch3.ads: Needs_Simple_Initialization
8407 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8408 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8410 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8411 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8412 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8416 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8417 package containing iteration primitives.
8418 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8420 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8422 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8423 "of", pre-analyze expression in case it is a function call with
8424 finalization actions that must be placed ahead of the loop.
8425 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8426 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8428 2011-08-02 Geert Bosch <bosch@adacore.com>
8430 * cstand.adb (Create_Float_Types): Only consider C's long double for
8431 Long_Long_Float, in addition to double.
8433 2011-08-02 Robert Dewar <dewar@adacore.com>
8435 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8436 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8437 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8440 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8442 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8445 2011-08-02 Javier Miranda <miranda@adacore.com>
8447 * einfo.ads, einfo.adb
8448 (Original_Access_Type): Move this attribute to Node26 since there was
8449 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8450 which causes conflicts and breaks the generation of the .NET compiler.
8451 (Interface_Name): Add missing documentation on JGNAT only uses of
8454 2011-08-02 Geert Bosch <bosch@adacore.com>
8456 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8457 (Find_Back_End_Float_Type): Likewise
8458 (Create_Back_End_Float_Types): Likewise
8459 (Create_Float_Types): Likewise
8460 (Register_Float_Type): Likewise
8461 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8462 Nlist and split out type selection in new local Find_Base_Type function.
8463 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8465 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8467 2011-08-02 Robert Dewar <dewar@adacore.com>
8469 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8471 * opt.ads: Minor comment change.
8472 * sem_ch12.adb: Minor code reorganization.
8474 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8476 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8477 subtype's list of rep items to the list on the full subtype in the case
8478 where the lists are the same.
8480 2011-08-02 Geert Bosch <bosch@adacore.com>
8482 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8483 using the one from System.Strings, which also deallocates all strings.
8485 2011-08-02 Geert Bosch <bosch@adacore.com>
8487 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8489 * gcc-interface/Make-lang.in: Update dependencies.
8491 2011-08-02 Olivier Hainque <hainque@adacore.com>
8493 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8496 2011-08-02 Javier Miranda <miranda@adacore.com>
8498 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8499 associated with anonymous access to subprograms.
8501 2011-08-02 Geert Bosch <bosch@adacore.com>
8504 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8505 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8506 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8507 (Add_Symbol_Definition): Move to switch-c.adb
8508 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8509 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8510 (Add_Symbol_Definition): Move to switch-c.adb.
8511 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8513 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8515 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8516 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8518 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8519 (Add_Symbol_Definition): Moved from Prepcomp.
8520 * switch-c.ads: Update copyright notice. Use String_List instead of
8521 Argument_List, removing dependency on System.OS_Lib.
8523 2011-08-02 Yannick Moy <moy@adacore.com>
8525 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8526 mode on initialization expression which does not respect SPARK
8528 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8529 if the tree referenced by its argument represents an initialization
8530 expression in SPARK, suitable for initializing an object in an object
8533 2011-08-02 Javier Miranda <miranda@adacore.com>
8535 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8536 internally generated access to subprogram with its associated protected
8538 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8540 2011-08-02 Geert Bosch <bosch@adacore.com>
8542 * cstand.adb (Register_Float_Type): Print information about type to
8543 register, if the Debug_Flag_Dot_B is set.
8544 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8545 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8546 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8547 with a requested precision of more than Max_Digits digits and no more
8548 than Max_Base_Digits digits, if a range specification is present and the
8549 Predefined_Float_Types list has a suitable type to derive from.
8550 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8551 case of type completion with pragma Import
8553 (Process_Import_Predefined_Type): Processing to complete a type
8554 with pragma Import. Currently supports floating point types only.
8555 (Set_Convention_From_Pragma): Do nothing without underlying type.
8556 (Process_Convention): Guard against absence of underlying type,
8557 which may happen when importing incomplete types.
8558 (Process_Import_Or_Interface): Handle case of importing predefined
8559 types. Tweak error message.
8561 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8563 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8564 functions to previous change. Reorganize code slightly.
8566 2011-08-02 Geert Bosch <bosch@adacore.com>
8568 * back_end.ads (Register_Type_Proc): New call back procedure type for
8569 allowing the back end to provide information about available types.
8570 (Register_Back_End_Types): New procedure to register back end types.
8571 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8573 * cstand.adb (Back_End_Float_Types): New list for floating point types
8574 supported by the back end.
8575 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8576 (Copy_Float_Type): New procedure to make new copies of predefined types.
8577 (Register_Float_Type): New call back procedure to populate the BEFT list
8578 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8579 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8580 (Create_Float_Types): New procedure to create entities for floating
8581 point types predefined in Standard, and put these and any remaining
8582 BEFTs on the Predefined_Float_Types list.
8583 * stand.ads (Predefined_Float_Types): New list for predefined floating
8584 point types that do not have declarations in package Standard.
8586 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8588 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8589 entity node for the unit containing the parameter.
8590 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8591 (Add_Inlined_Subprogram): Likewise.
8592 * gcc-interface/Make-lang.in: Update dependencies.
8594 2011-08-02 Thomas Quinot <quinot@adacore.com>
8596 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8599 2011-08-02 Geert Bosch <bosch@adacore.com>
8601 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8603 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8605 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8606 computed value of Base_Type.
8608 2011-08-02 Yannick Moy <moy@adacore.com>
8610 * restrict.adb (Check_Restriction): issue an error for any use of
8611 class-wide, even if the No_Dispatch restriction is not set.
8612 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8613 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8614 when completing a private extension, the type named in the private part
8615 is not the same as that named in the visible part.
8616 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8617 of an inherited primitive operations of a tagged type or type extension
8618 that returns the tagged type.
8619 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8620 function which returns True for an implicit operation inherited by the
8621 derived type declaration for the argument type.
8622 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8625 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8627 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8628 Process_Bounds, to perform analysis with expansion of a range or an
8629 expression that is the iteration scheme for a loop.
8630 (Analyze_Iterator_Specification): If domain of iteration is given by a
8631 function call with a controlled result, as is the case if call returns
8632 a predefined container, ensure that finalization actions are properly
8634 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8636 2011-08-02 Javier Miranda <miranda@adacore.com>
8638 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8639 * gcc-interface/Make-lang.in: Update dependencies.
8641 2011-08-02 Javier Miranda <miranda@adacore.com>
8643 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8644 determine if the analysis is performed using N or Original_Node (N).
8645 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8646 functionality of routine Is_Variable avoids code duplication.
8647 * checks.adb (Determine_Range): Handle temporaries generated by
8648 Remove_Side_Effects.
8650 2011-08-02 Javier Miranda <miranda@adacore.com>
8652 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8653 expansion of the condition. Required since the previous analysis was
8654 done with expansion disabled (see Resolve_Quantified_Expression) and
8655 hence checks were not inserted and record comparisons have not been
8658 2011-08-02 Ed Falis <falis@adacore.com>
8660 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8663 2011-08-02 Bob Duff <duff@adacore.com>
8665 * opt.ads: Minor comment fix.
8667 2011-08-02 Bob Duff <duff@adacore.com>
8669 * sem_ch12.adb (Analyze_Package_Instantiation,
8670 Analyze_Subprogram_Instantiation): Turn off style checking while
8671 analyzing an instance. Whatever style checks that apply to the generic
8672 unit should apply, so it makes no sense to apply them in an instance.
8673 This was causing trouble when compiling an instance of a runtime
8674 unit that violates the -gnatyO switch.
8675 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8676 one of the two case statements, causing spurious errors.
8678 2011-08-02 Robert Dewar <dewar@adacore.com>
8680 * uname.adb: Minor reformatting.
8681 * gnatcmd.adb: Minor reformatting.
8682 * exp_attr.adb: Minor reformatting.
8684 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8686 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8687 No_Dispatching_Calls, do not look for the Assign primitive, because
8688 predefined primitives are not created in this case.
8690 2011-08-02 Bob Duff <duff@adacore.com>
8692 * stylesw.ads: Minor comment fixes.
8694 2011-08-02 Robert Dewar <dewar@adacore.com>
8696 * freeze.adb (Add_To_Result): New procedure.
8698 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8700 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8701 time, if the specific run-time routines for handling streams of strings
8702 are not available, use the default mechanism.
8704 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8706 * s-regpat.ads: Fix typo.
8708 2011-08-02 Vincent Celier <celier@adacore.com>
8710 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8711 not null, call it to create the in memory config project file without
8712 parsing an existing default config project file.
8714 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8716 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8718 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8720 * sem_elim.adb: an abstract subprogram does not need an eliminate
8721 pragma for its descendant to be eliminable.
8723 2011-08-02 Ed Falis <falis@adacore.com>
8725 * init.c: revert to handling before previous checkin for VxWorks
8726 * s-intman-vxworks.adb: delete unnecessary declarations related to
8727 using Ada interrupt facilities for handling signals.
8728 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8729 * s-intman-vxworks.ads: Import __gnat_install_handler as
8730 Initialize_Interrupts.
8731 * s-taprop-vxworks.adb: Delete Signal_Mask.
8732 (Abort_Handler): change construction of mask to unblock exception
8735 2011-08-02 Jerome Guitton <guitton@adacore.com>
8737 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8738 Debug_Raise_Exception before propagation starts.
8740 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8742 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8743 to Restriction_Check_Required.
8744 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8745 * sem_res.adb (Resolve_Call): Likewise.
8746 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8748 2011-08-02 Bob Duff <duff@adacore.com>
8750 * stylesw.ads: Update comment.
8751 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8752 * errout.ads: Remove obsolete comment.
8754 2011-08-02 Javier Miranda <miranda@adacore.com>
8756 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8757 (Set_Is_Safe_To_Reevaluate): new procedure.
8758 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8759 assignment is allowed on safe-to-reevaluate variables.
8760 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8761 temporary created to remove side effects in expressions that use
8762 the secondary stack as safe-to-reevaluate.
8763 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8764 variables that are not true constants.
8766 2011-08-02 Robert Dewar <dewar@adacore.com>
8768 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8769 sem_res.adb, sem_ch6.adb: Minor reformatting.
8771 2011-08-02 Jerome Guitton <guitton@adacore.com>
8773 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8775 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8777 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8778 not set Overridden_Operation if subprogram is an initialization
8781 2011-08-02 Yannick Moy <moy@adacore.com>
8783 * par-ch6.adb: Correct obsolete name in comments
8784 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8785 which takes two message arguments (existing function takes one), with
8786 second message used for continuation.
8787 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8788 block statements that originate from a source block statement, not
8789 generated block statements
8790 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8791 symmetry with procedure case
8792 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8793 function to issue an error in formal mode if a package specification
8794 contains more than one tagged type or type extension.
8795 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8796 parameters matching formals of tagged types are objects (or ancestor
8797 type conversions of objects), not general expressions. Issue an error
8798 on view conversions that are not involving ancestor conversion of an
8800 (Resolve_Type_Conversion): in formal mode, issue an error on the
8801 operand of an ancestor type conversion which is not an object
8802 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8803 procedure so that it works also for actuals of function calls
8804 (Is_Actual_Tagged_Parameter): new function which determines if its
8805 argument is an actual parameter of a formal of tagged type in a
8807 (Is_SPARK_Object_Reference): new function which determines if the tree
8808 referenced by its argument represents an object in SPARK
8810 2011-08-02 Robert Dewar <dewar@adacore.com>
8812 * sem_ch3.adb: Minor reformatting
8813 Minor comment addition
8814 Minor error msg text change
8816 2011-08-02 Javier Miranda <miranda@adacore.com>
8818 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8819 function. Used to be more precise when we generate a variable plus one
8820 assignment to remove side effects in the evaluation of the Bound
8822 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8823 of the bound expression to force its re-analysis and thus expand the
8824 associated transient scope (if required). Code cleanup replacing the
8825 previous code that declared the constant entity by an invocation to
8826 routine Force_Evaluation which centralizes this work in the frontend.
8828 2011-08-02 Robert Dewar <dewar@adacore.com>
8830 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8831 (Base_Type): Now uses improved Is_Base_Type function
8832 * einfo.ads (Base_Type): Inline this function
8834 2011-08-02 Robert Dewar <dewar@adacore.com>
8836 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8837 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8839 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8841 * gcc-interface/Make-lang.in: Update dependencies.
8842 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8845 2011-08-02 Yannick Moy <moy@adacore.com>
8847 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8848 non-simple expression used in delta constraint
8849 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8850 index constraint which is not a subtype mark
8851 * par.adb: With and use Restrict
8852 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8853 mode on component type which is not a subtype mark and default
8854 expression on component
8855 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8856 of string which does not have a lower index bound equal to 1
8857 (Array_Type_Declaration): issue an error in formal mode on index or
8858 component type which is not a subtype mark, and on aliased keyword on
8860 (Derived_Type_Declaration): issue an error in formal mode on interface,
8861 limited or abstract type
8862 (Record_Type_Declaration): issue an error in formal mode on interface
8863 (Record_Type_Definition): issue an error in formal mode on tagged types
8864 and type extensions not declared in the specification of a library unit
8865 package; on null non-tagged record; on variant part
8867 2011-08-02 Vincent Celier <celier@adacore.com>
8869 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8870 not declared for qualified library project when Library_Name is not
8871 declared, but Library_Dir is.
8873 2011-08-02 Robert Dewar <dewar@adacore.com>
8875 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8876 pragmas (affects aspects [Component_]Default_Value
8877 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8878 component type for the resolution
8880 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8882 * einfo.adb (Base_Type): Tune implementation for speed.
8884 2011-08-02 Robert Dewar <dewar@adacore.com>
8886 * freeze.adb: Minor reformatting.
8888 2011-08-02 Thomas Quinot <quinot@adacore.com>
8890 * scos.ads: Update comments.
8892 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8894 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8895 base type, because the parent may be a subtype of a private type whose
8896 convention is established in a private part.
8898 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8900 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8901 statement in a block when the expansion of the return expression has
8902 created a finalization chain.
8903 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8904 with the parent node.
8905 Add N_Extended_Return_Statement to handle the case where a transient
8906 object declaration appears in the Return_Object_Declarations list of
8907 an extended return statement.
8909 2011-08-02 Matthew Gingell <gingell@adacore.com>
8911 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8912 unused parameter 'name'.
8914 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8916 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8917 inherited operation, check whether its alias, which is the source
8918 operastion that it renames, has been marked eliminated.
8920 2011-08-02 Javier Miranda <miranda@adacore.com>
8922 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8923 in-mode parameter whose type is an access type since it can be used to
8924 modify its designated object. Enforce code that handles as safe an
8925 access type that is not access-to-constant but it is the result of a
8926 previous removal of side-effects.
8927 (Remove_Side_Effects): Minor code reorganization of cases which require
8928 no action. Done to incorporate documentation on new cases uncovered
8929 working in this ticket: no action needed if this routine was invoked
8930 too early and the nodes are not yet decorated.
8931 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8932 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8933 were issued with actuals that are implicitly provided by
8936 2011-08-02 Robert Dewar <dewar@adacore.com>
8938 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8940 2011-08-02 Yannick Moy <moy@adacore.com>
8942 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8943 to issue an error in formal mode on attribute not supported in this mode
8944 (Analyze_Attribute): issue errors on standard attributes not supported
8946 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8947 comment, and issue error in formal mode on modulus which is not a power
8949 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8951 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8953 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8954 operator on modular type (except 'not').
8956 2011-08-02 Robert Dewar <dewar@adacore.com>
8958 * gnat_rm.texi: Minor reformatting.
8960 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8962 * s-osinte-linux.ads: Minor comment update and reformatting.
8963 * i-cexten.ads: Make this unit pure, as for its parent.
8964 Will allow its usage in more contexts if needed.
8966 2011-08-02 Robert Dewar <dewar@adacore.com>
8968 * s-utf_32.ads: Minor comment fix.
8970 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8972 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8973 operation of a tagged synchronized type, handle the case where the
8974 controlling argument is overloaded.
8976 2011-08-02 Yannick Moy <moy@adacore.com>
8978 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8979 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8980 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8981 SPARK mode and formal verification mode on processing SPARK restriction
8982 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8983 requiring consistency checking.
8985 2011-08-02 Robert Dewar <dewar@adacore.com>
8987 * sem_res.adb: Minor reformatting.
8989 2011-08-02 Robert Dewar <dewar@adacore.com>
8991 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8992 a-cforse.ads: Remove unneeded with of Ada.Containers
8993 Remove commented out pragma Inline's
8994 Move specifications of new subprograms to the actual specs
8996 2011-08-02 Yannick Moy <moy@adacore.com>
8998 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8999 a-cforse.ads: Update comments.
9001 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9003 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9005 2011-08-02 Robert Dewar <dewar@adacore.com>
9007 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9008 a-cforse.ads, a-cofove.ads: Minor reformatting.
9010 2011-08-02 Claire Dross <dross@adacore.com>
9012 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9013 a-cofove.ads: Add comments.
9015 2011-08-02 Yannick Moy <moy@adacore.com>
9017 * gnat_rm.texi: Document formal containers.
9019 2011-08-02 Emmanuel Briot <briot@adacore.com>
9021 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9024 2011-08-02 Robert Dewar <dewar@adacore.com>
9026 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
9029 2011-08-02 Robert Dewar <dewar@adacore.com>
9031 * aspects.adb: New aspects Default_Value and Default_Component_Value
9032 New format of Aspect_Names table checks for omitted entries
9033 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
9034 handling of boolean aspects for derived types.
9035 New aspects Default_Value and Default_Component_Value
9036 New format of Aspect_Names table checks for omitted entries
9037 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
9038 (Has_Default_Value): New flag
9039 (Has_Default_Component_Value): New flag
9040 (Has_Default_Value): New flag
9041 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
9043 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
9044 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
9045 Default_Value and Default_Component_Value
9046 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
9047 New aspects Default_Value and Default_Component_Value
9048 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
9049 * sprint.adb: Print N_Aspect_Specification node when called from gdb
9051 2011-08-02 Vincent Celier <celier@adacore.com>
9053 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
9054 inherit library kind.
9056 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9058 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
9061 2011-08-02 Robert Dewar <dewar@adacore.com>
9063 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
9065 2011-08-02 Yannick Moy <moy@adacore.com>
9067 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
9069 2011-08-02 Robert Dewar <dewar@adacore.com>
9071 * impunit.adb: Add comment.
9073 2011-08-02 Yannick Moy <moy@adacore.com>
9075 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
9076 qualification of aggregates in formal mode
9077 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
9079 (Resolve_Aggregate): complete the test that an aggregate is adequately
9080 qualified in formal mode
9082 2011-08-02 Pascal Obry <obry@adacore.com>
9084 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
9085 * mlib-prj.adb: Supress warning when compiling binder generated file.
9086 (Build_Library): Supress all warnings when compiling the binder
9089 2011-08-02 Yannick Moy <moy@adacore.com>
9091 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
9093 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
9094 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
9095 Add with/use clauses to make Check_Formal_Restriction visible
9097 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9099 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
9100 in-parameters when type of the generic formal is private in the generic
9101 spec and non-private in the body.
9103 2011-08-02 Claire Dross <dross@adacore.com>
9105 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
9106 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
9107 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
9108 * impunit.adb, Makefile.rtl: Take new files into account.
9110 2011-08-02 Robert Dewar <dewar@adacore.com>
9112 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
9113 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9115 2011-08-02 Yannick Moy <moy@adacore.com>
9117 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
9119 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
9120 matching static array bounds, taking into account the special case of
9122 * sem_ch3.adb: Typo in comment.
9124 2011-08-02 Yannick Moy <moy@adacore.com>
9126 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
9127 which issues an error in formal mode if its argument node is originally
9129 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
9130 has a discriminant specification so that it does not include the case
9132 (Derived_Type_Declaration): move here the test that a derived type has a
9133 discriminant specification
9134 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
9135 first element of a component association before accessing its choices
9136 (presence of component association is not enough)
9137 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
9138 declaration is a library item before accessing the next element in a
9139 list, as library items are not member of lists
9140 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
9141 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
9142 Check_Formal_Restriction whenever possible.
9144 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9146 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
9147 reference when needed.
9149 2011-08-02 Bob Duff <duff@adacore.com>
9151 * gnat_ugn.texi: Fix typo.
9153 2011-08-02 Vincent Celier <celier@adacore.com>
9155 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
9156 archive file name. Do not use the full path name of archives for Open
9159 2011-08-02 Robert Dewar <dewar@adacore.com>
9161 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
9162 Analyze_Aspect_Specifications
9164 (Analyze_Aspect_Specifications): New handling for boolean aspects
9165 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
9166 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
9167 sequence for Analyze_Aspect_Specifications
9168 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
9169 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
9171 2011-08-02 Robert Dewar <dewar@adacore.com>
9173 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
9174 aspects, since these no longer exist.
9176 2011-08-02 Robert Dewar <dewar@adacore.com>
9178 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
9179 semicolon, do not try to see if there are aspects following it.
9180 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
9183 2011-08-02 Robert Dewar <dewar@adacore.com>
9185 * sem_ch8.adb, aspects.ads: Minor reformatting.
9187 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9189 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
9190 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
9192 (Analyze_Aspect_Specifications): ...here. Call above procedure.
9194 2011-08-02 Yannick Moy <moy@adacore.com>
9196 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
9197 mode on subprogram declaration outside of package specification, unless
9198 it is followed by a pragma Import
9199 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
9200 Access_Type_Declaration): issue error in formal mode on access type
9201 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
9203 (Analyze_Object_Declaration): issue error in formal mode on object
9204 declaration which does not respect SPARK restrictions
9205 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
9206 declaration which does not respect SPARK restrictions
9207 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
9208 error in formal mode on digits or delta constraint
9209 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
9210 decimal fixed point type
9211 (Derived_Type_Declaration): issue error in formal mode on derived type
9212 other than type extensions of tagged record types
9213 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
9214 with check on access definition
9215 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
9216 mode on protected definition.
9217 (Analyze_Task_Definition): issue error in formal mode on task definition
9219 2011-08-02 Robert Dewar <dewar@adacore.com>
9221 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
9223 2011-08-02 Javier Miranda <miranda@adacore.com>
9225 * sem_ch6.adb (Can_Override_Operator): New function.
9226 (Verify_Overriding_Indicator): Add missing code to check overriding
9227 indicator in operators. Fixes regression.
9228 (Check_Overriding_Indicator): Minor reformating after replacing the
9229 code that evaluates if the subprogram can override an operator by
9230 invocations to the above new function.
9232 (Write_Field26_Name): Add missing code to ensure that, following
9233 the documentation in einfo.ads, this field is not shown as attribute
9234 "Static_Initialization" on non-dispatching functions.
9236 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9238 * sem_res.adb (Resolve_Call): A call to
9239 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
9240 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
9241 i.e., when the second parameter is of type Time_Span.
9243 2011-08-02 Vincent Celier <celier@adacore.com>
9245 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
9246 with an archive instead of -L<library dir> -l<library name>.
9248 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9250 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
9251 mark the base types In_Use in addition to making the operations
9254 2011-08-02 Ed Falis <falis@adacore.com>
9256 * init.c: add and setup __gnat_signal_mask for the exception signals
9257 * s-inmaop-vxworks.adb: new file.
9258 * s-intman-vxworks.adb: remove unnecessary initializations and
9260 * s-intman-vxworks.ads: remove unnecessary variable
9261 * s-taprop-vxworks.adb: simplify signal initialization
9263 2011-08-02 Robert Dewar <dewar@adacore.com>
9265 * sem_ch8.adb: Minor code reorganization, comment updates.
9267 2011-08-02 Robert Dewar <dewar@adacore.com>
9269 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
9270 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
9272 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
9273 (Matching_Static_Array_Bounds): Moved here from Sem_Res
9275 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9277 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
9278 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
9279 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
9280 use_type_clauses, to handle more efficiently use_type and use_all_type
9282 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
9283 Ada2012 Use_All_Type clause.
9284 (Use_Class_Wide_Operations): new procedure.
9286 2011-08-02 Robert Dewar <dewar@adacore.com>
9288 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
9289 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
9290 expression to expression function.
9292 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9294 * sem_ch4.adb: transform simple Ada2012 membership into equality only
9295 if types are compatible.
9297 2011-08-02 Yannick Moy <moy@adacore.com>
9299 * sem_res.adb (Matching_Static_Array_Bounds): new function which
9300 returns True if its argument array types have same dimension and same
9301 static bounds at each index.
9302 (Resolve_Actuals): issue an error in formal mode on actuals passed as
9303 OUT or IN OUT paramaters which are not view conversions in SPARK.
9304 (Resolve_Arithmetic_Op): issue an error in formal mode on
9305 multiplication or division with operands of fixed point types which are
9306 not qualified or explicitly converted.
9307 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
9308 Boolean or array type (except String) operands.
9309 (Resolve_Equality_Op): issue an error in formal mode on equality
9310 operators for array types other than String with non-matching static
9312 (Resolve_Logical_Op): issue an error in formal mode on logical operators
9313 for array types with non-matching static bounds. Factorize the code in
9314 Matching_Static_Array_Bounds.
9315 (Resolve_Qualified_Expression): issue an error in formal mode on
9316 qualified expressions for array types with non-matching static bounds.
9317 (Resolve_Type_Conversion): issue an error in formal mode on type
9318 conversion for array types with non-matching static bounds
9320 2011-08-02 Robert Dewar <dewar@adacore.com>
9322 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9324 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9326 * par-ch9.adb: save location of entry for proper error message.
9328 2011-08-02 Javier Miranda <miranda@adacore.com>
9330 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9331 (Use_Full_View) which permits this routine to climb through the
9332 ancestors using the full-view of private parents.
9333 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9334 Use_Full_View to true in calls to Is_Ancestor.
9335 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9336 true in call to Is_Ancestor.
9337 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9338 Use_Full_View to true in call to Is_Ancestor.
9339 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9340 call to Is_Ancestor.
9341 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9342 Use_Full_View to true in calls to Is_Ancestor.
9343 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9344 Make_Select_Specific_Data_Table, Register_Primitive,
9345 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9346 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9347 to true in call to Is_Ancestor.
9348 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9349 Use_Full_View to true in calls to Is_Ancestor.
9351 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9352 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9354 2011-08-02 Robert Dewar <dewar@adacore.com>
9356 * gnat_rm.texi: Minor reformatting.
9357 * sem_prag.adb: Minor reformatting.
9359 2011-08-02 Tristan Gingold <gingold@adacore.com>
9361 * vms_data.ads: Add VMS qualifier for -gnateP.
9363 2011-08-02 Robert Dewar <dewar@adacore.com>
9365 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9366 * par-ch7.adb (P_Package): Proper placement of aspects for package
9368 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9369 (End_Statements): Add Is_Sloc parameterr
9370 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9371 (Check_End): Ad Is_Sloc parameter
9372 (End_Statements): Add Is_Sloc parameterr
9374 2011-08-02 Vincent Celier <celier@adacore.com>
9376 * ug_words: Add VMS qualifier equivalent to -gnateP:
9377 /SYMBOL_PREPROCESSING.
9379 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9381 * gnat-style.texi: For hexadecimal numeric literals the typical
9382 grouping of digits is 4 to represent 2 bytes.
9383 A procedure spec which is split into several lines is indented two
9386 2011-08-02 Yannick Moy <moy@adacore.com>
9388 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9389 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9390 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9392 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9393 choice in array aggregate
9394 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9396 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9397 positional and named aggregate for record, or others in record
9398 aggregate, or multiple choice in record aggregate
9399 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9400 array operands to logical operations AND, OR and XOR do not have the
9401 same static lower and higher bounds
9402 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9404 2011-08-01 Robert Dewar <dewar@adacore.com>
9406 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9407 Replaces Last_Source_Node_In_Sequence.
9408 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9409 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9410 parens and blank in string (this was inconsistently implemented).
9412 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9413 blank in string (this was inconsistently implemented).
9415 (Set_Global_Switches): Set formal mode switches appropriately
9416 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9418 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9419 call Set_Error_Msg_Lang to set "spark" as language name.
9420 * par.adb: Remove unnecessary call to set formal language for errout
9421 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9422 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9424 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9425 calls to it, moved after resolution so that types are known
9426 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9427 result of concatenation is not of type String
9428 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9429 concatenation is not properly restricted
9430 * gnat_rm.texi: Add doc on pragma Spark_95.
9431 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9432 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9433 * gcc-interface/Make-lang.in: Update dependencies.
9435 2011-08-01 Javier Miranda <miranda@adacore.com>
9437 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9438 condition that detects if the overridden operation must replace an
9441 2011-08-01 Javier Miranda <miranda@adacore.com>
9443 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9444 code declarations inserted by Insert_Actions in each alternative of the
9445 N_Case_Expression node.
9447 2011-08-01 Robert Dewar <dewar@adacore.com>
9449 * sem_ch6.adb: Minor code reorganization.
9450 * sem_util.adb: Minor reformatting.
9452 2011-08-01 Pascal Obry <obry@adacore.com>
9454 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9455 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9457 2011-08-01 Yannick Moy <moy@adacore.com>
9459 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9460 literal or operator symbol which is prefixed
9461 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9462 mode on access attributes.
9463 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9464 that concatenation operands are properly restricted in formal mode
9465 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9466 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9467 result of the concatenation has a type different from String.
9468 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9469 Analyze_Quantified_Expression, Analyze_Slice,
9470 Analyze_Null): issue an error in formal mode on unsupported constructs
9472 (Analyze_Block_Statement): only issue error on source block statement
9473 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9474 function which returns the last node in a list of nodes for which
9475 Comes_From_Source returns True, if any
9476 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9477 Last_Source_Node_In_Sequence
9478 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9479 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9480 mode on unsupported constructs
9481 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9482 rest of the actions may be needed later on since the error is marked as
9484 * sinfo.ads: Typos in comments.
9486 2011-08-01 Pascal Obry <obry@adacore.com>
9488 * projects.texi: Minor editing.
9490 2011-08-01 Yannick Moy <moy@adacore.com>
9492 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9493 insertion character ~~
9494 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9495 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9496 with insertion character ~~
9497 (Set_Msg_Text): treat insertion character ~~
9498 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9499 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9500 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9501 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9502 errors related to the formal language restriction not serious
9503 (insertion character |).
9504 * par.adb (Par): set formal language for error messages if needed
9505 * sem_ch6.adb (Check_Missing_Return): take into account possible
9506 generated statements at the end of the function
9507 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9508 enumeration value to define a new pragma SPARK_95
9509 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9510 SPARK_Version): new type and variables to store the SPARK version
9512 (SPARK_Mode): return True when SPARK_Version is set
9513 * par-prag.adb: Correct indentation
9514 (Prag): take Pragma_SPARK_95 into account
9515 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9518 2011-08-01 Robert Dewar <dewar@adacore.com>
9520 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9521 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9522 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9524 2011-08-01 Pascal Obry <obry@adacore.com>
9526 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9527 Target_Name to Get_Path call.
9528 (Parse_Single_Project): Likewise.
9529 (Post_Parse_Context_Clause): Likewise.
9530 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9531 Call Initialise_Project_Path with the proper Target_Name.
9532 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9534 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9535 with the proper Target_Name.
9536 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9538 (Parse_Project_And_Apply_Config): Likewise.
9539 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9540 This is fine as this part of the code is supporting only native
9542 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9543 is fine as this part of the code is supporting only native compilation.
9545 2011-08-01 Yannick Moy <moy@adacore.com>
9547 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9548 of homonym, unless the homonym is one of the cases allowed in SPARK
9549 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9550 package declaration occurring after a body.
9552 2011-08-01 Robert Dewar <dewar@adacore.com>
9554 * checks.adb, exp_ch4.adb: Minor reformatting.
9556 2011-08-01 Javier Miranda <miranda@adacore.com>
9558 * einfo.ads (Access_Disp_Table): Fix documentation.
9559 (Dispatch_Table_Wrappers): Fix documentation.
9561 2011-08-01 Pascal Obry <obry@adacore.com>
9563 * prj-env.adb, prj-env.ads: Minor reformatting.
9565 2011-08-01 Yannick Moy <moy@adacore.com>
9567 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9568 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9569 procedures out of these packages.
9570 * errout.ads, errout.adb
9571 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9572 procedures in of this package
9573 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9574 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9575 on misplaced later vs initial declarations, like in Ada 83
9576 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9577 formal mode on attribute of private type whose full type declaration
9579 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9580 package declaration inside a package specification
9581 (Analyze_Full_Type_Declaration): issue error in formal mode on
9582 controlled type or discriminant type
9583 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9584 user-defined operator means that it should come from the source
9585 (New_Overloaded_Entity): issue error in formal mode on overloaded
9587 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9589 2011-08-01 Thomas Quinot <quinot@adacore.com>
9591 * atree.adb: Minor reformatting.
9592 * checks.adb: Minor reformatting.
9594 2011-08-01 Vincent Celier <celier@adacore.com>
9596 * s-parame-vms-ia64.ads: Fix typo in comment
9598 * s-parame-vms-restrict.ads: Removed, unused.
9600 2011-08-01 Javier Miranda <miranda@adacore.com>
9603 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9605 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9606 * sem_ch3.ads, sem_ch3.adb
9607 (Is_Constant_Bound): New extended version of the subprogram that was
9608 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9609 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9610 * sem_aux.ads (Constant_Value): Fix typo in comment.
9611 * checks.adb (Generate_Index_Checks): New implementation which, for
9612 array objects with constant bounds, generates the runtime check
9613 referencing the bounds of the array type. For other cases this routine
9614 provides its previous behavior obtaining such values from the array
9616 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9618 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9619 we cannot have semantic interpretations of the new node.
9621 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9623 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9626 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9628 * sem_ch8.adb: Minor code editing.
9629 * s-vxwext.adb: Remove trailing space.
9630 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9631 consistency with other files.
9633 2011-08-01 Thomas Quinot <quinot@adacore.com>
9635 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9637 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9639 * par-ch10.adb: reject parameterized expressions as compilation unit.
9640 * sem_ch4.adb: handle properly conditional expression with overloaded
9641 then_clause and no else_clause.
9643 2011-08-01 Tristan Gingold <gingold@adacore.com>
9645 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9646 like done by System.Aux_DEC.
9647 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9649 2011-08-01 Yannick Moy <moy@adacore.com>
9651 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9652 missing label at end of declaration (subprogram or package)
9653 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9654 of positional and named parameter association
9655 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9656 Error_Msg_SP which adds a prefix to the error message giving the name
9657 of the formal language analyzed
9658 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9659 access result type in subprogram, unconstrained array as result type,.
9660 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9662 * sem_ch8.adb: Code clean up.
9664 2011-08-01 Javier Miranda <miranda@adacore.com>
9666 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9667 * einfo.ads (Access_Disp_Table): Fix documentation.
9668 (Dispatch_Table_Wrappers): Fix documentation.
9669 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9670 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9671 to enforce the documentation of this attribute.
9672 (Set_Is_Interface): Cleanup the assertion.
9673 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9674 the Underlying_Type entity before reading attribute Access_Disp_Table.
9675 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9676 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9677 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9678 the Underlying_Type entity before reading attribute Access_Disp_Table.
9679 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9680 Locate the Underlying_Type entity before reading attribute
9683 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9685 * s-poosiz.ads: Additional overriding indicators.
9687 2011-08-01 Yannick Moy <moy@adacore.com>
9689 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9691 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9692 parameter specification does not include a subtype mark.
9693 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9694 formal mode on abstract subprogram.
9695 (Analyze_Subprogram_Specification): issue error in formal mode on
9696 user-defined operator.
9697 (Process_Formals): issue error in formal mode on access parameter and
9699 * sem_ch9.adb (Analyze_Abort_Statement,
9700 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9701 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9702 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9703 Analyze_Requeue, Analyze_Selective_Accept,
9704 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9705 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9706 issue error in formal mode on user-defined raise statement.
9708 2011-08-01 Thomas Quinot <quinot@adacore.com>
9710 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9711 declaration being hidden when overriding an implicit inherited
9713 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9714 (-gnats), do not complain about a source file that contains only a
9717 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9719 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9720 variable if already set.
9722 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9724 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9725 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9726 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9727 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9728 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9729 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9730 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9731 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9732 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9733 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9734 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9735 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9736 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9737 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9738 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9739 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9740 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9741 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9742 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9743 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9744 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9745 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9746 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9747 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9748 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9749 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9750 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9751 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9752 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9753 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9754 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9755 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9756 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9757 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9758 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9759 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9760 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9761 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9762 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9763 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9764 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9765 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9766 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9767 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9768 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9769 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9770 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9771 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9772 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9773 Use GNAT instead of GNARL.
9775 2011-08-01 Bob Duff <duff@adacore.com>
9777 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9778 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9779 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9782 2011-08-01 Yannick Moy <moy@adacore.com>
9784 * debug.adb (d.D) reverve flag for the SPARK mode
9785 (d.E) reverve flag for SPARK generation mode
9786 (d.F) reverve flag for Why generation mode
9787 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9788 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9789 functions which return True when the corresponding modes are set
9790 (Formal_Language): return "spark" or "alfa" when in formal verification
9792 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9793 Error_Msg to prefix the error message with a tag giving the formal
9795 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9796 message with a tag giving the formal language
9797 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9799 (Analyze_Case_Statement): issue error in formal mode on case statement
9800 with a single "others" case alternative
9801 (Analyze_Exit_Statement): issue errors in formal mode on exit
9802 statements which do not respect SPARK restrictions
9803 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9804 (Check_Unreachable_Code): always issue an error (not a warning) in
9805 formal mode on unreachable code (concerns both code after an infinite
9806 loop and after an unconditional jump, both not allowed in SPARK)
9807 * sem_ch6.adb (Analyze_Return_Statement): add call to
9808 Set_Return_Present for a procedure containing a return statement
9809 (already done for functions in Analyze_Function_Return)
9810 (Analyze_Function_Return): issue error in formal mode on extended
9811 return or if return is not last statement in function
9812 (Check_Missing_Return): issue error in formal mode if function does
9813 not end with return or if procedure contains a return
9814 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9815 function to detect if there is an inner scope of its parameter S which
9818 2011-08-01 Thomas Quinot <quinot@adacore.com>
9820 * sem_ch6.ads: Minor reformatting.
9822 2011-08-01 Javier Miranda <miranda@adacore.com>
9824 * sem_util.adb (Abstract_Interface_List): Complete condition when
9825 processing private type declarations to avoid reading unavailable
9827 (Is_Synchronized_Tagged_Type): Complete condition when processing
9828 private extension declaration nodes to avoid reading unavailable
9831 2011-08-01 Thomas Quinot <quinot@adacore.com>
9833 * sem_ch3.adb: Minor reformatting.
9835 2011-08-01 Thomas Quinot <quinot@adacore.com>
9837 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9838 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9839 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9840 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9841 for VMS, instead parametrize the common implementation with
9842 System.Parameters declarations.
9844 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9846 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9848 2011-08-01 Tristan Gingold <gingold@adacore.com>
9850 * seh_init.c: Fix SEH handler installation on win64.
9852 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9854 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9855 double analysis of an anonymous access to subprogram, because it can
9856 lead to improper sharing of profiles and a back-end crash.
9858 2011-08-01 Robert Dewar <dewar@adacore.com>
9860 * make.adb, sem_ch4.adb: Minor reformatting.
9861 * gcc-interface/Make-lang.in: Update dependencies.
9862 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9864 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9866 * gnat_rm.texi: Fix definition of Long_Integer.
9868 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9870 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9871 to prevent storage exhaustion.
9872 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9873 finalized is a function body, insert the cleanup code before the final
9874 return statement, to prevent spurious warnings.
9875 * s-pooglo.ads: add overriding indicator.
9877 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9879 * sem_ch4.adb (Operator_Check): improve error message when both a
9880 with_clause and a use_clause are needed to make operator usage legal.
9881 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9882 determine whether a compilation unit is visible within an other,
9883 either through a with_clause in the current unit, or a with_clause in
9884 its library unit or one one of its parents.
9886 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9888 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9889 over an arbitrary expression of an array or container type.
9890 * lib-xref.adb: clarify comment.
9892 2011-08-01 Bob Duff <duff@adacore.com>
9894 * einfo.ads: Minor reformatting.
9895 * debug.adb: Minor comment improvement.
9897 2011-08-01 Javier Miranda <miranda@adacore.com>
9899 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9900 consider hidden subprograms as valid candidates.
9902 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9904 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9906 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9908 * gnat_ugn.texi: Fix typo.
9910 2011-08-01 Robert Dewar <dewar@adacore.com>
9912 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9913 lib-xref.adb: Minor reformatting
9915 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9917 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9918 when to generate a call to Move_Final_List.
9919 (Has_Controlled_Parts): Remove this function.
9921 2011-08-01 Geert Bosch <bosch@adacore.com>
9923 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9926 2011-08-01 Thomas Quinot <quinot@adacore.com>
9928 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9929 explicit raise of a predefined exception as Comes_From_Source if the
9930 original N_Raise_Statement comes from source.
9932 2011-08-01 Robert Dewar <dewar@adacore.com>
9934 * sinfo.ads: Add comment.
9935 * sem_ch6.adb: Minor reformatting.
9937 2011-08-01 Robert Dewar <dewar@adacore.com>
9939 * freeze.adb (Freeze_Entity): Refine check for bad component size
9940 clause to avoid rejecting confirming clause when atomic/aliased present.
9942 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9944 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9945 better determine whether an entity reference is a write.
9946 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9948 * lib-xref.adb (Output_References): Do no suppress a read reference at
9949 the same location as an immediately preceeding modify-reference, to
9950 handle properly in-out actuals.
9952 2011-08-01 Tristan Gingold <gingold@adacore.com>
9954 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9956 2011-08-01 Quentin Ochem <ochem@adacore.com>
9958 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9959 heap to compute the result.
9961 2011-08-01 Robert Dewar <dewar@adacore.com>
9963 * atree.ads: Minor reformatting.
9965 2011-08-01 Emmanuel Briot <briot@adacore.com>
9967 * g-expect.adb (Get_Command_Output): Fix memory leak.
9969 2011-08-01 Geert Bosch <bosch@adacore.com>
9971 * cstand.adb (P_Float_Type): New procedure to print the definition of
9972 predefined fpt types.
9973 (P_Mixed_Name): New procedure to print a name using mixed case
9974 (Print_Standard): Use P_Float_Type for printing floating point types
9975 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9976 precision IEEE float.
9978 2011-08-01 Thomas Quinot <quinot@adacore.com>
9980 * sem_ch3.adb: Minor reformatting.
9982 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9984 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9985 the completion of a generic function, insert the new body rather than
9986 rewriting the original.
9988 2011-08-01 Yannick Moy <moy@adacore.com>
9990 * sinfo.ads, errout.ads: Typos in comments.
9992 2011-08-01 Robert Dewar <dewar@adacore.com>
9994 * par-endh.adb: Minor reformatting.
9996 2011-08-01 Robert Dewar <dewar@adacore.com>
9998 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9999 (Pre_Post_Aspects): New subtype.
10000 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10001 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10002 * par-ch7.adb (P_Package): Remove Decl parameter
10003 (P_Package): Handle new syntax for aspects (before IS)
10004 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10006 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10007 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10008 (P_Package): Remove Decl parameter
10009 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10011 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10013 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10014 * sinfo.ads: Document new syntax for aspects in packages etc.
10015 * sprint.adb: Handle new syntax of aspects before IS in package
10017 2011-08-01 Thomas Quinot <quinot@adacore.com>
10019 * atree.ads: Minor reformatting.
10020 * sem_prag.adb: Minor reformatting.
10022 2011-08-01 Robert Dewar <dewar@adacore.com>
10024 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10025 case expr alternative.
10027 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10029 * sem_ch12.adb: Fix typo.
10031 2011-08-01 Geert Bosch <bosch@adacore.com>
10033 * sem_prag.adb (Check_No_Link_Name): New procedure.
10034 (Process_Import_Or_Interface): Use Check_No_Link_Name.
10035 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
10036 instead of Standard_Long_Long_Float_Size global. Preparation for
10037 eventual removal of per type constants.
10038 * exp_util.ads (Get_Stream_Size): New function returning the stream
10039 size value of subtype E.
10040 * exp_util.adb (Get_Stream_Size): Implement new function.
10041 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
10043 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
10045 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
10047 2011-08-01 Geert Bosch <bosch@adacore.com>
10049 * cstand.adb: Fix comments.
10050 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
10051 count of arguments.
10053 2011-08-01 Robert Dewar <dewar@adacore.com>
10055 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
10057 2011-08-01 Geert Bosch <bosch@adacore.com>
10059 * atree.ads: Fix comment.
10061 2011-08-01 Robert Dewar <dewar@adacore.com>
10063 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
10064 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
10065 * par.adb: Add with for Namet.Sp.
10066 * par-tchk.adb: Minor reformatting.
10068 2011-08-01 Vincent Celier <celier@adacore.com>
10070 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
10071 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
10072 of the init procedure of a SAL.
10073 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
10076 2011-08-01 Thomas Quinot <quinot@adacore.com>
10078 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
10081 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10083 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
10085 2011-08-01 Thomas Quinot <quinot@adacore.com>
10087 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
10088 conformant with its spec (return True only for types that have
10089 an overriding Initialize primitive operation that prevents them from
10090 having preelaborable initialization).
10091 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
10092 initialization for controlled types in Ada 2005 or later mode.
10094 2011-08-01 Robert Dewar <dewar@adacore.com>
10096 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
10098 (Same_Aspect): New function.
10099 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
10100 Type_Invariant, Precondition, Postcondition.
10101 * snames.ads-tmpl: Add Name_Type_Invariant.
10103 2011-08-01 Robert Dewar <dewar@adacore.com>
10105 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
10107 (Freeze_All_Ent): Fix error in handling inherited aspects.
10108 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
10109 already analyzed, but don't skip entire processing of a declaration,
10110 that's wrong in some cases of declarations being rewritten.
10111 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
10112 Don't delay for integer, string literals
10113 Treat predicates in usual manner for delay, remove special case code,
10115 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
10116 (Build_Predicate_Function): Update saved expression in aspect
10117 (Build_Invariant_Procedure): Update saved expression in aspect
10118 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
10119 of replacement of discriminant references if the reference is simple.
10121 2011-08-01 Robert Dewar <dewar@adacore.com>
10123 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
10124 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
10125 Static_Predicate and Dynamic_Predicate.
10126 (Build_Predicate_Function): Add processing for Static_Predicate
10127 and Dynamic_Predicate.
10128 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
10129 (From_Static_Predicate): New flag
10130 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
10132 2011-08-01 Robert Dewar <dewar@adacore.com>
10134 * usage.adb: Documentation cleanup for Ada version modes in usage.
10135 * expander.adb: Minor reformatting.
10137 2011-08-01 Robert Dewar <dewar@adacore.com>
10139 * atree.ads: Minor comment fix.
10140 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
10141 a-witeio.ads, sem_prag.adb: Minor reformatting.
10143 2011-08-01 Doug Rupp <rupp@adacore.com>
10145 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
10146 pointers. Use descrip.h header file for convenience. Add some
10149 2011-08-01 Robert Dewar <dewar@adacore.com>
10151 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
10152 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
10153 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
10155 (Check_Aspect_At_End_Of_Declarations): New procedure
10156 (Analye_Aspect_Specification): Minor changes for above procedures
10157 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
10158 specification node as well.
10160 2011-08-01 Pascal Obry <obry@adacore.com>
10162 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
10163 Windows files. Use GetFilesAttributes() in this case to check for file
10164 existence instead of returning with an error code.
10166 2011-08-01 Vincent Celier <celier@adacore.com>
10168 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
10169 High is above Source length.
10171 2011-08-01 Robert Dewar <dewar@adacore.com>
10173 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
10175 2011-08-01 Robert Dewar <dewar@adacore.com>
10177 * aspects.ads (Boolean_Aspects): New subtype.
10178 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
10179 for derived types in cases where the parent type and derived type have
10181 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
10182 with aspects when parent type also has aspects.
10183 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
10184 boolean expression at this point).
10185 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
10186 accordance with final decision on the Ada 2012 feature.
10187 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
10189 2011-08-01 Matthew Heaney <heaney@adacore.com>
10191 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
10193 2011-08-01 Pascal Obry <obry@adacore.com>
10195 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
10196 Fix Replace_Slice when High is above current string size.
10197 (Replace_Slice): Fix DL computation when High is above current
10200 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10202 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
10204 2011-08-01 Matthew Heaney <heaney@adacore.com>
10206 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
10209 2011-08-01 Pascal Obry <obry@adacore.com>
10211 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
10214 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10216 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
10217 access to protected subprograms in generic bodies.
10218 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
10219 protected type, indicate that the convention of the subprogram is
10220 Convention_Protected, because it may be used in subsequent declarations
10221 within the protected declaration.
10223 2011-08-01 Vincent Celier <celier@adacore.com>
10225 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
10226 and "final" procedures when the name of the library is "ada", to avoid
10227 duplicate symbols "adainit" and "adafinal" in executables.
10229 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10231 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
10232 quantified expression that appears within a postcondition and uses the
10233 Ada2012 'Result attribute.
10235 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10237 * init.c (__gnat_error_handler): Cast reason to int.
10238 (__gnat_install_handler): Explain sa_sigaction use.
10240 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10242 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
10243 subprogram has copy-in copy-out parameters, try to promote the mode of
10244 the return type if it is passed in registers.
10246 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10248 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
10249 left operand as addressable.
10251 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
10253 * gcc-interface/gigi.h (build_function_stub): Remove.
10254 (build_return_expr): Likewise.
10255 (convert_vms_descriptor): Declare.
10256 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
10257 (build_function_stub): Move to...
10258 * gcc-interface/utils2.c (build_return_expr): Move to...
10259 * gcc-interface/trans.c (build_function_stub): ...here.
10260 (build_return_expr): ...here.
10261 (Subprogram_Body_to_gnu): Add local variable for language_function.
10262 Disconnect the parameter attributes cache, if any, once done with it.
10263 Call end_subprog_body only after setting the end_locus.
10264 Build the stub associated with the function, if any, at the very end.
10265 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
10266 variables and streamline control flow.
10268 2011-07-23 Arnaud Charlet <charlet@adacore.com>
10271 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
10272 g-trasym-dwarf.adb.
10274 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10277 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
10278 Assign to act.sa_sigaction.
10279 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
10280 current->return_address to char * before arithmetic.
10282 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10284 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
10285 Correct argument types.
10286 Extract code from reason.
10287 (__gnat_install_handler): Assign to act.sa_sigaction.
10289 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
10291 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
10292 (GNAT1_OBJS): ...here.
10294 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
10297 * g-socthi-mingw.adb (Fill): Fix formatting.
10299 * gcc-interface/gigi.h: Move around comment.
10301 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
10304 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
10306 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
10309 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
10311 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
10313 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
10314 range comparison if Pmode is SImode.
10316 2011-07-12 Laurent GUERBY <laurent@guerby.net>
10317 Eric Botcazou <ebotcazou@adacore.com>
10319 * adadecode.c: Wrap up in extern "C" block.
10320 * adadecode.h: Likewise.
10321 * adaint.c: Likewise. Remove 'const' keyword.
10322 * adaint.h: Likewise.
10323 * argv.c: Likewise.
10324 * atree.h: Likewise.
10326 * cstreams.c: Likewise.
10328 * exit.c: Likewise.
10330 * final.c: Likewise.
10331 * init.c: Likewise.
10332 * initialize.c: Likewise.
10333 * link.c: Likewise.
10334 * namet.h: Likewise.
10335 * nlists.h: Likewise.
10336 * raise.c: Likewise.
10337 * raise.h: Likewise.
10338 * repinfo.h: Likewise.
10339 * seh_init.c: Likewise.
10340 * targext.c: Likewise.
10341 * tracebak.c: Likewise.
10342 * uintp.h: Likewise.
10343 * urealp.h: Likewise.
10344 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10345 * xsinfo.adb: Likewise.
10346 * xsnamest.adb: Likewise.
10347 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10348 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10349 * gcc-interface/misc.c: Likewise.
10350 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10351 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10352 ada/targext.o here...
10353 (GNAT_ADA_OBJS): ...and not here.
10354 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10355 (GNATBIND_OBJS): Reorder.
10357 2011-07-07 Richard Henderson <rth@redhat.com>
10359 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10360 dwarf2out_frame_init.
10362 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10364 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10366 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10369 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10371 2011-07-06 Richard Guenther <rguenther@suse.de>
10373 * gcc-interface/misc.c (gnat_init): Merge calls to
10374 build_common_tree_nodes and build_common_tree_nodes_2.
10375 Re-initialize boolean_false_node.
10377 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10378 Olivier Hainque <hainque@adacore.com>
10379 Nicolas Setton <setton@adacore.com>
10381 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10382 the type according to the ARTIFICIAL_P parameter.
10383 (create_type_decl): Likewise.
10384 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10386 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10388 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10389 (gnatbind): Likewise.
10391 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10393 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10395 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10397 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10398 local variable throughout. Remove useless call to Base_Type.
10399 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10400 Take it also into account for the volatileness of the field. Set the
10401 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10403 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10405 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10406 on a dereference built for a by-ref object if it has an address clause.
10408 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10410 * einfo.ads (Address_Taken): Document use for the second argument of
10411 Asm_Input and Asm_Output attributes.
10412 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10413 argument is an entity name, then set Address_Taken on it.
10414 <Attribute_Asm_Output>: Likewise.
10415 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10416 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10417 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10418 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10420 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10422 PR middle-end/46500
10423 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10425 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10427 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10428 (ada/utils.o): Update dependencies.
10429 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10430 ../../../libcpp/libcpp.a.
10431 * gcc-interface/utils.c: Include common/common-target.h.
10432 (process_attributes): Use targetm_common.have_named_sections.
10434 2011-06-07 Richard Guenther <rguenther@suse.de>
10436 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10439 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10441 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10442 TREE_THIS_NOTRAP flag.
10444 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10446 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10449 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10451 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10452 constants whose full view has discriminants specially.
10454 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10456 * gcc-interface/utils.c: Include diagnostic.h.
10457 (gnat_write_global_declarations): Output debug information for all
10458 global type declarations before finalizing the compilation unit.
10459 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10461 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10463 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10465 2011-05-25 Kai Tietz <ktietz@redhat.com>
10467 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10468 initialization instead of const/none-const pointer assignment.
10470 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10472 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10473 $(EXTRA_GNAT1_OBJS).
10474 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10475 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10476 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10477 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10478 libcommon-target.a instead of prefix.o.
10480 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10483 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10485 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10487 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10488 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10489 instead of version.o.
10491 2011-05-18 Kai Tietz <ktietz@redhat.com>
10493 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10494 boolean_false_node instead of integer_zero_node.
10495 (convert_with_check): Likewise.
10496 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10498 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10500 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10501 type of the parameter is an unconstrained array, convert the actual to
10502 the type of the formal in the In Out and Out cases as well.
10504 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10506 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10507 call build_function_type_array or build_varargs_function_type_array
10509 (create_subprog_type): Don't call build_function_type; call
10510 build_function_type_vec instead.
10512 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10514 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10515 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10516 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10518 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10520 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10522 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10523 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10525 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10527 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10529 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10531 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10532 instead of accessing TYPE_ARG_TYPES directly.
10533 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10535 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10538 * gcc-interface/gigi.h (get_variant_part): Declare.
10539 * gcc-interface/decl.c (get_variant_part): Make global.
10540 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10541 types have the same constant size, are record types and T1 has a
10542 variant part while T2 doesn't.
10544 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10546 * gcc-interface/utils.c (begin_subprog_body): Do not call
10548 (end_subprog_body): Likewise.
10550 2011-05-04 Richard Guenther <rguenther@suse.de>
10552 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10554 (pos_to_constructor): Likewise.
10556 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10557 Eric Botcazou <ebotcazou@adacore.com>
10559 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10560 of build_function_type. Adjust calls to...
10561 (build_raise_check): ...this. Do not take a void_tree parameter.
10562 Call build_function_type_list instead of build_function_type.
10563 Fix head comment and swap couple of conditional blocks.
10565 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10567 * gnatvsn.ads (Library_Version): Bump to 4.7.
10568 (Current_Year): Bump to 2011.
10570 2011-04-29 Michael Matz <matz@suse.de>
10572 * gcc-interface/misc.c (gnat_handle_option): Set
10573 warn_maybe_uninitialized.
10575 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10577 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10578 the Watson/McCabe paper.
10580 2011-04-23 Jim Meyering <meyering@redhat.com>
10582 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10584 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10586 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10589 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10591 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10593 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10594 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10595 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10596 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10597 <all>: Do not set flags on the reused DECL node coming from an alias.
10598 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10599 don't need debug info here...
10600 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10601 (gigi): Adjust calls to create_subprog_decl.
10602 (build_raise_check): Likewise.
10603 (establish_gnat_vms_condition_handler): Likewise.
10604 (Compilation_Unit_to_gnu): Likewise.
10605 (gnat_to_gnu): Likewise.
10607 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10609 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10610 (NO_REORDER_ADAFLAGS): New variable.
10611 (EXTRA_GNATTOOLS): Always define.
10612 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10613 Clean up and adjust list of files compiled with special options.
10614 * gcc-interface/Make-lang.in: Likewise.
10615 (ada/decl.o): Cosmetical change.
10616 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10618 2011-04-20 Jim Meyering <meyering@redhat.com>
10620 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10622 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10624 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10625 $(CFLAGS) on the link line.
10627 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10629 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10630 padded type built for the return type if it is unconstrained.
10632 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10634 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10636 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10638 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10639 before calling TREE_CHAIN.
10640 * gcc-interface/misc.c (gnat_init_ts): New function.
10641 (LANG_HOOKS_INIT_TS): Define.
10643 2011-04-12 Martin Jambor <mjambor@suse.cz>
10645 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10646 instead of cgraph_node.
10648 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10650 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10651 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10654 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10656 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10657 of aggregate types that contain a placeholder.
10659 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10661 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10663 (handle_type_generic_attribute): Likewise.
10665 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10668 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10670 2011-04-04 Kai Tietz <ktietz@redhat.com>
10673 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10676 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10678 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10679 type case, do not strip a padding type around the array type.
10681 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10683 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10686 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10688 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10689 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10690 code for -feliminate-unused-debug-types.
10691 (gnat_post_options): Likewise.
10693 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10695 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10696 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10699 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10701 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10702 DECL_ARTIFICIAL flag on enumeration types.
10704 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10706 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10707 fat pointer types artificial unconditionally.
10708 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10711 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10713 * gcc-interface/gigi.h (get_dummy_type): Declare.
10714 (build_dummy_unc_pointer_types): Likewise.
10715 (finish_fat_pointer_type): Likewise.
10716 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10717 fat pointer type has been built, complete it in place.
10718 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10719 and thin pointers. Remove useless variable.
10720 (finish_fat_pointer_type): Make global and move to...
10721 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10722 (get_dummy_type): New function.
10723 (build_dummy_unc_pointer_types): Likewise.
10724 (gnat_pushdecl): Propage the name to the anonymous variants only.
10725 (update_pointer_to): Only adjust the pointer types in the unconstrained
10728 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10730 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10731 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10732 if this is a Taft amendment type and the full declaration is available.
10733 * gcc-interface/trans.c (process_type): Likewise.
10734 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10735 (process_freeze_entity): Likewise.
10736 * gcc-interface/utils.c (dummy_global): New static variable.
10737 (gnat_write_global_declarations): If there are types declared as used
10738 at the global level, insert them in the global hash table.
10740 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10742 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10743 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10744 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10746 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10747 flag of the type accordingly.
10748 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10750 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10752 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10753 finalizing types when updating the pointers to the designated type.
10754 <all>: Finalize the deferred types even if we didn't defer processing
10755 of incomplete types in this invocation.
10757 2011-04-01 Olivier Hainque <hainque@adacore.com>
10758 Nicolas Setton <setton@adacore.com>
10759 Eric Botcazou <ebotcazou@adacore.com>
10761 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10762 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10764 2011-03-28 Kai Tietz <ktietz@redhat.com>
10766 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10768 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10769 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10771 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10773 2011-03-28 Tristan Gingold <gingold@adacore.com>
10776 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10777 Use ada output of gnatbind.
10778 (ada/b_gnatb.adb): Ditto.
10779 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10780 (ada.mostlyclean, ada.stage1)
10781 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10782 (ada.stagefeedback): Adjust.
10783 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10784 Use ada output of gnatbind.
10785 (b_gnatm.adb): Ditto.
10786 (b_gnatl.o, b_gnatm.o): New rules.
10788 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10790 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10791 for the padded type built to support a specified size or alignment.
10793 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10795 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10796 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10797 unconditionally to the end of the unit when the designated type is
10799 <all>: Rename local variable. Attempt to un-defer types only and do it
10800 for limited_with'ed types as well.
10801 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10802 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10803 consistently and remove redundant call to finalize_from_with_types.
10805 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10807 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10808 subprograms without a previous spec declared in the same unit.
10809 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10810 subprograms at the end of the unit instead of at the beginning.
10811 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10812 isn't public for the special handling of non-inline functions nested
10813 inside inline external functions.
10815 2011-03-25 Jeff Law <law@redhat.com>
10817 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10819 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10821 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10822 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10823 to compute Set_Size_Depends_On_Discriminant.
10824 (Layout_Type): Call it on array types in back-end layout mode.
10825 * sem_util.adb (Requires_Transient_Scope): Return true for array
10826 types only if the size depends on the value of discriminants.
10827 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10828 type if the RHS is a call to a function that returns an unconstrained
10829 type with default discriminant.
10831 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10833 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10834 non-conversion to the nominal result type at the end.
10836 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10838 * gcc-interface/trans.c (create_temporary): New function taken from...
10839 (create_init_temporary): ...here. Call it.
10840 (call_to_gnu): Create the temporary for the return value early, if any.
10841 Create it for a function with copy-in/copy-out parameters if there is
10842 no target; in other cases of copy-in/copy-out, use another temporary.
10843 Push the new binding level lazily. Add and rename local variables.
10845 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10847 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10849 (set_rm_size): Likewise.
10851 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10853 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10854 for the padded type built in order to support a specified alignment.
10855 Fix incorrect formatting.
10857 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10860 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10862 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10864 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10865 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10866 to the end of the list. Adjust recursive call. Rename local variable.
10867 If REORDER is true, reorder components of the record type.
10868 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10869 components_to_record and adjust the parameter list.
10871 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10873 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10874 disabled, use the variable for bounds of loop iteration scheme.
10876 2011-03-21 Kai Tietz <ktietz@redhat.com>
10879 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10881 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10883 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10884 out whether the expression is read-only. Short-circuit placeholder
10885 case and rename a couple of local variables.
10887 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10889 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10890 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10891 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10892 (convert): Deal with conversions from a smaller form type specially.
10894 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10896 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10897 its argument, except for the special -I- switch.
10899 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10901 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10904 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10906 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10908 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10910 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10912 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10913 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10914 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10915 Do not generate the check directly, instead instantiate the template
10916 check present in the descriptor.
10917 (make_descriptor_field): Move around.
10918 (build_vms_descriptor32): Build a template check in the POINTER field.
10919 (build_vms_descriptor): Remove useless suffixes.
10920 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10922 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10925 * targext.c: Include target files if IN_RTS is defined.
10927 2011-01-26 Richard Guenther <rguenther@suse.de>
10930 * targext.c: Include config.h.
10931 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10934 2011-01-04 Pascal Obry <obry@adacore.com>
10935 Eric Botcazou <ebotcazou@adacore.com>
10937 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10939 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10941 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10942 end-of-case on the end label and its associated gotos, if any.
10944 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10946 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10947 expressions of the parameter cache within the statement group of
10948 the CICO mechanism.
10950 2011-01-04 Olivier Hainque <hainque@adacore.com>
10951 Eric Botcazou <ebotcazou@adacore.com>
10953 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10954 (set_end_locus_from_node): New function.
10955 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10956 make and the function end_locus.
10957 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10958 for the elaboration subprogram.
10959 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10960 set the end_locus of the expression as well.
10962 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10965 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10966 variables that are referenced in exception handlers volatile.
10970 Copyright (C) 2011 Free Software Foundation, Inc.
10972 Copying and distribution of this file, with or without modification,
10973 are permitted in any medium without royalty provided the copyright
10974 notice and this notice are preserved.