1 2011-08-29 Thomas Quinot <quinot@adacore.com>
3 * get_scos.adb: When reading a P statement SCO without a pragma name
4 (from an older ALI file), ensure that the Pragma_Name component is set
5 to Unknown_Pragma (not left uninitialized).
7 2011-08-29 Vincent Celier <celier@adacore.com>
9 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
10 modified to compute correctly the object path of a SAL project that is
11 extending another library project.
12 (Write_Path_File): New procedure.
13 * makeutl.ads (Directories): New table moved from Buildgpr
14 (Get_Directories): New procedure moved from Buildgpr
15 (Write_Path_File): New procedure
16 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
17 paths before binding SALs, instead of Set_Ada_Paths.
18 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
20 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
21 (Current_Source_Path_File_Of): New function
22 (Set_Current_Object_Path_File_Of): New procedure
23 (Current_Source_Object_File_Of): New function
24 (Set_Current_Object_Path_File_Of): New procedure
25 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
26 (Current_Source_Path_File_Of): New function
27 (Set_Current_Object_Path_File_Of): New procedure
28 (Current_Source_Object_File_Of): New function
29 (Set_Current_Object_Path_File_Of): New procedure
31 2011-08-29 Ed Schonberg <schonberg@adacore.com>
33 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
34 packed entity, use a bit-field assignment only if there is no change of
37 2011-08-29 Thomas Quinot <quinot@adacore.com>
39 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
40 Is_RTU instead of using Chars comparisons.
42 2011-08-29 Thomas Quinot <quinot@adacore.com>
44 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
45 temporary object if the actual is constrained, and the discriminants
46 read from the stream don't match.
48 2011-08-29 Tristan Gingold <gingold@adacore.com>
50 * sem_attr.adb, exp_attr.adb: Add handling of
51 Attribute_System_Allocator_Alignment
52 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
53 Attribute_System_Allocator_Alignment.
54 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
55 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
56 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
57 get_target_system_allocator_alignment.
59 2011-08-29 Arnaud Charlet <charlet@adacore.com>
61 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
64 2011-08-29 Arnaud Charlet <charlet@adacore.com>
66 * exp_ch3.adb (In_Runtime): Fix typo.
68 2011-08-29 Bob Duff <duff@adacore.com>
70 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
72 2011-08-29 Ed Schonberg <schonberg@adacore.com>
74 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
75 and a separate tag assignment is generated, ensure that the tag
76 assignment is analyzed.
78 2011-08-29 Ed Schonberg <schonberg@adacore.com>
80 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
81 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
82 of statement lists that may contain local declarations.
83 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
84 duplicate the triggering statements needed for the expansion of this
85 construct, when the trigger is a dispatching call to a synchronized
88 2011-08-29 Arnaud Charlet <charlet@adacore.com>
90 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
91 * bindgen.adb: Add comments.
92 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
95 2011-08-29 Robert Dewar <dewar@adacore.com>
97 * exp_attr.adb: Minor reformatting.
98 Minor code reorganization and commenting.
99 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
102 2011-08-29 Thomas Quinot <quinot@adacore.com>
104 * get_scos.adb: Ignore chaining indicators not currently supported
107 2011-08-29 Arnaud Charlet <charlet@adacore.com>
109 * system.ads: Minor editing.
111 2011-08-29 Arnaud Charlet <charlet@adacore.com>
113 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
115 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
116 Attribute_Elab_Subp_Body.
117 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
118 * sem_util.adb: Update comments.
120 2011-08-29 Thomas Quinot <quinot@adacore.com>
122 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
123 pragma name for each SCO statement corresponding to a pragma.
125 2011-08-29 Arnaud Charlet <charlet@adacore.com>
127 * opt.ads: Minor editing.
129 2011-08-29 Yannick Moy <moy@adacore.com>
131 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
132 that only made sense for CodePeer mode.
134 2011-08-29 Jose Ruiz <ruiz@adacore.com>
136 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
137 which is no longer used.
138 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
139 handling of the 64-bit division check.
140 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
142 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
145 2011-08-29 Thomas Quinot <quinot@adacore.com>
147 * get_scos.adb: Minor reformatting.
149 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
151 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
152 statement list is wrapped in a block, the block is explicitly analyzed
153 in order to properly redecorate the entities and create a servicing
156 2011-08-29 Tristan Gingold <gingold@adacore.com>
158 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
159 (Set_Zero_Cost_Handling): Remove.
161 2011-08-29 Thomas Quinot <quinot@adacore.com>
163 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
165 2011-08-29 Geert Bosch <bosch@adacore.com>
167 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
168 instruction, as the latter may produce -0.0, which is not a valid VAX
170 (Neg_G): Likewise for VAX F float.
172 2011-08-29 Robert Dewar <dewar@adacore.com>
174 * exp_util.adb: Minor reformatting.
176 2011-08-29 Yannick Moy <moy@adacore.com>
178 * sem_ch3.adb: Minor comment update.
180 2011-08-29 Thomas Quinot <quinot@adacore.com>
182 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
185 2011-08-29 Thomas Quinot <quinot@adacore.com>
187 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
188 current statement sequence on a generic instantiation or a subprogram
191 2011-08-29 Robert Dewar <dewar@adacore.com>
193 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
196 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
198 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
199 Correct the check which involves the freeze node of a controlled or
200 access-to-controlled type.
202 2011-08-29 Geert Bosch <bosch@adacore.com>
204 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
206 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
209 2011-08-29 Yannick Moy <moy@adacore.com>
211 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
212 for every index type and component type that is not a subtype_mark.
213 (Process_Subtype): Set Etype of subtype.
215 2011-08-29 Robert Dewar <dewar@adacore.com>
217 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
218 reorganization. Minor reformatting.
220 2011-08-29 Steve Baird <baird@adacore.com>
222 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
223 for CodePeer and ALFA modes.
225 2011-08-29 Ed Schonberg <schonberg@adacore.com>
227 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
228 that comes from an enclosing scope if it is not the renaming of an
229 actual, to handle properly a spurious ambiguity in an instance.
231 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
233 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
234 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
235 use it instead of the Esize of the first parameter.
236 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
238 <Size>: Likewise. Call it for composite types on the RM size.
240 2011-08-29 Yannick Moy <moy@adacore.com>
242 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
243 * sem_util.adb (Unique_Name): Correct behaviour for names of
246 2011-08-29 Yannick Moy <moy@adacore.com>
248 * sem_prag.adb (Check_Precondition_Postcondition): In formal
249 verification mode, analyze pragma expression for correctness, for
250 pre/post on library-level subprogram, as it is not expanded later.
252 2011-08-29 Yannick Moy <moy@adacore.com>
254 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
255 in formal verification.
257 2011-08-29 Thomas Quinot <quinot@adacore.com>
259 * sem_util.adb: Minor reformatting.
260 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
262 * par_sco.ads, par_sco.adb: Update comments.
264 2011-08-29 Yannick Moy <moy@adacore.com>
266 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
267 associated getter/setter.
268 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
270 2011-08-29 Vincent Celier <celier@adacore.com>
272 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
273 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
274 with declarations for Language_Kind and Dependency_Kind for Ada.
275 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
276 (Process_Compiler): Take into account the new attributes Dependency_Kind
278 (Check_Configuration): Check if language kind is unit based, not if the
279 language name is Ada.
280 (Process_Exceptions_Unit_Based): Ditto
281 (Add_Language): Remove default additions of language and dependency kind
282 * prj.ads: Minor comment change
283 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
285 2011-08-29 Johannes Kanig <kanig@adacore.com>
287 * debug.adb: Update comments.
289 2011-08-24 Joseph Myers <joseph@codesourcery.com>
291 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
292 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
293 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
294 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
295 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
297 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
299 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
300 (GNATLIBCFLAGS_FOR_C): Replace
301 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
302 (gnatlib-shared-default, gnatlib-shared-dual-win32)
303 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
304 (gnatlib-sjlj, gnatlib-zcx): Likewise.
306 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
308 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
310 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
312 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
314 2011-08-05 Nicolas Roche <roche@adacore.com>
316 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
317 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
319 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
321 2011-08-05 Matthew Heaney <heaney@adacore.com>
323 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
324 subprogram bodies declared out-of-order.
326 2011-08-05 Yannick Moy <moy@adacore.com>
328 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
329 entities directly in package Standard, otherwise skip the standard
332 2011-08-05 Robert Dewar <dewar@adacore.com>
334 * a-cbmutr.adb: Minor reformatting
335 (Allocate_Node): refactor node allocation algorithm
337 2011-08-05 Robert Dewar <dewar@adacore.com>
339 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
340 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
342 (Analyze_Pragma, case Check_Policy): Ditto.
343 * sem_prag.ads (Check_Disabled): New function
344 * snames.ads-tmpl: Add Name_Disable.
346 2011-08-05 Robert Dewar <dewar@adacore.com>
348 * gnat_rm.texi: Document implementation-defined policy DISABLE for
349 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
351 2011-08-05 Ed Schonberg <schonberg@adacore.com>
353 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
354 that appears in a generic formal part and applies to a formal
357 2011-08-05 Robert Dewar <dewar@adacore.com>
359 * a-cbmutr.ads: Minor reformatting.
361 2011-08-05 Matthew Heaney <heaney@adacore.com>
363 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
364 to check count, check sign of value instead.
365 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
366 (Copy_Subtree): allocate copy of source element
367 (Equal_Subtree): compare elements, not access objects
369 2011-08-05 Vincent Celier <celier@adacore.com>
371 * gnat_ugn.texi: Fix VMS alternative.
373 2011-08-05 Thomas Quinot <quinot@adacore.com>
375 * sem_ch11.adb: Add comment.
377 2011-08-05 Robert Dewar <dewar@adacore.com>
379 * exp_util.adb: Minor comment fix.
381 2011-08-05 Robert Dewar <dewar@adacore.com>
383 * scng.adb (Error_Unterminated_String): Improve flag position when
386 2011-08-05 Matthew Heaney <heaney@adacore.com>
388 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
390 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
391 multiway tree containers.
393 2011-08-05 Robert Dewar <dewar@adacore.com>
395 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
396 * stylesw.adb: Implement -gnatyC to control comment spacing
397 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
399 * usage.adb: Add line for -gnatyC.
401 2011-08-05 Robert Dewar <dewar@adacore.com>
403 * gnat_ugn.texi: Document -gnatyC.
404 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
405 synonym for COMMENTS2).
407 2011-08-05 Robert Dewar <dewar@adacore.com>
409 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
410 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
411 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
412 a-comutr.ads, lib-xref.adb: Minor reformatting.
414 2011-08-05 Robert Dewar <dewar@adacore.com>
416 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
417 warning if there is an exception handler present.
419 2011-08-05 Pascal Obry <obry@adacore.com>
421 * a-iteint.ads: Fix copyright year.
423 2011-08-05 Thomas Quinot <quinot@adacore.com>
425 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
426 statement SCO for a USE clause or a representation clause.
428 2011-08-05 Yannick Moy <moy@adacore.com>
430 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
431 between body and spec for stub.
432 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
433 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
434 pragma precondition or postcondition, for which the enclosing
435 subprogram or package in the AST is not the desired one, return empty.
437 2011-08-05 Thomas Quinot <quinot@adacore.com>
439 * g-expect.adb: Minor reformatting.
441 2011-08-05 Bob Duff <duff@adacore.com>
443 * a-fihema.adb: Comment out OS_Lib.
445 2011-08-05 Matthew Heaney <heaney@adacore.com>
447 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
448 (unbounded multiway tree containers) and a-iteint.ads.
449 * a-comutr.ads, a-comutr.adb:
450 This is the new Ada 2012 unit for unbounded multiway tree containers
451 * a-cimutr.ads, a-cimutr.adb
452 This is the new Ada 2012 unit for indefinite multiway tree containers
453 * a-iteint.ads: New file.
455 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
457 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
459 2011-08-05 Bob Duff <duff@adacore.com>
461 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
463 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
465 2011-08-05 Ed Schonberg <schonberg@adacore.com>
467 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
468 general indexing aspects of Ada2012. Called when analyzing indexed
469 components when other interpretations fail.
470 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
471 in an expression context where overloading is meaningful. This excludes
472 the occurrence in an aspect specification (efficiency only).
473 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
474 related to iterators can be set by an attribute specification, but
476 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
477 Constant_Indexing and Variable_Indexing.
478 (Check_Indexing_Functions): New procedure to perform legality checks.
479 Additional semantic checks at end of declarations.
481 2011-08-05 Sergey Rybin <rybin@adacore.com>
483 * tree_io.ads: Update ASIS_Version_Number because of the change of the
484 order of calling Tree_Write/Tree_Read routines made for aspects.
486 2011-08-05 Bob Duff <duff@adacore.com>
488 * a-fihema.adb (Finalize): Fix race condition.
490 2011-08-05 Yannick Moy <moy@adacore.com>
492 * sem_ch12.adb (Analyze_Package_Instantiation,
493 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
496 2011-08-05 Ed Schonberg <schonberg@adacore.com>
498 * sem_type.adb (Specific_Type): in an instance, the type-specific
499 operand of an equality check that involves null may have a private
500 type. Use full view to determine legality of construct.
502 2011-08-05 Vincent Celier <celier@adacore.com>
504 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
505 delete or close the file when the call to gnatmake was successful.
507 2011-08-05 Yannick Moy <moy@adacore.com>
509 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
510 Global_Discard_Names.
512 2011-08-05 Ed Schonberg <schonberg@adacore.com>
514 * sinfo.ads: comments on use of entity field for aspect specifications.
516 2011-08-05 Ed Schonberg <schonberg@adacore.com>
518 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
519 node is not itself an entity but a selected component, it is a
520 rewritten parameterless call to an en enclosing synchronized operation,
521 and this expansion will be performed again in the instance, so there is
522 no global information to preserve.
524 2011-08-05 Javier Miranda <miranda@adacore.com>
526 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
527 for renamings of predefined primitives.
528 (In_Predef_Prims_DT): New subprogram.
530 2011-08-05 Ed Schonberg <schonberg@adacore.com>
532 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
533 possible interpretation of name is a reference type, add an
534 interpretation that is the designated type of the reference
535 discriminant of that type.
536 * sem_res.adb (resolve): If the interpretation imposed by context is an
537 implicit dereference, rewrite the node as the deference of the
538 reference discriminant.
539 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
540 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
541 parent type or base type.
542 * sem_ch4.adb (Process_Indexed_Component,
543 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
544 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
545 Check for implicit dereference.
546 (List_Operand_Interps): Indicate when an implicit dereference is
548 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
550 2011-08-05 Thomas Quinot <quinot@adacore.com>
552 * scos.ads: Update documentation of SCO table. Pragma statements can now
553 be marked as disabled (using 'p' instead of 'P' as the statement kind).
554 * par_sco.ads, par_sco.adb: Implement the above change.
555 (Process_Decisions_Defer): Generate a P decision for the first parameter
556 of a dyadic pragma Debug.
557 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
559 * put_scos.adb: Code simplification based on above change.
561 2011-08-05 Robert Dewar <dewar@adacore.com>
563 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
564 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
565 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
566 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
568 2011-08-05 Bob Duff <duff@adacore.com>
570 * a-stunau.ads, g-spipat.adb: Update comments.
572 2011-08-05 Bob Duff <duff@adacore.com>
574 * a-fihema.ads: Minor comment fix.
575 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
577 (Attach, Detach): Remove some unnecessary code.
578 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
580 2011-08-05 Bob Duff <duff@adacore.com>
582 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
583 allocation for Objects component. This simplifies the code somewhat. It
584 is also a little more efficient in the not-so-unusual case where there
585 are no controlled objects allocated.
586 Make Finalization_Started flag atomic.
587 (Finalize): Avoid unnecessary detachment of items from the list.
588 (pcol): Minor cleanup.
590 2011-08-05 Ed Schonberg <schonberg@adacore.com>
592 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
593 package whose name is the same as that of the generic unit, or its
596 2011-08-05 Bob Duff <duff@adacore.com>
598 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
599 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
602 2011-08-05 Arnaud Charlet <charlet@adacore.com>
604 * make.adb (Linking_Phase): No longer need to set source search path
605 before calling gnatlink in CodePeer mode.
606 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
607 gcc in CodePeer mode, since the binder generated file no longer has a
609 * switch.ads, switch.adb (Is_Language_Switch): Removed.
610 * switch-c.adb: Update comment.
612 2011-08-05 Thomas Quinot <quinot@adacore.com>
614 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
616 2011-08-05 Nicolas Roche <roche@adacore.com>
618 * gnat_ugn.texi: Fix minor syntax error issue.
620 2011-08-05 Vincent Celier <celier@adacore.com>
622 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
623 delete or close the file when the call to gnatmake returns a non
624 successful return code.
626 2011-08-05 Ed Schonberg <schonberg@adacore.com>
628 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
629 check, indicate that the copy of the original node does not come from
630 source, to prevent an infinite recursion of the expansion.
632 2011-08-05 Johannes Kanig <kanig@adacore.com>
634 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
635 VC generation for subprogram bodies.
637 2011-08-05 Yannick Moy <moy@adacore.com>
640 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
641 the base type with the smallest allowed base type.
643 2011-08-05 Sergey Rybin <rybin@adacore.com>
645 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
648 2011-08-05 Ed Schonberg <schonberg@adacore.com>
650 * sem_ch12.ads: minor comment updates.
652 2011-08-05 Ed Schonberg <schonberg@adacore.com>
654 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
655 instantiation and a formal package the compiler generates a package
656 renaming declaration so that the generic name within the declaration
657 is interpreted as a renaming of the instance. At the end of a formal
658 package declaration, this renaming must become invisible.
660 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
662 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
663 comparison and rely on concrete entities instead.
665 2011-08-05 Ed Schonberg <schonberg@adacore.com>
667 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
668 and discriminants, to indicate that the type has an access discriminant
669 that supports implicit dereference.
670 * snames.ads-tmpl: Add names of aspects and attributes related to
671 Ada2012 iterators: constant_indexing, default_iterator,
672 iterator_element, implicit_dereference, variable_indexing.
673 * aspects.ads, aspects.adb: entries for iterator-related aspects.
674 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
675 iterator-related aspects.
676 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
678 2011-08-05 Sergey Rybin <rybin@adacore.com>
680 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
681 metrics in gnatmetric to cover new kinds of coupling mentrics.
683 2011-08-05 Steve Baird <baird@adacore.com>
685 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
686 of calling the user-defined main subprogram.
687 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
688 is set) Call_Main_Subprogram ahead of, as opposed to
690 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
691 generation of a "with" of the user-defined main subprogram.
692 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
693 (which is now called from Gen_Main instead).
695 2011-08-05 Emmanuel Briot <briot@adacore.com>
697 * projects.texi: Added reference to the Makefile package.
699 2011-08-05 Thomas Quinot <quinot@adacore.com>
701 * exp_ch7.adb: Minor comment rewording.
703 2011-08-05 Ed Falis <falis@adacore.com>
705 * env.c: Fix comment.
707 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
709 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
710 character comparison and rely on concrete entities instead.
712 2011-08-05 Ed Schonberg <schonberg@adacore.com>
714 * sem_ch3.adb: (Check_Private_Overriding): better error message,
715 suggested by AI95-0068.
717 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
719 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
720 the two potential initialization calls. This accounts for any
721 access-before-elaboration checks which may precede the initialization
723 (Next_Suitable_Statement): New routine. Returns the next real statement
724 after the input node while skipping generated checks.
725 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
726 with comment on usage.
727 Do not generate Elaborate_All when the trigger is a finalization call
728 coming from a type init proc.
729 (Check_Elab_Call): Propagate the initialization procedure context to
730 subsequent calls to Check_A_Call.
731 (Check_Internal_Call_Continue): Propagate the initialization procedure
732 context to subsequent calls to Check_Elab_Call.
733 (Is_Finalization_Procedure): New routine. Returns True if the input
734 entity denotes a [Deep_]Finalize routine.
735 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
736 along with comment on usage.
738 2011-08-05 Vadim Godunko <godunko@adacore.com>
740 * s-atocou.ads: Add list of supported platforms.
742 2011-08-05 Yannick Moy <moy@adacore.com>
744 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
746 * opt.ads (Disable_ALI_File): new Boolean flag
747 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
749 2011-08-05 Ed Falis <falis@adacore.com>
751 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
752 environ is properly defined.
754 2011-08-05 Vincent Celier <celier@adacore.com>
756 * make.adb (Compilation_Phase): Exit immediately when all objects have
757 been found up to date, to avoid multiple exit messages.
758 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
759 same project for languages with no compiler.
760 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
762 2011-08-05 Robert Dewar <dewar@adacore.com>
764 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
765 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
766 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
767 s-atocou-builtin.adb: Minor reformatting.
769 2011-08-05 Yannick Moy <moy@adacore.com>
771 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
772 if the node to wrap is a pragma check, this node and enclosed
773 expression are not expanded, so do not apply any transformations here.
774 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
775 introducing transient scopes.
777 2011-08-05 Jose Ruiz <ruiz@adacore.com>
779 * adaint.c (__gnat_set_writable, __gnat_set_readable,
780 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
781 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
782 routine is available, so we use the default implementation of these
784 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
785 support for copying attributes on VxWorks 6.
787 2011-08-05 Yannick Moy <moy@adacore.com>
789 * debug.adb: Remove use of -gnatd.D.
790 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
791 * opt.ads: Simplify variables for ALFA mode, to keep one only
792 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
795 2011-08-05 Vincent Celier <celier@adacore.com>
797 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
798 Builder'Default_Switches.
800 2011-08-05 Vincent Celier <celier@adacore.com>
802 * makeusg.adb: Add lines for --create-map-file switches.
804 2011-08-05 Ed Schonberg <schonberg@adacore.com>
806 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
807 profile is incomplete and the full view is available, replace it with
809 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
810 incomplete, freezing the subprogram is delayed until the full view is
812 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
813 fixed-point multiplication operator and the predefined operator is
814 resolved in favor of the user-defined one.
816 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
818 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
821 2011-08-04 Ed Schonberg <schonberg@adacore.com>
823 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
824 whether a type lacks user-defined Read or Write operations, or has a
825 component that lacks them.
826 * sem_attr.adb (Check_Stream_Attribute): if restriction
827 No_Default_Stream_Attributes is active, verify that all subcomponent
828 types of the target have user-defined stream operations, and report
830 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
831 * exp_strm.adb: Build_Elementary_Input_Call,
832 Build_Elementary_Write_Call): remove checks for restriction
833 No_Default_Stream_Attributes, now checked in semantics.
835 2011-08-04 Vincent Celier <celier@adacore.com>
837 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
838 switches on the command line, look for all valid --RTS switches in the
839 Builder switches and for each language use the first runtime name found
841 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
842 command line and there is no auto-configuration.
843 (Runtime_Name_Set_For): New function.
845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
847 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
848 elaborate initialization expression for variable Abort when processing
849 a package body or a declaration.
850 (Create_Finalizer): Propagate the package context when creating the
851 exception-related variables.
852 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
853 For_Package along with usage comment.
855 2011-08-04 Arnaud Charlet <charlet@adacore.com>
857 * gcc-interface/Makefile.in: Clean up targets.
858 Enable new package for atomic counters and copy-on-write implementation
859 of unbounded strings on x86 platforms.
860 * gcc-interface/Make-lang.in: Update dependencies.
862 2011-08-04 Robert Dewar <dewar@adacore.com>
864 * exp_ch7.adb: Minor reformatting.
866 2011-08-04 Robert Dewar <dewar@adacore.com>
868 * exp_strm.adb: Minor reformatting.
870 2011-08-04 Vadim Godunko <godunko@adacore.com>
872 * s-atocou.adb: Replace by dummy version and use on targets where atomic
873 operations are not supported.
874 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
875 * s-atocou-x86.adb: New file.
876 * Makefile.rtl: Add s-atocou.o file
878 2011-08-04 Arnaud Charlet <charlet@adacore.com>
880 * make.adb (Compile): Move setting of CodePeer_Mode to ...
881 (Compilation_Phase): ... here.
882 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
884 2011-08-04 Thomas Quinot <quinot@adacore.com>
886 * Make-generated.in: Fix minor typo in comment.
888 2011-08-04 Thomas Quinot <quinot@adacore.com>
890 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
893 2011-08-04 Robert Dewar <dewar@adacore.com>
895 * a-coinho.adb: Minor reformatting.
897 2011-08-04 Robert Dewar <dewar@adacore.com>
899 * a-coinho.ads: Minor reformatting.
901 2011-08-04 Vadim Godunko <godunko@adacore.com>
903 * s-atocou.ads, s-atocou.adb: New files.
904 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
905 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
906 direct use of GCC's atomic builtins and replace them by use of new
907 atomic counter package.
909 2011-08-04 Ed Schonberg <schonberg@adacore.com>
911 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
913 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
915 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
916 with a call to Get_External_Tag.
917 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
918 subprogram usage. Remove the guard against package declarations and
919 bodies since Build_Cleanup_Statements is no longer invoked in that
921 (Build_Components): Initialize Tagged_Type_Stmts when the context
922 contains at least one library-level tagged type.
923 (Build_Finalizer): New local variables Has_Tagged_Types and
924 Tagged_Type_Stmts along with associated comments on usage. Update the
925 logic to include tagged type processing.
926 (Create_Finalizer): Insert all library-level tagged type unregistration
927 code before the jump block circuitry.
928 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
929 (Expand_N_Package_Declaration): Remove the call to
930 Build_Cleanup_Statements.
931 (Process_Tagged_Type_Declaration): New routine. Generate a call to
932 unregister the external tag of a tagged type.
933 (Processing_Actions): Reimplemented to handle tagged types.
934 (Process_Declarations): Detect the declaration of a library-level
935 tagged type and carry out the appropriate actions.
936 (Unregister_Tagged_Types): Removed. The machinery has been directly
937 merged with Build_Finalizer.
939 2011-08-04 Robert Dewar <dewar@adacore.com>
941 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
942 gnatls.adb, exp_ch3.adb: Minor reformatting.
944 2011-08-04 Marc Sango <sango@adacore.com>
946 * sem_attr.adb (Analyze_Attribute): Replace the message
947 "invisible attribute of}" of the spark restriction violation in
948 attribute reference by the simple message "invisible attribute of type".
949 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
950 two insertion characters: '&' and '}'.
952 2011-08-04 Vadim Godunko <godunko@adacore.com>
954 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
955 * a-coinho.ads, a-coinho.adb: New file.
956 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
958 2011-08-04 Nicolas Roche <roche@adacore.com>
960 * alfa_test.adb: Not all ali files are containing alfa information even
961 if compiled with -gnatd.F. So suppress warning about missing ALFA
964 2011-08-04 Yannick Moy <moy@adacore.com>
966 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
968 * put_alfa.adb: Check that scope name is not empty.
970 2011-08-04 Ed Schonberg <schonberg@adacore.com>
972 * exp_ch3.adb (Stream_Operation_Ok): new predicate
973 Needs_Elementary_Stream_Operation, to determine whether user-defined
974 Read and Write attributes are available for the elementary components
975 of the given type. If only the predefined attributes are available,
976 then when restriction No_Default_Stream_Attributes is active the
977 predefined stream attributes for the composite type cannot be created.
979 2011-08-04 Robert Dewar <dewar@adacore.com>
981 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
982 Put routines in alpha order
984 2011-08-04 Jose Ruiz <ruiz@adacore.com>
986 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
987 * gcc-interface/Make-lang.in: Update dependencies.
989 2011-08-04 Arnaud Charlet <charlet@adacore.com>
991 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
992 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
995 2011-08-04 Robert Dewar <dewar@adacore.com>
997 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
998 lib-xref-alfa.adb: Minor reformatting.
1000 2011-08-04 Marc Sango <sango@adacore.com>
1002 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1003 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1004 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1007 2011-08-04 Tristan Gingold <gingold@adacore.com>
1009 * bindgen.adb (Gen_Adainit_C): Remove.
1010 (Gen_Adafinal_C): Ditto.
1011 (Gen_Elab_Externals_C): Ditto.
1012 (Gen_Elab_Calls_C): Ditto.
1013 (Gen_Elab_Order_C): Ditto.
1014 (Gen_Elab_Defs_C): Ditto.
1015 (Gen_Finalize_Library_C): Ditto.
1016 (Gen_Finalize_Library_Defs_C): Ditto.
1017 (Gen_Main_C): Ditto.
1018 (Gen_Output_File_C): Ditto.
1019 (Gen_Restrictions_C): Ditto.
1020 (Gen_Versions_C): Ditto.
1021 (Write_Info_Ada_C): Ditto.
1022 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1023 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1024 Always call Gen_Output_File_Ada.
1025 * gnatlink.adb (Begin_Info): Now a constant.
1027 (Ada_Bind_File): Remove
1028 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1029 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1030 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1031 * opt.ads (Ada_Bind_File): Remove.
1033 2011-08-04 Thomas Quinot <quinot@adacore.com>
1035 * projects.texi: Document target-specific directory in default project
1038 2011-08-04 Thomas Quinot <quinot@adacore.com>
1040 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1043 2011-08-04 Yannick Moy <moy@adacore.com>
1045 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1046 opt.ads, lib-xref.ads: Code clean up.
1048 2011-08-04 Yannick Moy <moy@adacore.com>
1050 * gnat_rm.texi: Update description of Test_Case
1051 * gnat_ugn.texi: Typo.
1053 2011-08-04 Ed Falis <falis@adacore.com>
1055 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1057 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1059 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1060 it is of type Root_Controlled. This action eliminates fields Prev and
1061 Next from type equality.
1063 2011-08-04 Yannick Moy <moy@adacore.com>
1065 * lib-xref-alfa.adb: Correct typo.
1067 2011-08-04 Matthew Heaney <heaney@adacore.com>
1069 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1072 2011-08-04 Yannick Moy <moy@adacore.com>
1074 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1075 (Analyze_Pragma): allow static string expression for name of Test_Case,
1076 instead of simply string literals.
1077 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1080 2011-08-04 Vincent Celier <celier@adacore.com>
1082 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1083 case suffixes to find truncated main sources.
1085 2011-08-04 Tristan Gingold <gingold@adacore.com>
1087 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1088 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1089 (Compute_Current_Task): Ditto.
1091 2011-08-04 Tristan Gingold <gingold@adacore.com>
1093 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1095 2011-08-04 Yannick Moy <moy@adacore.com>
1097 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1098 library-level constant.
1099 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1100 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1101 used as selector of parameter association, in ALFA mode.
1103 2011-08-04 Robert Dewar <dewar@adacore.com>
1105 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1106 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1109 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1111 * make.adb (Linking_Phase): Set source search path before calling
1112 gnatlink in CodePeer mode.
1114 2011-08-04 Javier Miranda <miranda@adacore.com>
1116 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1117 Remove code which takes care of building TSDs.
1118 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1119 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1120 the accessibility check in VM targets.
1121 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1122 (Building_Static_DT): Now returns false for VM targets.
1123 (Build_VM_TSDs): Removed.
1124 (Expand_Interface_Conversion): Generate missing runtime check for
1125 conversions to interface types whose target type is unknown at compile
1127 (Make_VM_TSD): Add missing code to disable the generation of calls to
1128 Check_TSD if the tagged type is not defined at library level, or not
1129 has a representation clause specifying its external tag, or -gnatdQ is
1131 * exp_disp.ads (Build_VM_TSDs): Removed.
1132 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1133 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1134 register primitives in the dispatch tables in VM targets.
1135 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1136 initialization of class-wide interface objects in VM targets.
1137 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1140 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1142 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1143 when dotnet-ld cannot be found.
1145 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1147 * bindgen.adb: Simplify significantly generation of binder body file in
1149 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1150 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1153 2011-08-04 Yannick Moy <moy@adacore.com>
1155 * sem_prag.adb, sem.ads: Code cleanup.
1157 2011-08-04 Tristan Gingold <gingold@adacore.com>
1159 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1160 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1161 results if possible.
1162 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1163 * gnat_ugn.texi: Update dynamic stack usage section.
1165 2011-08-04 Steve Baird <baird@adacore.com>
1167 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1168 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1169 contains only a call to the user-defined main subprogram.
1170 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1171 call the "wrapper" subprogram instead of directly
1172 calling the user-defined main subprogram.
1174 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1176 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1177 alternatives of a case statement for controlled objects. Rename local
1178 variable A to Dead_Alt.
1179 (Expand_N_If_Statement): Check the then and else statements of an if
1180 statement for controlled objects. Check the then statements of all
1181 elsif parts of an if statement for controlled objects.
1182 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1184 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1185 detects a loop associated with the expansion of an array object.
1186 Augment the processing of the loop statements to account for a possible
1187 wrap done by Process_Statements_For_Controlled_Objects.
1188 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1189 statements and abortable part of an asynchronous select for controlled
1191 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1192 conditional entry call for controlled objects.
1193 (Expand_N_Selective_Accept): Check the alternatives of a selective
1194 accept for controlled objects.
1195 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1196 alternatives of a timed entry call for controlled objects.
1197 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1198 exception handler for controlled objects.
1199 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1200 Add formal parameter Nested_Constructs along with its associated
1202 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1203 Requires_Cleanup_Actions.
1204 (Process_Statements_For_Controlled_Objects): New routine.
1205 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1206 routine. Inspect a node which contains a non-handled sequence of
1207 statements for controlled objects. If such an object is found, the
1208 statements are wrapped in a block.
1210 2011-08-04 Bob Duff <duff@adacore.com>
1212 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1213 need to compare with Class_Wide_Type (T2), in order to get at the
1214 original class-wide type node.
1215 * sem_type.ads (Covers): Improve the comment.
1216 * einfo.ads (Class_Wide_Type): Improve the comment.
1217 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1218 the type of the Deref.
1220 2011-08-04 Yannick Moy <moy@adacore.com>
1222 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1223 separate declarations.
1224 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1225 check identifier of pragma argument.
1226 (Chain_TC): check that no other test case associated to the same entity
1227 share the same name.
1228 (Check_Test_Case): disallow test case inside subprogram body
1229 (Analyze_Pragma): correct call to check identifier and not argument
1230 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1231 function gets name from test case pragma.
1233 2011-08-04 Yannick Moy <moy@adacore.com>
1235 * gnat_rm.texi: Document new pragma and aspect.
1236 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1237 (No_Duplicates_Allowed): new constant array defining whether duplicates
1238 aspects of each kind can appear on the same declaration.
1239 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1240 field, which points to a node holding the previous Spec_PPC_List.
1241 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1242 through the indirection with Contract.
1243 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1244 * par-prag.adb (Prag): do nothing on Test_Case pragma
1245 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1247 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1248 component Ensures of Test_Case.
1249 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1250 (Analyze_Generic_Subprogram_Declaration,
1251 Analyze_Subprogram_Instantiation,
1252 Analyze_Abstract_Subprogram_Declaration,
1253 Analyze_Subprogram_Body_Helper,
1254 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1255 insert contract in subprogram node at point of definition
1257 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1258 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1259 corresponding pragma
1260 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1261 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1262 similar to the analysis of pre/post
1263 (Derive_Subprogram): insert contract in subprogram node at point of
1265 * sem_prag.adb, sem_prag.ads
1266 (Check_Arg_Is_String_Literal, Check_Identifier):
1267 new checking procedures to be called in treatment of pragmas
1268 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1269 pragma is well-formed. This does not check currently that 'Result is
1270 used only in the Ensures component of a Test_Case.
1271 (Analyze_Pragma): add case for Test_Case
1272 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1273 components of a Test_Case.
1274 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1275 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1276 pragma, treated as spec expressions.
1277 (Sig_Flags): add value -1 for Test_Case.
1278 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1279 Get_Requires_From_Test_Case_Pragma): getters for both expression
1280 components of a Test_Case.
1281 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1282 indirection between an entry or [generic] subprogram entity and its
1283 pre/post + test-cases.
1284 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1285 get/set for fields of an N_Contract node.
1286 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1287 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1288 names and pragma for Test_Case.
1289 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1291 2011-08-04 Vincent Celier <celier@adacore.com>
1293 * gnat_ugn.texi: Improve documentation of gnatmake switch
1294 --source-info-file=.
1296 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1298 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1299 type). Initialize Atyp to the appropriate type which is later checked
1300 for completion. Rewrite the assertion associated with private type
1303 2011-08-04 Ed Falis <falis@adacore.com>
1305 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1306 initialize the number of CPUs.
1308 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1310 * sem_type.adb (Disambiguate): New subsidiary routine
1311 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1312 equality on an anonymous access type whose designated type is private
1313 does not lead to an ambiguity with the universal access equality
1314 operator in the body or child units of the defining package. The same
1315 is true for a multiplication operator on a private type completed with
1318 2011-08-04 Javier Miranda <miranda@adacore.com>
1320 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1321 (Normalize_Scalars_Config): Removed.
1323 (Register_Opt_Config_Switches): Remove registering config values of
1324 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1325 (Restore_Opt_Config_Switches): Remove code which restores the values of
1326 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1327 Init_Or_Norm_Scalars.
1328 (Save_Opt_Config_Switches): Remove code which saves values of
1329 Init_Or_Norm_Scalars and Normalize_Scalars.
1330 (Set_Opt_Config_Switches): Remove code which restores config values of
1331 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1332 Init_Or_Norm_Scalars.
1334 2011-08-04 Yannick Moy <moy@adacore.com>
1336 * frontend.adb (Frontend): remove previous patch to avoid full
1337 qualification in ALFA mode.
1338 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1339 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1340 unique name for an entity, which could be used to identify the entity
1341 across compilation units.
1343 2011-08-04 Thomas Quinot <quinot@adacore.com>
1346 (Initialize_Default_Project_Path): Add target specific directory
1347 ($prefix/$target/lib/gnat) in front of project path in all cases
1348 (making gnatmake's behaviour consistent with gprbuild).
1349 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1350 Pass target name from Sdefault to project subsystem.
1351 * gnatls.adb: Show new target specific default project directory.
1353 2011-08-04 Johannes Kanig <kanig@adacore.com>
1355 * cstand.adb: Add Information to Identifier in Standard
1356 (Identifer_For): Set Entity to the corresponding entity
1358 2011-08-04 Sergey Rybin <rybin@adacore.com>
1360 * gnat_ugn.texi: Update doc on gnatcheck.
1362 2011-08-04 Yannick Moy <moy@adacore.com>
1364 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1367 2011-08-04 Yannick Moy <moy@adacore.com>
1369 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1370 performing expansion.
1371 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1372 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1373 it is not called in ALFA mode.
1375 2011-08-04 Emmanuel Briot <briot@adacore.com>
1377 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1378 after all, so removed.
1380 2011-08-04 Sergey Rybin <rybin@adacore.com>
1382 * vms_data.ads: Add missing VMS qualifiers.
1384 2011-08-04 Emmanuel Briot <briot@adacore.com>
1386 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1387 the list of files on the command line after processing it through
1390 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1392 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1393 processing for .NET/JVM. These targets can now benefit from
1394 Raise_From_Controlled_Operation and they share the same processing with
1396 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1397 These targets need transient scopes in order to properly finalize short
1398 lived controlled objects.
1399 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1400 NET/JVM. These targets can now benefit from
1401 Raise_From_Controlled_Operation and they share the same processing with
1404 2011-08-04 Geert Bosch <bosch@adacore.com>
1406 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1408 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1410 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1411 Expand_Record_Aggregate, to determine whether aggregate must be
1412 expanded into assignments. This is the case if the ancestor part is
1413 private, regarless of the setting of the flag Has_Private_Ancestor.
1415 2011-08-04 Ed Falis <falis@adacore.com>
1417 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1419 2011-08-04 Bob Duff <duff@adacore.com>
1421 * sinfo.ads: Fix comment.
1423 2011-08-04 Steve Baird <baird@adacore.com>
1425 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1426 choose a package name in much the same way as is
1427 done for JGNAT when VM_Target /= No_VM, except that
1428 a slightly more distinctive prefix string is used.
1430 2011-08-04 Emmanuel Briot <briot@adacore.com>
1432 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1433 gnatmake command line.
1434 This behavior was never documented (and was supported only because of
1435 an early bug in the code). This case might lead to ambiguous cases
1436 (between unit names and truncated base names without suffixes).
1438 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1440 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1441 Remove the external tag of a tagged type from the internal hash table.
1442 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1443 expanded usage of the routine. Strenghten the check for Is_Master. Add
1444 processing for tagged types.
1445 (Build_Finalizer): Create all the necessary lists used in finalizer
1446 creation when the processed context is a package that may contain
1448 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1449 Requires_Cleanup_Actions.
1450 (Expand_N_Package_Body): Package bodies may need clean up code
1451 depending on whether they contain tagged types.
1452 (Expand_N_Package_Declaration): Package declarations may need clean up
1453 code depending on whether they contain tagged types.
1454 (Unregister_Tagged_Types): New routine. Search through a list of
1455 declarations or statements, looking for non-abstract Ada tagged types.
1456 For each such type, generate code to unregister the external tag.
1457 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1458 Requires_Cleanup_Actions.
1459 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1460 through a list of declarations or statements looking for non-abstract
1461 Ada tagged types or controlled objects.
1462 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1463 Requires_Cleanup_Actions.
1464 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1465 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1468 2011-08-04 Vincent Celier <celier@adacore.com>
1470 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1471 has Ada sources, not project Project, because if the root project
1472 Project has no sources of its own, all projects will be deemed without
1475 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1477 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1478 of the No_Param_Proc acc-to-subp type used for initialization of
1479 __gnat_finalize_library_objects so that it's declared at library level
1480 rather than nested inside of the adainit routine.
1482 2011-08-04 Javier Miranda <miranda@adacore.com>
1484 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1485 if the tagged type has a representation clause which specifies its
1488 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1490 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1491 Remove previous procedure with that name.
1492 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1494 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1495 subtype mark, the ancestor cannot have unknown discriminants.
1496 (Resolve_Record_Aggregate): if the type has invisible components
1497 because of a private ancestor, the aggregate is illegal.
1499 2011-08-04 Vincent Celier <celier@adacore.com>
1501 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1502 account switches -gnat2005, -gnat12 and -gnat2012.
1504 2011-08-04 Bob Duff <duff@adacore.com>
1506 * s-tasdeb.ads: Minor comment fix.
1508 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1510 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1512 * switch.ads, switch.adb (Is_Language_Switch): New function.
1514 2011-08-04 Vincent Celier <celier@adacore.com>
1516 * switch-c.adb: Minor comment addition.
1518 2011-08-04 Vincent Celier <celier@adacore.com>
1520 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1521 ending with '=' is followed by a space (missing file name).
1523 2011-08-04 Pascal Obry <obry@adacore.com>
1525 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1527 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1529 * sem_ch12.adb (Analyze_Associations): New routine
1530 Check_Overloaded_Formal_Subprogram to reject a formal package when
1531 there is a named association or a box initialisation for an overloaded
1532 formal subprogram of the corresponding generic.
1534 2011-08-04 Yannick Moy <moy@adacore.com>
1536 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1537 * get_alfa.adb, put_alfa.adb: Read and write new component of
1539 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1541 2011-08-04 Pascal Obry <obry@adacore.com>
1543 * urealp.adb: Minor reformatting.
1545 2011-08-04 Tristan Gingold <gingold@adacore.com>
1547 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1548 Handle the case when Cleanup_Protected_Object returns Empty.
1550 2011-08-04 Yannick Moy <moy@adacore.com>
1552 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1554 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1556 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1557 call, ignore functions.
1559 2011-08-04 Geert Bosch <bosch@adacore.com>
1561 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1564 2011-08-04 Emmanuel Briot <briot@adacore.com>
1566 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1567 as an index for Builder'Switches. This conforms to the documentation.
1568 * make.adb (Insert_Project_Sources): avoid duplicate code
1570 2011-08-04 Emmanuel Briot <briot@adacore.com>
1572 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1573 name on the command line (for instance "../dummy"), never assume it can
1576 2011-08-04 Tristan Gingold <gingold@adacore.com>
1578 * bindgen.adb: Remove code the reference or create the
1579 Break_Start/__gnat_break_start procedure.
1580 * s-stalib.adb (Break_Start): Removed.
1582 2011-08-04 Emmanuel Briot <briot@adacore.com>
1584 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1585 shared with gprbuild.
1587 2011-08-04 Yannick Moy <moy@adacore.com>
1589 * par-ch4.adb (P_Primary): preferentially issue an error message about
1590 a missing parenthesis arount a conditional or case expression in Ada
1591 2012 mode, if we detect that the alignment is not correct for a
1594 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1596 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1597 tag-to-class-wide conversion as needing finalization actions.
1598 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1599 a tag-to-class-wide conversion as needing finalization actions.
1600 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1601 conversion does not need finalization actions.
1602 (Is_Tag_To_CW_Conversion): New routine.
1603 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1604 whether an object is the result of a tag-to-class-wide conversion.
1606 2011-08-04 Yannick Moy <moy@adacore.com>
1608 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1609 the left-hand-side and right-hand-side of a conjunct are inserted when
1610 translating a pre- or postcondition
1611 * sem_ch6.adb: Correct typo in comment
1613 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1615 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1616 Unchecked_Conversion and Unchecked_Deallocation.
1618 2011-08-04 Thomas Quinot <quinot@adacore.com>
1620 * make.adb: Minor reformatting.
1622 2011-08-04 Emmanuel Briot <briot@adacore.com>
1624 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1625 sources in the project and its imported projects, but not in the whole
1628 2011-08-04 Emmanuel Briot <briot@adacore.com>
1630 * make.adb: Remove debug trace.
1632 2011-08-04 Vincent Celier <celier@adacore.com>
1634 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1635 path in canonical form, to be able to compare path names on platforms
1636 such as Windows or Darwin.
1638 2011-08-04 Thomas Quinot <quinot@adacore.com>
1640 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1641 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1642 * scos.ads: Update documentation accordingly.
1643 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1646 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1648 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1649 attribute only if prefix type is scalar.
1651 2011-08-04 Emmanuel Briot <briot@adacore.com>
1653 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1654 in gnatmake for specifying mains on the command line that do not belong
1655 to the main project. These mains must currently all belong to the same
1657 (Ultimate_Extension_Of): removed, since duplicated
1658 Ultimate_Extending_Project.
1660 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1662 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1664 (CodePeer_Mode_String): New.
1665 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1667 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1668 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1669 mode, since no useful elaboration subprogram is needed by CodePeer.
1670 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1671 In this mode, compile binder file with -gnatC and do stop after this
1674 2011-08-04 Vincent Celier <celier@adacore.com>
1676 * exp_ch7.adb: Minor comment fix.
1678 2011-08-04 Robert Dewar <dewar@adacore.com>
1680 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1681 exp_ch4.adb, makeutl.adb: Minor reformatting.
1683 2011-08-04 Emmanuel Briot <briot@adacore.com>
1685 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1686 Create several new subprograms to move code out of Make. This makes the
1687 code more readable, removes code duplication, and is a preparation work
1688 for adding support for aggregate projects.
1690 2011-08-04 Tristan Gingold <gingold@adacore.com>
1692 * s-po32gl.ads, s-po32gl.adb: New files.
1693 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1694 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1695 (Build_Finalization_Collection): Use it.
1696 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1697 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1699 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1700 * gcc-interface/Make-lang.in: Update dependencies.
1702 2011-08-04 Emmanuel Briot <briot@adacore.com>
1704 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1707 2011-08-04 Emmanuel Briot <briot@adacore.com>
1709 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1710 command line is not a file name, also check whether it could be a unit
1713 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1715 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1716 the header of the finalization routine.
1717 If the unit has no finalizer but is a body whose spec has one, then
1718 generate the decrement of the elaboration entity only.
1719 If the unit has a finalizer and is a spec, then do not generate the
1720 decrement of the elaboration entity.
1721 (Gen_Finalize_Library_C): Likewise.
1723 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1725 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1726 (Bounds_Size_Expression): Removed.
1727 (Double_Alignment_Of): New subsidiary routine.
1728 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1729 for a hole in the dope vector of unconstrained arrays due to different
1730 index and element alignments.
1732 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1734 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1735 raise program_error because body has not been seen yet.
1737 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1739 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1742 2011-08-04 Vincent Celier <celier@adacore.com>
1744 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1746 2011-08-04 Yannick Moy <moy@adacore.com>
1748 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1749 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1751 2011-08-04 Thomas Quinot <quinot@adacore.com>
1753 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1754 instantiation in RCI.
1756 2011-08-04 Emmanuel Briot <briot@adacore.com>
1758 * make.adb: Share more code with gprbuild
1760 2011-08-04 Emmanuel Briot <briot@adacore.com>
1762 * projects.texi: Added documentation for the IDE'Gnat project file
1765 2011-08-04 Nicolas Roche <roche@adacore.com>
1767 * gnat_rm.texi: Minor editing.
1769 2011-08-04 Javier Miranda <miranda@adacore.com>
1771 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1772 and the library case for VM targets.
1773 (Gen_Adainit_Ada): Likewise.
1775 2011-08-04 Robert Dewar <dewar@adacore.com>
1777 * g-altive.ads: Minor comment updates.
1778 * prj-nmsc.adb: Minor reformatting.
1780 2011-08-04 Javier Miranda <miranda@adacore.com>
1783 (Normalize_Scalars_Config): Value of the configuration switch set by
1784 pragma Normalize_Scalars when it appears in the gnat.adc file.
1785 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1786 to save and restore settings of this pragma.
1788 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1789 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1791 2011-08-04 Vincent Celier <celier@adacore.com>
1793 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1795 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1797 * makeutl.adb: Minor reformatting.
1799 2011-08-04 Olivier Hainque <hainque@adacore.com>
1801 * g-altive.ads: Update comments to reflect that only the soft
1802 binding is available today.
1804 2011-08-04 Robert Dewar <dewar@adacore.com>
1806 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1807 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1808 * gcc-interface/Make-lang.in: Update dependencies.
1810 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1812 * prj-env.adb: Remove local debug traces.
1814 2011-08-04 Yannick Moy <moy@adacore.com>
1816 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1817 was used instead of Hi_OK, which could cause a read of an uninitialized
1818 value later on. Detected while working on the new warning.
1819 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1821 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1822 in more cases, in order to detect more unreferenced values.
1823 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1824 object for expression, if any.
1826 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1828 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1829 the operand types instead of the Esize.
1831 2011-08-04 Steve Baird <baird@adacore.com>
1833 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1834 enable CodePeer_Mode.
1835 * bindusg.adb (Display): Add help message describing -P binder switch.
1836 * gnat_ugn.texi: Document -P binder switch.
1837 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1838 user-defined main program directly.
1839 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1840 user-defined main program in the context clause of the package body.
1842 2011-08-04 Yannick Moy <moy@adacore.com>
1844 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1845 duplicate of Defining_Entity
1846 (Get_Unique_Entity_For_Decl): rename function into
1847 Unique_Defining_Entity
1848 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1849 (Formal_Proof_On): remove synthesized flag
1850 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1851 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1852 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1853 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1854 Annotate (Formal_Proof)
1856 2011-08-04 Emmanuel Briot <briot@adacore.com>
1858 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1859 source files with non-standard naming schemes, in imported projects
1861 2011-08-04 Emmanuel Briot <briot@adacore.com>
1863 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1864 specified on the gprbuild command line, we need to compile all units
1865 within that file, not just the first one we find
1866 Fix error message for mains that are not found.
1868 2011-08-04 Thomas Quinot <quinot@adacore.com>
1870 * sem_ch6.adb: Update comment.
1871 * sem_ch12.adb: Minor reformatting.
1873 2011-08-04 Bob Duff <duff@adacore.com>
1875 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1876 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1877 race condition whose symptom is to fail to lock Parent. That, in turn,
1878 causes Parent.Awake_Count to be accessed without locking Parent, which
1879 causes another race condition whose symptom is that Parent.Awake_Count
1880 can be off by 1 (either too high or too low). The solution is to lock
1881 Parent unconditionally, and then lock Acceptor, before reading
1882 Acceptor.Terminate_Alternative.
1884 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1886 * debug.adb: Update comment.
1888 2011-08-04 Robert Dewar <dewar@adacore.com>
1890 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1891 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1892 exp_ch6.adb: Minor reformatting.
1894 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1896 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1899 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1901 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1903 2011-08-04 Thomas Quinot <quinot@adacore.com>
1905 * sinfo.ads: Minor reformatting.
1907 2011-08-04 Emmanuel Briot <briot@adacore.com>
1909 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1910 even if there is no location.
1912 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1914 * sem_res.adb, sem_ch4.adb: move check for restriction
1915 No_Task_Hierarchy to resolve_allocator.
1917 2011-08-04 Thomas Quinot <quinot@adacore.com>
1919 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1920 This flag of N_Pragma nodes is not used, remove it as well as all of
1921 the associated circuitry.
1923 2011-08-04 Javier Miranda <miranda@adacore.com>
1925 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1926 runtime check on duplicated externa tags
1927 * debug.adb Document switch -gnatdQ.
1929 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1931 * a-fihema.ads: Minor typo fix.
1933 2011-08-04 Yannick Moy <moy@adacore.com>
1935 * sem_ch10.adb: Minor comment update.
1937 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1939 * einfo.adb: Update the node field usage to reflect the renaming of
1940 Return_Flag to Return_ Flag_Or_Transient_Decl.
1941 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1942 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1943 (Write_Field15_Name): Change Return_Flag to
1944 Return_Flag_Or_Transient_Decl.
1945 * einfo.ads: Rename node field Return_Flag to
1946 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1947 occurrences in entities.
1948 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1949 associated Inline pragma.
1950 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1951 associated Inline pragma.
1952 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1954 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1955 Return_Flag and Set_Return_Flag.
1956 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1957 objects generated for controlled transients declared inside an
1958 Exception_With_Actions. Update the calls to Return_Flag.
1959 (Process_Object_Declaration): Add code to add a null guard for hook
1960 objects generated for controlled transients declared inside an
1961 Exception_With_Actions. Update related comment.
1962 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1963 objects generated for controlled transients declared inside an
1964 Exception_With_Actions. Update the calls to Return_Flag.
1965 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1967 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1969 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1970 positional aggregate.
1972 2011-08-04 Vincent Celier <celier@adacore.com>
1974 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1975 SLOC only for pragmas.
1977 2011-08-04 Emmanuel Briot <briot@adacore.com>
1979 * projects.texi: Minor typo fix.
1981 2011-08-04 Emmanuel Briot <briot@adacore.com>
1983 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1984 on case-sensitive file systems.
1986 2011-08-04 Thomas Quinot <quinot@adacore.com>
1988 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1989 nested in a disabled pragma.
1990 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1991 enclosing pragma, if any, for X decisions.
1993 2011-08-04 Thomas Quinot <quinot@adacore.com>
1995 * sem_prag.adb: Minor reformatting.
1997 2011-08-04 Vincent Celier <celier@adacore.com>
1999 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2000 allowed in no run time mode.
2002 2011-08-04 Vincent Celier <celier@adacore.com>
2004 * make.adb (Check): When -gnatc is used, check for the source file
2005 inside the ALI file with a canonical case file name.
2007 2011-08-04 Emmanuel Briot <briot@adacore.com>
2009 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2010 overriding the separator.
2012 2011-08-04 Robert Dewar <dewar@adacore.com>
2014 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2015 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2017 2011-08-04 Robert Dewar <dewar@adacore.com>
2019 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2021 2011-08-04 Yannick Moy <moy@adacore.com>
2023 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2024 'Result only appears in postcondition of function.
2026 2011-08-04 Thomas Quinot <quinot@adacore.com>
2028 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2029 external tag, include the value of the external tag in the exception
2032 2011-08-04 Yannick Moy <moy@adacore.com>
2034 * sem_attr.adb (Result): modify error message for misplaced 'Result
2036 2011-08-04 Sergey Rybin <rybin@adacore.com>
2038 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2039 clear that the second argument must be an identifier.
2041 2011-08-04 Thomas Quinot <quinot@adacore.com>
2043 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2044 -fpreserve-control-flow, insert an IF statement on the barrier
2045 condition to ensure that a conditional branch instruction is generated.
2047 2011-08-04 Emmanuel Briot <briot@adacore.com>
2049 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2050 (Processing_Flags.Ignore_Missing_With): new flag.
2052 2011-08-04 Emmanuel Briot <briot@adacore.com>
2054 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2055 Source_List_File on case-insensitive systems where the file is actually
2056 on a case-sensitive file system (NFS,...).
2058 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2060 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2061 function return contains a controlled [extension] aggregate and the
2062 return statement is not part of a handled sequence of statements, wrap
2063 the return in a block. This ensures that all controlled temporaries
2064 generated during aggregate resolution will be picked up by the
2065 finalization machinery.
2067 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2069 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2070 components, freeze type before resolution, to ensure that default
2071 initializations are present for all components.
2072 * sem_res.adb (Resolve_Actuals): the designated object of an
2073 accces-to-constant type is a legal actual in a call to an
2074 initialization procedure.
2076 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2078 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2079 N_Unchecked_Type_Conversion to the possible containers of a renamed
2082 2011-08-04 Yannick Moy <moy@adacore.com>
2084 * par-ch13.adb (Aspect_Specifications_Present): recognize
2085 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2086 is issued in Strict mode.
2087 * par.adb: Fix typos in comments.
2089 2011-08-04 Yannick Moy <moy@adacore.com>
2091 * sem_attr.adb (Result): modify error message to take into account Post
2092 aspect when compiling Ada 2012 (or newer) code.
2094 2011-08-04 Nicolas Roche <roche@adacore.com>
2096 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2097 remove need for GCC exceptions.
2099 2011-08-04 Vincent Celier <celier@adacore.com>
2101 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2102 project, not the source file name.
2103 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2104 excluded, continue looking. This excluded source will only be returned
2105 if there is no other source with the same base name that is not locally
2108 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2110 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2111 private and one of the operands is a real literal, use a qualified
2112 expression rather than a conversion which is not meaningful to the
2115 2011-08-04 Yannick Moy <moy@adacore.com>
2117 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2118 corresponding aspect X'Class are allowed, proceed with analysis of the
2119 aspect instead of skipping it.
2121 2011-08-04 Tristan Gingold <gingold@adacore.com>
2123 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2124 This will allow to have an Ada implementation for the subprogram.
2126 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2128 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2129 completion and aspects are present, apply them to the entity for the
2130 type which is currently the partial view, but which is the one that
2132 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2133 applies to a partial view, indicate that the full view has predicates
2134 and delayed aspects.
2135 (Replace_Type_Reference): Handle properly predicates that apply to the
2136 full view of a private completion.
2138 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2140 * layout.adb (Layout_Type): For composite types, do not set Esize.
2141 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2143 (Size_Known): Look at the RM size of components instead of the Esize.
2144 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2145 issue warning and activate Implicit_Packing.
2146 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2147 if the Esize is not known.
2148 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2149 for elementary types only.
2150 (Analyze_Record_Representation_Clause): Look at the RM size instead
2151 of the Esize to issue errors.
2152 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2154 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2156 Look at the RM size instead of the Esize for types if the latter is
2158 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2160 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2162 * sem_type.adb: proper handling of equality not involving anonymous
2165 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2167 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2168 Vis_Decls. When creating a library-level finalizer for a package spec,
2169 both the declaration and body of the finalizer are inserted either in
2170 the visible or private declarations of the package spec.
2172 2011-08-04 Javier Miranda <miranda@adacore.com>
2174 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2175 use of the full-view of a type when invoking Is_Ancestor.
2176 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2177 the full-view of private parents is requested, then use also the
2178 full-view of the parent of the first derivation.
2180 2011-08-04 Tristan Gingold <gingold@adacore.com>
2182 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2183 instead of the locally imported procedure.
2184 * s-taprop-mingw.adb (Enter_Task): Ditto.
2185 * s-valrea.adb (Scan_Real): Ditto.
2186 * s-imgrea.adb (Set_Image_Real): Ditto.
2187 * s-flocon.ads: Make the package pure.
2189 2011-08-04 Thomas Quinot <quinot@adacore.com>
2191 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2192 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2193 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2194 New subprogram, moved here from...
2195 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2196 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2197 rewriting of the last argument into a procedure call statement here...
2198 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2201 2011-08-04 Thomas Quinot <quinot@adacore.com>
2203 * par_sco.adb: Minor reformatting.
2205 2011-08-04 Robert Dewar <dewar@adacore.com>
2207 * erroutc.adb: Minor reformatting.
2209 2011-08-04 Thomas Quinot <quinot@adacore.com>
2211 * par_sco.adb: Comment update.
2213 2011-08-04 Tristan Gingold <gingold@adacore.com>
2215 * s-flocon.ads: New file.
2216 * g-flocon.ads: Now a renaming of s-flocon.
2217 * Makefile.rtl: Add s-flocon.o
2219 2011-08-04 Javier Miranda <miranda@adacore.com>
2221 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2222 constrained, do not attempt to build a subtype of it.
2224 2011-08-04 Yannick Moy <moy@adacore.com>
2226 * errout.ads Change comments: remove 'R'M as an example where quotes
2227 are needed; add ALFA as another case where quotes are not needed
2228 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2229 case where quotes are not needed.
2230 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2231 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2232 Remove all occurrences of 'A'L'F'A
2234 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2236 * sem_ch13.adb: check legality of invariant pragma.
2238 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2240 * bindgen.adb: Add comments.
2242 2011-08-04 Yannick Moy <moy@adacore.com>
2244 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2246 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2247 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2249 2011-08-04 Robert Dewar <dewar@adacore.com>
2251 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2252 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2253 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2255 2011-08-04 Thomas Quinot <quinot@adacore.com>
2257 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2259 2011-08-04 Thomas Quinot <quinot@adacore.com>
2262 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2265 2011-08-04 Robert Dewar <dewar@adacore.com>
2267 * einfo.ads, exp_ch4.adb: Minor reformatting.
2269 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2271 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2273 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2275 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2276 type in all cases to compute list of primitive operations, because full
2277 view may be an itype that is not attached to the list of declarations.
2279 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2281 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2282 library has already been finalized.
2283 (Gen_Adafinal_C): Likewise.
2284 (Gen_Adainit_Ada): Generate an early return if the library has
2285 already been elaborated.
2286 (Gen_Adainit_C): Likewise.
2287 (Gen_Output_File_Ada): Generate an elaboration flag.
2288 (Gen_Output_File_C): Likewise.
2290 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2292 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2293 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2294 built in the first place.
2295 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2296 for CodePeer because Finalize_Address was not built to begin with.
2297 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2299 2011-08-04 Pascal Obry <obry@adacore.com>
2301 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2302 filenames, this ensures unicity of filenames across processes.
2304 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2306 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2307 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2308 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2309 Add False as the actual to From_Abort in the generated call to
2310 Raise_From_Controlled_Operation.
2312 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2314 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2315 so that the ali file name can be retrieved from outside of this package.
2316 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2317 doing nothing in the general case, but used to update the object file
2318 timestamp if directly generated by the backend.
2319 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2320 to a later time than the ali file one.
2322 2011-08-04 Yannick Moy <moy@adacore.com>
2324 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2325 entities whose body contains an Annotate pragma which forces formal
2327 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2328 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2329 Mark_Non_ALFA_Subprogram to pass in a message and node.
2330 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2331 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2332 surrounding subprogram.
2333 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2334 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2335 as not in ALFA is annotated with Formal_Proof being On, then an error
2336 is issued based on the additional parameters for message and node.
2337 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2338 * gcc-interface/Make-lang.in: Update dependencies.
2340 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2342 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2343 Finalize_Address when CodePeer is enabled.
2345 2011-08-04 Pascal Obry <obry@adacore.com>
2347 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2348 the latter returns a pointer to a static buffer which is deallocated
2349 at the end of the routine.
2351 2011-08-04 Yannick Moy <moy@adacore.com>
2353 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2354 after index creation; mark unconstrained base array type generated as
2355 being in/not in ALFA as well
2356 (Make_Index): mark subtype created as in/not in ALFA
2357 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2358 over a loop as in/not in ALFA, depending on its type and form of loop
2361 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2363 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2364 directly to False on .NET and JVM.
2366 2011-08-04 Yannick Moy <moy@adacore.com>
2368 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2369 constraint that subtype must come from source code to be in ALFA, so
2370 that anonymous subtypes can be in ALFA too.
2372 2011-08-04 Yannick Moy <moy@adacore.com>
2374 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2375 reference for ALFA mode.
2376 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2377 procedure public so as to use it from formal verification back-end.
2379 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2381 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2382 invalid checks of the Parameter, making Remove_Switch not working
2385 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2387 * targparm.ads: Update header: no run-time exception is needed on this
2390 2011-08-04 Vincent Celier <celier@adacore.com>
2392 * a-fihema.adb: Use System.IO instead of GNAT.IO
2394 2011-08-04 Thomas Quinot <quinot@adacore.com>
2396 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2397 are forbidden in Compiler_Unit mode.
2399 2011-08-04 Robert Dewar <dewar@adacore.com>
2401 * sem_util.adb: Minor reformatting.
2403 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2405 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2406 library-level finalizers.
2407 (Gen_Finalize_Library_C): Update the import string for library-level
2409 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2410 library-level finalizer.
2411 * exp_ch7.adb: Remove with and use clauses for Stringt.
2412 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2413 Spec_Decl. Add local variable Body_Id. The names of library-level
2414 finalizers are now manually fully qualified and are no longer external.
2415 A single name is now capable of servicing .NET, JVM and non-VM targets.
2416 Pragma Export is no longer required to provide visibility for the name.
2417 (Create_Finalizer_String): Removed.
2418 (New_Finalizer_Name): New routine which mimics New_..._Name.
2420 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2422 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2423 elaboration counter to Standard_Short_Integer.
2424 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2425 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2426 (Gen_Elab_Externals_C): Likewise.
2428 2011-08-04 Ed Falis <falis@adacore.com>
2430 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2431 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2432 system-vxworks-mips.ads, system-vxworks-x86.ads
2433 (Always_Compatible_Rep): set to False for all VxWorks targets.
2435 2011-08-04 Robert Dewar <dewar@adacore.com>
2437 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2438 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2439 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2440 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2441 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2442 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2443 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2444 Minor reformatting and code reorganization.
2446 2011-08-04 Emmanuel Briot <briot@adacore.com>
2448 * projects.texi: Added doc for aggregate projects.
2450 2011-08-04 Emmanuel Briot <briot@adacore.com>
2452 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2453 Add support for overriding the Project_Path in aggregate projects.
2455 2011-08-04 Robert Dewar <dewar@adacore.com>
2457 * a-cofove.ads: Minor reformatting.
2459 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2461 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2462 on the generated code.
2463 (Build_Finalize_Statements): Update the comment on the generated code.
2464 (Build_Initialize_Statements): Update the comment on the generated code.
2465 (Build_Object_Declarations): Add local variable Result. The object
2466 declarations are now built in sequence.
2467 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2470 2011-08-04 Robert Dewar <dewar@adacore.com>
2472 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2474 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2476 * einfo.ads (Elaboration_Entity): Document new definition and use.
2477 (Elaboration_Entity_Required): Adjust to above change.
2478 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2479 * exp_ch12.adb: And with and use for Snames.
2480 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2481 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2482 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2483 <Check_Unit_Name>: Deal with N_Expanded_Name.
2484 <Attribute_Elaborated>: Extend to all unit names.
2485 * sem_elab.adb: And with and use for Uintp.
2486 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2487 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2488 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2489 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2490 from Gen_Adainit_Ada.
2491 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2492 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2493 case, do not call System.Standard_Library.Adafinal; instead call
2494 finalize_library if needed.
2495 (Gen_Adafinal_C): Likewise.
2496 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2497 non-main program case.
2498 (Gen_Adainit_C): Generate a couple of external declarations here.
2499 In the main program case, set SSL.Finalize_Library_Objects.
2500 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2501 (Gen_Elab_Calls_C): Likewise.
2502 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2503 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2504 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2506 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2507 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2509 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2510 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2511 of external declarations. Call Gen_Finalize_Library_C.
2513 2011-08-04 Emmanuel Briot <briot@adacore.com>
2515 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2516 Compute_Compilation_Phases): new subprogram.
2517 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2518 The number of mains as well as the various compilation phases that
2519 need to be run are now project tree specific, since various
2520 aggregated trees might have different requirements. In particular,
2521 they do not all require bind or link phases.
2523 2011-08-04 Emmanuel Briot <briot@adacore.com>
2525 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2526 (Project_Tree_Appdata): New type.
2527 It is now possible to associate application-specific data to a project
2528 tree. In particular, this is used in the gprbuild builder to avoid a
2529 number of global tables and htables, especially now that there can be
2530 several project trees loaded at once because of aggregate projects.
2531 (Debug_Name): new procedure.
2532 * projects.texi: Clarify syntax of "**" for Source_Dirs
2534 2011-08-03 Emmanuel Briot <briot@adacore.com>
2536 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2537 the "roots" for a main.
2538 (Fill_From_Project): add support for aggregate projects. Main units
2539 in aggregated projects are now automatically added in the list of
2540 files to build (although this fails later on in gprbuild, because
2541 these files are not using the root proejct tree, so this needs
2543 * gcc-interface/Make-lang.in: Update dependencies.
2545 2011-08-03 Yannick Moy <moy@adacore.com>
2547 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2548 conditional expression in ALFA.
2549 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2550 expressions as not in ALFA.
2552 2011-08-03 Robert Dewar <dewar@adacore.com>
2554 * a-cofove.adb: Minor reformatting.
2556 2011-08-03 Emmanuel Briot <briot@adacore.com>
2558 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2559 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2561 These packages are more logically placed in the Queue package, since
2562 they manipulate the queue. It is also likely that they can be adapted
2563 for gnatmake, thus sharing more code.
2564 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2565 that we could move the above.
2567 2011-08-03 Emmanuel Briot <briot@adacore.com>
2569 * errutil.adb (Finalize): clean up the list of error messages on exit.
2570 Calling this subprogram multiple times will no longer show duplicate
2571 error messages on stderr.
2573 2011-08-03 Emmanuel Briot <briot@adacore.com>
2575 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2576 Getopt_Switches when we have already define a command line
2579 2011-08-03 Yannick Moy <moy@adacore.com>
2581 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2582 in ALFA. Instead, they are considered as assertions to prove.
2583 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2584 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2585 if they have no ELSE part, or if they occur in pre- and postconditions,
2586 where the Condition cannot have side-effects in ALFA
2587 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2588 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2589 Instead, include type conversion between scalar types in ALFA.
2590 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2591 if-and-only-if its type is in ALFA.
2593 2011-08-03 Thomas Quinot <quinot@adacore.com>
2595 * scos.adb, get_scos.adb, put_scos.adb
2596 New code letter for decisions: G (entry guard)
2598 (Traverse_Subprogram_Body): Rename to...
2599 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2600 (Traverse_Protected_Body): New subprogram
2601 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2602 protected bodies and entry bodies.
2604 2011-08-03 Yannick Moy <moy@adacore.com>
2606 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2607 entities with get/set subprograms, which is set on procedure entities
2608 generated by the compiler for a postcondition.
2609 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2610 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2611 entity for a declaration
2612 (Get_Unique_Entity_For_Decl): new function returning an entity which
2613 represents a declaration, so that matching spec and body have the same
2616 2011-08-03 Robert Dewar <dewar@adacore.com>
2618 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2619 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2621 2011-08-03 Yannick Moy <moy@adacore.com>
2623 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2624 library-level because retriction No_Implicit_Dynamic_Code in the
2625 front-end prevents its definition as a local subprogram
2626 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2627 for reuse in other contexts
2628 (Traverse_Declarations_Or_Statements,
2629 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2630 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2631 procedures take a callback parameter to be called on all declarations
2633 (Traverse_All_Compilation_Units): new generic function to traverse a
2634 compilation unit and call a callback parameter on all declarations
2636 2011-08-03 Javier Miranda <miranda@adacore.com>
2638 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2639 in Java since they are always enclosed in a namespace that
2640 differentiates them, and overloaded entities are supported by the VM.
2642 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2644 * checks.adb (Determine_Range): If a computed bound of an operation is
2645 outside the range of the base type of the expression, and overflow
2646 checks are enabled, the result is unknown and cannot be used for any
2647 subsequent constant folding.
2648 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2649 unknown, so is the result of the comparison.
2651 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2653 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2654 From_Abort. When finalization was triggered by an abort, propagate
2655 Standard'Abort_Signal rather than Program_Error.
2656 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2658 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2659 From_Abort. When finalization was triggered by an abort, propagate
2660 Standard'Abort_Signal rather than Program_Error.
2661 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2663 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2664 Abort_Id. Update the calls to Build_Object_Declarations and
2665 Build_Raise_Statement to include Abort_Id.
2666 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2667 calls to Build_Object_Declarations and Build_Raise_Statement to include
2669 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2670 calls to Build_Object_Declarations and Build_Raise_Statement to include
2672 (Build_Components): Create an entity for Abort_Id when exceptions are
2673 allowed on the target.
2674 (Build_Finalizer): New local variable Abort_Id.
2675 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2676 calls to Build_Object_Declarations and Build_Raise_Statement to include
2678 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2679 declaration of flag Abort_Id to preserve the original abort status
2680 before finalization code is executed.
2681 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2682 runtime routine Raise_From_Controlled_Operation.
2683 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2684 Abort_Id. Update the call to Build_Object_Declarations to include
2685 Abort_Id. Update the layout of the finalizer body.
2686 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2687 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2688 clunky code to create all flags and objects related to
2689 exception propagation and replace it with a call to
2690 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2692 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2693 Add new formal Abort_Id and associated comment on its use.
2694 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2696 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2697 Remove the clunky code to create all flags and objects related to
2698 exception propagation and replace it with a call to
2699 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2701 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2703 * s-tassta.adb: Fix minor typos.
2705 2011-08-03 Robert Dewar <dewar@adacore.com>
2707 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2708 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2710 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2712 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2713 to packages. This ensures that the finalizer body will not end up
2714 inside the freeze node.
2715 (Process_Declarations): Add code to detect whether a freeze node has a
2716 nested finalization collection.
2718 2011-08-03 Pascal Obry <obry@adacore.com>
2720 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2721 (Current_Session): Return a not null access to Session_Type.
2722 (Default_Session): Likewise.
2724 2011-08-03 Robert Dewar <dewar@adacore.com>
2726 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2727 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2729 2011-08-03 Pascal Obry <obry@adacore.com>
2731 * g-awk.ads: Minor comment fix.
2733 2011-08-03 Sergey Rybin <rybin@adacore.com>
2735 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2736 the tree structure related to discriminant constraints.
2737 Original_Discriminant cannot be used any more for computing the
2738 defining name for the reference to a discriminant.
2740 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2742 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2743 function is not visibly tagged, this is not a dispatching call and
2744 therfore is not Tag_Indeterminate, even if the function is marked as
2745 dispatching on result.
2747 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2749 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2750 (Expand_N_Free_Statement): Add a guard to protect against run-times
2751 which do not support controlled types.
2752 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2753 against run-times which do not support controlled types.
2754 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2755 against run-times which do not support controlled types.
2756 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2757 against run-times which do not support controlled types.
2758 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2759 protect against run-times which do not support controlled types.
2761 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2763 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2764 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2766 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2768 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2769 modified in the source, to prevent spurious warnings when compiling
2772 2011-08-03 Thomas Quinot <quinot@adacore.com>
2774 * a-except-2005.adb: Minor reformatting.
2776 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2778 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2779 is a renaming declaration in the private part of a package, do not emit
2780 a warning that the with_clause could be moved because the renaming may
2781 be used in the body or in a child unit.
2783 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2785 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2786 Propagate the Comes_From_Source attribute from the original return
2787 object to the renaming.
2789 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2791 * exp_ch7.adb (Build_Raise_Statement): Do not call
2792 Raise_From_Controlled_Operation when this routine is not present in
2793 the run-time library.
2794 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2795 libraries (Ravenscar), tasks are non-terminating, and protected objects
2796 and tasks can only appear at library level, so we do not want
2797 finalization of protected objects nor tasks.
2798 * exp_intr.adb: Minor clarification in comment.
2799 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2800 Gen_Output_File_C): Remove references to finalization of library-level
2801 objects when using restricted run-time libraries.
2803 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2805 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2806 Original_Discriminant only if the parent type is a generic formal.
2808 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2810 * exp_ch13.adb: Add with and use clause for Targparm;
2811 (Expand_N_Free_Statement): Prevent the generation of a custom
2812 Deallocate on .NET/JVM targets since this requires pools and address
2814 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2815 .NET/JVM targets, attach the newly allocated object to the access
2816 type's finalization collection. Do not generate a call to
2817 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2818 exist in the runtime.
2819 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2820 create a custom Allocate for object that do not require initialization.
2821 Attach a newly allocated object to the access type's finalization
2822 collection on .NET/JVM.
2823 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2824 assignment of controlled types on .NET/JVM. The two hidden pointers
2825 Prev and Next and stored and later restored after the assignment takes
2827 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2828 kludge for .NET/JVM to recognize a particular piece of code coming from
2829 Heap_Management and change the call to Finalize into Deep_Finalize.
2830 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2831 finalization collections on .NET/JVM only for types derived from
2832 Controlled. Separate the association of storage pools with a collection
2833 and only allow it on non-.NET/JVM targets.
2834 (Make_Attach_Call): New routine.
2835 (Make_Detach_Call): New routine.
2836 (Process_Object_Declarations): Suppress the generation of
2837 build-in-place return object clean up code on .NET/JVM since it uses
2839 * exp_ch7.ads (Make_Attach_Call): New routine.
2840 (Make_Detach_Call): New routine.
2841 * exp_intr.adb Add with and use clause for Targparm.
2842 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2843 on .NET/JVM targets.
2844 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2845 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2846 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2847 names used in finalization.
2849 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2851 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2852 (Attach, Detach): Lock the current task when chaining an object onto a
2855 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2857 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2858 Rewritten to create the message strings when the exception is not
2859 raised by an abort during finalization.
2860 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2861 Raise_From_Controlled_Operation and update its associated comment.
2862 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2863 Ada.Finalization.Heap_Management provides key functionality
2864 associated with controlled objects on the heap, their creation,
2865 finalization and reclamation. Type Finalization_Collection is
2866 effectively a wrapper which sits ontop of a storage pool and performs
2867 all necessary bookkeeping for all the objects it contains. Each
2868 access-to-controlled or access-to-class-wide type receives a collection
2869 as part of its expansion. The compiler generates buffer code and
2870 invokes Allocate / Deallocate to create and destroy allocated
2872 * a-finali.adb ("="): Removed.
2873 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2874 fields Prev and Next.
2875 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2876 A library unit with at least one controlled object on the library level
2877 has a special finalizer which is invoked by the binder. To signal this,
2878 ali files carry field PF.
2879 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2880 associated comment on field usage.
2881 * a-tags.adb (Get_RC_Offset): Removed.
2882 (Needs_Finalization): New routine.
2883 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2884 Dispatch tables now carry field Needs_Finalization which provides
2885 runtime indication whether a type is controlled or has controlled
2886 components or both. Remove field RC_Offset.
2887 (Get_RC_Offset): Removed along with its associated pragma Export.
2888 Since tagged types with controlled components no longer carry hidden
2889 field _controller, the special mechanism to retrieve its location is no
2891 (Needs_Finalization): New routine.
2892 * atree.ads, atree.adb (Elist24): New routine.
2893 (Set_Elist24): New routine.
2894 * atree.h: Add a define clause for Elist24.
2895 * bindgen.adb New library-level variable Lib_Final_Built.
2896 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2897 presence of a VM target, the routine generates calls to the proper
2898 library finalization routine.
2899 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2900 targets. Set the correct library finalization routine depending on
2901 whether the library has controlled objects or this is a VM compilation.
2902 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2903 to library-level finalizers of compiled units in reverse order of
2904 elaboration. It also produces exception management code and reraises a
2905 potential exception after all units have been finalized.
2906 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2907 library-level finalizers of compiled units in reverse order of
2909 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2910 definitions of all library-level finalizers available to the compilation
2911 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2913 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2914 System.Standard_Library.Adafinal directly. If the library needs
2915 finalization actions, create the sequence of finalization calls.
2916 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2917 Generate a with clause for System.Soft_Links when compiling for a VM.
2918 Remove the code which imports System.Standard_Library.Adafinal as
2919 Do_Finalize. Generate the library finalization routine.
2920 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2921 If the library needs finalization actions, create all the definitions
2922 of library- level finalizers.
2923 (Has_Finalizer): New routine. Determines whether at least one compiled
2924 unit has a library-level finalizer.
2925 Add type Qualification_Mode.
2926 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2927 * einfo.adb: New usage of field 15 as Return_Flag.
2928 Remove Finalization_Chain_Entity from the usages of field 19.
2929 Remove Associated_Final_Chain from the usages of field 23.
2930 New usage of field 23 as Associated_Collection.
2931 New usage of field 24 as Finalizer.
2932 New usage of flag 252 as Is_Processed_Transient.
2933 (Associated_Final_Chain): Removed.
2934 (Associated_Collection): New routine.
2935 (Finalization_Chain_Entity): Removed.
2936 (Finalizer): New routine.
2937 (Is_Finalizer): New routine.
2938 (Is_Processed_Transient): New routine.
2939 (Return_Flag): New routine.
2940 (Set_Associated_Final_Chain): Removed.
2941 (Set_Associated_Collection): New routine.
2942 (Set_Finalization_Chain_Entity): Removed.
2943 (Set_Finalizer): New routine.
2944 (Set_Is_Processed_Transient): New routine.
2945 (Set_Return_Flag): New routine.
2946 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2948 (Write_Field8_Name): Alphabetize the output.
2949 (Write_Field11_Name): Alphabetize the output.
2950 (Write_Field12_Name): Alphabetize the output.
2951 (Write_Field13_Name): Alphabetize the output.
2952 (Write_Field14_Name): Alphabetize the output.
2953 (Write_Field15_Name): Alphabetize the output.
2954 (Write_Field16_Name): Alphabetize the output.
2955 (Write_Field17_Name): Alphabetize the output.
2956 (Write_Field18_Name): Alphabetize the output.
2957 (Write_Field19_Name): Alphabetize the output. Remove the output of
2958 Finalization_Chain_Entity.
2959 (Write_Field20_Name): Alphabetize the output.
2960 (Write_Field21_Name): Alphabetize the output.
2961 (Write_Field22_Name): Alphabetize the output.
2962 (Write_Field23_Name): Alphabetize the output. Remove the output of
2963 Associated_Final_Chain. Add output for Associated_Collection.
2964 (Write_Field24_Name): Alphabetize the output.
2965 (Write_Field25_Name): Add output for Finalizer.
2966 (Write_Field26_Name): Alphabetize the output.
2967 (Write_Field27_Name): Alphabetize the output.
2968 (Write_Field28_Name): Alphabetize the output.
2969 * einfo.ads: Add new field description for Associated_Collection and
2971 Remove Associated_Final_Chain and its uses in nodes.
2972 Remove Finalization_Chain_Entity and its uses in nodes.
2973 Add new field description for Finalizer and its uses in nodes.
2974 Add new synthesized attribute Is_Finalizer.
2975 Add new flag description for Is_Processed_Transient and its uses in
2977 Add new field description for Return_Flag and its uses in nodes.
2978 (Associated_Final_Chain): Removed along with its pragma Inline.
2979 (Associated_Collection): New routine and pragma Inline.
2980 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2981 (Finalizer): New routine and pragma Inline.
2982 (Is_Finalizer): New routine and pragma Inline.
2983 (Is_Processed_Transient): New routine and pragma Inline.
2984 (Return_Flag): New routine and pragma Inline.
2985 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2986 (Set_Associated_Collection): New routine and pragma Inline.
2987 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2988 (Set_Finalizer): New routine and pragma Inline.
2989 (Set_Is_Processed_Transient): New routine and pragma Inline.
2990 (Set_Return_Flag): New routine and pragma Inline.
2991 * exp_aggr.adb: Alphabetize subprograms.
2992 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2993 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2994 associated comments. Remove local variables External_Final_List and
2996 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2997 Ancestor. Remove the retrieval of finalization lists. Update the call to
2999 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3000 lists. Update the call to Late_Expansion.
3001 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3002 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3003 (Gen_Assign): Remove the retrieval of the finalization list used to
3004 build the assignment. Update the calls to Make_Init_Call and
3006 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3007 Remove the mechanism to determine attachment levels and finalization
3008 list retrieval. Remove the processing for coextensions.
3009 (Init_Controller): Removed. Controllers no longer exist.
3010 (Late_Expansion): Remove formals Flist and Obj along with their
3011 associated comments. Update the calls to Build_Record_Aggr_Code and
3012 Build_Array_Aggr_Code.
3013 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3014 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3015 appear in entry bodies, protected subprograms and task bodies.
3016 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3017 * exp_ch3.adb (Add_Final_Chain): Removed.
3018 (Build_Array_Init_Proc): Alphabetize local variables.
3019 (Build_Assignment): Alphabetize local variables. Update the call to
3021 (Build_Class_Wide_Master): Rename local variables to better reflect
3023 (Build_Discriminant_Assignments): Code reformatting.
3024 (Build_Init_Call_Thru): Code reformatting.
3025 (Build_Init_Procedure): Code reformatting. Generate a special version
3026 of Deep_Finalize which is capable of finalizing all initialized
3027 components and ignore the rest.
3028 (Build_Init_Statements): Rename local variables to better reflect their
3030 Reimplement the mechanism to include the creation and update of an index
3031 variable called a "counter". It is used as a bookmark for tracing
3032 initialized and non-initialized components.
3033 (Build_Initialization_Call): Remove local variable Controller_Typ.
3034 Alphabetize all local variables. Remove the initialization of the
3035 record controller and update the call to Make_Init_Call.
3036 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3037 New local variable Counter.
3038 (Constrain_Array): Alphabetize.
3039 (Expand_Freeze_Array_Type): Create a collection instead of a
3041 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3042 Finalize_Address which is used in conjunction with allocated controlled
3044 (Expand_N_Object_Declaration): Remove the creation of a finalization
3045 list for anonymous access types. Update the calls to Make_Init_Call and
3047 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3048 retrieval of finalization lists. Remove the expansion of the record
3049 controller. Create TSS primitive Finalize_Address used in conjunction
3050 with controlled objects on the heap. Create finalization collections
3051 for access-to-controlled record components.
3052 (Expand_Record_Controller): Removed.
3053 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3054 class-wide types now requires additional processing. Create
3055 finalization collections for access-to-controlled types.
3056 (Increment_Counter): New routine.
3057 (Make_Counter): New routine.
3058 (Make_Eq_If): Remove the mention of Name_uController.
3059 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3060 types coming from System.Finalization_Root.
3061 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3062 (Predefined_Primitive_Bodies): There is no longer need to skip types
3063 coming from System.Finalization_Root.
3064 (Stream_Operation_OK): Do not generate stream routines for
3065 type Ada.Finalization.Heap_Management.Finalization_Collection.
3066 * exp_ch3.ads: Alphabetize subprograms.
3067 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3068 Add with and use clause for Lib.
3069 (Complete_Coextension_Finalization): Removed.
3070 (Complete_Controlled_Allocation): New routine. Create a finalization
3071 collection for anonymous access-to-controlled types. Create a custom
3072 Allocate which interfaces with the back end and the machinery in
3074 (Expand_Allocator_Expression): Add necessary calls to
3075 Complete_Controlled_Allocation. Remove the retrieval of finalization
3076 lists. Update the calls to Make_Adjust_Call. Generate a call to
3077 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3078 the associated collection.
3079 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3080 Code clean up. Remove the retrieval of finalization lists and
3082 Update the call to Make_Init_Call. Generate a call to
3083 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3084 the associated collection.
3085 (Get_Allocator_Final_List): Removed. Finalization lists are not
3087 (Suitable_Element): Remove the mention of Name_uController.
3088 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3089 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3090 the left hand side, carry out the assignment and adjust the left hand
3092 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3093 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3094 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3095 BIP_Collection and BIPcollection.
3096 (Build_Heap_Allocator): New routine used to allocate the return object
3097 of a build-in-place function onto a collection.
3098 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3099 (Expand_Call): Do not replace direct calls to Deep routines with their
3101 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3102 and update their occurrences. Add a special return flag to monitor the
3103 [ab]normal execution of the function. The flag is set right before the
3105 Rewrite the mechanism used to allocate a build-in-place return object
3106 on the heap or on a storage pool.
3107 (Is_Direct_Deep_Call): New routine.
3108 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3109 build-in-place function call instead of a final list. Build a call to
3110 Set_Finalize_Address_Ptr to decorate the associated collection.
3111 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3112 order to name the build-in-place function call's result for later
3113 finalization. Add a collection to a build-in-place function call
3114 instead of a final list.
3115 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3116 build-in-place function call instead of a final list. Remove the code
3117 which moves one final list and transforms it into the actual in a
3118 nested build-in-place call.
3119 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3120 build-in-place function call instead of a final list.
3121 (Move_Final_List): Removed.
3122 (Needs_BIP_Collection): New routine.
3123 (Needs_BIP_Final_List): Removed.
3124 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3125 enumeration type BIP_Formal_Kind.
3126 Update the related comment.
3127 (Needs_BIP_Collection): New routine.
3128 (Needs_BIP_Final_List): Removed.
3129 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3130 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3131 majority of subprograms in this unit. Add Name_Finalize_Address to
3132 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3133 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3134 statements for an array type.
3135 (Build_Adjust_Statements): Create the adjust statements for a record
3137 (Build_Cleanup_Statements): New routine. A procedure which given any
3138 construct containing asynchronous calls, references to _master, or is a
3139 task body, a task allocation or a protected body produces the necessary
3140 runtime calls to clean up these constructs.
3141 (Build_Exception_Handler): New routine.
3142 (Build_Final_List): Removed.
3143 (Build_Finalization_Collection): New routine. A core procedure which
3144 creates a collection to service heap allocated controlled objects
3145 associated with an access-to-controlled type.
3146 (Build_Finalize_Statements): Create the finalization statements for a
3148 (Build_Finalizer): New routine. A core procedure which given any
3149 construct with declarations and/or statements detects all objects which
3150 need any type of clean up (controlled objects, protected objects) and
3151 generates all necessary code to clean up the said objects in the proper
3153 (Build_Finalizer_Call): New routine.
3154 (Build_Initialize_Statements): Create the initialization statements for
3155 an array type. The generated routine contains code to finalize partially
3157 (Build_Object_Declarations): New routine.
3158 (Build_Raise_Statement): New routine.
3159 (Clean_Simple_Protected_Objects): Removed.
3160 (Controller_Component): Removed.
3161 (Enclosing_Function): New routine.
3162 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3163 either declarations or statements or both.
3164 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3165 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3167 (Find_Final_List): Removed.
3168 (Global_Flist_Ref): Removed.
3169 (In_Finalization_Root): Removed.
3170 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3171 scope in terms of tree nodes. Process all transient variables within
3173 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3174 generated after the adjust.
3175 (Make_Attach_Call): Removed.
3176 (Make_Call): New routine.
3177 (Make_Clean): Removed.
3178 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3180 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3182 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3184 (Make_Final_Call): Modified to simply create a call to either
3185 Deep_Finalize or Finalize.
3186 (Make_Finalize_Address_Body): New routine.
3187 (Make_Finalize_Address_Stmts): New routine. A function which produces
3188 TSS primitive Finalize_Address used in conjunction with heap allocated
3190 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3191 (Make_Init_Call): Rewritten. There is no longer an attach call
3192 generated after initialization.
3193 (Make_Local_Deep_Finalize): New routine.
3194 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3195 (Make_Transient_Block): Remove the finalization list retrieval and
3197 (Needs_Finalization): Moved to Exp_Util.
3198 (Parent_Field_Type): New routine.
3199 (Preprocess_Components): New routine.
3200 (Process_Transient_Objects): New routine.
3201 (Wrap_HSS_In_Block): New routine.
3202 (Wrap_Transient_Declaration): Remove finalization list management and
3203 controller insertion.
3204 (Wrap_Transient_Expression): Code reformatting.
3205 (Wrap_Transient_Statement): Code reformatting.
3206 * exp_ch7.ads (Build_Final_List): Removed.
3207 (Build_Finalization_Collection): New routine.
3208 (Build_Raise_Statement): New routine.
3209 (Controller_Component): Removed.
3210 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3211 (Find_Final_List): Removed.
3212 (In_Finalization_Root): Removed.
3213 (Is_Simple_Protected_Type): Update related comment.
3214 (Make_Adjust_Call): New parameter profile and associated comments.
3215 (Make_Attach_Call): Removed.
3216 (Make_Final_Call): New parameter profile and associated comments.
3217 (Make_Finalize_Address_Body): New routine.
3218 (Make_Init_Call): New parameter profile and associated comments.
3219 (Make_Local_Deep_Finalize): New routine.
3220 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3221 (Needs_Finalization): Moved to Exp_Util.
3222 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3223 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3224 (Find_Protection_Type): Moved to Exp_Util.
3225 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3226 (Make_DT): Update sequence of dispatch table initialization. Remove the
3227 initialization of field RC_Offset. Add initialization of field Needs_
3229 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3230 Reimplement how an object is first finalized, then deallocated.
3231 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3233 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3234 Register TSS_Finalize_Address with type TSS_Names.
3235 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3236 procedure provides the interface between an allocation / deallocation
3237 and the support machinery in Ada.Finalization.Heap_Management.
3238 (Find_Init_Call): Code reformatting.
3239 (Find_Init_Call_In_List): Code reformatting.
3240 (Find_Protection_Type): Moved from Exp_Ch9.
3241 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3242 (Has_Controlled_Coextensions): Removed.
3243 (Has_Controlled_Objects): New routine.
3244 (In_Library_Level_Package_Body): New routine.
3245 (Insert_Action_After): New routine.
3246 (Is_Finalizable_Transient): New routine. This predicate determines
3247 whether an object declaration is one of the many variants of controlled
3249 (Is_Null_Access_BIP_Func_Call): New routine.
3250 (Is_Non_BIP_Func_Call): New routine.
3251 (Is_Related_To_Func_Return): New routine.
3252 (Needs_Finalization): Moved from Exp_Ch7.
3253 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3254 (Find_Protection_Type): Moved from Exp_Ch9.
3255 (Has_Controlled_Coextensions): Removed.
3256 (Has_Controlled_Objects): New routine.
3257 (In_Library_Level_Package_Body): New routine.
3258 (Insert_Action_After): New routine.
3259 (Is_Finalizable_Transient): New routine.
3260 (Is_Null_Access_BIP_Func_Call): New routine.
3261 (Is_Non_BIP_Func_Call): New routine.
3262 (Is_Related_To_Func_Return): New routine.
3263 (Needs_Finalization): Moved from Exp_ch7.
3264 * expander.adb (Expand): Add a case for N_Free_Statement.
3265 * freeze.adb (Freeze_All): Replace the generation of a finalization
3266 list with a collection for access-to-controlled types.
3267 (Freeze_Entity): Code reformatting.
3268 (Freeze_Record_Type): Remove the freezing of a record controller
3270 (Freeze_Subprogram): Code reformatting.
3271 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3273 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3274 has a library-level finalizer.
3275 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3276 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3277 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3278 files. Add a-fihema to the list of object files.
3280 Alphabetize the associations in type Is_Parameterless_Attribute.
3281 * rtsfind.ads: Ada.Finalization_List.Controller and
3282 System.Finalization_Implementation are no longer a GNAT unit.
3283 Update the range of type Ada_Finalization_Child. Remove the following
3284 recoverable entities:
3286 RE_Attach_To_Final_List
3290 RE_Finalizable_Ptr_Ptr
3291 RE_Global_Final_List
3292 RE_Limited_Record_Controller
3295 RE_Record_Controller
3296 RE_Simple_List_Controller
3298 Add the following recoverable entities:
3300 RE_Add_Offset_To_Address
3304 RE_Exception_Identity
3305 RE_Finalization_Collection
3306 RE_Finalization_Collection_Ptr
3307 RE_Needs_Finalization
3308 RE_Save_Library_Occurrence
3309 RE_Set_Finalize_Address_Ptr
3310 RE_Set_Storage_Pool_Ptr
3312 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3314 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3315 (First_Stored_Discriminant): Remove the mention of Name_uController.
3316 * sem_aux.ads: Comment reformatting.
3317 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3318 to redecorate an already existing class-wide type.
3319 (Decorate_Tagged_Type): New parameter profile and associated comment.
3320 Create a "shadow class-wide type" for a shadow entity.
3321 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3322 of the final chain along with the associated comment.
3323 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3324 Full_Desig and set it to the full view of the designated type.
3325 Initialize the finalization collection to empty.
3326 (Build_Derived_Record_Type): Alphabetize local variables. Code
3328 (Collect_Fixed_Components): Remove the mention of Name_uController.
3329 (Create_Constrained_Components): Remove the mention of Name_uController.
3330 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3331 class-wide type of a shadow entity.
3332 (Process_Full_View): Update the machinery which marks type
3333 Limited_Controlled's entity as limited.
3334 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3335 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3336 list, instead make a collection build-in-place formal.
3337 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3338 a designated type in order to establish a match between the renaming
3339 and the renamed entity.
3340 (Find_Selected_Component): Add guard to prevent spurious exceptions
3341 from being raised on .NET/JVM.
3342 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3343 to the list of primitive that need special processing. Update arrays
3344 C_Names and D_Names.
3345 (Replace_Types): Handle class-wide types.
3346 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3347 different parameter profile, look at the first formal.
3348 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3349 use clauses for Exp_Util.
3350 * sem_res.adb: Remove with and use clauses for Elists.
3351 (Propagate_Coextensions): Removed.
3352 (Resolve_Allocator): Do not propagate the list of coextensions from one
3353 allocator to another.
3354 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3355 Deaccessed_T to Desig_Typ.
3356 (Enter_Name): Remove the mention of Name_uController.
3357 (Gather_Components): Remove the mention of Name_uController.
3358 (Incomplete_Or_Private_View): New routine.
3359 (Is_Coextension_Root): Removed.
3360 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3361 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3362 (Is_Coextension_Root): Removed.
3363 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3364 Controlled types are now derived from a null tagged record. Remove
3365 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3366 * sinfo.adb (Coextensions): Removed.
3367 (Set_Coextensions): Removed.
3368 * sinfo.ads: Remove Coextensions from the explanation of node fields
3369 and its uses in nodes.
3370 Update the field usage of N_Allocator.
3371 (Coextensions): Removed along with its pragma Inline.
3372 (Set_Coextensions): Removed along with its pragma Inline.
3373 * snames.ads-tmpl: Remove names
3378 Name_uLocal_Final_List
3379 Name_Finalization_Root
3386 Name_Finalize_Address
3387 * s-pooglo.adb (Allocate): Add overriding indicator.
3388 (Deallocate): Add overriding indicator.
3389 (Storage_Size): Add overriding indicator.
3390 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3391 than Finalize_Global_List.
3392 (Null_Finalize_Global_List): Removed.
3393 (Save_Library_Occurrence): New routine.
3394 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3395 initialization. Add variable Finalize_Library_Objects along with its
3396 pragma Export. Add variables Library_Exception and
3397 Library_Exception_Set along with their pragma Export.
3398 (Null_Finalize_Global_List): Removed.
3399 (Save_Library_Occurrence): New routine.
3400 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3401 rather than Finalize_Global_List.
3402 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3403 of the constructed node.
3405 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3407 * link.c: Include "auto-host.h" before system headers.
3409 2011-08-03 Vincent Celier <celier@adacore.com>
3411 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3412 that are not extended. Do not check if a library project that is
3413 extended should be regenerated. Do not add to table Library_Paths the
3414 libraries that are in extended projects. Link only with libraries that
3415 are in libray projects that are not extended.
3416 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3417 for a library project that is extended.
3419 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3421 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3422 conforming subprogram renamings that appear to be completions if they
3423 are not fully conformant.
3424 Such renamings are homographs but not completions.
3425 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3426 names in a subprogram renaming that appears in an instance.
3428 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3430 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3431 not immutably limited, build actual subtype from expression to provide
3432 proper bounds to caller.
3434 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3436 * sem_ch8.adb: Minor comment correction.
3438 2011-08-03 Thomas Quinot <quinot@adacore.com>
3440 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3441 returning a limited array, use an extended return statement.
3443 2011-08-03 Vincent Celier <celier@adacore.com>
3445 * make.adb (Initialize): If --subdirs= is used, but no project file is
3446 specified, attempt to create the specify subdir if it does not already
3447 exist and use it as the object directory as if -D had been specified.
3449 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3451 * s-tpopsp-vms.adb: New file.
3452 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3453 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3455 2011-08-03 Emmanuel Briot <briot@adacore.com>
3457 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3460 2011-08-03 Yannick Moy <moy@adacore.com>
3462 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3463 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3464 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3465 detect that an array has static bounds.
3467 2011-08-03 Thomas Quinot <quinot@adacore.com>
3469 * exp_dist.adb: Minor reformatting.
3471 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3473 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3474 (ATCB_Key): Removed, not always used.
3476 2011-08-03 Emmanuel Briot <briot@adacore.com>
3478 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3479 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3480 most remaining global variables.
3482 2011-08-03 Robert Dewar <dewar@adacore.com>
3484 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3485 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3488 2011-08-03 Javier Miranda <miranda@adacore.com>
3490 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3491 that must be passed by copy in VM targets.
3493 2011-08-03 Emmanuel Briot <briot@adacore.com>
3495 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3496 duplicates a similar htable now in the project tree.
3498 2011-08-03 Claire Dross <dross@adacore.com>
3500 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3501 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3502 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3503 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3504 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3505 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3506 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3509 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3511 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3512 (ATCB_Key): Removed, not always used.
3513 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3515 * s-tpopsp-tls.adb: New file.
3516 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3517 x86/x64/ia64/powerpc/sparc Linux.
3519 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3521 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3522 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3524 2011-08-03 Thomas Quinot <quinot@adacore.com>
3526 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3527 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3528 Fix type selection for mapping integer types to PolyORB types.
3530 2011-08-03 Bob Duff <duff@adacore.com>
3532 * sem_ch7.adb: Minor comment clarification.
3534 2011-08-03 Bob Duff <duff@adacore.com>
3536 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3537 an error analyzing a choice, skip further processing. Further
3538 processing could cause a crash or cascade errors.
3540 2011-08-03 Emmanuel Briot <briot@adacore.com>
3542 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3543 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3544 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3545 prj-env.ads (Shared_Project_Tree_Data): new type
3546 An aggregate project and its aggregated trees need to share the common
3547 data structures used for lists of strings, packages,... This makes the
3548 code simpler since otherwise we have to pass the root tree (also used
3549 for the configuration file data) in addition to the current project
3550 tree. This also avoids ambiguities as to which tree should be used.
3551 And finally this saves a bit of memory.
3552 (For_Every_Project_Imported): new parameter Tree.
3553 Since aggregated projects are using a different tree, we need to let
3554 the caller know which tree to use to manipulate the returned project.
3556 2011-08-03 Robert Dewar <dewar@adacore.com>
3558 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3559 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3560 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3561 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3563 2011-08-03 Javier Miranda <miranda@adacore.com>
3565 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3566 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3568 2011-08-03 Bob Duff <duff@adacore.com>
3570 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3573 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3575 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3576 g-sehash.ads: Fix typo. Update header.
3578 2011-08-03 Thomas Quinot <quinot@adacore.com>
3580 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3583 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3585 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3586 prefixes of private types along with records, since the selector may be
3588 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3589 private types along with records, since the selector may be a
3592 2011-08-03 Emmanuel Briot <briot@adacore.com>
3594 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
3596 2011-08-03 Javier Miranda <miranda@adacore.com>
3598 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3599 Tagged_Type_Expansion.
3601 2011-08-03 Yannick Moy <moy@adacore.com>
3603 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3604 violation when the argument of concatenation is the name of a
3607 2011-08-03 Emmanuel Briot <briot@adacore.com>
3609 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3610 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3611 (Process_Declarative_Items): new parameter Child_Env.
3613 2011-08-03 Yannick Moy <moy@adacore.com>
3615 * alfa.ads: Update format of ALFA section in ALI file in order to
3616 add a mapping from bodies to specs when both are present.
3617 (ALFA_Scope_Record): Add components for spec file/scope.
3618 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3620 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3621 collected, fill in the spec information when relevant.
3622 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
3625 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3627 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3628 code unit to decide whether to add internally generated subprograms.
3630 2011-08-03 Javier Miranda <miranda@adacore.com>
3632 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3633 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
3634 be handled by copy in VM targets.
3636 2011-08-03 Emmanuel Briot <briot@adacore.com>
3638 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
3639 code with Makeutl.Get_Switches.
3640 * prj-tree.adb: Update comment.
3642 2011-08-03 Thomas Quinot <quinot@adacore.com>
3644 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3645 subprogram with a limited formal that does not support external
3648 2011-08-03 Yannick Moy <moy@adacore.com>
3650 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3652 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3653 not from current unit in two phases, because it is not possible to
3654 change the table while iterating over its content.
3655 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3657 2011-08-03 Sergey Rybin <rybin@adacore.com>
3659 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3660 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3662 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3664 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3665 and the component type is composite, this is ambiguous for predefined
3666 concatenation, but if the node is not overloaded and the entity is a use
3667 -defined function its profile can be used to resolve that aggregate.
3669 2011-08-03 Robert Dewar <dewar@adacore.com>
3671 * exp_ch4.adb: Minor code cleanup.
3673 2011-08-03 Thomas Quinot <quinot@adacore.com>
3675 * exp_dist.adb: Do not generate distribution stubs if serious errors
3676 have been diagnosed.
3678 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3680 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3681 the first formal of a primitive operation, go to the base type to
3682 handle properly an access to a derived type with constrained
3684 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3685 user-defined function that is only use-visible.
3687 2011-08-03 Robert Dewar <dewar@adacore.com>
3689 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3690 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3691 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3692 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3693 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3694 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3695 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3696 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3698 2011-08-03 Robert Dewar <dewar@adacore.com>
3700 * repinfo.adb (List_Mechanism): Add handling of
3701 Convention_Ada_Pass_By_XXX.
3702 * sem_mech.adb (Set_Mechanism): Ditto.
3703 * sem_prag.adb (Process_Convention): Add entries for
3704 Convention_Ada_Pass_By_XXX.
3705 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3707 2011-08-03 Pascal Obry <obry@adacore.com>
3709 * makeutl.adb: Minor reformatting.
3711 2011-08-03 Vincent Celier <celier@adacore.com>
3714 (Get_File_Name) If the file cannot be found when there are no config
3715 pragmas file and May_Fail is True, return No_File instead of the file
3716 name, to be consistent.
3718 2011-08-03 Pascal Obry <obry@adacore.com>
3720 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3723 2011-08-03 Javier Miranda <miranda@adacore.com>
3726 (Same_Representation): In VM targets the representation of arrays with
3727 aliased components differs from arrays with non-aliased components.
3729 2011-08-03 Emmanuel Briot <briot@adacore.com>
3731 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3732 not systematically lower case attribute indexes that contain no "."
3733 Fix definition of several Naming attributes, which take
3734 a unit name as index and therefore should be case insensitive.
3735 Minor refactoring (reduce length of variable names).
3737 2011-08-03 Emmanuel Briot <briot@adacore.com>
3739 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3741 2011-08-03 Emmanuel Briot <briot@adacore.com>
3743 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3744 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3745 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3746 prj-tree.ads (Prj.Tree.Environment): new type.
3748 2011-08-03 Emmanuel Briot <briot@adacore.com>
3750 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3751 prj-tree.adb, prj-tree.ads (Environment): new type.
3753 2011-08-03 Emmanuel Briot <briot@adacore.com>
3755 * prj-tree.ads: Remove unused variable.
3757 2011-08-03 Yannick Moy <moy@adacore.com>
3759 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3760 issuing messages related to SPARK restriction violation.
3762 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3764 * sem_ch6.adb: guard against error nodes in return statements.
3766 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3768 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3769 a warning can only appear on a configuration file, so emit warning
3770 without further checks.
3772 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3774 * s-interr.ads: add overriding keyword.
3776 2011-08-03 Geert Bosch <bosch@adacore.com>
3778 * exp_attr.adb: Fix minor typo.
3780 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3782 * par-ch4.adb: improve error recovery.
3784 2011-08-03 Emmanuel Briot <briot@adacore.com>
3786 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3787 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3790 2011-08-03 Emmanuel Briot <briot@adacore.com>
3792 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3793 "external" as an attribute name in aggregate projects.
3795 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3797 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3798 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3799 from 0, so we need to adjust.
3801 2011-08-03 Emmanuel Briot <briot@adacore.com>
3803 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3804 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3806 2011-08-03 Yannick Moy <moy@adacore.com>
3808 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3809 restriction on overloaded entity if the entity is not an operator.
3811 2011-08-03 Yannick Moy <moy@adacore.com>
3813 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3814 restrict.ads: Rename remaining Check_Formal_Restriction* into
3815 Check_SPARK_Restriction*.
3817 2011-08-03 Emmanuel Briot <briot@adacore.com>
3819 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3820 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3822 (Project_Empty): removed
3823 (Empty_Project): new parameter Qualifier
3824 This is used to have fields specific to aggregate projects, cleaner
3825 New field to store the list of aggregated projects.
3826 (Check_Aggregate_Project): removed
3827 (Process_Aggregated_Projects, Free): new subprograms.
3829 2011-08-03 Olivier Hainque <hainque@adacore.com>
3831 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3833 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3835 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3836 explicit dereference of an unconstrained type, create a constrained
3837 subtype for it, as is done for function calls that return an
3840 2011-08-03 Thomas Quinot <quinot@adacore.com>
3842 * g-pehage.adb (Finalize): Avoid possible double-free.
3844 2011-08-03 Steve Baird <baird@adacore.com>
3846 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3847 Elab_Spec/Body attrs in CodePeer_Mode.
3849 2011-08-03 Javier Miranda <miranda@adacore.com>
3851 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3852 low bound is not known at compile time but they have no others choice.
3853 Done because in this case the bounds can be obtained directly from the
3856 2011-08-03 Ed Falis <falis@adacore.com>
3858 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3859 on VxWorks SMP. Remove unusable constant ANY_CPU.
3861 2011-08-03 Emmanuel Briot <briot@adacore.com>
3863 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3864 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3865 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3866 Prj.Env.Initialize_Empty): new subprograms
3867 (Get_Env, Find_Project): remove parameter Target_Name.
3869 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3871 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3872 as a condition for the delayed call to Derived_Subprograms done for the
3873 case of the rewriting of a derived type that constrains the
3874 discriminants of its parent type.
3875 Avoids redundant subprogram derivations for private subtype derivations.
3877 2011-08-03 Javier Miranda <miranda@adacore.com>
3879 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3880 Build_Record_Aggr_Code.
3881 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3882 discriminants in extension aggregates.
3884 2011-08-03 Emmanuel Briot <briot@adacore.com>
3886 * prj-pp.adb (Print): also output project qualifiers, since in
3887 particular "aggregate" is mandatory in an aggregate project.
3889 2011-08-03 Emmanuel Briot <briot@adacore.com>
3891 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3892 (Debug_Output): new function.
3894 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3896 * gnat_ugn.texi: Document -Wstack-usage.
3897 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3899 2011-08-03 Thomas Quinot <quinot@adacore.com>
3901 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3902 have keyword LIMITED.
3904 2011-08-03 Yannick Moy <moy@adacore.com>
3906 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3907 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3908 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3909 section (does not happen in compiler, only if code directly calls
3911 * get_alfa.adb, get_alfa.ads: New files.
3912 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3914 * lib-xref-alfa.adb: New file.
3915 * lib-xref.adb, lib-xref.ads
3916 (Xref_Entry): redefine information needed in cross-references for ALFA.
3917 Push ALFA treatments in separated local package.
3918 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3919 identifiers. Return entity of package body instead of spec. Return
3920 Empty for a scope with no location.
3921 (Generate_Reference): adapt to new components for ALFA information.
3922 Remove the need for D references on definitions.
3923 (Is_Local_Reference): moved to ALFA local package
3924 (Output_References): extract subfunction as Extract_Source_Name
3925 (Output_Local_References): remove procedure, replaced by filtering of
3926 cross-references in package ALFA and printing in Put_ALFA.
3927 (Write_Entity_Name): remove procedure
3928 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3929 print exact name of entity as it appears in source file
3930 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3931 * put_alfa.adb, put_alfa.ads: New files.
3932 * xref_lib.adb (Search_Xref): protect read of cross-references against
3933 reading other sections of the ALI file, in gnatxref
3934 (Search): protect read of cross-references against reading other
3935 sections of the ALI file, in gnatfind.
3936 * gcc-interface/Make-lang.in: Update dependencies.
3938 2011-08-03 Thomas Quinot <quinot@adacore.com>
3940 * sem_ch3.adb: Minor reformatting.
3942 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3944 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3945 raising an exception.
3947 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3949 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3950 type, always use 1 as the lower bound or string, even if lower bound of
3951 context is not static, to handle properly null strings in a non-static
3954 2011-08-03 Bob Duff <duff@adacore.com>
3956 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3957 always legal on the right-hand side of an assignment statement; there
3958 is always an applicable index constraint in this case. Therefore, the
3959 check for Pkind = N_Assignment_Statement is now unconditional -- it
3960 doesn't depend on whether Is_Constrained (Typ).
3962 2011-08-03 Robert Dewar <dewar@adacore.com>
3964 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3966 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3968 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3969 for an itype created within a generic unit.
3971 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3973 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3974 suppresses all inlining.
3976 2011-08-03 Robert Dewar <dewar@adacore.com>
3978 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3979 exp_aggr.adb: Minor reformatting.
3981 2011-08-03 Thomas Quinot <quinot@adacore.com>
3983 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3984 tagged assignment when discriminant checks are suppressed. This is
3985 useless and extremely costly in terms of static stack usage.
3987 2011-08-03 Bob Duff <duff@adacore.com>
3989 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3990 of generics, because this leads to the wrong entity in the wrong scope,
3991 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3993 (Process_Interface_Name): Follow Alias for instances of generics, to
3994 correct for the above change.
3996 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3998 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3999 is an integer literal it is always safe to replace the reference. In
4000 addition, if the reference appears in the generated code for an object
4001 declaration it is necessary to copy because otherwise the reference
4002 might be to the uninitilized value of the discriminant of the object
4005 2011-08-03 Pascal Obry <obry@adacore.com>
4007 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4008 ACL used, in this case we want to check for ending .exe, not .exe
4009 anywhere in the path.
4011 2011-08-03 Sergey Rybin <rybin@adacore.com>
4013 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4014 the tree structure (semantic decoration of references to record
4017 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4019 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4020 choices of a named array aggregate, bail out when any choices are
4021 marked as Errors_Posted.
4023 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4025 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4026 in which entity is frozen, to handle properly loop variables in
4029 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4031 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4032 subtype is not static, compute the upper bound using attributes, to
4033 handle properly index types that are not integer types.
4035 2011-08-03 Bob Duff <duff@adacore.com>
4037 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4038 Update copyright notice.
4040 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4042 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4043 Original_Discriminant if within an instance.
4044 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4046 2011-08-03 Thomas Quinot <quinot@adacore.com>
4048 * einfo.ads: Minor reformatting.
4050 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4052 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4053 composite type with an unfrozen subcomponent, in the profile of a
4054 primitive operation.
4056 2011-08-03 Robert Dewar <dewar@adacore.com>
4058 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4060 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4062 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4063 unconstrained type with discriminants is initialized with an aggregate,
4064 use the constrained subtype of the aggregate as the type of the object,
4065 because it is immutable, and this allows the back-end to generate no
4066 code for the object declaration.
4068 2011-08-03 Robert Dewar <dewar@adacore.com>
4070 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4071 comparison operand is variable, and turns out to be zero or negative.
4073 2011-08-03 Javier Miranda <miranda@adacore.com>
4076 (Expand_Dispatching_Constructor_Call): Disable expansion of
4077 code required for native targets. Done to avoid generating
4078 references to unavailable runtime entities in VM targets.
4080 (Expand_N_Object_Declaration): Add missing support to handle
4081 the explicit initialization of class-wide interface objects.
4084 2011-08-03 Matthew Heaney <heaney@adacore.com>
4086 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4088 2011-08-03 Matthew Heaney <heaney@adacore.com>
4090 * a-cbdlli.adb (Splice): move source items from first to last
4092 2011-08-03 Yannick Moy <moy@adacore.com>
4094 * sem_util.ads: comment added.
4096 2011-08-03 Javier Miranda <miranda@adacore.com>
4099 (Expand_Record_Aggregate): In VM targets disable the expansion into
4100 assignments of aggregates whose type is not known at compile time.
4102 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4104 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4105 protected entries and task entries, to build the proper renaming
4106 declaration for entry formals, used in debugging.
4107 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4108 parameters in the same way.
4110 2011-08-02 Robert Dewar <dewar@adacore.com>
4112 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4113 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4114 code reorganization.
4116 2011-08-02 Robert Dewar <dewar@adacore.com>
4118 * debug.adb: Debug flag d.P to suppress length comparison optimization
4119 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4120 comparison of Length by comparing First/Last instead.
4122 2011-08-02 Matthew Heaney <heaney@adacore.com>
4124 * a-cobove.ads: Code clean up.
4126 2011-08-02 Vincent Celier <celier@adacore.com>
4128 * adaint.c (file_names_case_sensitive_cache): New static int.
4129 (__gnat_get_file_names_case_sensitive): Cache the return value in
4130 file_names_case_sensitive_cache at the first invocation, to avoid
4131 multiple calls to getenv.
4133 2011-08-02 Bob Duff <duff@adacore.com>
4135 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4137 2011-08-02 Yannick Moy <moy@adacore.com>
4139 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4140 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4141 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4142 indicate that we are in a precondition or postcondition. This is used in
4143 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4144 decide whether to flag the spec or body of the current subprogram as
4147 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4149 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4151 * a-extiin.ads: New file.
4153 2011-08-02 Bob Duff <duff@adacore.com>
4155 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4156 now raises Name_Error instead of Use_Error in certain cases. The other
4157 parts of this AI were already implemented properly.
4159 2011-08-02 Vincent Celier <celier@adacore.com>
4161 * link.c: Only import "auto-host.h" when building the gnattools.
4163 2011-08-02 Yannick Moy <moy@adacore.com>
4165 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4166 which calls a local subprogram, so extract subprogram
4167 from Mark_Non_ALFA_Subprogram_Body.
4169 2011-08-02 Javier Miranda <miranda@adacore.com>
4172 (Extract_Dispatching_Call): If the type of the dispatching object is an
4173 access type then return an explicit dereference in the Object out-mode
4176 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4178 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4179 compatibility checks for all indexes of an array subtype, not just the
4180 first. Reset Has_Dynamic_Range_Check on the subtype before each
4181 potential check to ensure that Insert_Range_Checks will not elide any
4182 of the dynamic checks.
4184 2011-08-02 Yannick Moy <moy@adacore.com>
4186 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4187 SPARK restriction at parsing time.
4188 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4189 directive only if the SPARK restriction is set for this unit.
4191 2011-08-02 Yannick Moy <moy@adacore.com>
4193 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4194 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4195 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4196 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4197 Mark_Non_ALFA_Subprogram_Body.
4198 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4201 2011-08-02 Yannick Moy <moy@adacore.com>
4203 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4206 2011-08-02 Robert Dewar <dewar@adacore.com>
4208 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4209 exp_ch3.adb: Minor reformatting.
4211 2011-08-02 Emmanuel Briot <briot@adacore.com>
4213 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4214 files, not any regular file.
4215 (__gnat_locate_file_with_predicate): new subprogram.
4217 2011-08-02 Yannick Moy <moy@adacore.com>
4219 * sinfo.adb, sinfo.ads: Restrict the use of flags
4220 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4221 nodes, plus N_Subtype_Declaration for the 2nd one.
4223 2011-08-02 Sergey Rybin <rybin@adacore.com>
4225 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4226 - fix bugs in the description of Source_Trace;
4227 - get rid of UNIT_NAME;
4229 2011-08-02 Javier Miranda <miranda@adacore.com>
4232 (Build_Dispatching_Requeue): Adding support for VM targets
4233 since we cannot directly reference the Tag entity.
4234 * exp_sel.adb (Build_K): Adding support for VM targets.
4235 (Build_S_Assignment): Adding support for VM targets.
4237 (Default_Prim_Op_Position): In VM targets do not restrict availability
4238 of predefined interface primitives to compiling in Ada 2005 mode.
4239 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4240 restricted to compiling in Ada 2005 mode.
4241 (Make_VM_TSD): Generate code that declares and initializes the OSD
4242 record. Needed to support dispatching calls through synchronized
4245 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4246 primitives associated with synchronized interfaces.
4247 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4248 primitives associated with synchronized interfaces.
4250 2011-08-02 Yannick Moy <moy@adacore.com>
4252 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4253 statements hidden in SPARK if preceded by the HIDE directive
4254 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4255 exception handlers as hidden in SPARK if preceded by the HIDE directive
4256 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4257 if starting with the HIDE directive
4258 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4259 starting with the HIDE directive; mark the declarations in a private
4260 part as hidden in SPARK if the private part starts with the HIDE
4262 * restrict.adb, restrict.ads
4263 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4264 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4265 argument node belongs to a part which is hidden in SPARK
4266 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4267 parts in SPARK; protect the possibly costly call to
4268 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4269 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4270 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4271 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4273 (Scan): recognize special comment starting with '#' and followed by
4274 SPARK keyword "hide" as a HIDE directive.
4276 2011-08-02 Yannick Moy <moy@adacore.com>
4278 * types.ads, erroutc.ads: Minor reformatting.
4280 2011-08-02 Vincent Celier <celier@adacore.com>
4282 * link.c: Add response file support for cross platforms.
4284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4286 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4287 in an association, set parent field of copy before partial analysis.
4288 * sem_res.adb (Resolve_Slice): create reference to itype only when
4289 expansion is enabled.
4291 2011-08-02 Yannick Moy <moy@adacore.com>
4293 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4294 for new flag denoting which subprogram bodies are in ALFA
4295 * restrict.adb, sem_ch7.adb: Update comment
4296 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4297 sem_ch9.adb, sem_res.adb: Add calls to
4298 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4299 * sem_ch6.adb (Analyze_Function_Return): add calls to
4300 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4301 middle of the body, and extended return.
4302 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4303 False when missing return.
4304 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4305 to True for subprograms whose spec is in ALFA. Remove later on the flag
4306 on the entity used for a subprogram body when there exists a separate
4308 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4309 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4310 False, otherwise do nothing.
4312 2011-08-02 Robert Dewar <dewar@adacore.com>
4314 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4316 2011-08-02 Yannick Moy <moy@adacore.com>
4318 * sem_ch4.ads: minor formatting.
4320 2011-08-02 Yannick Moy <moy@adacore.com>
4322 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4323 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4324 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4325 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4326 opt.ads: cleanup of SPARK mode
4328 2011-08-02 Yannick Moy <moy@adacore.com>
4330 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4332 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4333 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4335 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4336 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4337 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4338 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4340 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4342 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4343 functions whose return type is not in ALFA.
4344 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4346 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4347 parameter's type is not in ALFA.
4348 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4351 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4353 * sem_ch6 (Analyze_Expression_Function): treat the function as
4354 Inline_Always, and introduce a subprogram declaration for it when it is
4356 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4357 expression functions, so that the back-end can determine whether they
4358 can in fact be inlined.
4359 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4360 a function body comes from an expression function.
4362 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4364 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4365 null exclusions to test Can_Never_Be_Null on the anonymous access types
4366 of the formals rather than testing the formals themselves. Exclude this
4367 check in cases where the Old_Formal is marked as a controlling formal,
4368 to avoid issuing spurious errors for bodies completing dispatching
4369 operations (due to the flag not getting set on controlling access
4370 formals in body specs).
4371 (Find_Corresponding_Spec): When checking full and subtype conformance of
4372 subprogram bodies in instances, pass Designated and E in that order, for
4373 consistency with the expected order of the formals (New_Id followed by
4376 2011-08-02 Robert Dewar <dewar@adacore.com>
4378 * sem_ch8.adb: Minor reformatting.
4380 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4382 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4383 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4384 primitive operations of class-wide actuals.
4386 2011-08-02 Javier Miranda <miranda@adacore.com>
4388 * exp_atag.ads, exp_atag.adb
4389 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4390 since its value is implicitly passed in argument Typ.
4391 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4392 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4393 Build_Common_Dispatching_Select_Statements.
4395 2011-08-02 Robert Dewar <dewar@adacore.com>
4397 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4398 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4401 2011-08-02 Robert Dewar <dewar@adacore.com>
4403 * sem_res.adb: Minor reformatting.
4404 * sem_prag.adb: Minor reformatting.
4406 2011-08-02 Javier Miranda <miranda@adacore.com>
4408 * exp_atag.adb, exp_atags.ads
4409 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4410 by the tagged type Entity. Required to use this routine in the VM
4411 targets since we do not have available the Tag entity in the VM
4414 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4415 Ada.Tags has not been previously loaded.
4417 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4418 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4420 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4421 view of enclosing scopes. Required to handle enclosing scopes that
4422 are synchronized types whose full view is a task type.
4424 (Build_VM_TSDs): Minor code improvement to avoid generating and
4425 analyzing lists with empty nodes.
4426 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4427 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4428 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4429 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4430 (Make_Select_Specific_Data_Table): Add support for VM targets.
4431 (Make_VM_TSD): Generate code to initialize the SSD structure of
4434 2011-08-02 Yannick Moy <moy@adacore.com>
4436 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4437 cross-references section in ALI.
4438 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4439 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4441 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4442 subprogram or package entity of a node
4443 (Is_Local_Reference_Type): new function returns True for references
4444 selected in local cross-references.
4445 (Lt): function extracted from Lt in Output_References
4446 (Write_Entity_Name): function extracted from Output_References
4447 (Generate_Definition): generate reference with type 'D' for definition
4448 of objects (object declaration and parameter specification), with
4449 appropriate locations and units, for use in local cross-references.
4450 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4451 references of type 'I' for initialization in object definition.
4452 (Output_References): move part of function Lt and procedure
4453 Write_Entity_Name outside of the body. Ignore references of types 'D'
4454 and 'I' introduced for local cross-references.
4455 (Output_Local_References): new procedure to output the local
4456 cross-references sections.
4457 (Lref_Entity_Status): new array defining whether an entity is a local
4458 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4459 with 'I' type when initialization expression is present.
4460 * get_scos.adb, get_scos.ads: Correct comments and typos
4462 2011-08-02 Javier Miranda <miranda@adacore.com>
4464 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4466 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4468 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4471 2011-08-02 Vincent Celier <celier@adacore.com>
4473 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4474 (No_Space_Img): New function
4475 (Find_Excluded_Sources): When reading from a file, record the file name
4476 and the line number for each excluded source.
4477 (Mark_Excluded_Sources): When reporting an error, if the excluded
4478 sources were read from a file, include file name and line number in
4481 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4483 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4485 2011-08-02 Robert Dewar <dewar@adacore.com>
4487 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4489 2011-08-02 Javier Miranda <miranda@adacore.com>
4491 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4492 generation of TSDs to the DOTNET compiler.
4493 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4494 generation of TSDs to the DOTNET compiler.
4496 2011-08-02 Javier Miranda <miranda@adacore.com>
4498 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4499 record of all the tagged types declared inside library level package
4500 declarations, library level package bodies or library level subprograms.
4501 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4502 associated with a given tagged type.
4503 (Build_VM_TSDs): New subprogram.
4504 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4505 compilation units that are subprograms.
4506 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4507 compilation units that are package bodies.
4508 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4509 units that are a package declaration or a package instantiation.
4510 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4511 reorganization to improve the error generated by the frontend when the
4512 function Ada.Tags.Secondary_Tag is not available.
4513 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4514 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4516 2011-08-02 Javier Miranda <miranda@adacore.com>
4518 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4520 2011-08-02 Robert Dewar <dewar@adacore.com>
4522 * s-imenne.ads: Minor reformatting.
4524 2011-08-02 Robert Dewar <dewar@adacore.com>
4526 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4527 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4528 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4530 2011-08-02 Robert Dewar <dewar@adacore.com>
4532 * einfo.ads (Materialize_Entity): Document this is only for renamings
4533 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4534 required debug information in the case where we transform the object
4535 declaration into a renaming declaration.
4536 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4538 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4541 2011-08-02 Robert Dewar <dewar@adacore.com>
4543 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4544 Suppress_Init_Procs.
4545 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4546 Suppress_Initialization/Initialization_Suppressed.
4547 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4548 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4549 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4550 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4552 2011-08-02 Robert Dewar <dewar@adacore.com>
4554 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4557 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4559 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4560 only have inheritable classwide pre/postconditions.
4562 2011-08-02 Javier Miranda <miranda@adacore.com>
4564 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4565 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4566 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4567 checks if the external tag of a type is the same as the external tag
4568 of some other declaration.
4570 2011-08-02 Thomas Quinot <quinot@adacore.com>
4572 * s-taskin.ads: Minor reformatting.
4574 2011-08-02 Emmanuel Briot <briot@adacore.com>
4576 * g-comlin.adb (Display_Help): swap the order in which it prints the
4577 short help and the general usage.
4579 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4581 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4582 the aspect declarations and attach them to the generic copy for
4583 subsequent analysis.
4584 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4585 declarations of the generic tree to the new subprogram declarations.
4586 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4587 conditions that apply to a subprogram instance.
4589 2011-08-02 Robert Dewar <dewar@adacore.com>
4591 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4593 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4595 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4596 private type with a tagged full view is not derived in the immediate
4597 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4599 2011-08-02 Robert Dewar <dewar@adacore.com>
4601 * exp_ch4.adb: Minor reformatting.
4603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4605 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4606 Ada2012 iterator, the loop will be rewritten during expansion into a
4607 while loop with a cursor and an element declaration. Do not analyze the
4608 body in this case, because if the container is for indefinite types the
4609 actual subtype of the elements will only be determined when the cursor
4610 declaration is analyzed.
4612 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4614 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4615 size/alignment related attributes in CodePeer_Mode.
4617 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4619 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4620 Prepend_Element, since this can result in the operation getting the
4621 wrong slot in the full type's dispatch table if the full type has
4622 inherited operations. The incomplete type's operation will get added
4623 to the proper position in the full type's primitives
4624 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4625 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4626 dispatching operations, since there are cases where nonprimitive
4627 subprograms can get added to the list of incomplete dependents (such
4628 as subprograms in nested packages).
4629 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4630 private part when determining whether to add a primitive with a
4631 parameter of a tagged incomplete type to the Private_Dependents list.
4632 Such primitives can also occur in the visible part, and should not have
4633 been excluded from being private dependents.
4634 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4635 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4636 list of a Taft-amendment incomplete type is a primitive before issuing
4637 an error that the full type must appear in the same unit. There are
4638 cases where nonprimitives can be in the list (such as subprograms in
4640 * sem_disp.adb (Derives_From): Use correct condition for checking that
4641 a formal's type is derived from the type of the corresponding formal in
4642 the parent subprogram (the condition was completely wrong). Add
4643 checking that was missing for controlling result types being derived
4644 from the result type of the parent operation.
4646 2011-08-02 Yannick Moy <moy@adacore.com>
4648 * errout.adb (First_Node): minor renaming
4649 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4652 2011-08-02 Yannick Moy <moy@adacore.com>
4654 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4655 before accessing operands.
4656 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4657 decide whether an initialization expression respects SPARK rules, as
4658 the plain node is the expanded one. This allows for more valid warnings
4660 * gnat_rm.texi: Minor update.
4662 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4664 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4667 2011-08-02 Robert Dewar <dewar@adacore.com>
4669 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4671 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4673 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4674 loop statements and the element renaming declaration with a block when
4675 the element type is controlled.
4677 2011-08-02 Yannick Moy <moy@adacore.com>
4679 * sinfo.ads: Minor formatting.
4681 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4683 * sem_aggr.adb (Add_Association): if the association has a box and no
4684 expression, use the Sloc of the aggregate itself for the new
4686 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4689 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4691 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4692 When a container is provided via a function call, generate a renaming
4693 of the function result. This avoids the creation of a transient scope
4694 and the premature finalization of the container.
4695 * exp_ch7.adb (Is_Container_Cursor): Removed.
4696 (Wrap_Transient_Declaration): Remove the supression of the finalization
4697 of the list controller when the declaration denotes a container cursor,
4700 2011-08-02 Yannick Moy <moy@adacore.com>
4702 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4703 node is from source, instead of the original node being from source.
4705 (Resolve_Array_Aggregate): refine the check for a static expression, to
4706 recognize also static ranges
4707 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4708 Array_Type_Declaration): postpone the test for the type being a subtype
4709 mark after the type has been resolved, so that component-selection and
4710 expanded-name are discriminated.
4711 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4712 to distinguish the case of an iteration scheme, so that an error is
4713 issed on a non-static range in SPARK except in an iteration scheme.
4714 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4715 In_Iter_Schm = True.
4716 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4717 user-defined operators so that they are allowed in renaming
4719 (Find_Selected_Component): refine the check for prefixing of operators
4720 so that they are allowed in renaming. Move the checks for restrictions
4721 on selector name after analysis discriminated between
4722 component-selection and expanded-name.
4723 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4724 concatenation argument of string type if it is static.
4725 * sem_util.adb, sem_util.ads
4726 (Check_Later_Vs_Basic_Declarations): add a new function
4727 Is_Later_Declarative_Item to decice which declarations are allowed as
4728 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4729 mode, add that renamings are considered as later items.
4730 (Enclosing_Package): new function to return the enclosing package
4731 (Enter_Name): correct the rule for homonyms in SPARK
4732 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4733 from source (result of expansion) to avoid issuing wrong warnings.
4735 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4737 * errout.adb: On anything but an expression First_Node returns its
4740 2011-08-02 Pascal Obry <obry@adacore.com>
4742 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4744 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4746 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4747 Set the associated loop as the related expression of internally
4749 * exp_ch7.adb (Is_Container_Cursor): New routine.
4750 (Wrap_Transient_Declaration): Supress the finalization of the list
4751 controller when the declaration denotes a container cursor.
4753 2011-08-02 Yannick Moy <moy@adacore.com>
4755 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4757 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4758 expression is a simple expression. This check cannot be performed in
4759 the semantics, so just drop it.
4760 (P_Index_Or_Discriminant_Constraint): move check that the index or
4761 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4762 semantics. Other cases were previously checked in the semantics.
4763 * par-ch4.adb (P_Name): move checks that a selector name is not
4764 character literal or an operator symbol to Find_Selected_Component in
4766 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4767 declarations are not placed after later declarations in a separate
4768 procedure in Sem_Util (possibly not the best choice?), to be used both
4769 during parsing, for Ada 83 mode, and during semantic analysis, for
4771 * par-endh.adb (Check_End): move check that end label is not missing
4772 to Process_End_Label in the semantics
4773 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4774 the special case for SPARK restriction
4775 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4776 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4777 parameter Force to issue the error message even on internal node (used
4778 for generated end label). Call Check_Restriction to check when an error
4779 must be issued. In SPARK mode, issue an error message even if the
4780 restriction is not set.
4781 (Check_Restriction): new procedure with an additional out parameter to
4782 inform the caller that a message has been issued
4783 * sem_aggr.adb: Minor modification of message
4784 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4785 instead of issuing an error message directly
4786 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4787 declarations are not placed after later declarations, by calling
4788 Check_Later_Vs_Basic_Declarations
4789 (Analyze_Subtype_Declaration): move here the check that an index or
4790 discriminant constraint must be a subtype mark. Change the check that
4791 a subtype of String must start at one so that it works on subtype marks.
4792 * sem_ch4.adb (Analyze_Call): move here the check that a named
4793 association cannot follow a positional one in a call
4794 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4795 instead of issuing an error message directly
4796 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4797 selector name is not a character literal or an operator symbol. Move
4798 here the check that the prefix of an expanded name cannot be a
4799 subprogram or a loop statement.
4800 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4801 procedure called from parsing and semantics to check that basic
4802 declarations are not placed after later declarations
4803 (Process_End_Label): move here the check that end label is not missing
4805 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4807 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4808 representation clause in codepeer mode, since it confuses CodePeer and
4809 does not bring useful info.
4811 2011-08-02 Ed Falis <falis@adacore.com>
4813 * init.c: initialize fp hw on MILS.
4815 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4817 * errout.adb (First_Node): for bodies, return the node itself (small
4818 optimization). For other nodes, do not check source_unit if the node
4819 comes from Standard.
4821 2011-08-02 Robert Dewar <dewar@adacore.com>
4823 * exp_ch3.adb: Minor comment additions.
4824 * sem_ch13.adb: Minor reformatting.
4826 2011-08-02 Pascal Obry <obry@adacore.com>
4828 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4830 2011-08-02 Robert Dewar <dewar@adacore.com>
4832 * sem_attr.adb: Minor reformatting.
4834 2011-08-02 Robert Dewar <dewar@adacore.com>
4836 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4837 (Has_Default_Component_Value): Removed
4838 * einfo.ads Comment updates
4839 (Has_Default_Aspect): Replaces Has_Default_Value
4840 (Has_Default_Component_Value): Removed
4842 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4844 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4845 (Get_Simple_Init_Val): Handle Default_Value aspect
4846 (Needs_Simple_Initialization): Handle Default_Value aspect
4847 * exp_ch3.ads: Needs_Simple_Initialization
4848 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4849 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4851 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4852 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4853 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4855 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4857 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4858 package containing iteration primitives.
4859 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4861 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4863 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4864 "of", pre-analyze expression in case it is a function call with
4865 finalization actions that must be placed ahead of the loop.
4866 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4867 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4869 2011-08-02 Geert Bosch <bosch@adacore.com>
4871 * cstand.adb (Create_Float_Types): Only consider C's long double for
4872 Long_Long_Float, in addition to double.
4874 2011-08-02 Robert Dewar <dewar@adacore.com>
4876 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4877 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4878 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4883 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4886 2011-08-02 Javier Miranda <miranda@adacore.com>
4888 * einfo.ads, einfo.adb
4889 (Original_Access_Type): Move this attribute to Node26 since there was
4890 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4891 which causes conflicts and breaks the generation of the .NET compiler.
4892 (Interface_Name): Add missing documentation on JGNAT only uses of
4895 2011-08-02 Geert Bosch <bosch@adacore.com>
4897 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4898 (Find_Back_End_Float_Type): Likewise
4899 (Create_Back_End_Float_Types): Likewise
4900 (Create_Float_Types): Likewise
4901 (Register_Float_Type): Likewise
4902 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4903 Nlist and split out type selection in new local Find_Base_Type function.
4904 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4906 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4908 2011-08-02 Robert Dewar <dewar@adacore.com>
4910 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4912 * opt.ads: Minor comment change.
4913 * sem_ch12.adb: Minor code reorganization.
4915 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4917 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4918 subtype's list of rep items to the list on the full subtype in the case
4919 where the lists are the same.
4921 2011-08-02 Geert Bosch <bosch@adacore.com>
4923 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4924 using the one from System.Strings, which also deallocates all strings.
4926 2011-08-02 Geert Bosch <bosch@adacore.com>
4928 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4930 * gcc-interface/Make-lang.in: Update dependencies.
4932 2011-08-02 Olivier Hainque <hainque@adacore.com>
4934 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4937 2011-08-02 Javier Miranda <miranda@adacore.com>
4939 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4940 associated with anonymous access to subprograms.
4942 2011-08-02 Geert Bosch <bosch@adacore.com>
4945 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4946 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4947 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4948 (Add_Symbol_Definition): Move to switch-c.adb
4949 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4950 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4951 (Add_Symbol_Definition): Move to switch-c.adb.
4952 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4954 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4956 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4957 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4959 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4960 (Add_Symbol_Definition): Moved from Prepcomp.
4961 * switch-c.ads: Update copyright notice. Use String_List instead of
4962 Argument_List, removing dependency on System.OS_Lib.
4964 2011-08-02 Yannick Moy <moy@adacore.com>
4966 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4967 mode on initialization expression which does not respect SPARK
4969 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4970 if the tree referenced by its argument represents an initialization
4971 expression in SPARK, suitable for initializing an object in an object
4974 2011-08-02 Javier Miranda <miranda@adacore.com>
4976 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4977 internally generated access to subprogram with its associated protected
4979 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4981 2011-08-02 Geert Bosch <bosch@adacore.com>
4983 * cstand.adb (Register_Float_Type): Print information about type to
4984 register, if the Debug_Flag_Dot_B is set.
4985 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4986 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4987 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4988 with a requested precision of more than Max_Digits digits and no more
4989 than Max_Base_Digits digits, if a range specification is present and the
4990 Predefined_Float_Types list has a suitable type to derive from.
4991 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4992 case of type completion with pragma Import
4994 (Process_Import_Predefined_Type): Processing to complete a type
4995 with pragma Import. Currently supports floating point types only.
4996 (Set_Convention_From_Pragma): Do nothing without underlying type.
4997 (Process_Convention): Guard against absence of underlying type,
4998 which may happen when importing incomplete types.
4999 (Process_Import_Or_Interface): Handle case of importing predefined
5000 types. Tweak error message.
5002 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5004 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5005 functions to previous change. Reorganize code slightly.
5007 2011-08-02 Geert Bosch <bosch@adacore.com>
5009 * back_end.ads (Register_Type_Proc): New call back procedure type for
5010 allowing the back end to provide information about available types.
5011 (Register_Back_End_Types): New procedure to register back end types.
5012 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5014 * cstand.adb (Back_End_Float_Types): New list for floating point types
5015 supported by the back end.
5016 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5017 (Copy_Float_Type): New procedure to make new copies of predefined types.
5018 (Register_Float_Type): New call back procedure to populate the BEFT list
5019 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5020 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5021 (Create_Float_Types): New procedure to create entities for floating
5022 point types predefined in Standard, and put these and any remaining
5023 BEFTs on the Predefined_Float_Types list.
5024 * stand.ads (Predefined_Float_Types): New list for predefined floating
5025 point types that do not have declarations in package Standard.
5027 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5029 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5030 entity node for the unit containing the parameter.
5031 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5032 (Add_Inlined_Subprogram): Likewise.
5033 * gcc-interface/Make-lang.in: Update dependencies.
5035 2011-08-02 Thomas Quinot <quinot@adacore.com>
5037 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5040 2011-08-02 Geert Bosch <bosch@adacore.com>
5042 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5044 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5046 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5047 computed value of Base_Type.
5049 2011-08-02 Yannick Moy <moy@adacore.com>
5051 * restrict.adb (Check_Restriction): issue an error for any use of
5052 class-wide, even if the No_Dispatch restriction is not set.
5053 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5054 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5055 when completing a private extension, the type named in the private part
5056 is not the same as that named in the visible part.
5057 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5058 of an inherited primitive operations of a tagged type or type extension
5059 that returns the tagged type.
5060 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5061 function which returns True for an implicit operation inherited by the
5062 derived type declaration for the argument type.
5063 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5066 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5068 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5069 Process_Bounds, to perform analysis with expansion of a range or an
5070 expression that is the iteration scheme for a loop.
5071 (Analyze_Iterator_Specification): If domain of iteration is given by a
5072 function call with a controlled result, as is the case if call returns
5073 a predefined container, ensure that finalization actions are properly
5075 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5077 2011-08-02 Javier Miranda <miranda@adacore.com>
5079 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5080 * gcc-interface/Make-lang.in: Update dependencies.
5082 2011-08-02 Javier Miranda <miranda@adacore.com>
5084 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5085 determine if the analysis is performed using N or Original_Node (N).
5086 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5087 functionality of routine Is_Variable avoids code duplication.
5088 * checks.adb (Determine_Range): Handle temporaries generated by
5089 Remove_Side_Effects.
5091 2011-08-02 Javier Miranda <miranda@adacore.com>
5093 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5094 expansion of the condition. Required since the previous analysis was
5095 done with expansion disabled (see Resolve_Quantified_Expression) and
5096 hence checks were not inserted and record comparisons have not been
5099 2011-08-02 Ed Falis <falis@adacore.com>
5101 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5104 2011-08-02 Bob Duff <duff@adacore.com>
5106 * opt.ads: Minor comment fix.
5108 2011-08-02 Bob Duff <duff@adacore.com>
5110 * sem_ch12.adb (Analyze_Package_Instantiation,
5111 Analyze_Subprogram_Instantiation): Turn off style checking while
5112 analyzing an instance. Whatever style checks that apply to the generic
5113 unit should apply, so it makes no sense to apply them in an instance.
5114 This was causing trouble when compiling an instance of a runtime
5115 unit that violates the -gnatyO switch.
5116 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5117 one of the two case statements, causing spurious errors.
5119 2011-08-02 Robert Dewar <dewar@adacore.com>
5121 * uname.adb: Minor reformatting.
5122 * gnatcmd.adb: Minor reformatting.
5123 * exp_attr.adb: Minor reformatting.
5125 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5127 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5128 No_Dispatching_Calls, do not look for the Assign primitive, because
5129 predefined primitives are not created in this case.
5131 2011-08-02 Bob Duff <duff@adacore.com>
5133 * stylesw.ads: Minor comment fixes.
5135 2011-08-02 Robert Dewar <dewar@adacore.com>
5137 * freeze.adb (Add_To_Result): New procedure.
5139 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5141 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5142 time, if the specific run-time routines for handling streams of strings
5143 are not available, use the default mechanism.
5145 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5147 * s-regpat.ads: Fix typo.
5149 2011-08-02 Vincent Celier <celier@adacore.com>
5151 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5152 not null, call it to create the in memory config project file without
5153 parsing an existing default config project file.
5155 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5157 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5159 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5161 * sem_elim.adb: an abstract subprogram does not need an eliminate
5162 pragma for its descendant to be eliminable.
5164 2011-08-02 Ed Falis <falis@adacore.com>
5166 * init.c: revert to handling before previous checkin for VxWorks
5167 * s-intman-vxworks.adb: delete unnecessary declarations related to
5168 using Ada interrupt facilities for handling signals.
5169 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5170 * s-intman-vxworks.ads: Import __gnat_install_handler as
5171 Initialize_Interrupts.
5172 * s-taprop-vxworks.adb: Delete Signal_Mask.
5173 (Abort_Handler): change construction of mask to unblock exception
5176 2011-08-02 Jerome Guitton <guitton@adacore.com>
5178 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5179 Debug_Raise_Exception before propagation starts.
5181 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5183 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5184 to Restriction_Check_Required.
5185 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5186 * sem_res.adb (Resolve_Call): Likewise.
5187 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5189 2011-08-02 Bob Duff <duff@adacore.com>
5191 * stylesw.ads: Update comment.
5192 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5193 * errout.ads: Remove obsolete comment.
5195 2011-08-02 Javier Miranda <miranda@adacore.com>
5197 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5198 (Set_Is_Safe_To_Reevaluate): new procedure.
5199 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5200 assignment is allowed on safe-to-reevaluate variables.
5201 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5202 temporary created to remove side effects in expressions that use
5203 the secondary stack as safe-to-reevaluate.
5204 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5205 variables that are not true constants.
5207 2011-08-02 Robert Dewar <dewar@adacore.com>
5209 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5210 sem_res.adb, sem_ch6.adb: Minor reformatting.
5212 2011-08-02 Jerome Guitton <guitton@adacore.com>
5214 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5216 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5218 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5219 not set Overridden_Operation if subprogram is an initialization
5222 2011-08-02 Yannick Moy <moy@adacore.com>
5224 * par-ch6.adb: Correct obsolete name in comments
5225 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5226 which takes two message arguments (existing function takes one), with
5227 second message used for continuation.
5228 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5229 block statements that originate from a source block statement, not
5230 generated block statements
5231 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5232 symmetry with procedure case
5233 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5234 function to issue an error in formal mode if a package specification
5235 contains more than one tagged type or type extension.
5236 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5237 parameters matching formals of tagged types are objects (or ancestor
5238 type conversions of objects), not general expressions. Issue an error
5239 on view conversions that are not involving ancestor conversion of an
5241 (Resolve_Type_Conversion): in formal mode, issue an error on the
5242 operand of an ancestor type conversion which is not an object
5243 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5244 procedure so that it works also for actuals of function calls
5245 (Is_Actual_Tagged_Parameter): new function which determines if its
5246 argument is an actual parameter of a formal of tagged type in a
5248 (Is_SPARK_Object_Reference): new function which determines if the tree
5249 referenced by its argument represents an object in SPARK
5251 2011-08-02 Robert Dewar <dewar@adacore.com>
5253 * sem_ch3.adb: Minor reformatting
5254 Minor comment addition
5255 Minor error msg text change
5257 2011-08-02 Javier Miranda <miranda@adacore.com>
5259 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5260 function. Used to be more precise when we generate a variable plus one
5261 assignment to remove side effects in the evaluation of the Bound
5263 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5264 of the bound expression to force its re-analysis and thus expand the
5265 associated transient scope (if required). Code cleanup replacing the
5266 previous code that declared the constant entity by an invocation to
5267 routine Force_Evaluation which centralizes this work in the frontend.
5269 2011-08-02 Robert Dewar <dewar@adacore.com>
5271 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5272 (Base_Type): Now uses improved Is_Base_Type function
5273 * einfo.ads (Base_Type): Inline this function
5275 2011-08-02 Robert Dewar <dewar@adacore.com>
5277 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5278 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5280 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5282 * gcc-interface/Make-lang.in: Update dependencies.
5283 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5286 2011-08-02 Yannick Moy <moy@adacore.com>
5288 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5289 non-simple expression used in delta constraint
5290 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5291 index constraint which is not a subtype mark
5292 * par.adb: With and use Restrict
5293 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5294 mode on component type which is not a subtype mark and default
5295 expression on component
5296 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5297 of string which does not have a lower index bound equal to 1
5298 (Array_Type_Declaration): issue an error in formal mode on index or
5299 component type which is not a subtype mark, and on aliased keyword on
5301 (Derived_Type_Declaration): issue an error in formal mode on interface,
5302 limited or abstract type
5303 (Record_Type_Declaration): issue an error in formal mode on interface
5304 (Record_Type_Definition): issue an error in formal mode on tagged types
5305 and type extensions not declared in the specification of a library unit
5306 package; on null non-tagged record; on variant part
5308 2011-08-02 Vincent Celier <celier@adacore.com>
5310 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5311 not declared for qualified library project when Library_Name is not
5312 declared, but Library_Dir is.
5314 2011-08-02 Robert Dewar <dewar@adacore.com>
5316 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5317 pragmas (affects aspects [Component_]Default_Value
5318 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5319 component type for the resolution
5321 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5323 * einfo.adb (Base_Type): Tune implementation for speed.
5325 2011-08-02 Robert Dewar <dewar@adacore.com>
5327 * freeze.adb: Minor reformatting.
5329 2011-08-02 Thomas Quinot <quinot@adacore.com>
5331 * scos.ads: Update comments.
5333 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5335 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5336 base type, because the parent may be a subtype of a private type whose
5337 convention is established in a private part.
5339 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5341 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5342 statement in a block when the expansion of the return expression has
5343 created a finalization chain.
5344 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5345 with the parent node.
5346 Add N_Extended_Return_Statement to handle the case where a transient
5347 object declaration appears in the Return_Object_Declarations list of
5348 an extended return statement.
5350 2011-08-02 Matthew Gingell <gingell@adacore.com>
5352 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5353 unused parameter 'name'.
5355 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5357 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5358 inherited operation, check whether its alias, which is the source
5359 operastion that it renames, has been marked eliminated.
5361 2011-08-02 Javier Miranda <miranda@adacore.com>
5363 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5364 in-mode parameter whose type is an access type since it can be used to
5365 modify its designated object. Enforce code that handles as safe an
5366 access type that is not access-to-constant but it is the result of a
5367 previous removal of side-effects.
5368 (Remove_Side_Effects): Minor code reorganization of cases which require
5369 no action. Done to incorporate documentation on new cases uncovered
5370 working in this ticket: no action needed if this routine was invoked
5371 too early and the nodes are not yet decorated.
5372 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5373 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5374 were issued with actuals that are implicitly provided by
5377 2011-08-02 Robert Dewar <dewar@adacore.com>
5379 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5381 2011-08-02 Yannick Moy <moy@adacore.com>
5383 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5384 to issue an error in formal mode on attribute not supported in this mode
5385 (Analyze_Attribute): issue errors on standard attributes not supported
5387 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5388 comment, and issue error in formal mode on modulus which is not a power
5390 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5392 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5394 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5395 operator on modular type (except 'not').
5397 2011-08-02 Robert Dewar <dewar@adacore.com>
5399 * gnat_rm.texi: Minor reformatting.
5401 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5403 * s-osinte-linux.ads: Minor comment update and reformatting.
5404 * i-cexten.ads: Make this unit pure, as for its parent.
5405 Will allow its usage in more contexts if needed.
5407 2011-08-02 Robert Dewar <dewar@adacore.com>
5409 * s-utf_32.ads: Minor comment fix.
5411 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5413 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5414 operation of a tagged synchronized type, handle the case where the
5415 controlling argument is overloaded.
5417 2011-08-02 Yannick Moy <moy@adacore.com>
5419 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5420 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5421 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5422 SPARK mode and formal verification mode on processing SPARK restriction
5423 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5424 requiring consistency checking.
5426 2011-08-02 Robert Dewar <dewar@adacore.com>
5428 * sem_res.adb: Minor reformatting.
5430 2011-08-02 Robert Dewar <dewar@adacore.com>
5432 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5433 a-cforse.ads: Remove unneeded with of Ada.Containers
5434 Remove commented out pragma Inline's
5435 Move specifications of new subprograms to the actual specs
5437 2011-08-02 Yannick Moy <moy@adacore.com>
5439 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5440 a-cforse.ads: Update comments.
5442 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5444 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5446 2011-08-02 Robert Dewar <dewar@adacore.com>
5448 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5449 a-cforse.ads, a-cofove.ads: Minor reformatting.
5451 2011-08-02 Claire Dross <dross@adacore.com>
5453 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5454 a-cofove.ads: Add comments.
5456 2011-08-02 Yannick Moy <moy@adacore.com>
5458 * gnat_rm.texi: Document formal containers.
5460 2011-08-02 Emmanuel Briot <briot@adacore.com>
5462 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5465 2011-08-02 Robert Dewar <dewar@adacore.com>
5467 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5470 2011-08-02 Robert Dewar <dewar@adacore.com>
5472 * aspects.adb: New aspects Default_Value and Default_Component_Value
5473 New format of Aspect_Names table checks for omitted entries
5474 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5475 handling of boolean aspects for derived types.
5476 New aspects Default_Value and Default_Component_Value
5477 New format of Aspect_Names table checks for omitted entries
5478 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5479 (Has_Default_Value): New flag
5480 (Has_Default_Component_Value): New flag
5481 (Has_Default_Value): New flag
5482 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5484 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5485 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5486 Default_Value and Default_Component_Value
5487 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5488 New aspects Default_Value and Default_Component_Value
5489 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5490 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5492 2011-08-02 Vincent Celier <celier@adacore.com>
5494 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5495 inherit library kind.
5497 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5499 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5502 2011-08-02 Robert Dewar <dewar@adacore.com>
5504 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5506 2011-08-02 Yannick Moy <moy@adacore.com>
5508 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5510 2011-08-02 Robert Dewar <dewar@adacore.com>
5512 * impunit.adb: Add comment.
5514 2011-08-02 Yannick Moy <moy@adacore.com>
5516 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5517 qualification of aggregates in formal mode
5518 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5520 (Resolve_Aggregate): complete the test that an aggregate is adequately
5521 qualified in formal mode
5523 2011-08-02 Pascal Obry <obry@adacore.com>
5525 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5526 * mlib-prj.adb: Supress warning when compiling binder generated file.
5527 (Build_Library): Supress all warnings when compiling the binder
5530 2011-08-02 Yannick Moy <moy@adacore.com>
5532 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5534 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5535 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5536 Add with/use clauses to make Check_Formal_Restriction visible
5538 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5540 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5541 in-parameters when type of the generic formal is private in the generic
5542 spec and non-private in the body.
5544 2011-08-02 Claire Dross <dross@adacore.com>
5546 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5547 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5548 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5549 * impunit.adb, Makefile.rtl: Take new files into account.
5551 2011-08-02 Robert Dewar <dewar@adacore.com>
5553 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5554 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5556 2011-08-02 Yannick Moy <moy@adacore.com>
5558 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5560 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5561 matching static array bounds, taking into account the special case of
5563 * sem_ch3.adb: Typo in comment.
5565 2011-08-02 Yannick Moy <moy@adacore.com>
5567 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5568 which issues an error in formal mode if its argument node is originally
5570 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5571 has a discriminant specification so that it does not include the case
5573 (Derived_Type_Declaration): move here the test that a derived type has a
5574 discriminant specification
5575 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5576 first element of a component association before accessing its choices
5577 (presence of component association is not enough)
5578 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5579 declaration is a library item before accessing the next element in a
5580 list, as library items are not member of lists
5581 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5582 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5583 Check_Formal_Restriction whenever possible.
5585 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5587 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5588 reference when needed.
5590 2011-08-02 Bob Duff <duff@adacore.com>
5592 * gnat_ugn.texi: Fix typo.
5594 2011-08-02 Vincent Celier <celier@adacore.com>
5596 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5597 archive file name. Do not use the full path name of archives for Open
5600 2011-08-02 Robert Dewar <dewar@adacore.com>
5602 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5603 Analyze_Aspect_Specifications
5605 (Analyze_Aspect_Specifications): New handling for boolean aspects
5606 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5607 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5608 sequence for Analyze_Aspect_Specifications
5609 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5610 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5612 2011-08-02 Robert Dewar <dewar@adacore.com>
5614 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5615 aspects, since these no longer exist.
5617 2011-08-02 Robert Dewar <dewar@adacore.com>
5619 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5620 semicolon, do not try to see if there are aspects following it.
5621 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5624 2011-08-02 Robert Dewar <dewar@adacore.com>
5626 * sem_ch8.adb, aspects.ads: Minor reformatting.
5628 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5630 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5631 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5633 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5635 2011-08-02 Yannick Moy <moy@adacore.com>
5637 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5638 mode on subprogram declaration outside of package specification, unless
5639 it is followed by a pragma Import
5640 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5641 Access_Type_Declaration): issue error in formal mode on access type
5642 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5644 (Analyze_Object_Declaration): issue error in formal mode on object
5645 declaration which does not respect SPARK restrictions
5646 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5647 declaration which does not respect SPARK restrictions
5648 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5649 error in formal mode on digits or delta constraint
5650 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5651 decimal fixed point type
5652 (Derived_Type_Declaration): issue error in formal mode on derived type
5653 other than type extensions of tagged record types
5654 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5655 with check on access definition
5656 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5657 mode on protected definition.
5658 (Analyze_Task_Definition): issue error in formal mode on task definition
5660 2011-08-02 Robert Dewar <dewar@adacore.com>
5662 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5664 2011-08-02 Javier Miranda <miranda@adacore.com>
5666 * sem_ch6.adb (Can_Override_Operator): New function.
5667 (Verify_Overriding_Indicator): Add missing code to check overriding
5668 indicator in operators. Fixes regression.
5669 (Check_Overriding_Indicator): Minor reformating after replacing the
5670 code that evaluates if the subprogram can override an operator by
5671 invocations to the above new function.
5673 (Write_Field26_Name): Add missing code to ensure that, following
5674 the documentation in einfo.ads, this field is not shown as attribute
5675 "Static_Initialization" on non-dispatching functions.
5677 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5679 * sem_res.adb (Resolve_Call): A call to
5680 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5681 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5682 i.e., when the second parameter is of type Time_Span.
5684 2011-08-02 Vincent Celier <celier@adacore.com>
5686 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5687 with an archive instead of -L<library dir> -l<library name>.
5689 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5691 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5692 mark the base types In_Use in addition to making the operations
5695 2011-08-02 Ed Falis <falis@adacore.com>
5697 * init.c: add and setup __gnat_signal_mask for the exception signals
5698 * s-inmaop-vxworks.adb: new file.
5699 * s-intman-vxworks.adb: remove unnecessary initializations and
5701 * s-intman-vxworks.ads: remove unnecessary variable
5702 * s-taprop-vxworks.adb: simplify signal initialization
5704 2011-08-02 Robert Dewar <dewar@adacore.com>
5706 * sem_ch8.adb: Minor code reorganization, comment updates.
5708 2011-08-02 Robert Dewar <dewar@adacore.com>
5710 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5711 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5713 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5714 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5716 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5718 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5719 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5720 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5721 use_type_clauses, to handle more efficiently use_type and use_all_type
5723 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5724 Ada2012 Use_All_Type clause.
5725 (Use_Class_Wide_Operations): new procedure.
5727 2011-08-02 Robert Dewar <dewar@adacore.com>
5729 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5730 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5731 expression to expression function.
5733 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5735 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5736 if types are compatible.
5738 2011-08-02 Yannick Moy <moy@adacore.com>
5740 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5741 returns True if its argument array types have same dimension and same
5742 static bounds at each index.
5743 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5744 OUT or IN OUT paramaters which are not view conversions in SPARK.
5745 (Resolve_Arithmetic_Op): issue an error in formal mode on
5746 multiplication or division with operands of fixed point types which are
5747 not qualified or explicitly converted.
5748 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5749 Boolean or array type (except String) operands.
5750 (Resolve_Equality_Op): issue an error in formal mode on equality
5751 operators for array types other than String with non-matching static
5753 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5754 for array types with non-matching static bounds. Factorize the code in
5755 Matching_Static_Array_Bounds.
5756 (Resolve_Qualified_Expression): issue an error in formal mode on
5757 qualified expressions for array types with non-matching static bounds.
5758 (Resolve_Type_Conversion): issue an error in formal mode on type
5759 conversion for array types with non-matching static bounds
5761 2011-08-02 Robert Dewar <dewar@adacore.com>
5763 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5765 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5767 * par-ch9.adb: save location of entry for proper error message.
5769 2011-08-02 Javier Miranda <miranda@adacore.com>
5771 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5772 (Use_Full_View) which permits this routine to climb through the
5773 ancestors using the full-view of private parents.
5774 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5775 Use_Full_View to true in calls to Is_Ancestor.
5776 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5777 true in call to Is_Ancestor.
5778 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5779 Use_Full_View to true in call to Is_Ancestor.
5780 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5781 call to Is_Ancestor.
5782 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5783 Use_Full_View to true in calls to Is_Ancestor.
5784 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5785 Make_Select_Specific_Data_Table, Register_Primitive,
5786 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5787 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5788 to true in call to Is_Ancestor.
5789 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5790 Use_Full_View to true in calls to Is_Ancestor.
5792 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5793 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5795 2011-08-02 Robert Dewar <dewar@adacore.com>
5797 * gnat_rm.texi: Minor reformatting.
5798 * sem_prag.adb: Minor reformatting.
5800 2011-08-02 Tristan Gingold <gingold@adacore.com>
5802 * vms_data.ads: Add VMS qualifier for -gnateP.
5804 2011-08-02 Robert Dewar <dewar@adacore.com>
5806 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5807 * par-ch7.adb (P_Package): Proper placement of aspects for package
5809 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5810 (End_Statements): Add Is_Sloc parameterr
5811 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5812 (Check_End): Ad Is_Sloc parameter
5813 (End_Statements): Add Is_Sloc parameterr
5815 2011-08-02 Vincent Celier <celier@adacore.com>
5817 * ug_words: Add VMS qualifier equivalent to -gnateP:
5818 /SYMBOL_PREPROCESSING.
5820 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5822 * gnat-style.texi: For hexadecimal numeric literals the typical
5823 grouping of digits is 4 to represent 2 bytes.
5824 A procedure spec which is split into several lines is indented two
5827 2011-08-02 Yannick Moy <moy@adacore.com>
5829 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5830 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5831 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5833 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5834 choice in array aggregate
5835 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5837 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5838 positional and named aggregate for record, or others in record
5839 aggregate, or multiple choice in record aggregate
5840 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5841 array operands to logical operations AND, OR and XOR do not have the
5842 same static lower and higher bounds
5843 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5845 2011-08-01 Robert Dewar <dewar@adacore.com>
5847 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5848 Replaces Last_Source_Node_In_Sequence.
5849 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5850 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5851 parens and blank in string (this was inconsistently implemented).
5853 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5854 blank in string (this was inconsistently implemented).
5856 (Set_Global_Switches): Set formal mode switches appropriately
5857 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5859 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5860 call Set_Error_Msg_Lang to set "spark" as language name.
5861 * par.adb: Remove unnecessary call to set formal language for errout
5862 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5863 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5865 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5866 calls to it, moved after resolution so that types are known
5867 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5868 result of concatenation is not of type String
5869 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5870 concatenation is not properly restricted
5871 * gnat_rm.texi: Add doc on pragma Spark_95.
5872 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5873 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5874 * gcc-interface/Make-lang.in: Update dependencies.
5876 2011-08-01 Javier Miranda <miranda@adacore.com>
5878 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5879 condition that detects if the overridden operation must replace an
5882 2011-08-01 Javier Miranda <miranda@adacore.com>
5884 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5885 code declarations inserted by Insert_Actions in each alternative of the
5886 N_Case_Expression node.
5888 2011-08-01 Robert Dewar <dewar@adacore.com>
5890 * sem_ch6.adb: Minor code reorganization.
5891 * sem_util.adb: Minor reformatting.
5893 2011-08-01 Pascal Obry <obry@adacore.com>
5895 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5896 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5898 2011-08-01 Yannick Moy <moy@adacore.com>
5900 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5901 literal or operator symbol which is prefixed
5902 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5903 mode on access attributes.
5904 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5905 that concatenation operands are properly restricted in formal mode
5906 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5907 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5908 result of the concatenation has a type different from String.
5909 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5910 Analyze_Quantified_Expression, Analyze_Slice,
5911 Analyze_Null): issue an error in formal mode on unsupported constructs
5913 (Analyze_Block_Statement): only issue error on source block statement
5914 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5915 function which returns the last node in a list of nodes for which
5916 Comes_From_Source returns True, if any
5917 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5918 Last_Source_Node_In_Sequence
5919 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5920 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5921 mode on unsupported constructs
5922 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5923 rest of the actions may be needed later on since the error is marked as
5925 * sinfo.ads: Typos in comments.
5927 2011-08-01 Pascal Obry <obry@adacore.com>
5929 * projects.texi: Minor editing.
5931 2011-08-01 Yannick Moy <moy@adacore.com>
5933 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5934 insertion character ~~
5935 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5936 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5937 with insertion character ~~
5938 (Set_Msg_Text): treat insertion character ~~
5939 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5940 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5941 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5942 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5943 errors related to the formal language restriction not serious
5944 (insertion character |).
5945 * par.adb (Par): set formal language for error messages if needed
5946 * sem_ch6.adb (Check_Missing_Return): take into account possible
5947 generated statements at the end of the function
5948 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5949 enumeration value to define a new pragma SPARK_95
5950 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5951 SPARK_Version): new type and variables to store the SPARK version
5953 (SPARK_Mode): return True when SPARK_Version is set
5954 * par-prag.adb: Correct indentation
5955 (Prag): take Pragma_SPARK_95 into account
5956 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5959 2011-08-01 Robert Dewar <dewar@adacore.com>
5961 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5962 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5963 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5965 2011-08-01 Pascal Obry <obry@adacore.com>
5967 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5968 Target_Name to Get_Path call.
5969 (Parse_Single_Project): Likewise.
5970 (Post_Parse_Context_Clause): Likewise.
5971 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5972 Call Initialise_Project_Path with the proper Target_Name.
5973 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5975 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5976 with the proper Target_Name.
5977 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5979 (Parse_Project_And_Apply_Config): Likewise.
5980 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5981 This is fine as this part of the code is supporting only native
5983 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5984 is fine as this part of the code is supporting only native compilation.
5986 2011-08-01 Yannick Moy <moy@adacore.com>
5988 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5989 of homonym, unless the homonym is one of the cases allowed in SPARK
5990 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5991 package declaration occurring after a body.
5993 2011-08-01 Robert Dewar <dewar@adacore.com>
5995 * checks.adb, exp_ch4.adb: Minor reformatting.
5997 2011-08-01 Javier Miranda <miranda@adacore.com>
5999 * einfo.ads (Access_Disp_Table): Fix documentation.
6000 (Dispatch_Table_Wrappers): Fix documentation.
6002 2011-08-01 Pascal Obry <obry@adacore.com>
6004 * prj-env.adb, prj-env.ads: Minor reformatting.
6006 2011-08-01 Yannick Moy <moy@adacore.com>
6008 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6009 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6010 procedures out of these packages.
6011 * errout.ads, errout.adb
6012 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6013 procedures in of this package
6014 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6015 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6016 on misplaced later vs initial declarations, like in Ada 83
6017 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6018 formal mode on attribute of private type whose full type declaration
6020 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6021 package declaration inside a package specification
6022 (Analyze_Full_Type_Declaration): issue error in formal mode on
6023 controlled type or discriminant type
6024 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6025 user-defined operator means that it should come from the source
6026 (New_Overloaded_Entity): issue error in formal mode on overloaded
6028 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6030 2011-08-01 Thomas Quinot <quinot@adacore.com>
6032 * atree.adb: Minor reformatting.
6033 * checks.adb: Minor reformatting.
6035 2011-08-01 Vincent Celier <celier@adacore.com>
6037 * s-parame-vms-ia64.ads: Fix typo in comment
6039 * s-parame-vms-restrict.ads: Removed, unused.
6041 2011-08-01 Javier Miranda <miranda@adacore.com>
6044 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6046 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6047 * sem_ch3.ads, sem_ch3.adb
6048 (Is_Constant_Bound): New extended version of the subprogram that was
6049 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6050 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6051 * sem_aux.ads (Constant_Value): Fix typo in comment.
6052 * checks.adb (Generate_Index_Checks): New implementation which, for
6053 array objects with constant bounds, generates the runtime check
6054 referencing the bounds of the array type. For other cases this routine
6055 provides its previous behavior obtaining such values from the array
6057 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6059 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6060 we cannot have semantic interpretations of the new node.
6062 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6064 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6067 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6069 * sem_ch8.adb: Minor code editing.
6070 * s-vxwext.adb: Remove trailing space.
6071 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6072 consistency with other files.
6074 2011-08-01 Thomas Quinot <quinot@adacore.com>
6076 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6078 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6080 * par-ch10.adb: reject parameterized expressions as compilation unit.
6081 * sem_ch4.adb: handle properly conditional expression with overloaded
6082 then_clause and no else_clause.
6084 2011-08-01 Tristan Gingold <gingold@adacore.com>
6086 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6087 like done by System.Aux_DEC.
6088 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6090 2011-08-01 Yannick Moy <moy@adacore.com>
6092 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6093 missing label at end of declaration (subprogram or package)
6094 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6095 of positional and named parameter association
6096 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6097 Error_Msg_SP which adds a prefix to the error message giving the name
6098 of the formal language analyzed
6099 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6100 access result type in subprogram, unconstrained array as result type,.
6101 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6103 * sem_ch8.adb: Code clean up.
6105 2011-08-01 Javier Miranda <miranda@adacore.com>
6107 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6108 * einfo.ads (Access_Disp_Table): Fix documentation.
6109 (Dispatch_Table_Wrappers): Fix documentation.
6110 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6111 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6112 to enforce the documentation of this attribute.
6113 (Set_Is_Interface): Cleanup the assertion.
6114 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6115 the Underlying_Type entity before reading attribute Access_Disp_Table.
6116 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6117 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6118 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6119 the Underlying_Type entity before reading attribute Access_Disp_Table.
6120 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6121 Locate the Underlying_Type entity before reading attribute
6124 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6126 * s-poosiz.ads: Additional overriding indicators.
6128 2011-08-01 Yannick Moy <moy@adacore.com>
6130 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6132 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6133 parameter specification does not include a subtype mark.
6134 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6135 formal mode on abstract subprogram.
6136 (Analyze_Subprogram_Specification): issue error in formal mode on
6137 user-defined operator.
6138 (Process_Formals): issue error in formal mode on access parameter and
6140 * sem_ch9.adb (Analyze_Abort_Statement,
6141 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6142 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6143 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6144 Analyze_Requeue, Analyze_Selective_Accept,
6145 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6146 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6147 issue error in formal mode on user-defined raise statement.
6149 2011-08-01 Thomas Quinot <quinot@adacore.com>
6151 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6152 declaration being hidden when overriding an implicit inherited
6154 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6155 (-gnats), do not complain about a source file that contains only a
6158 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6160 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6161 variable if already set.
6163 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6165 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6166 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6167 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6168 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6169 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6170 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6171 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6172 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6173 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6174 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6175 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6176 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6177 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6178 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6179 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6180 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6181 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6182 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6183 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6184 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6185 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6186 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6187 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6188 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6189 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6190 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6191 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6192 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6193 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6194 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6195 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6196 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6197 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6198 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6199 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6200 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6201 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6202 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6203 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6204 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6205 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6206 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6207 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6208 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6209 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6210 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6211 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6212 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6213 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6214 Use GNAT instead of GNARL.
6216 2011-08-01 Bob Duff <duff@adacore.com>
6218 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6219 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6220 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6223 2011-08-01 Yannick Moy <moy@adacore.com>
6225 * debug.adb (d.D) reverve flag for the SPARK mode
6226 (d.E) reverve flag for SPARK generation mode
6227 (d.F) reverve flag for Why generation mode
6228 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6229 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6230 functions which return True when the corresponding modes are set
6231 (Formal_Language): return "spark" or "alfa" when in formal verification
6233 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6234 Error_Msg to prefix the error message with a tag giving the formal
6236 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6237 message with a tag giving the formal language
6238 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6240 (Analyze_Case_Statement): issue error in formal mode on case statement
6241 with a single "others" case alternative
6242 (Analyze_Exit_Statement): issue errors in formal mode on exit
6243 statements which do not respect SPARK restrictions
6244 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6245 (Check_Unreachable_Code): always issue an error (not a warning) in
6246 formal mode on unreachable code (concerns both code after an infinite
6247 loop and after an unconditional jump, both not allowed in SPARK)
6248 * sem_ch6.adb (Analyze_Return_Statement): add call to
6249 Set_Return_Present for a procedure containing a return statement
6250 (already done for functions in Analyze_Function_Return)
6251 (Analyze_Function_Return): issue error in formal mode on extended
6252 return or if return is not last statement in function
6253 (Check_Missing_Return): issue error in formal mode if function does
6254 not end with return or if procedure contains a return
6255 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6256 function to detect if there is an inner scope of its parameter S which
6259 2011-08-01 Thomas Quinot <quinot@adacore.com>
6261 * sem_ch6.ads: Minor reformatting.
6263 2011-08-01 Javier Miranda <miranda@adacore.com>
6265 * sem_util.adb (Abstract_Interface_List): Complete condition when
6266 processing private type declarations to avoid reading unavailable
6268 (Is_Synchronized_Tagged_Type): Complete condition when processing
6269 private extension declaration nodes to avoid reading unavailable
6272 2011-08-01 Thomas Quinot <quinot@adacore.com>
6274 * sem_ch3.adb: Minor reformatting.
6276 2011-08-01 Thomas Quinot <quinot@adacore.com>
6278 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6279 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6280 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6281 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6282 for VMS, instead parametrize the common implementation with
6283 System.Parameters declarations.
6285 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6287 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6289 2011-08-01 Tristan Gingold <gingold@adacore.com>
6291 * seh_init.c: Fix SEH handler installation on win64.
6293 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6295 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6296 double analysis of an anonymous access to subprogram, because it can
6297 lead to improper sharing of profiles and a back-end crash.
6299 2011-08-01 Robert Dewar <dewar@adacore.com>
6301 * make.adb, sem_ch4.adb: Minor reformatting.
6302 * gcc-interface/Make-lang.in: Update dependencies.
6303 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6305 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6307 * gnat_rm.texi: Fix definition of Long_Integer.
6309 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6311 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6312 to prevent storage exhaustion.
6313 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6314 finalized is a function body, insert the cleanup code before the final
6315 return statement, to prevent spurious warnings.
6316 * s-pooglo.ads: add overriding indicator.
6318 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6320 * sem_ch4.adb (Operator_Check): improve error message when both a
6321 with_clause and a use_clause are needed to make operator usage legal.
6322 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6323 determine whether a compilation unit is visible within an other,
6324 either through a with_clause in the current unit, or a with_clause in
6325 its library unit or one one of its parents.
6327 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6329 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6330 over an arbitrary expression of an array or container type.
6331 * lib-xref.adb: clarify comment.
6333 2011-08-01 Bob Duff <duff@adacore.com>
6335 * einfo.ads: Minor reformatting.
6336 * debug.adb: Minor comment improvement.
6338 2011-08-01 Javier Miranda <miranda@adacore.com>
6340 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6341 consider hidden subprograms as valid candidates.
6343 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6345 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6347 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6349 * gnat_ugn.texi: Fix typo.
6351 2011-08-01 Robert Dewar <dewar@adacore.com>
6353 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6354 lib-xref.adb: Minor reformatting
6356 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6358 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6359 when to generate a call to Move_Final_List.
6360 (Has_Controlled_Parts): Remove this function.
6362 2011-08-01 Geert Bosch <bosch@adacore.com>
6364 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6367 2011-08-01 Thomas Quinot <quinot@adacore.com>
6369 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6370 explicit raise of a predefined exception as Comes_From_Source if the
6371 original N_Raise_Statement comes from source.
6373 2011-08-01 Robert Dewar <dewar@adacore.com>
6375 * sinfo.ads: Add comment.
6376 * sem_ch6.adb: Minor reformatting.
6378 2011-08-01 Robert Dewar <dewar@adacore.com>
6380 * freeze.adb (Freeze_Entity): Refine check for bad component size
6381 clause to avoid rejecting confirming clause when atomic/aliased present.
6383 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6385 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6386 better determine whether an entity reference is a write.
6387 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6389 * lib-xref.adb (Output_References): Do no suppress a read reference at
6390 the same location as an immediately preceeding modify-reference, to
6391 handle properly in-out actuals.
6393 2011-08-01 Tristan Gingold <gingold@adacore.com>
6395 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6397 2011-08-01 Quentin Ochem <ochem@adacore.com>
6399 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6400 heap to compute the result.
6402 2011-08-01 Robert Dewar <dewar@adacore.com>
6404 * atree.ads: Minor reformatting.
6406 2011-08-01 Emmanuel Briot <briot@adacore.com>
6408 * g-expect.adb (Get_Command_Output): Fix memory leak.
6410 2011-08-01 Geert Bosch <bosch@adacore.com>
6412 * cstand.adb (P_Float_Type): New procedure to print the definition of
6413 predefined fpt types.
6414 (P_Mixed_Name): New procedure to print a name using mixed case
6415 (Print_Standard): Use P_Float_Type for printing floating point types
6416 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6417 precision IEEE float.
6419 2011-08-01 Thomas Quinot <quinot@adacore.com>
6421 * sem_ch3.adb: Minor reformatting.
6423 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6425 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6426 the completion of a generic function, insert the new body rather than
6427 rewriting the original.
6429 2011-08-01 Yannick Moy <moy@adacore.com>
6431 * sinfo.ads, errout.ads: Typos in comments.
6433 2011-08-01 Robert Dewar <dewar@adacore.com>
6435 * par-endh.adb: Minor reformatting.
6437 2011-08-01 Robert Dewar <dewar@adacore.com>
6439 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6440 (Pre_Post_Aspects): New subtype.
6441 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6442 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6443 * par-ch7.adb (P_Package): Remove Decl parameter
6444 (P_Package): Handle new syntax for aspects (before IS)
6445 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6447 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6448 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6449 (P_Package): Remove Decl parameter
6450 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6452 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6454 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6455 * sinfo.ads: Document new syntax for aspects in packages etc.
6456 * sprint.adb: Handle new syntax of aspects before IS in package
6458 2011-08-01 Thomas Quinot <quinot@adacore.com>
6460 * atree.ads: Minor reformatting.
6461 * sem_prag.adb: Minor reformatting.
6463 2011-08-01 Robert Dewar <dewar@adacore.com>
6465 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6466 case expr alternative.
6468 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6470 * sem_ch12.adb: Fix typo.
6472 2011-08-01 Geert Bosch <bosch@adacore.com>
6474 * sem_prag.adb (Check_No_Link_Name): New procedure.
6475 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6476 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6477 instead of Standard_Long_Long_Float_Size global. Preparation for
6478 eventual removal of per type constants.
6479 * exp_util.ads (Get_Stream_Size): New function returning the stream
6480 size value of subtype E.
6481 * exp_util.adb (Get_Stream_Size): Implement new function.
6482 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6484 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6486 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6488 2011-08-01 Geert Bosch <bosch@adacore.com>
6490 * cstand.adb: Fix comments.
6491 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6494 2011-08-01 Robert Dewar <dewar@adacore.com>
6496 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6498 2011-08-01 Geert Bosch <bosch@adacore.com>
6500 * atree.ads: Fix comment.
6502 2011-08-01 Robert Dewar <dewar@adacore.com>
6504 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6505 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6506 * par.adb: Add with for Namet.Sp.
6507 * par-tchk.adb: Minor reformatting.
6509 2011-08-01 Vincent Celier <celier@adacore.com>
6511 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6512 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6513 of the init procedure of a SAL.
6514 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6517 2011-08-01 Thomas Quinot <quinot@adacore.com>
6519 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6522 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6524 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6526 2011-08-01 Thomas Quinot <quinot@adacore.com>
6528 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6529 conformant with its spec (return True only for types that have
6530 an overriding Initialize primitive operation that prevents them from
6531 having preelaborable initialization).
6532 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6533 initialization for controlled types in Ada 2005 or later mode.
6535 2011-08-01 Robert Dewar <dewar@adacore.com>
6537 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6539 (Same_Aspect): New function.
6540 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6541 Type_Invariant, Precondition, Postcondition.
6542 * snames.ads-tmpl: Add Name_Type_Invariant.
6544 2011-08-01 Robert Dewar <dewar@adacore.com>
6546 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6548 (Freeze_All_Ent): Fix error in handling inherited aspects.
6549 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6550 already analyzed, but don't skip entire processing of a declaration,
6551 that's wrong in some cases of declarations being rewritten.
6552 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6553 Don't delay for integer, string literals
6554 Treat predicates in usual manner for delay, remove special case code,
6556 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6557 (Build_Predicate_Function): Update saved expression in aspect
6558 (Build_Invariant_Procedure): Update saved expression in aspect
6559 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6560 of replacement of discriminant references if the reference is simple.
6562 2011-08-01 Robert Dewar <dewar@adacore.com>
6564 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6565 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6566 Static_Predicate and Dynamic_Predicate.
6567 (Build_Predicate_Function): Add processing for Static_Predicate
6568 and Dynamic_Predicate.
6569 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6570 (From_Static_Predicate): New flag
6571 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6573 2011-08-01 Robert Dewar <dewar@adacore.com>
6575 * usage.adb: Documentation cleanup for Ada version modes in usage.
6576 * expander.adb: Minor reformatting.
6578 2011-08-01 Robert Dewar <dewar@adacore.com>
6580 * atree.ads: Minor comment fix.
6581 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6582 a-witeio.ads, sem_prag.adb: Minor reformatting.
6584 2011-08-01 Doug Rupp <rupp@adacore.com>
6586 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6587 pointers. Use descrip.h header file for convenience. Add some
6590 2011-08-01 Robert Dewar <dewar@adacore.com>
6592 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6593 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6594 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6596 (Check_Aspect_At_End_Of_Declarations): New procedure
6597 (Analye_Aspect_Specification): Minor changes for above procedures
6598 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6599 specification node as well.
6601 2011-08-01 Pascal Obry <obry@adacore.com>
6603 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6604 Windows files. Use GetFilesAttributes() in this case to check for file
6605 existence instead of returning with an error code.
6607 2011-08-01 Vincent Celier <celier@adacore.com>
6609 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6610 High is above Source length.
6612 2011-08-01 Robert Dewar <dewar@adacore.com>
6614 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6616 2011-08-01 Robert Dewar <dewar@adacore.com>
6618 * aspects.ads (Boolean_Aspects): New subtype.
6619 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6620 for derived types in cases where the parent type and derived type have
6622 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6623 with aspects when parent type also has aspects.
6624 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6625 boolean expression at this point).
6626 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6627 accordance with final decision on the Ada 2012 feature.
6628 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6630 2011-08-01 Matthew Heaney <heaney@adacore.com>
6632 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6634 2011-08-01 Pascal Obry <obry@adacore.com>
6636 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6637 Fix Replace_Slice when High is above current string size.
6638 (Replace_Slice): Fix DL computation when High is above current
6641 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6643 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6645 2011-08-01 Matthew Heaney <heaney@adacore.com>
6647 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6650 2011-08-01 Pascal Obry <obry@adacore.com>
6652 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6655 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6657 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6658 access to protected subprograms in generic bodies.
6659 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6660 protected type, indicate that the convention of the subprogram is
6661 Convention_Protected, because it may be used in subsequent declarations
6662 within the protected declaration.
6664 2011-08-01 Vincent Celier <celier@adacore.com>
6666 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6667 and "final" procedures when the name of the library is "ada", to avoid
6668 duplicate symbols "adainit" and "adafinal" in executables.
6670 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6672 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6673 quantified expression that appears within a postcondition and uses the
6674 Ada2012 'Result attribute.
6676 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6678 * init.c (__gnat_error_handler): Cast reason to int.
6679 (__gnat_install_handler): Explain sa_sigaction use.
6681 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6683 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6684 subprogram has copy-in copy-out parameters, try to promote the mode of
6685 the return type if it is passed in registers.
6687 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6689 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6690 left operand as addressable.
6692 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6694 * gcc-interface/gigi.h (build_function_stub): Remove.
6695 (build_return_expr): Likewise.
6696 (convert_vms_descriptor): Declare.
6697 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6698 (build_function_stub): Move to...
6699 * gcc-interface/utils2.c (build_return_expr): Move to...
6700 * gcc-interface/trans.c (build_function_stub): ...here.
6701 (build_return_expr): ...here.
6702 (Subprogram_Body_to_gnu): Add local variable for language_function.
6703 Disconnect the parameter attributes cache, if any, once done with it.
6704 Call end_subprog_body only after setting the end_locus.
6705 Build the stub associated with the function, if any, at the very end.
6706 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6707 variables and streamline control flow.
6709 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6712 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6715 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6718 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6719 Assign to act.sa_sigaction.
6720 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6721 current->return_address to char * before arithmetic.
6723 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6725 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6726 Correct argument types.
6727 Extract code from reason.
6728 (__gnat_install_handler): Assign to act.sa_sigaction.
6730 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6732 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6733 (GNAT1_OBJS): ...here.
6735 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6738 * g-socthi-mingw.adb (Fill): Fix formatting.
6740 * gcc-interface/gigi.h: Move around comment.
6742 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6745 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6747 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6750 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6752 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6754 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6755 range comparison if Pmode is SImode.
6757 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6758 Eric Botcazou <ebotcazou@adacore.com>
6760 * adadecode.c: Wrap up in extern "C" block.
6761 * adadecode.h: Likewise.
6762 * adaint.c: Likewise. Remove 'const' keyword.
6763 * adaint.h: Likewise.
6765 * atree.h: Likewise.
6767 * cstreams.c: Likewise.
6771 * final.c: Likewise.
6773 * initialize.c: Likewise.
6775 * namet.h: Likewise.
6776 * nlists.h: Likewise.
6777 * raise.c: Likewise.
6778 * raise.h: Likewise.
6779 * repinfo.h: Likewise.
6780 * seh_init.c: Likewise.
6781 * targext.c: Likewise.
6782 * tracebak.c: Likewise.
6783 * uintp.h: Likewise.
6784 * urealp.h: Likewise.
6785 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6786 * xsinfo.adb: Likewise.
6787 * xsnamest.adb: Likewise.
6788 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6789 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6790 * gcc-interface/misc.c: Likewise.
6791 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6792 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6793 ada/targext.o here...
6794 (GNAT_ADA_OBJS): ...and not here.
6795 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6796 (GNATBIND_OBJS): Reorder.
6798 2011-07-07 Richard Henderson <rth@redhat.com>
6800 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6801 dwarf2out_frame_init.
6803 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6805 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6807 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6810 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6812 2011-07-06 Richard Guenther <rguenther@suse.de>
6814 * gcc-interface/misc.c (gnat_init): Merge calls to
6815 build_common_tree_nodes and build_common_tree_nodes_2.
6816 Re-initialize boolean_false_node.
6818 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6819 Olivier Hainque <hainque@adacore.com>
6820 Nicolas Setton <setton@adacore.com>
6822 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6823 the type according to the ARTIFICIAL_P parameter.
6824 (create_type_decl): Likewise.
6825 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6827 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6829 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6830 (gnatbind): Likewise.
6832 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6834 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6836 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6838 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6839 local variable throughout. Remove useless call to Base_Type.
6840 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6841 Take it also into account for the volatileness of the field. Set the
6842 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6844 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6846 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6847 on a dereference built for a by-ref object if it has an address clause.
6849 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6851 * einfo.ads (Address_Taken): Document use for the second argument of
6852 Asm_Input and Asm_Output attributes.
6853 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6854 argument is an entity name, then set Address_Taken on it.
6855 <Attribute_Asm_Output>: Likewise.
6856 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6857 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6858 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6859 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6861 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6864 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6866 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6868 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6869 (ada/utils.o): Update dependencies.
6870 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6871 ../../../libcpp/libcpp.a.
6872 * gcc-interface/utils.c: Include common/common-target.h.
6873 (process_attributes): Use targetm_common.have_named_sections.
6875 2011-06-07 Richard Guenther <rguenther@suse.de>
6877 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6880 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6882 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6883 TREE_THIS_NOTRAP flag.
6885 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6887 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6890 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6892 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6893 constants whose full view has discriminants specially.
6895 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6897 * gcc-interface/utils.c: Include diagnostic.h.
6898 (gnat_write_global_declarations): Output debug information for all
6899 global type declarations before finalizing the compilation unit.
6900 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6902 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6904 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6906 2011-05-25 Kai Tietz <ktietz@redhat.com>
6908 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6909 initialization instead of const/none-const pointer assignment.
6911 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6913 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6914 $(EXTRA_GNAT1_OBJS).
6915 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6916 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6917 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6918 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6919 libcommon-target.a instead of prefix.o.
6921 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6924 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6926 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6928 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6929 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6930 instead of version.o.
6932 2011-05-18 Kai Tietz <ktietz@redhat.com>
6934 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6935 boolean_false_node instead of integer_zero_node.
6936 (convert_with_check): Likewise.
6937 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6939 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6941 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6942 type of the parameter is an unconstrained array, convert the actual to
6943 the type of the formal in the In Out and Out cases as well.
6945 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6947 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6948 call build_function_type_array or build_varargs_function_type_array
6950 (create_subprog_type): Don't call build_function_type; call
6951 build_function_type_vec instead.
6953 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6955 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6956 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6957 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6959 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6961 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6963 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6964 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6966 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6968 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6970 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6972 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6973 instead of accessing TYPE_ARG_TYPES directly.
6974 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6976 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6979 * gcc-interface/gigi.h (get_variant_part): Declare.
6980 * gcc-interface/decl.c (get_variant_part): Make global.
6981 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6982 types have the same constant size, are record types and T1 has a
6983 variant part while T2 doesn't.
6985 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6987 * gcc-interface/utils.c (begin_subprog_body): Do not call
6989 (end_subprog_body): Likewise.
6991 2011-05-04 Richard Guenther <rguenther@suse.de>
6993 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6995 (pos_to_constructor): Likewise.
6997 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6998 Eric Botcazou <ebotcazou@adacore.com>
7000 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7001 of build_function_type. Adjust calls to...
7002 (build_raise_check): ...this. Do not take a void_tree parameter.
7003 Call build_function_type_list instead of build_function_type.
7004 Fix head comment and swap couple of conditional blocks.
7006 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7008 * gnatvsn.ads (Library_Version): Bump to 4.7.
7009 (Current_Year): Bump to 2011.
7011 2011-04-29 Michael Matz <matz@suse.de>
7013 * gcc-interface/misc.c (gnat_handle_option): Set
7014 warn_maybe_uninitialized.
7016 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7018 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7019 the Watson/McCabe paper.
7021 2011-04-23 Jim Meyering <meyering@redhat.com>
7023 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7025 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7027 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7030 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7032 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7034 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7035 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7036 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7037 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7038 <all>: Do not set flags on the reused DECL node coming from an alias.
7039 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7040 don't need debug info here...
7041 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7042 (gigi): Adjust calls to create_subprog_decl.
7043 (build_raise_check): Likewise.
7044 (establish_gnat_vms_condition_handler): Likewise.
7045 (Compilation_Unit_to_gnu): Likewise.
7046 (gnat_to_gnu): Likewise.
7048 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7050 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7051 (NO_REORDER_ADAFLAGS): New variable.
7052 (EXTRA_GNATTOOLS): Always define.
7053 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7054 Clean up and adjust list of files compiled with special options.
7055 * gcc-interface/Make-lang.in: Likewise.
7056 (ada/decl.o): Cosmetical change.
7057 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7059 2011-04-20 Jim Meyering <meyering@redhat.com>
7061 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7063 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7065 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7066 $(CFLAGS) on the link line.
7068 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7070 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7071 padded type built for the return type if it is unconstrained.
7073 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7075 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7077 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7079 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7080 before calling TREE_CHAIN.
7081 * gcc-interface/misc.c (gnat_init_ts): New function.
7082 (LANG_HOOKS_INIT_TS): Define.
7084 2011-04-12 Martin Jambor <mjambor@suse.cz>
7086 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7087 instead of cgraph_node.
7089 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7091 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7092 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7095 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7097 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7098 of aggregate types that contain a placeholder.
7100 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7102 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7104 (handle_type_generic_attribute): Likewise.
7106 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7109 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7111 2011-04-04 Kai Tietz <ktietz@redhat.com>
7114 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7117 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7119 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7120 type case, do not strip a padding type around the array type.
7122 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7124 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7127 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7129 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7130 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7131 code for -feliminate-unused-debug-types.
7132 (gnat_post_options): Likewise.
7134 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7136 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7137 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7140 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7142 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7143 DECL_ARTIFICIAL flag on enumeration types.
7145 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7147 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7148 fat pointer types artificial unconditionally.
7149 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7152 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7154 * gcc-interface/gigi.h (get_dummy_type): Declare.
7155 (build_dummy_unc_pointer_types): Likewise.
7156 (finish_fat_pointer_type): Likewise.
7157 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7158 fat pointer type has been built, complete it in place.
7159 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7160 and thin pointers. Remove useless variable.
7161 (finish_fat_pointer_type): Make global and move to...
7162 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7163 (get_dummy_type): New function.
7164 (build_dummy_unc_pointer_types): Likewise.
7165 (gnat_pushdecl): Propage the name to the anonymous variants only.
7166 (update_pointer_to): Only adjust the pointer types in the unconstrained
7169 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7171 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7172 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7173 if this is a Taft amendment type and the full declaration is available.
7174 * gcc-interface/trans.c (process_type): Likewise.
7175 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7176 (process_freeze_entity): Likewise.
7177 * gcc-interface/utils.c (dummy_global): New static variable.
7178 (gnat_write_global_declarations): If there are types declared as used
7179 at the global level, insert them in the global hash table.
7181 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7183 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7184 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7185 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7187 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7188 flag of the type accordingly.
7189 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7191 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7193 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7194 finalizing types when updating the pointers to the designated type.
7195 <all>: Finalize the deferred types even if we didn't defer processing
7196 of incomplete types in this invocation.
7198 2011-04-01 Olivier Hainque <hainque@adacore.com>
7199 Nicolas Setton <setton@adacore.com>
7200 Eric Botcazou <ebotcazou@adacore.com>
7202 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7203 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7205 2011-03-28 Kai Tietz <ktietz@redhat.com>
7207 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7209 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7210 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7212 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7214 2011-03-28 Tristan Gingold <gingold@adacore.com>
7217 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7218 Use ada output of gnatbind.
7219 (ada/b_gnatb.adb): Ditto.
7220 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7221 (ada.mostlyclean, ada.stage1)
7222 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7223 (ada.stagefeedback): Adjust.
7224 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7225 Use ada output of gnatbind.
7226 (b_gnatm.adb): Ditto.
7227 (b_gnatl.o, b_gnatm.o): New rules.
7229 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7231 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7232 for the padded type built to support a specified size or alignment.
7234 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7236 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7237 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7238 unconditionally to the end of the unit when the designated type is
7240 <all>: Rename local variable. Attempt to un-defer types only and do it
7241 for limited_with'ed types as well.
7242 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7243 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7244 consistently and remove redundant call to finalize_from_with_types.
7246 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7248 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7249 subprograms without a previous spec declared in the same unit.
7250 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7251 subprograms at the end of the unit instead of at the beginning.
7252 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7253 isn't public for the special handling of non-inline functions nested
7254 inside inline external functions.
7256 2011-03-25 Jeff Law <law@redhat.com>
7258 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7260 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7262 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7263 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7264 to compute Set_Size_Depends_On_Discriminant.
7265 (Layout_Type): Call it on array types in back-end layout mode.
7266 * sem_util.adb (Requires_Transient_Scope): Return true for array
7267 types only if the size depends on the value of discriminants.
7268 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7269 type if the RHS is a call to a function that returns an unconstrained
7270 type with default discriminant.
7272 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7274 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7275 non-conversion to the nominal result type at the end.
7277 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7279 * gcc-interface/trans.c (create_temporary): New function taken from...
7280 (create_init_temporary): ...here. Call it.
7281 (call_to_gnu): Create the temporary for the return value early, if any.
7282 Create it for a function with copy-in/copy-out parameters if there is
7283 no target; in other cases of copy-in/copy-out, use another temporary.
7284 Push the new binding level lazily. Add and rename local variables.
7286 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7288 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7290 (set_rm_size): Likewise.
7292 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7294 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7295 for the padded type built in order to support a specified alignment.
7296 Fix incorrect formatting.
7298 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7301 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7303 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7305 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7306 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7307 to the end of the list. Adjust recursive call. Rename local variable.
7308 If REORDER is true, reorder components of the record type.
7309 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7310 components_to_record and adjust the parameter list.
7312 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7314 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7315 disabled, use the variable for bounds of loop iteration scheme.
7317 2011-03-21 Kai Tietz <ktietz@redhat.com>
7320 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7322 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7324 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7325 out whether the expression is read-only. Short-circuit placeholder
7326 case and rename a couple of local variables.
7328 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7330 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7331 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7332 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7333 (convert): Deal with conversions from a smaller form type specially.
7335 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7337 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7338 its argument, except for the special -I- switch.
7340 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7342 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7345 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7347 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7349 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7351 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7353 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7354 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7355 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7356 Do not generate the check directly, instead instantiate the template
7357 check present in the descriptor.
7358 (make_descriptor_field): Move around.
7359 (build_vms_descriptor32): Build a template check in the POINTER field.
7360 (build_vms_descriptor): Remove useless suffixes.
7361 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7363 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7366 * targext.c: Include target files if IN_RTS is defined.
7368 2011-01-26 Richard Guenther <rguenther@suse.de>
7371 * targext.c: Include config.h.
7372 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7375 2011-01-04 Pascal Obry <obry@adacore.com>
7376 Eric Botcazou <ebotcazou@adacore.com>
7378 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7380 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7382 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7383 end-of-case on the end label and its associated gotos, if any.
7385 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7387 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7388 expressions of the parameter cache within the statement group of
7391 2011-01-04 Olivier Hainque <hainque@adacore.com>
7392 Eric Botcazou <ebotcazou@adacore.com>
7394 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7395 (set_end_locus_from_node): New function.
7396 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7397 make and the function end_locus.
7398 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7399 for the elaboration subprogram.
7400 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7401 set the end_locus of the expression as well.
7403 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7406 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7407 variables that are referenced in exception handlers volatile.
7411 Copyright (C) 2011 Free Software Foundation, Inc.
7413 Copying and distribution of this file, with or without modification,
7414 are permitted in any medium without royalty provided the copyright
7415 notice and this notice are preserved.
7417 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7418 - fix bugs in the description of Source_Trace;
7419 - get rid of UNIT_NAME;
7421 2011-08-02 Javier Miranda <miranda@adacore.com>
7424 (Build_Dispatching_Requeue): Adding support for VM targets
7425 since we cannot directly reference the Tag entity.
7426 * exp_sel.adb (Build_K): Adding support for VM targets.
7427 (Build_S_Assignment): Adding support for VM targets.
7429 (Default_Prim_Op_Position): In VM targets do not restrict availability
7430 of predefined interface primitives to compiling in Ada 2005 mode.
7431 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7432 restricted to compiling in Ada 2005 mode.
7433 (Make_VM_TSD): Generate code that declares and initializes the OSD
7434 record. Needed to support dispatching calls through synchronized
7437 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7438 primitives associated with synchronized interfaces.
7439 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7440 primitives associated with synchronized interfaces.
7442 2011-08-02 Yannick Moy <moy@adacore.com>
7444 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7445 statements hidden in SPARK if preceded by the HIDE directive
7446 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7447 exception handlers as hidden in SPARK if preceded by the HIDE directive
7448 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7449 if starting with the HIDE directive
7450 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7451 starting with the HIDE directive; mark the declarations in a private
7452 part as hidden in SPARK if the private part starts with the HIDE
7454 * restrict.adb, restrict.ads
7455 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7456 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7457 argument node belongs to a part which is hidden in SPARK
7458 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7459 parts in SPARK; protect the possibly costly call to
7460 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7461 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7462 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7463 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7465 (Scan): recognize special comment starting with '#' and followed by
7466 SPARK keyword "hide" as a HIDE directive.
7468 2011-08-02 Yannick Moy <moy@adacore.com>
7470 * types.ads, erroutc.ads: Minor reformatting.
7472 2011-08-02 Vincent Celier <celier@adacore.com>
7474 * link.c: Add response file support for cross platforms.
7476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7478 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7479 in an association, set parent field of copy before partial analysis.
7480 * sem_res.adb (Resolve_Slice): create reference to itype only when
7481 expansion is enabled.
7483 2011-08-02 Yannick Moy <moy@adacore.com>
7485 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7486 for new flag denoting which subprogram bodies are in ALFA
7487 * restrict.adb, sem_ch7.adb: Update comment
7488 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7489 sem_ch9.adb, sem_res.adb: Add calls to
7490 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7491 * sem_ch6.adb (Analyze_Function_Return): add calls to
7492 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7493 middle of the body, and extended return.
7494 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7495 False when missing return.
7496 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7497 to True for subprograms whose spec is in ALFA. Remove later on the flag
7498 on the entity used for a subprogram body when there exists a separate
7500 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7501 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7502 False, otherwise do nothing.
7504 2011-08-02 Robert Dewar <dewar@adacore.com>
7506 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7508 2011-08-02 Yannick Moy <moy@adacore.com>
7510 * sem_ch4.ads: minor formatting.
7512 2011-08-02 Yannick Moy <moy@adacore.com>
7514 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7515 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7516 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7517 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7518 opt.ads: cleanup of SPARK mode
7520 2011-08-02 Yannick Moy <moy@adacore.com>
7522 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7524 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7525 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7527 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7528 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7529 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7530 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7532 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7534 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7535 functions whose return type is not in ALFA.
7536 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7538 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7539 parameter's type is not in ALFA.
7540 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7543 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7545 * sem_ch6 (Analyze_Expression_Function): treat the function as
7546 Inline_Always, and introduce a subprogram declaration for it when it is
7548 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7549 expression functions, so that the back-end can determine whether they
7550 can in fact be inlined.
7551 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7552 a function body comes from an expression function.
7554 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7556 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7557 null exclusions to test Can_Never_Be_Null on the anonymous access types
7558 of the formals rather than testing the formals themselves. Exclude this
7559 check in cases where the Old_Formal is marked as a controlling formal,
7560 to avoid issuing spurious errors for bodies completing dispatching
7561 operations (due to the flag not getting set on controlling access
7562 formals in body specs).
7563 (Find_Corresponding_Spec): When checking full and subtype conformance of
7564 subprogram bodies in instances, pass Designated and E in that order, for
7565 consistency with the expected order of the formals (New_Id followed by
7568 2011-08-02 Robert Dewar <dewar@adacore.com>
7570 * sem_ch8.adb: Minor reformatting.
7572 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7574 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7575 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7576 primitive operations of class-wide actuals.
7578 2011-08-02 Javier Miranda <miranda@adacore.com>
7580 * exp_atag.ads, exp_atag.adb
7581 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7582 since its value is implicitly passed in argument Typ.
7583 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7584 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7585 Build_Common_Dispatching_Select_Statements.
7587 2011-08-02 Robert Dewar <dewar@adacore.com>
7589 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7590 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7593 2011-08-02 Robert Dewar <dewar@adacore.com>
7595 * sem_res.adb: Minor reformatting.
7596 * sem_prag.adb: Minor reformatting.
7598 2011-08-02 Javier Miranda <miranda@adacore.com>
7600 * exp_atag.adb, exp_atags.ads
7601 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7602 by the tagged type Entity. Required to use this routine in the VM
7603 targets since we do not have available the Tag entity in the VM
7606 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7607 Ada.Tags has not been previously loaded.
7609 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7610 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7612 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7613 view of enclosing scopes. Required to handle enclosing scopes that
7614 are synchronized types whose full view is a task type.
7616 (Build_VM_TSDs): Minor code improvement to avoid generating and
7617 analyzing lists with empty nodes.
7618 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7619 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7620 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7621 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7622 (Make_Select_Specific_Data_Table): Add support for VM targets.
7623 (Make_VM_TSD): Generate code to initialize the SSD structure of
7626 2011-08-02 Yannick Moy <moy@adacore.com>
7628 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7629 cross-references section in ALI.
7630 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7631 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7633 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7634 subprogram or package entity of a node
7635 (Is_Local_Reference_Type): new function returns True for references
7636 selected in local cross-references.
7637 (Lt): function extracted from Lt in Output_References
7638 (Write_Entity_Name): function extracted from Output_References
7639 (Generate_Definition): generate reference with type 'D' for definition
7640 of objects (object declaration and parameter specification), with
7641 appropriate locations and units, for use in local cross-references.
7642 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7643 references of type 'I' for initialization in object definition.
7644 (Output_References): move part of function Lt and procedure
7645 Write_Entity_Name outside of the body. Ignore references of types 'D'
7646 and 'I' introduced for local cross-references.
7647 (Output_Local_References): new procedure to output the local
7648 cross-references sections.
7649 (Lref_Entity_Status): new array defining whether an entity is a local
7650 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7651 with 'I' type when initialization expression is present.
7652 * get_scos.adb, get_scos.ads: Correct comments and typos
7654 2011-08-02 Javier Miranda <miranda@adacore.com>
7656 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7658 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7660 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7663 2011-08-02 Vincent Celier <celier@adacore.com>
7665 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7666 (No_Space_Img): New function
7667 (Find_Excluded_Sources): When reading from a file, record the file name
7668 and the line number for each excluded source.
7669 (Mark_Excluded_Sources): When reporting an error, if the excluded
7670 sources were read from a file, include file name and line number in
7673 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7675 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7677 2011-08-02 Robert Dewar <dewar@adacore.com>
7679 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7681 2011-08-02 Javier Miranda <miranda@adacore.com>
7683 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7684 generation of TSDs to the DOTNET compiler.
7685 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7686 generation of TSDs to the DOTNET compiler.
7688 2011-08-02 Javier Miranda <miranda@adacore.com>
7690 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7691 record of all the tagged types declared inside library level package
7692 declarations, library level package bodies or library level subprograms.
7693 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7694 associated with a given tagged type.
7695 (Build_VM_TSDs): New subprogram.
7696 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7697 compilation units that are subprograms.
7698 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7699 compilation units that are package bodies.
7700 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7701 units that are a package declaration or a package instantiation.
7702 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7703 reorganization to improve the error generated by the frontend when the
7704 function Ada.Tags.Secondary_Tag is not available.
7705 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7706 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7708 2011-08-02 Javier Miranda <miranda@adacore.com>
7710 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7712 2011-08-02 Robert Dewar <dewar@adacore.com>
7714 * s-imenne.ads: Minor reformatting.
7716 2011-08-02 Robert Dewar <dewar@adacore.com>
7718 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7719 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7720 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7722 2011-08-02 Robert Dewar <dewar@adacore.com>
7724 * einfo.ads (Materialize_Entity): Document this is only for renamings
7725 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7726 required debug information in the case where we transform the object
7727 declaration into a renaming declaration.
7728 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7730 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7733 2011-08-02 Robert Dewar <dewar@adacore.com>
7735 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7736 Suppress_Init_Procs.
7737 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7738 Suppress_Initialization/Initialization_Suppressed.
7739 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7740 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7741 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7742 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7744 2011-08-02 Robert Dewar <dewar@adacore.com>
7746 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7751 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7752 only have inheritable classwide pre/postconditions.
7754 2011-08-02 Javier Miranda <miranda@adacore.com>
7756 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7757 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7758 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7759 checks if the external tag of a type is the same as the external tag
7760 of some other declaration.
7762 2011-08-02 Thomas Quinot <quinot@adacore.com>
7764 * s-taskin.ads: Minor reformatting.
7766 2011-08-02 Emmanuel Briot <briot@adacore.com>
7768 * g-comlin.adb (Display_Help): swap the order in which it prints the
7769 short help and the general usage.
7771 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7773 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7774 the aspect declarations and attach them to the generic copy for
7775 subsequent analysis.
7776 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7777 declarations of the generic tree to the new subprogram declarations.
7778 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7779 conditions that apply to a subprogram instance.
7781 2011-08-02 Robert Dewar <dewar@adacore.com>
7783 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7785 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7787 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7788 private type with a tagged full view is not derived in the immediate
7789 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7791 2011-08-02 Robert Dewar <dewar@adacore.com>
7793 * exp_ch4.adb: Minor reformatting.
7795 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7797 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7798 Ada2012 iterator, the loop will be rewritten during expansion into a
7799 while loop with a cursor and an element declaration. Do not analyze the
7800 body in this case, because if the container is for indefinite types the
7801 actual subtype of the elements will only be determined when the cursor
7802 declaration is analyzed.
7804 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7806 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7807 size/alignment related attributes in CodePeer_Mode.
7809 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7811 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7812 Prepend_Element, since this can result in the operation getting the
7813 wrong slot in the full type's dispatch table if the full type has
7814 inherited operations. The incomplete type's operation will get added
7815 to the proper position in the full type's primitives
7816 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7817 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7818 dispatching operations, since there are cases where nonprimitive
7819 subprograms can get added to the list of incomplete dependents (such
7820 as subprograms in nested packages).
7821 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7822 private part when determining whether to add a primitive with a
7823 parameter of a tagged incomplete type to the Private_Dependents list.
7824 Such primitives can also occur in the visible part, and should not have
7825 been excluded from being private dependents.
7826 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7827 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7828 list of a Taft-amendment incomplete type is a primitive before issuing
7829 an error that the full type must appear in the same unit. There are
7830 cases where nonprimitives can be in the list (such as subprograms in
7832 * sem_disp.adb (Derives_From): Use correct condition for checking that
7833 a formal's type is derived from the type of the corresponding formal in
7834 the parent subprogram (the condition was completely wrong). Add
7835 checking that was missing for controlling result types being derived
7836 from the result type of the parent operation.
7838 2011-08-02 Yannick Moy <moy@adacore.com>
7840 * errout.adb (First_Node): minor renaming
7841 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7844 2011-08-02 Yannick Moy <moy@adacore.com>
7846 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7847 before accessing operands.
7848 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7849 decide whether an initialization expression respects SPARK rules, as
7850 the plain node is the expanded one. This allows for more valid warnings
7852 * gnat_rm.texi: Minor update.
7854 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7856 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7859 2011-08-02 Robert Dewar <dewar@adacore.com>
7861 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7863 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7865 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7866 loop statements and the element renaming declaration with a block when
7867 the element type is controlled.
7869 2011-08-02 Yannick Moy <moy@adacore.com>
7871 * sinfo.ads: Minor formatting.
7873 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7875 * sem_aggr.adb (Add_Association): if the association has a box and no
7876 expression, use the Sloc of the aggregate itself for the new
7878 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7881 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7883 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7884 When a container is provided via a function call, generate a renaming
7885 of the function result. This avoids the creation of a transient scope
7886 and the premature finalization of the container.
7887 * exp_ch7.adb (Is_Container_Cursor): Removed.
7888 (Wrap_Transient_Declaration): Remove the supression of the finalization
7889 of the list controller when the declaration denotes a container cursor,
7892 2011-08-02 Yannick Moy <moy@adacore.com>
7894 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7895 node is from source, instead of the original node being from source.
7897 (Resolve_Array_Aggregate): refine the check for a static expression, to
7898 recognize also static ranges
7899 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7900 Array_Type_Declaration): postpone the test for the type being a subtype
7901 mark after the type has been resolved, so that component-selection and
7902 expanded-name are discriminated.
7903 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7904 to distinguish the case of an iteration scheme, so that an error is
7905 issed on a non-static range in SPARK except in an iteration scheme.
7906 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7907 In_Iter_Schm = True.
7908 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7909 user-defined operators so that they are allowed in renaming
7911 (Find_Selected_Component): refine the check for prefixing of operators
7912 so that they are allowed in renaming. Move the checks for restrictions
7913 on selector name after analysis discriminated between
7914 component-selection and expanded-name.
7915 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7916 concatenation argument of string type if it is static.
7917 * sem_util.adb, sem_util.ads
7918 (Check_Later_Vs_Basic_Declarations): add a new function
7919 Is_Later_Declarative_Item to decice which declarations are allowed as
7920 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7921 mode, add that renamings are considered as later items.
7922 (Enclosing_Package): new function to return the enclosing package
7923 (Enter_Name): correct the rule for homonyms in SPARK
7924 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7925 from source (result of expansion) to avoid issuing wrong warnings.
7927 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7929 * errout.adb: On anything but an expression First_Node returns its
7932 2011-08-02 Pascal Obry <obry@adacore.com>
7934 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7936 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7938 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7939 Set the associated loop as the related expression of internally
7941 * exp_ch7.adb (Is_Container_Cursor): New routine.
7942 (Wrap_Transient_Declaration): Supress the finalization of the list
7943 controller when the declaration denotes a container cursor.
7945 2011-08-02 Yannick Moy <moy@adacore.com>
7947 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7949 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7950 expression is a simple expression. This check cannot be performed in
7951 the semantics, so just drop it.
7952 (P_Index_Or_Discriminant_Constraint): move check that the index or
7953 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7954 semantics. Other cases were previously checked in the semantics.
7955 * par-ch4.adb (P_Name): move checks that a selector name is not
7956 character literal or an operator symbol to Find_Selected_Component in
7958 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7959 declarations are not placed after later declarations in a separate
7960 procedure in Sem_Util (possibly not the best choice?), to be used both
7961 during parsing, for Ada 83 mode, and during semantic analysis, for
7963 * par-endh.adb (Check_End): move check that end label is not missing
7964 to Process_End_Label in the semantics
7965 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7966 the special case for SPARK restriction
7967 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7968 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7969 parameter Force to issue the error message even on internal node (used
7970 for generated end label). Call Check_Restriction to check when an error
7971 must be issued. In SPARK mode, issue an error message even if the
7972 restriction is not set.
7973 (Check_Restriction): new procedure with an additional out parameter to
7974 inform the caller that a message has been issued
7975 * sem_aggr.adb: Minor modification of message
7976 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7977 instead of issuing an error message directly
7978 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7979 declarations are not placed after later declarations, by calling
7980 Check_Later_Vs_Basic_Declarations
7981 (Analyze_Subtype_Declaration): move here the check that an index or
7982 discriminant constraint must be a subtype mark. Change the check that
7983 a subtype of String must start at one so that it works on subtype marks.
7984 * sem_ch4.adb (Analyze_Call): move here the check that a named
7985 association cannot follow a positional one in a call
7986 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7987 instead of issuing an error message directly
7988 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7989 selector name is not a character literal or an operator symbol. Move
7990 here the check that the prefix of an expanded name cannot be a
7991 subprogram or a loop statement.
7992 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7993 procedure called from parsing and semantics to check that basic
7994 declarations are not placed after later declarations
7995 (Process_End_Label): move here the check that end label is not missing
7997 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7999 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8000 representation clause in codepeer mode, since it confuses CodePeer and
8001 does not bring useful info.
8003 2011-08-02 Ed Falis <falis@adacore.com>
8005 * init.c: initialize fp hw on MILS.
8007 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8009 * errout.adb (First_Node): for bodies, return the node itself (small
8010 optimization). For other nodes, do not check source_unit if the node
8011 comes from Standard.
8013 2011-08-02 Robert Dewar <dewar@adacore.com>
8015 * exp_ch3.adb: Minor comment additions.
8016 * sem_ch13.adb: Minor reformatting.
8018 2011-08-02 Pascal Obry <obry@adacore.com>
8020 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8022 2011-08-02 Robert Dewar <dewar@adacore.com>
8024 * sem_attr.adb: Minor reformatting.
8026 2011-08-02 Robert Dewar <dewar@adacore.com>
8028 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8029 (Has_Default_Component_Value): Removed
8030 * einfo.ads Comment updates
8031 (Has_Default_Aspect): Replaces Has_Default_Value
8032 (Has_Default_Component_Value): Removed
8034 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8036 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8037 (Get_Simple_Init_Val): Handle Default_Value aspect
8038 (Needs_Simple_Initialization): Handle Default_Value aspect
8039 * exp_ch3.ads: Needs_Simple_Initialization
8040 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8041 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8043 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8044 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8045 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8047 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8049 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8050 package containing iteration primitives.
8051 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8053 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8055 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8056 "of", pre-analyze expression in case it is a function call with
8057 finalization actions that must be placed ahead of the loop.
8058 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8059 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8061 2011-08-02 Geert Bosch <bosch@adacore.com>
8063 * cstand.adb (Create_Float_Types): Only consider C's long double for
8064 Long_Long_Float, in addition to double.
8066 2011-08-02 Robert Dewar <dewar@adacore.com>
8068 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8069 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8070 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8075 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8078 2011-08-02 Javier Miranda <miranda@adacore.com>
8080 * einfo.ads, einfo.adb
8081 (Original_Access_Type): Move this attribute to Node26 since there was
8082 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8083 which causes conflicts and breaks the generation of the .NET compiler.
8084 (Interface_Name): Add missing documentation on JGNAT only uses of
8087 2011-08-02 Geert Bosch <bosch@adacore.com>
8089 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8090 (Find_Back_End_Float_Type): Likewise
8091 (Create_Back_End_Float_Types): Likewise
8092 (Create_Float_Types): Likewise
8093 (Register_Float_Type): Likewise
8094 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8095 Nlist and split out type selection in new local Find_Base_Type function.
8096 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8098 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8100 2011-08-02 Robert Dewar <dewar@adacore.com>
8102 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8104 * opt.ads: Minor comment change.
8105 * sem_ch12.adb: Minor code reorganization.
8107 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8109 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8110 subtype's list of rep items to the list on the full subtype in the case
8111 where the lists are the same.
8113 2011-08-02 Geert Bosch <bosch@adacore.com>
8115 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8116 using the one from System.Strings, which also deallocates all strings.
8118 2011-08-02 Geert Bosch <bosch@adacore.com>
8120 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8122 * gcc-interface/Make-lang.in: Update dependencies.
8124 2011-08-02 Olivier Hainque <hainque@adacore.com>
8126 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8129 2011-08-02 Javier Miranda <miranda@adacore.com>
8131 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8132 associated with anonymous access to subprograms.
8134 2011-08-02 Geert Bosch <bosch@adacore.com>
8137 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8138 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8139 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8140 (Add_Symbol_Definition): Move to switch-c.adb
8141 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8142 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8143 (Add_Symbol_Definition): Move to switch-c.adb.
8144 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8146 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8148 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8149 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8151 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8152 (Add_Symbol_Definition): Moved from Prepcomp.
8153 * switch-c.ads: Update copyright notice. Use String_List instead of
8154 Argument_List, removing dependency on System.OS_Lib.
8156 2011-08-02 Yannick Moy <moy@adacore.com>
8158 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8159 mode on initialization expression which does not respect SPARK
8161 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8162 if the tree referenced by its argument represents an initialization
8163 expression in SPARK, suitable for initializing an object in an object
8166 2011-08-02 Javier Miranda <miranda@adacore.com>
8168 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8169 internally generated access to subprogram with its associated protected
8171 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8173 2011-08-02 Geert Bosch <bosch@adacore.com>
8175 * cstand.adb (Register_Float_Type): Print information about type to
8176 register, if the Debug_Flag_Dot_B is set.
8177 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8178 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8179 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8180 with a requested precision of more than Max_Digits digits and no more
8181 than Max_Base_Digits digits, if a range specification is present and the
8182 Predefined_Float_Types list has a suitable type to derive from.
8183 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8184 case of type completion with pragma Import
8186 (Process_Import_Predefined_Type): Processing to complete a type
8187 with pragma Import. Currently supports floating point types only.
8188 (Set_Convention_From_Pragma): Do nothing without underlying type.
8189 (Process_Convention): Guard against absence of underlying type,
8190 which may happen when importing incomplete types.
8191 (Process_Import_Or_Interface): Handle case of importing predefined
8192 types. Tweak error message.
8194 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8196 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8197 functions to previous change. Reorganize code slightly.
8199 2011-08-02 Geert Bosch <bosch@adacore.com>
8201 * back_end.ads (Register_Type_Proc): New call back procedure type for
8202 allowing the back end to provide information about available types.
8203 (Register_Back_End_Types): New procedure to register back end types.
8204 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8206 * cstand.adb (Back_End_Float_Types): New list for floating point types
8207 supported by the back end.
8208 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8209 (Copy_Float_Type): New procedure to make new copies of predefined types.
8210 (Register_Float_Type): New call back procedure to populate the BEFT list
8211 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8212 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8213 (Create_Float_Types): New procedure to create entities for floating
8214 point types predefined in Standard, and put these and any remaining
8215 BEFTs on the Predefined_Float_Types list.
8216 * stand.ads (Predefined_Float_Types): New list for predefined floating
8217 point types that do not have declarations in package Standard.
8219 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8221 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8222 entity node for the unit containing the parameter.
8223 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8224 (Add_Inlined_Subprogram): Likewise.
8225 * gcc-interface/Make-lang.in: Update dependencies.
8227 2011-08-02 Thomas Quinot <quinot@adacore.com>
8229 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8232 2011-08-02 Geert Bosch <bosch@adacore.com>
8234 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8236 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8238 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8239 computed value of Base_Type.
8241 2011-08-02 Yannick Moy <moy@adacore.com>
8243 * restrict.adb (Check_Restriction): issue an error for any use of
8244 class-wide, even if the No_Dispatch restriction is not set.
8245 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8246 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8247 when completing a private extension, the type named in the private part
8248 is not the same as that named in the visible part.
8249 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8250 of an inherited primitive operations of a tagged type or type extension
8251 that returns the tagged type.
8252 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8253 function which returns True for an implicit operation inherited by the
8254 derived type declaration for the argument type.
8255 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8258 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8260 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8261 Process_Bounds, to perform analysis with expansion of a range or an
8262 expression that is the iteration scheme for a loop.
8263 (Analyze_Iterator_Specification): If domain of iteration is given by a
8264 function call with a controlled result, as is the case if call returns
8265 a predefined container, ensure that finalization actions are properly
8267 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8269 2011-08-02 Javier Miranda <miranda@adacore.com>
8271 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8272 * gcc-interface/Make-lang.in: Update dependencies.
8274 2011-08-02 Javier Miranda <miranda@adacore.com>
8276 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8277 determine if the analysis is performed using N or Original_Node (N).
8278 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8279 functionality of routine Is_Variable avoids code duplication.
8280 * checks.adb (Determine_Range): Handle temporaries generated by
8281 Remove_Side_Effects.
8283 2011-08-02 Javier Miranda <miranda@adacore.com>
8285 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8286 expansion of the condition. Required since the previous analysis was
8287 done with expansion disabled (see Resolve_Quantified_Expression) and
8288 hence checks were not inserted and record comparisons have not been
8291 2011-08-02 Ed Falis <falis@adacore.com>
8293 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8296 2011-08-02 Bob Duff <duff@adacore.com>
8298 * opt.ads: Minor comment fix.
8300 2011-08-02 Bob Duff <duff@adacore.com>
8302 * sem_ch12.adb (Analyze_Package_Instantiation,
8303 Analyze_Subprogram_Instantiation): Turn off style checking while
8304 analyzing an instance. Whatever style checks that apply to the generic
8305 unit should apply, so it makes no sense to apply them in an instance.
8306 This was causing trouble when compiling an instance of a runtime
8307 unit that violates the -gnatyO switch.
8308 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8309 one of the two case statements, causing spurious errors.
8311 2011-08-02 Robert Dewar <dewar@adacore.com>
8313 * uname.adb: Minor reformatting.
8314 * gnatcmd.adb: Minor reformatting.
8315 * exp_attr.adb: Minor reformatting.
8317 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8319 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8320 No_Dispatching_Calls, do not look for the Assign primitive, because
8321 predefined primitives are not created in this case.
8323 2011-08-02 Bob Duff <duff@adacore.com>
8325 * stylesw.ads: Minor comment fixes.
8327 2011-08-02 Robert Dewar <dewar@adacore.com>
8329 * freeze.adb (Add_To_Result): New procedure.
8331 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8333 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8334 time, if the specific run-time routines for handling streams of strings
8335 are not available, use the default mechanism.
8337 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8339 * s-regpat.ads: Fix typo.
8341 2011-08-02 Vincent Celier <celier@adacore.com>
8343 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8344 not null, call it to create the in memory config project file without
8345 parsing an existing default config project file.
8347 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8349 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8351 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8353 * sem_elim.adb: an abstract subprogram does not need an eliminate
8354 pragma for its descendant to be eliminable.
8356 2011-08-02 Ed Falis <falis@adacore.com>
8358 * init.c: revert to handling before previous checkin for VxWorks
8359 * s-intman-vxworks.adb: delete unnecessary declarations related to
8360 using Ada interrupt facilities for handling signals.
8361 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8362 * s-intman-vxworks.ads: Import __gnat_install_handler as
8363 Initialize_Interrupts.
8364 * s-taprop-vxworks.adb: Delete Signal_Mask.
8365 (Abort_Handler): change construction of mask to unblock exception
8368 2011-08-02 Jerome Guitton <guitton@adacore.com>
8370 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8371 Debug_Raise_Exception before propagation starts.
8373 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8375 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8376 to Restriction_Check_Required.
8377 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8378 * sem_res.adb (Resolve_Call): Likewise.
8379 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8381 2011-08-02 Bob Duff <duff@adacore.com>
8383 * stylesw.ads: Update comment.
8384 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8385 * errout.ads: Remove obsolete comment.
8387 2011-08-02 Javier Miranda <miranda@adacore.com>
8389 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8390 (Set_Is_Safe_To_Reevaluate): new procedure.
8391 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8392 assignment is allowed on safe-to-reevaluate variables.
8393 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8394 temporary created to remove side effects in expressions that use
8395 the secondary stack as safe-to-reevaluate.
8396 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8397 variables that are not true constants.
8399 2011-08-02 Robert Dewar <dewar@adacore.com>
8401 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8402 sem_res.adb, sem_ch6.adb: Minor reformatting.
8404 2011-08-02 Jerome Guitton <guitton@adacore.com>
8406 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8408 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8410 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8411 not set Overridden_Operation if subprogram is an initialization
8414 2011-08-02 Yannick Moy <moy@adacore.com>
8416 * par-ch6.adb: Correct obsolete name in comments
8417 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8418 which takes two message arguments (existing function takes one), with
8419 second message used for continuation.
8420 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8421 block statements that originate from a source block statement, not
8422 generated block statements
8423 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8424 symmetry with procedure case
8425 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8426 function to issue an error in formal mode if a package specification
8427 contains more than one tagged type or type extension.
8428 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8429 parameters matching formals of tagged types are objects (or ancestor
8430 type conversions of objects), not general expressions. Issue an error
8431 on view conversions that are not involving ancestor conversion of an
8433 (Resolve_Type_Conversion): in formal mode, issue an error on the
8434 operand of an ancestor type conversion which is not an object
8435 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8436 procedure so that it works also for actuals of function calls
8437 (Is_Actual_Tagged_Parameter): new function which determines if its
8438 argument is an actual parameter of a formal of tagged type in a
8440 (Is_SPARK_Object_Reference): new function which determines if the tree
8441 referenced by its argument represents an object in SPARK
8443 2011-08-02 Robert Dewar <dewar@adacore.com>
8445 * sem_ch3.adb: Minor reformatting
8446 Minor comment addition
8447 Minor error msg text change
8449 2011-08-02 Javier Miranda <miranda@adacore.com>
8451 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8452 function. Used to be more precise when we generate a variable plus one
8453 assignment to remove side effects in the evaluation of the Bound
8455 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8456 of the bound expression to force its re-analysis and thus expand the
8457 associated transient scope (if required). Code cleanup replacing the
8458 previous code that declared the constant entity by an invocation to
8459 routine Force_Evaluation which centralizes this work in the frontend.
8461 2011-08-02 Robert Dewar <dewar@adacore.com>
8463 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8464 (Base_Type): Now uses improved Is_Base_Type function
8465 * einfo.ads (Base_Type): Inline this function
8467 2011-08-02 Robert Dewar <dewar@adacore.com>
8469 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8470 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8472 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8474 * gcc-interface/Make-lang.in: Update dependencies.
8475 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8478 2011-08-02 Yannick Moy <moy@adacore.com>
8480 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8481 non-simple expression used in delta constraint
8482 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8483 index constraint which is not a subtype mark
8484 * par.adb: With and use Restrict
8485 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8486 mode on component type which is not a subtype mark and default
8487 expression on component
8488 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8489 of string which does not have a lower index bound equal to 1
8490 (Array_Type_Declaration): issue an error in formal mode on index or
8491 component type which is not a subtype mark, and on aliased keyword on
8493 (Derived_Type_Declaration): issue an error in formal mode on interface,
8494 limited or abstract type
8495 (Record_Type_Declaration): issue an error in formal mode on interface
8496 (Record_Type_Definition): issue an error in formal mode on tagged types
8497 and type extensions not declared in the specification of a library unit
8498 package; on null non-tagged record; on variant part
8500 2011-08-02 Vincent Celier <celier@adacore.com>
8502 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8503 not declared for qualified library project when Library_Name is not
8504 declared, but Library_Dir is.
8506 2011-08-02 Robert Dewar <dewar@adacore.com>
8508 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8509 pragmas (affects aspects [Component_]Default_Value
8510 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8511 component type for the resolution
8513 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8515 * einfo.adb (Base_Type): Tune implementation for speed.
8517 2011-08-02 Robert Dewar <dewar@adacore.com>
8519 * freeze.adb: Minor reformatting.
8521 2011-08-02 Thomas Quinot <quinot@adacore.com>
8523 * scos.ads: Update comments.
8525 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8527 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8528 base type, because the parent may be a subtype of a private type whose
8529 convention is established in a private part.
8531 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8533 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8534 statement in a block when the expansion of the return expression has
8535 created a finalization chain.
8536 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8537 with the parent node.
8538 Add N_Extended_Return_Statement to handle the case where a transient
8539 object declaration appears in the Return_Object_Declarations list of
8540 an extended return statement.
8542 2011-08-02 Matthew Gingell <gingell@adacore.com>
8544 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8545 unused parameter 'name'.
8547 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8549 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8550 inherited operation, check whether its alias, which is the source
8551 operastion that it renames, has been marked eliminated.
8553 2011-08-02 Javier Miranda <miranda@adacore.com>
8555 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8556 in-mode parameter whose type is an access type since it can be used to
8557 modify its designated object. Enforce code that handles as safe an
8558 access type that is not access-to-constant but it is the result of a
8559 previous removal of side-effects.
8560 (Remove_Side_Effects): Minor code reorganization of cases which require
8561 no action. Done to incorporate documentation on new cases uncovered
8562 working in this ticket: no action needed if this routine was invoked
8563 too early and the nodes are not yet decorated.
8564 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8565 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8566 were issued with actuals that are implicitly provided by
8569 2011-08-02 Robert Dewar <dewar@adacore.com>
8571 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8573 2011-08-02 Yannick Moy <moy@adacore.com>
8575 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8576 to issue an error in formal mode on attribute not supported in this mode
8577 (Analyze_Attribute): issue errors on standard attributes not supported
8579 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8580 comment, and issue error in formal mode on modulus which is not a power
8582 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8584 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8586 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8587 operator on modular type (except 'not').
8589 2011-08-02 Robert Dewar <dewar@adacore.com>
8591 * gnat_rm.texi: Minor reformatting.
8593 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8595 * s-osinte-linux.ads: Minor comment update and reformatting.
8596 * i-cexten.ads: Make this unit pure, as for its parent.
8597 Will allow its usage in more contexts if needed.
8599 2011-08-02 Robert Dewar <dewar@adacore.com>
8601 * s-utf_32.ads: Minor comment fix.
8603 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8605 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8606 operation of a tagged synchronized type, handle the case where the
8607 controlling argument is overloaded.
8609 2011-08-02 Yannick Moy <moy@adacore.com>
8611 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8612 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8613 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8614 SPARK mode and formal verification mode on processing SPARK restriction
8615 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8616 requiring consistency checking.
8618 2011-08-02 Robert Dewar <dewar@adacore.com>
8620 * sem_res.adb: Minor reformatting.
8622 2011-08-02 Robert Dewar <dewar@adacore.com>
8624 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8625 a-cforse.ads: Remove unneeded with of Ada.Containers
8626 Remove commented out pragma Inline's
8627 Move specifications of new subprograms to the actual specs
8629 2011-08-02 Yannick Moy <moy@adacore.com>
8631 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8632 a-cforse.ads: Update comments.
8634 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8636 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8638 2011-08-02 Robert Dewar <dewar@adacore.com>
8640 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8641 a-cforse.ads, a-cofove.ads: Minor reformatting.
8643 2011-08-02 Claire Dross <dross@adacore.com>
8645 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8646 a-cofove.ads: Add comments.
8648 2011-08-02 Yannick Moy <moy@adacore.com>
8650 * gnat_rm.texi: Document formal containers.
8652 2011-08-02 Emmanuel Briot <briot@adacore.com>
8654 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8657 2011-08-02 Robert Dewar <dewar@adacore.com>
8659 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8662 2011-08-02 Robert Dewar <dewar@adacore.com>
8664 * aspects.adb: New aspects Default_Value and Default_Component_Value
8665 New format of Aspect_Names table checks for omitted entries
8666 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8667 handling of boolean aspects for derived types.
8668 New aspects Default_Value and Default_Component_Value
8669 New format of Aspect_Names table checks for omitted entries
8670 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8671 (Has_Default_Value): New flag
8672 (Has_Default_Component_Value): New flag
8673 (Has_Default_Value): New flag
8674 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8676 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8677 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8678 Default_Value and Default_Component_Value
8679 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8680 New aspects Default_Value and Default_Component_Value
8681 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8682 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8684 2011-08-02 Vincent Celier <celier@adacore.com>
8686 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8687 inherit library kind.
8689 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8691 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8694 2011-08-02 Robert Dewar <dewar@adacore.com>
8696 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8698 2011-08-02 Yannick Moy <moy@adacore.com>
8700 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8702 2011-08-02 Robert Dewar <dewar@adacore.com>
8704 * impunit.adb: Add comment.
8706 2011-08-02 Yannick Moy <moy@adacore.com>
8708 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8709 qualification of aggregates in formal mode
8710 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8712 (Resolve_Aggregate): complete the test that an aggregate is adequately
8713 qualified in formal mode
8715 2011-08-02 Pascal Obry <obry@adacore.com>
8717 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8718 * mlib-prj.adb: Supress warning when compiling binder generated file.
8719 (Build_Library): Supress all warnings when compiling the binder
8722 2011-08-02 Yannick Moy <moy@adacore.com>
8724 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8726 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8727 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8728 Add with/use clauses to make Check_Formal_Restriction visible
8730 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8732 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8733 in-parameters when type of the generic formal is private in the generic
8734 spec and non-private in the body.
8736 2011-08-02 Claire Dross <dross@adacore.com>
8738 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8739 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8740 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8741 * impunit.adb, Makefile.rtl: Take new files into account.
8743 2011-08-02 Robert Dewar <dewar@adacore.com>
8745 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8746 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8748 2011-08-02 Yannick Moy <moy@adacore.com>
8750 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8752 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8753 matching static array bounds, taking into account the special case of
8755 * sem_ch3.adb: Typo in comment.
8757 2011-08-02 Yannick Moy <moy@adacore.com>
8759 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8760 which issues an error in formal mode if its argument node is originally
8762 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8763 has a discriminant specification so that it does not include the case
8765 (Derived_Type_Declaration): move here the test that a derived type has a
8766 discriminant specification
8767 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8768 first element of a component association before accessing its choices
8769 (presence of component association is not enough)
8770 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8771 declaration is a library item before accessing the next element in a
8772 list, as library items are not member of lists
8773 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8774 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8775 Check_Formal_Restriction whenever possible.
8777 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8779 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8780 reference when needed.
8782 2011-08-02 Bob Duff <duff@adacore.com>
8784 * gnat_ugn.texi: Fix typo.
8786 2011-08-02 Vincent Celier <celier@adacore.com>
8788 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8789 archive file name. Do not use the full path name of archives for Open
8792 2011-08-02 Robert Dewar <dewar@adacore.com>
8794 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8795 Analyze_Aspect_Specifications
8797 (Analyze_Aspect_Specifications): New handling for boolean aspects
8798 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8799 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8800 sequence for Analyze_Aspect_Specifications
8801 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8802 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8804 2011-08-02 Robert Dewar <dewar@adacore.com>
8806 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8807 aspects, since these no longer exist.
8809 2011-08-02 Robert Dewar <dewar@adacore.com>
8811 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8812 semicolon, do not try to see if there are aspects following it.
8813 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8816 2011-08-02 Robert Dewar <dewar@adacore.com>
8818 * sem_ch8.adb, aspects.ads: Minor reformatting.
8820 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8822 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8823 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8825 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8827 2011-08-02 Yannick Moy <moy@adacore.com>
8829 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8830 mode on subprogram declaration outside of package specification, unless
8831 it is followed by a pragma Import
8832 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8833 Access_Type_Declaration): issue error in formal mode on access type
8834 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8836 (Analyze_Object_Declaration): issue error in formal mode on object
8837 declaration which does not respect SPARK restrictions
8838 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8839 declaration which does not respect SPARK restrictions
8840 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8841 error in formal mode on digits or delta constraint
8842 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8843 decimal fixed point type
8844 (Derived_Type_Declaration): issue error in formal mode on derived type
8845 other than type extensions of tagged record types
8846 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8847 with check on access definition
8848 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8849 mode on protected definition.
8850 (Analyze_Task_Definition): issue error in formal mode on task definition
8852 2011-08-02 Robert Dewar <dewar@adacore.com>
8854 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8856 2011-08-02 Javier Miranda <miranda@adacore.com>
8858 * sem_ch6.adb (Can_Override_Operator): New function.
8859 (Verify_Overriding_Indicator): Add missing code to check overriding
8860 indicator in operators. Fixes regression.
8861 (Check_Overriding_Indicator): Minor reformating after replacing the
8862 code that evaluates if the subprogram can override an operator by
8863 invocations to the above new function.
8865 (Write_Field26_Name): Add missing code to ensure that, following
8866 the documentation in einfo.ads, this field is not shown as attribute
8867 "Static_Initialization" on non-dispatching functions.
8869 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8871 * sem_res.adb (Resolve_Call): A call to
8872 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8873 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8874 i.e., when the second parameter is of type Time_Span.
8876 2011-08-02 Vincent Celier <celier@adacore.com>
8878 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8879 with an archive instead of -L<library dir> -l<library name>.
8881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8883 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8884 mark the base types In_Use in addition to making the operations
8887 2011-08-02 Ed Falis <falis@adacore.com>
8889 * init.c: add and setup __gnat_signal_mask for the exception signals
8890 * s-inmaop-vxworks.adb: new file.
8891 * s-intman-vxworks.adb: remove unnecessary initializations and
8893 * s-intman-vxworks.ads: remove unnecessary variable
8894 * s-taprop-vxworks.adb: simplify signal initialization
8896 2011-08-02 Robert Dewar <dewar@adacore.com>
8898 * sem_ch8.adb: Minor code reorganization, comment updates.
8900 2011-08-02 Robert Dewar <dewar@adacore.com>
8902 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8903 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8905 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8906 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8908 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8910 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8911 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8912 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8913 use_type_clauses, to handle more efficiently use_type and use_all_type
8915 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8916 Ada2012 Use_All_Type clause.
8917 (Use_Class_Wide_Operations): new procedure.
8919 2011-08-02 Robert Dewar <dewar@adacore.com>
8921 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8922 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8923 expression to expression function.
8925 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8927 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8928 if types are compatible.
8930 2011-08-02 Yannick Moy <moy@adacore.com>
8932 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8933 returns True if its argument array types have same dimension and same
8934 static bounds at each index.
8935 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8936 OUT or IN OUT paramaters which are not view conversions in SPARK.
8937 (Resolve_Arithmetic_Op): issue an error in formal mode on
8938 multiplication or division with operands of fixed point types which are
8939 not qualified or explicitly converted.
8940 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8941 Boolean or array type (except String) operands.
8942 (Resolve_Equality_Op): issue an error in formal mode on equality
8943 operators for array types other than String with non-matching static
8945 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8946 for array types with non-matching static bounds. Factorize the code in
8947 Matching_Static_Array_Bounds.
8948 (Resolve_Qualified_Expression): issue an error in formal mode on
8949 qualified expressions for array types with non-matching static bounds.
8950 (Resolve_Type_Conversion): issue an error in formal mode on type
8951 conversion for array types with non-matching static bounds
8953 2011-08-02 Robert Dewar <dewar@adacore.com>
8955 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8957 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8959 * par-ch9.adb: save location of entry for proper error message.
8961 2011-08-02 Javier Miranda <miranda@adacore.com>
8963 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8964 (Use_Full_View) which permits this routine to climb through the
8965 ancestors using the full-view of private parents.
8966 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8967 Use_Full_View to true in calls to Is_Ancestor.
8968 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8969 true in call to Is_Ancestor.
8970 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8971 Use_Full_View to true in call to Is_Ancestor.
8972 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8973 call to Is_Ancestor.
8974 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8975 Use_Full_View to true in calls to Is_Ancestor.
8976 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8977 Make_Select_Specific_Data_Table, Register_Primitive,
8978 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8979 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8980 to true in call to Is_Ancestor.
8981 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8982 Use_Full_View to true in calls to Is_Ancestor.
8984 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8985 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8987 2011-08-02 Robert Dewar <dewar@adacore.com>
8989 * gnat_rm.texi: Minor reformatting.
8990 * sem_prag.adb: Minor reformatting.
8992 2011-08-02 Tristan Gingold <gingold@adacore.com>
8994 * vms_data.ads: Add VMS qualifier for -gnateP.
8996 2011-08-02 Robert Dewar <dewar@adacore.com>
8998 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8999 * par-ch7.adb (P_Package): Proper placement of aspects for package
9001 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9002 (End_Statements): Add Is_Sloc parameterr
9003 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9004 (Check_End): Ad Is_Sloc parameter
9005 (End_Statements): Add Is_Sloc parameterr
9007 2011-08-02 Vincent Celier <celier@adacore.com>
9009 * ug_words: Add VMS qualifier equivalent to -gnateP:
9010 /SYMBOL_PREPROCESSING.
9012 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9014 * gnat-style.texi: For hexadecimal numeric literals the typical
9015 grouping of digits is 4 to represent 2 bytes.
9016 A procedure spec which is split into several lines is indented two
9019 2011-08-02 Yannick Moy <moy@adacore.com>
9021 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9022 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9023 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9025 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9026 choice in array aggregate
9027 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9029 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9030 positional and named aggregate for record, or others in record
9031 aggregate, or multiple choice in record aggregate
9032 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9033 array operands to logical operations AND, OR and XOR do not have the
9034 same static lower and higher bounds
9035 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9037 2011-08-01 Robert Dewar <dewar@adacore.com>
9039 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9040 Replaces Last_Source_Node_In_Sequence.
9041 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9042 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9043 parens and blank in string (this was inconsistently implemented).
9045 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9046 blank in string (this was inconsistently implemented).
9048 (Set_Global_Switches): Set formal mode switches appropriately
9049 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9051 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9052 call Set_Error_Msg_Lang to set "spark" as language name.
9053 * par.adb: Remove unnecessary call to set formal language for errout
9054 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9055 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9057 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9058 calls to it, moved after resolution so that types are known
9059 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9060 result of concatenation is not of type String
9061 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9062 concatenation is not properly restricted
9063 * gnat_rm.texi: Add doc on pragma Spark_95.
9064 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9065 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9066 * gcc-interface/Make-lang.in: Update dependencies.
9068 2011-08-01 Javier Miranda <miranda@adacore.com>
9070 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9071 condition that detects if the overridden operation must replace an
9074 2011-08-01 Javier Miranda <miranda@adacore.com>
9076 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9077 code declarations inserted by Insert_Actions in each alternative of the
9078 N_Case_Expression node.
9080 2011-08-01 Robert Dewar <dewar@adacore.com>
9082 * sem_ch6.adb: Minor code reorganization.
9083 * sem_util.adb: Minor reformatting.
9085 2011-08-01 Pascal Obry <obry@adacore.com>
9087 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9088 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9090 2011-08-01 Yannick Moy <moy@adacore.com>
9092 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9093 literal or operator symbol which is prefixed
9094 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9095 mode on access attributes.
9096 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9097 that concatenation operands are properly restricted in formal mode
9098 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9099 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9100 result of the concatenation has a type different from String.
9101 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9102 Analyze_Quantified_Expression, Analyze_Slice,
9103 Analyze_Null): issue an error in formal mode on unsupported constructs
9105 (Analyze_Block_Statement): only issue error on source block statement
9106 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9107 function which returns the last node in a list of nodes for which
9108 Comes_From_Source returns True, if any
9109 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9110 Last_Source_Node_In_Sequence
9111 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9112 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9113 mode on unsupported constructs
9114 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9115 rest of the actions may be needed later on since the error is marked as
9117 * sinfo.ads: Typos in comments.
9119 2011-08-01 Pascal Obry <obry@adacore.com>
9121 * projects.texi: Minor editing.
9123 2011-08-01 Yannick Moy <moy@adacore.com>
9125 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9126 insertion character ~~
9127 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9128 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9129 with insertion character ~~
9130 (Set_Msg_Text): treat insertion character ~~
9131 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9132 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9133 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9134 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9135 errors related to the formal language restriction not serious
9136 (insertion character |).
9137 * par.adb (Par): set formal language for error messages if needed
9138 * sem_ch6.adb (Check_Missing_Return): take into account possible
9139 generated statements at the end of the function
9140 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9141 enumeration value to define a new pragma SPARK_95
9142 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9143 SPARK_Version): new type and variables to store the SPARK version
9145 (SPARK_Mode): return True when SPARK_Version is set
9146 * par-prag.adb: Correct indentation
9147 (Prag): take Pragma_SPARK_95 into account
9148 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9151 2011-08-01 Robert Dewar <dewar@adacore.com>
9153 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9154 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9155 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9157 2011-08-01 Pascal Obry <obry@adacore.com>
9159 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9160 Target_Name to Get_Path call.
9161 (Parse_Single_Project): Likewise.
9162 (Post_Parse_Context_Clause): Likewise.
9163 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9164 Call Initialise_Project_Path with the proper Target_Name.
9165 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9167 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9168 with the proper Target_Name.
9169 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9171 (Parse_Project_And_Apply_Config): Likewise.
9172 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9173 This is fine as this part of the code is supporting only native
9175 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9176 is fine as this part of the code is supporting only native compilation.
9178 2011-08-01 Yannick Moy <moy@adacore.com>
9180 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9181 of homonym, unless the homonym is one of the cases allowed in SPARK
9182 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9183 package declaration occurring after a body.
9185 2011-08-01 Robert Dewar <dewar@adacore.com>
9187 * checks.adb, exp_ch4.adb: Minor reformatting.
9189 2011-08-01 Javier Miranda <miranda@adacore.com>
9191 * einfo.ads (Access_Disp_Table): Fix documentation.
9192 (Dispatch_Table_Wrappers): Fix documentation.
9194 2011-08-01 Pascal Obry <obry@adacore.com>
9196 * prj-env.adb, prj-env.ads: Minor reformatting.
9198 2011-08-01 Yannick Moy <moy@adacore.com>
9200 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9201 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9202 procedures out of these packages.
9203 * errout.ads, errout.adb
9204 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9205 procedures in of this package
9206 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9207 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9208 on misplaced later vs initial declarations, like in Ada 83
9209 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9210 formal mode on attribute of private type whose full type declaration
9212 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9213 package declaration inside a package specification
9214 (Analyze_Full_Type_Declaration): issue error in formal mode on
9215 controlled type or discriminant type
9216 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9217 user-defined operator means that it should come from the source
9218 (New_Overloaded_Entity): issue error in formal mode on overloaded
9220 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9222 2011-08-01 Thomas Quinot <quinot@adacore.com>
9224 * atree.adb: Minor reformatting.
9225 * checks.adb: Minor reformatting.
9227 2011-08-01 Vincent Celier <celier@adacore.com>
9229 * s-parame-vms-ia64.ads: Fix typo in comment
9231 * s-parame-vms-restrict.ads: Removed, unused.
9233 2011-08-01 Javier Miranda <miranda@adacore.com>
9236 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9238 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9239 * sem_ch3.ads, sem_ch3.adb
9240 (Is_Constant_Bound): New extended version of the subprogram that was
9241 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9242 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9243 * sem_aux.ads (Constant_Value): Fix typo in comment.
9244 * checks.adb (Generate_Index_Checks): New implementation which, for
9245 array objects with constant bounds, generates the runtime check
9246 referencing the bounds of the array type. For other cases this routine
9247 provides its previous behavior obtaining such values from the array
9249 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9251 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9252 we cannot have semantic interpretations of the new node.
9254 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9256 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9259 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9261 * sem_ch8.adb: Minor code editing.
9262 * s-vxwext.adb: Remove trailing space.
9263 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9264 consistency with other files.
9266 2011-08-01 Thomas Quinot <quinot@adacore.com>
9268 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9270 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9272 * par-ch10.adb: reject parameterized expressions as compilation unit.
9273 * sem_ch4.adb: handle properly conditional expression with overloaded
9274 then_clause and no else_clause.
9276 2011-08-01 Tristan Gingold <gingold@adacore.com>
9278 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9279 like done by System.Aux_DEC.
9280 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9282 2011-08-01 Yannick Moy <moy@adacore.com>
9284 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9285 missing label at end of declaration (subprogram or package)
9286 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9287 of positional and named parameter association
9288 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9289 Error_Msg_SP which adds a prefix to the error message giving the name
9290 of the formal language analyzed
9291 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9292 access result type in subprogram, unconstrained array as result type,.
9293 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9295 * sem_ch8.adb: Code clean up.
9297 2011-08-01 Javier Miranda <miranda@adacore.com>
9299 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9300 * einfo.ads (Access_Disp_Table): Fix documentation.
9301 (Dispatch_Table_Wrappers): Fix documentation.
9302 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9303 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9304 to enforce the documentation of this attribute.
9305 (Set_Is_Interface): Cleanup the assertion.
9306 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9307 the Underlying_Type entity before reading attribute Access_Disp_Table.
9308 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9309 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9310 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9311 the Underlying_Type entity before reading attribute Access_Disp_Table.
9312 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9313 Locate the Underlying_Type entity before reading attribute
9316 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9318 * s-poosiz.ads: Additional overriding indicators.
9320 2011-08-01 Yannick Moy <moy@adacore.com>
9322 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9324 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9325 parameter specification does not include a subtype mark.
9326 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9327 formal mode on abstract subprogram.
9328 (Analyze_Subprogram_Specification): issue error in formal mode on
9329 user-defined operator.
9330 (Process_Formals): issue error in formal mode on access parameter and
9332 * sem_ch9.adb (Analyze_Abort_Statement,
9333 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9334 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9335 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9336 Analyze_Requeue, Analyze_Selective_Accept,
9337 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9338 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9339 issue error in formal mode on user-defined raise statement.
9341 2011-08-01 Thomas Quinot <quinot@adacore.com>
9343 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9344 declaration being hidden when overriding an implicit inherited
9346 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9347 (-gnats), do not complain about a source file that contains only a
9350 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9352 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9353 variable if already set.
9355 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9357 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9358 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9359 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9360 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9361 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9362 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9363 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9364 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9365 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9366 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9367 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9368 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9369 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9370 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9371 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9372 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9373 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9374 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9375 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9376 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9377 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9378 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9379 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9380 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9381 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9382 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9383 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9384 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9385 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9386 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9387 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9388 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9389 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9390 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9391 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9392 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9393 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9394 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9395 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9396 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9397 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9398 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9399 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9400 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9401 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9402 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9403 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9404 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9405 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9406 Use GNAT instead of GNARL.
9408 2011-08-01 Bob Duff <duff@adacore.com>
9410 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9411 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9412 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9415 2011-08-01 Yannick Moy <moy@adacore.com>
9417 * debug.adb (d.D) reverve flag for the SPARK mode
9418 (d.E) reverve flag for SPARK generation mode
9419 (d.F) reverve flag for Why generation mode
9420 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9421 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9422 functions which return True when the corresponding modes are set
9423 (Formal_Language): return "spark" or "alfa" when in formal verification
9425 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9426 Error_Msg to prefix the error message with a tag giving the formal
9428 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9429 message with a tag giving the formal language
9430 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9432 (Analyze_Case_Statement): issue error in formal mode on case statement
9433 with a single "others" case alternative
9434 (Analyze_Exit_Statement): issue errors in formal mode on exit
9435 statements which do not respect SPARK restrictions
9436 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9437 (Check_Unreachable_Code): always issue an error (not a warning) in
9438 formal mode on unreachable code (concerns both code after an infinite
9439 loop and after an unconditional jump, both not allowed in SPARK)
9440 * sem_ch6.adb (Analyze_Return_Statement): add call to
9441 Set_Return_Present for a procedure containing a return statement
9442 (already done for functions in Analyze_Function_Return)
9443 (Analyze_Function_Return): issue error in formal mode on extended
9444 return or if return is not last statement in function
9445 (Check_Missing_Return): issue error in formal mode if function does
9446 not end with return or if procedure contains a return
9447 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9448 function to detect if there is an inner scope of its parameter S which
9451 2011-08-01 Thomas Quinot <quinot@adacore.com>
9453 * sem_ch6.ads: Minor reformatting.
9455 2011-08-01 Javier Miranda <miranda@adacore.com>
9457 * sem_util.adb (Abstract_Interface_List): Complete condition when
9458 processing private type declarations to avoid reading unavailable
9460 (Is_Synchronized_Tagged_Type): Complete condition when processing
9461 private extension declaration nodes to avoid reading unavailable
9464 2011-08-01 Thomas Quinot <quinot@adacore.com>
9466 * sem_ch3.adb: Minor reformatting.
9468 2011-08-01 Thomas Quinot <quinot@adacore.com>
9470 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9471 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9472 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9473 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9474 for VMS, instead parametrize the common implementation with
9475 System.Parameters declarations.
9477 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9479 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9481 2011-08-01 Tristan Gingold <gingold@adacore.com>
9483 * seh_init.c: Fix SEH handler installation on win64.
9485 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9487 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9488 double analysis of an anonymous access to subprogram, because it can
9489 lead to improper sharing of profiles and a back-end crash.
9491 2011-08-01 Robert Dewar <dewar@adacore.com>
9493 * make.adb, sem_ch4.adb: Minor reformatting.
9494 * gcc-interface/Make-lang.in: Update dependencies.
9495 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9497 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9499 * gnat_rm.texi: Fix definition of Long_Integer.
9501 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9503 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9504 to prevent storage exhaustion.
9505 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9506 finalized is a function body, insert the cleanup code before the final
9507 return statement, to prevent spurious warnings.
9508 * s-pooglo.ads: add overriding indicator.
9510 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9512 * sem_ch4.adb (Operator_Check): improve error message when both a
9513 with_clause and a use_clause are needed to make operator usage legal.
9514 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9515 determine whether a compilation unit is visible within an other,
9516 either through a with_clause in the current unit, or a with_clause in
9517 its library unit or one one of its parents.
9519 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9521 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9522 over an arbitrary expression of an array or container type.
9523 * lib-xref.adb: clarify comment.
9525 2011-08-01 Bob Duff <duff@adacore.com>
9527 * einfo.ads: Minor reformatting.
9528 * debug.adb: Minor comment improvement.
9530 2011-08-01 Javier Miranda <miranda@adacore.com>
9532 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9533 consider hidden subprograms as valid candidates.
9535 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9537 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9539 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9541 * gnat_ugn.texi: Fix typo.
9543 2011-08-01 Robert Dewar <dewar@adacore.com>
9545 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9546 lib-xref.adb: Minor reformatting
9548 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9550 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9551 when to generate a call to Move_Final_List.
9552 (Has_Controlled_Parts): Remove this function.
9554 2011-08-01 Geert Bosch <bosch@adacore.com>
9556 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9559 2011-08-01 Thomas Quinot <quinot@adacore.com>
9561 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9562 explicit raise of a predefined exception as Comes_From_Source if the
9563 original N_Raise_Statement comes from source.
9565 2011-08-01 Robert Dewar <dewar@adacore.com>
9567 * sinfo.ads: Add comment.
9568 * sem_ch6.adb: Minor reformatting.
9570 2011-08-01 Robert Dewar <dewar@adacore.com>
9572 * freeze.adb (Freeze_Entity): Refine check for bad component size
9573 clause to avoid rejecting confirming clause when atomic/aliased present.
9575 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9577 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9578 better determine whether an entity reference is a write.
9579 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9581 * lib-xref.adb (Output_References): Do no suppress a read reference at
9582 the same location as an immediately preceeding modify-reference, to
9583 handle properly in-out actuals.
9585 2011-08-01 Tristan Gingold <gingold@adacore.com>
9587 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9589 2011-08-01 Quentin Ochem <ochem@adacore.com>
9591 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9592 heap to compute the result.
9594 2011-08-01 Robert Dewar <dewar@adacore.com>
9596 * atree.ads: Minor reformatting.
9598 2011-08-01 Emmanuel Briot <briot@adacore.com>
9600 * g-expect.adb (Get_Command_Output): Fix memory leak.
9602 2011-08-01 Geert Bosch <bosch@adacore.com>
9604 * cstand.adb (P_Float_Type): New procedure to print the definition of
9605 predefined fpt types.
9606 (P_Mixed_Name): New procedure to print a name using mixed case
9607 (Print_Standard): Use P_Float_Type for printing floating point types
9608 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9609 precision IEEE float.
9611 2011-08-01 Thomas Quinot <quinot@adacore.com>
9613 * sem_ch3.adb: Minor reformatting.
9615 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9617 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9618 the completion of a generic function, insert the new body rather than
9619 rewriting the original.
9621 2011-08-01 Yannick Moy <moy@adacore.com>
9623 * sinfo.ads, errout.ads: Typos in comments.
9625 2011-08-01 Robert Dewar <dewar@adacore.com>
9627 * par-endh.adb: Minor reformatting.
9629 2011-08-01 Robert Dewar <dewar@adacore.com>
9631 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9632 (Pre_Post_Aspects): New subtype.
9633 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9634 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9635 * par-ch7.adb (P_Package): Remove Decl parameter
9636 (P_Package): Handle new syntax for aspects (before IS)
9637 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9639 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9640 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9641 (P_Package): Remove Decl parameter
9642 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9644 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9646 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9647 * sinfo.ads: Document new syntax for aspects in packages etc.
9648 * sprint.adb: Handle new syntax of aspects before IS in package
9650 2011-08-01 Thomas Quinot <quinot@adacore.com>
9652 * atree.ads: Minor reformatting.
9653 * sem_prag.adb: Minor reformatting.
9655 2011-08-01 Robert Dewar <dewar@adacore.com>
9657 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9658 case expr alternative.
9660 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9662 * sem_ch12.adb: Fix typo.
9664 2011-08-01 Geert Bosch <bosch@adacore.com>
9666 * sem_prag.adb (Check_No_Link_Name): New procedure.
9667 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9668 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9669 instead of Standard_Long_Long_Float_Size global. Preparation for
9670 eventual removal of per type constants.
9671 * exp_util.ads (Get_Stream_Size): New function returning the stream
9672 size value of subtype E.
9673 * exp_util.adb (Get_Stream_Size): Implement new function.
9674 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9676 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9678 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9680 2011-08-01 Geert Bosch <bosch@adacore.com>
9682 * cstand.adb: Fix comments.
9683 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9686 2011-08-01 Robert Dewar <dewar@adacore.com>
9688 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9690 2011-08-01 Geert Bosch <bosch@adacore.com>
9692 * atree.ads: Fix comment.
9694 2011-08-01 Robert Dewar <dewar@adacore.com>
9696 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9697 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9698 * par.adb: Add with for Namet.Sp.
9699 * par-tchk.adb: Minor reformatting.
9701 2011-08-01 Vincent Celier <celier@adacore.com>
9703 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9704 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9705 of the init procedure of a SAL.
9706 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9709 2011-08-01 Thomas Quinot <quinot@adacore.com>
9711 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9714 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9716 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9718 2011-08-01 Thomas Quinot <quinot@adacore.com>
9720 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9721 conformant with its spec (return True only for types that have
9722 an overriding Initialize primitive operation that prevents them from
9723 having preelaborable initialization).
9724 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9725 initialization for controlled types in Ada 2005 or later mode.
9727 2011-08-01 Robert Dewar <dewar@adacore.com>
9729 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9731 (Same_Aspect): New function.
9732 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9733 Type_Invariant, Precondition, Postcondition.
9734 * snames.ads-tmpl: Add Name_Type_Invariant.
9736 2011-08-01 Robert Dewar <dewar@adacore.com>
9738 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9740 (Freeze_All_Ent): Fix error in handling inherited aspects.
9741 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9742 already analyzed, but don't skip entire processing of a declaration,
9743 that's wrong in some cases of declarations being rewritten.
9744 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9745 Don't delay for integer, string literals
9746 Treat predicates in usual manner for delay, remove special case code,
9748 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9749 (Build_Predicate_Function): Update saved expression in aspect
9750 (Build_Invariant_Procedure): Update saved expression in aspect
9751 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9752 of replacement of discriminant references if the reference is simple.
9754 2011-08-01 Robert Dewar <dewar@adacore.com>
9756 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9757 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9758 Static_Predicate and Dynamic_Predicate.
9759 (Build_Predicate_Function): Add processing for Static_Predicate
9760 and Dynamic_Predicate.
9761 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9762 (From_Static_Predicate): New flag
9763 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9765 2011-08-01 Robert Dewar <dewar@adacore.com>
9767 * usage.adb: Documentation cleanup for Ada version modes in usage.
9768 * expander.adb: Minor reformatting.
9770 2011-08-01 Robert Dewar <dewar@adacore.com>
9772 * atree.ads: Minor comment fix.
9773 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9774 a-witeio.ads, sem_prag.adb: Minor reformatting.
9776 2011-08-01 Doug Rupp <rupp@adacore.com>
9778 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9779 pointers. Use descrip.h header file for convenience. Add some
9782 2011-08-01 Robert Dewar <dewar@adacore.com>
9784 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9785 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9786 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9788 (Check_Aspect_At_End_Of_Declarations): New procedure
9789 (Analye_Aspect_Specification): Minor changes for above procedures
9790 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9791 specification node as well.
9793 2011-08-01 Pascal Obry <obry@adacore.com>
9795 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9796 Windows files. Use GetFilesAttributes() in this case to check for file
9797 existence instead of returning with an error code.
9799 2011-08-01 Vincent Celier <celier@adacore.com>
9801 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9802 High is above Source length.
9804 2011-08-01 Robert Dewar <dewar@adacore.com>
9806 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9808 2011-08-01 Robert Dewar <dewar@adacore.com>
9810 * aspects.ads (Boolean_Aspects): New subtype.
9811 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9812 for derived types in cases where the parent type and derived type have
9814 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9815 with aspects when parent type also has aspects.
9816 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9817 boolean expression at this point).
9818 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9819 accordance with final decision on the Ada 2012 feature.
9820 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9822 2011-08-01 Matthew Heaney <heaney@adacore.com>
9824 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9826 2011-08-01 Pascal Obry <obry@adacore.com>
9828 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9829 Fix Replace_Slice when High is above current string size.
9830 (Replace_Slice): Fix DL computation when High is above current
9833 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9835 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9837 2011-08-01 Matthew Heaney <heaney@adacore.com>
9839 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9842 2011-08-01 Pascal Obry <obry@adacore.com>
9844 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9847 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9849 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9850 access to protected subprograms in generic bodies.
9851 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9852 protected type, indicate that the convention of the subprogram is
9853 Convention_Protected, because it may be used in subsequent declarations
9854 within the protected declaration.
9856 2011-08-01 Vincent Celier <celier@adacore.com>
9858 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9859 and "final" procedures when the name of the library is "ada", to avoid
9860 duplicate symbols "adainit" and "adafinal" in executables.
9862 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9864 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9865 quantified expression that appears within a postcondition and uses the
9866 Ada2012 'Result attribute.
9868 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9870 * init.c (__gnat_error_handler): Cast reason to int.
9871 (__gnat_install_handler): Explain sa_sigaction use.
9873 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9875 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9876 subprogram has copy-in copy-out parameters, try to promote the mode of
9877 the return type if it is passed in registers.
9879 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9881 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9882 left operand as addressable.
9884 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9886 * gcc-interface/gigi.h (build_function_stub): Remove.
9887 (build_return_expr): Likewise.
9888 (convert_vms_descriptor): Declare.
9889 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9890 (build_function_stub): Move to...
9891 * gcc-interface/utils2.c (build_return_expr): Move to...
9892 * gcc-interface/trans.c (build_function_stub): ...here.
9893 (build_return_expr): ...here.
9894 (Subprogram_Body_to_gnu): Add local variable for language_function.
9895 Disconnect the parameter attributes cache, if any, once done with it.
9896 Call end_subprog_body only after setting the end_locus.
9897 Build the stub associated with the function, if any, at the very end.
9898 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9899 variables and streamline control flow.
9901 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9904 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9907 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9910 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9911 Assign to act.sa_sigaction.
9912 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9913 current->return_address to char * before arithmetic.
9915 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9917 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9918 Correct argument types.
9919 Extract code from reason.
9920 (__gnat_install_handler): Assign to act.sa_sigaction.
9922 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9924 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9925 (GNAT1_OBJS): ...here.
9927 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9930 * g-socthi-mingw.adb (Fill): Fix formatting.
9932 * gcc-interface/gigi.h: Move around comment.
9934 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9937 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9939 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9942 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9944 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9946 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9947 range comparison if Pmode is SImode.
9949 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9950 Eric Botcazou <ebotcazou@adacore.com>
9952 * adadecode.c: Wrap up in extern "C" block.
9953 * adadecode.h: Likewise.
9954 * adaint.c: Likewise. Remove 'const' keyword.
9955 * adaint.h: Likewise.
9957 * atree.h: Likewise.
9959 * cstreams.c: Likewise.
9963 * final.c: Likewise.
9965 * initialize.c: Likewise.
9967 * namet.h: Likewise.
9968 * nlists.h: Likewise.
9969 * raise.c: Likewise.
9970 * raise.h: Likewise.
9971 * repinfo.h: Likewise.
9972 * seh_init.c: Likewise.
9973 * targext.c: Likewise.
9974 * tracebak.c: Likewise.
9975 * uintp.h: Likewise.
9976 * urealp.h: Likewise.
9977 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9978 * xsinfo.adb: Likewise.
9979 * xsnamest.adb: Likewise.
9980 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9981 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9982 * gcc-interface/misc.c: Likewise.
9983 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9984 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9985 ada/targext.o here...
9986 (GNAT_ADA_OBJS): ...and not here.
9987 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9988 (GNATBIND_OBJS): Reorder.
9990 2011-07-07 Richard Henderson <rth@redhat.com>
9992 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9993 dwarf2out_frame_init.
9995 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9997 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9999 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10002 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10004 2011-07-06 Richard Guenther <rguenther@suse.de>
10006 * gcc-interface/misc.c (gnat_init): Merge calls to
10007 build_common_tree_nodes and build_common_tree_nodes_2.
10008 Re-initialize boolean_false_node.
10010 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10011 Olivier Hainque <hainque@adacore.com>
10012 Nicolas Setton <setton@adacore.com>
10014 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10015 the type according to the ARTIFICIAL_P parameter.
10016 (create_type_decl): Likewise.
10017 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10019 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10021 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10022 (gnatbind): Likewise.
10024 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10026 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10028 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10030 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10031 local variable throughout. Remove useless call to Base_Type.
10032 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10033 Take it also into account for the volatileness of the field. Set the
10034 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10036 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10038 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10039 on a dereference built for a by-ref object if it has an address clause.
10041 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10043 * einfo.ads (Address_Taken): Document use for the second argument of
10044 Asm_Input and Asm_Output attributes.
10045 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10046 argument is an entity name, then set Address_Taken on it.
10047 <Attribute_Asm_Output>: Likewise.
10048 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10049 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10050 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10051 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10053 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10055 PR middle-end/46500
10056 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10058 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10060 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10061 (ada/utils.o): Update dependencies.
10062 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10063 ../../../libcpp/libcpp.a.
10064 * gcc-interface/utils.c: Include common/common-target.h.
10065 (process_attributes): Use targetm_common.have_named_sections.
10067 2011-06-07 Richard Guenther <rguenther@suse.de>
10069 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10072 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10074 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10075 TREE_THIS_NOTRAP flag.
10077 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10079 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10082 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10084 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10085 constants whose full view has discriminants specially.
10087 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10089 * gcc-interface/utils.c: Include diagnostic.h.
10090 (gnat_write_global_declarations): Output debug information for all
10091 global type declarations before finalizing the compilation unit.
10092 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10094 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10096 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10098 2011-05-25 Kai Tietz <ktietz@redhat.com>
10100 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10101 initialization instead of const/none-const pointer assignment.
10103 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10105 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10106 $(EXTRA_GNAT1_OBJS).
10107 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10108 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10109 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10110 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10111 libcommon-target.a instead of prefix.o.
10113 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10116 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10118 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10120 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10121 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10122 instead of version.o.
10124 2011-05-18 Kai Tietz <ktietz@redhat.com>
10126 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10127 boolean_false_node instead of integer_zero_node.
10128 (convert_with_check): Likewise.
10129 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10131 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10133 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10134 type of the parameter is an unconstrained array, convert the actual to
10135 the type of the formal in the In Out and Out cases as well.
10137 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10139 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10140 call build_function_type_array or build_varargs_function_type_array
10142 (create_subprog_type): Don't call build_function_type; call
10143 build_function_type_vec instead.
10145 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10147 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10148 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10149 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10151 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10153 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10155 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10156 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10158 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10160 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10162 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10164 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10165 instead of accessing TYPE_ARG_TYPES directly.
10166 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10168 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10171 * gcc-interface/gigi.h (get_variant_part): Declare.
10172 * gcc-interface/decl.c (get_variant_part): Make global.
10173 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10174 types have the same constant size, are record types and T1 has a
10175 variant part while T2 doesn't.
10177 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10179 * gcc-interface/utils.c (begin_subprog_body): Do not call
10181 (end_subprog_body): Likewise.
10183 2011-05-04 Richard Guenther <rguenther@suse.de>
10185 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10187 (pos_to_constructor): Likewise.
10189 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10190 Eric Botcazou <ebotcazou@adacore.com>
10192 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10193 of build_function_type. Adjust calls to...
10194 (build_raise_check): ...this. Do not take a void_tree parameter.
10195 Call build_function_type_list instead of build_function_type.
10196 Fix head comment and swap couple of conditional blocks.
10198 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10200 * gnatvsn.ads (Library_Version): Bump to 4.7.
10201 (Current_Year): Bump to 2011.
10203 2011-04-29 Michael Matz <matz@suse.de>
10205 * gcc-interface/misc.c (gnat_handle_option): Set
10206 warn_maybe_uninitialized.
10208 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10210 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10211 the Watson/McCabe paper.
10213 2011-04-23 Jim Meyering <meyering@redhat.com>
10215 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10217 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10219 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10222 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10224 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10226 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10227 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10228 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10229 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10230 <all>: Do not set flags on the reused DECL node coming from an alias.
10231 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10232 don't need debug info here...
10233 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10234 (gigi): Adjust calls to create_subprog_decl.
10235 (build_raise_check): Likewise.
10236 (establish_gnat_vms_condition_handler): Likewise.
10237 (Compilation_Unit_to_gnu): Likewise.
10238 (gnat_to_gnu): Likewise.
10240 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10242 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10243 (NO_REORDER_ADAFLAGS): New variable.
10244 (EXTRA_GNATTOOLS): Always define.
10245 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10246 Clean up and adjust list of files compiled with special options.
10247 * gcc-interface/Make-lang.in: Likewise.
10248 (ada/decl.o): Cosmetical change.
10249 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10251 2011-04-20 Jim Meyering <meyering@redhat.com>
10253 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10255 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10257 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10258 $(CFLAGS) on the link line.
10260 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10262 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10263 padded type built for the return type if it is unconstrained.
10265 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10267 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10269 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10271 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10272 before calling TREE_CHAIN.
10273 * gcc-interface/misc.c (gnat_init_ts): New function.
10274 (LANG_HOOKS_INIT_TS): Define.
10276 2011-04-12 Martin Jambor <mjambor@suse.cz>
10278 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10279 instead of cgraph_node.
10281 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10283 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10284 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10287 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10289 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10290 of aggregate types that contain a placeholder.
10292 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10294 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10296 (handle_type_generic_attribute): Likewise.
10298 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10301 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10303 2011-04-04 Kai Tietz <ktietz@redhat.com>
10306 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10309 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10311 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10312 type case, do not strip a padding type around the array type.
10314 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10316 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10319 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10321 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10322 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10323 code for -feliminate-unused-debug-types.
10324 (gnat_post_options): Likewise.
10326 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10328 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10329 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10332 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10334 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10335 DECL_ARTIFICIAL flag on enumeration types.
10337 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10339 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10340 fat pointer types artificial unconditionally.
10341 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10344 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10346 * gcc-interface/gigi.h (get_dummy_type): Declare.
10347 (build_dummy_unc_pointer_types): Likewise.
10348 (finish_fat_pointer_type): Likewise.
10349 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10350 fat pointer type has been built, complete it in place.
10351 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10352 and thin pointers. Remove useless variable.
10353 (finish_fat_pointer_type): Make global and move to...
10354 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10355 (get_dummy_type): New function.
10356 (build_dummy_unc_pointer_types): Likewise.
10357 (gnat_pushdecl): Propage the name to the anonymous variants only.
10358 (update_pointer_to): Only adjust the pointer types in the unconstrained
10361 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10363 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10364 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10365 if this is a Taft amendment type and the full declaration is available.
10366 * gcc-interface/trans.c (process_type): Likewise.
10367 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10368 (process_freeze_entity): Likewise.
10369 * gcc-interface/utils.c (dummy_global): New static variable.
10370 (gnat_write_global_declarations): If there are types declared as used
10371 at the global level, insert them in the global hash table.
10373 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10375 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10376 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10377 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10379 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10380 flag of the type accordingly.
10381 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10383 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10385 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10386 finalizing types when updating the pointers to the designated type.
10387 <all>: Finalize the deferred types even if we didn't defer processing
10388 of incomplete types in this invocation.
10390 2011-04-01 Olivier Hainque <hainque@adacore.com>
10391 Nicolas Setton <setton@adacore.com>
10392 Eric Botcazou <ebotcazou@adacore.com>
10394 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10395 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10397 2011-03-28 Kai Tietz <ktietz@redhat.com>
10399 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10401 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10402 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10404 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10406 2011-03-28 Tristan Gingold <gingold@adacore.com>
10409 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10410 Use ada output of gnatbind.
10411 (ada/b_gnatb.adb): Ditto.
10412 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10413 (ada.mostlyclean, ada.stage1)
10414 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10415 (ada.stagefeedback): Adjust.
10416 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10417 Use ada output of gnatbind.
10418 (b_gnatm.adb): Ditto.
10419 (b_gnatl.o, b_gnatm.o): New rules.
10421 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10423 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10424 for the padded type built to support a specified size or alignment.
10426 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10428 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10429 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10430 unconditionally to the end of the unit when the designated type is
10432 <all>: Rename local variable. Attempt to un-defer types only and do it
10433 for limited_with'ed types as well.
10434 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10435 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10436 consistently and remove redundant call to finalize_from_with_types.
10438 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10440 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10441 subprograms without a previous spec declared in the same unit.
10442 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10443 subprograms at the end of the unit instead of at the beginning.
10444 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10445 isn't public for the special handling of non-inline functions nested
10446 inside inline external functions.
10448 2011-03-25 Jeff Law <law@redhat.com>
10450 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10452 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10454 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10455 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10456 to compute Set_Size_Depends_On_Discriminant.
10457 (Layout_Type): Call it on array types in back-end layout mode.
10458 * sem_util.adb (Requires_Transient_Scope): Return true for array
10459 types only if the size depends on the value of discriminants.
10460 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10461 type if the RHS is a call to a function that returns an unconstrained
10462 type with default discriminant.
10464 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10466 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10467 non-conversion to the nominal result type at the end.
10469 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10471 * gcc-interface/trans.c (create_temporary): New function taken from...
10472 (create_init_temporary): ...here. Call it.
10473 (call_to_gnu): Create the temporary for the return value early, if any.
10474 Create it for a function with copy-in/copy-out parameters if there is
10475 no target; in other cases of copy-in/copy-out, use another temporary.
10476 Push the new binding level lazily. Add and rename local variables.
10478 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10480 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10482 (set_rm_size): Likewise.
10484 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10486 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10487 for the padded type built in order to support a specified alignment.
10488 Fix incorrect formatting.
10490 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10493 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10495 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10497 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10498 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10499 to the end of the list. Adjust recursive call. Rename local variable.
10500 If REORDER is true, reorder components of the record type.
10501 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10502 components_to_record and adjust the parameter list.
10504 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10506 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10507 disabled, use the variable for bounds of loop iteration scheme.
10509 2011-03-21 Kai Tietz <ktietz@redhat.com>
10512 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10514 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10516 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10517 out whether the expression is read-only. Short-circuit placeholder
10518 case and rename a couple of local variables.
10520 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10522 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10523 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10524 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10525 (convert): Deal with conversions from a smaller form type specially.
10527 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10529 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10530 its argument, except for the special -I- switch.
10532 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10534 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10537 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10539 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10541 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10543 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10545 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10546 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10547 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10548 Do not generate the check directly, instead instantiate the template
10549 check present in the descriptor.
10550 (make_descriptor_field): Move around.
10551 (build_vms_descriptor32): Build a template check in the POINTER field.
10552 (build_vms_descriptor): Remove useless suffixes.
10553 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10555 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10558 * targext.c: Include target files if IN_RTS is defined.
10560 2011-01-26 Richard Guenther <rguenther@suse.de>
10563 * targext.c: Include config.h.
10564 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10567 2011-01-04 Pascal Obry <obry@adacore.com>
10568 Eric Botcazou <ebotcazou@adacore.com>
10570 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10572 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10574 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10575 end-of-case on the end label and its associated gotos, if any.
10577 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10579 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10580 expressions of the parameter cache within the statement group of
10581 the CICO mechanism.
10583 2011-01-04 Olivier Hainque <hainque@adacore.com>
10584 Eric Botcazou <ebotcazou@adacore.com>
10586 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10587 (set_end_locus_from_node): New function.
10588 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10589 make and the function end_locus.
10590 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10591 for the elaboration subprogram.
10592 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10593 set the end_locus of the expression as well.
10595 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10598 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10599 variables that are referenced in exception handlers volatile.
10603 Copyright (C) 2011 Free Software Foundation, Inc.
10605 Copying and distribution of this file, with or without modification,
10606 are permitted in any medium without royalty provided the copyright
10607 notice and this notice are preserved.