1 2011-08-05 Robert Dewar <dewar@adacore.com>
3 * a-cbmutr.adb: Minor reformatting
4 (Allocate_Node): refactor node allocation algorithm
6 2011-08-05 Robert Dewar <dewar@adacore.com>
8 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
9 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
11 (Analyze_Pragma, case Check_Policy): Ditto.
12 * sem_prag.ads (Check_Disabled): New function
13 * snames.ads-tmpl: Add Name_Disable.
15 2011-08-05 Robert Dewar <dewar@adacore.com>
17 * gnat_rm.texi: Document implementation-defined policy DISABLE for
18 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
20 2011-08-05 Ed Schonberg <schonberg@adacore.com>
22 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
23 that appears in a generic formal part and applies to a formal
26 2011-08-05 Robert Dewar <dewar@adacore.com>
28 * a-cbmutr.ads: Minor reformatting.
30 2011-08-05 Matthew Heaney <heaney@adacore.com>
32 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
33 to check count, check sign of value instead.
34 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
35 (Copy_Subtree): allocate copy of source element
36 (Equal_Subtree): compare elements, not access objects
38 2011-08-05 Vincent Celier <celier@adacore.com>
40 * gnat_ugn.texi: Fix VMS alternative.
42 2011-08-05 Thomas Quinot <quinot@adacore.com>
44 * sem_ch11.adb: Add comment.
46 2011-08-05 Robert Dewar <dewar@adacore.com>
48 * exp_util.adb: Minor comment fix.
50 2011-08-05 Robert Dewar <dewar@adacore.com>
52 * scng.adb (Error_Unterminated_String): Improve flag position when
55 2011-08-05 Matthew Heaney <heaney@adacore.com>
57 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
59 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
60 multiway tree containers.
62 2011-08-05 Robert Dewar <dewar@adacore.com>
64 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
65 * stylesw.adb: Implement -gnatyC to control comment spacing
66 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
68 * usage.adb: Add line for -gnatyC.
70 2011-08-05 Robert Dewar <dewar@adacore.com>
72 * gnat_ugn.texi: Document -gnatyC for J505-006
73 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
74 synonym for COMMENTS2).
76 2011-08-05 Robert Dewar <dewar@adacore.com>
78 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
79 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
80 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
81 a-comutr.ads, lib-xref.adb: Minor reformatting.
83 2011-08-05 Robert Dewar <dewar@adacore.com>
85 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
86 warning if there is an exception handler present.
88 2011-08-05 Pascal Obry <obry@adacore.com>
90 * a-iteint.ads: Fix copyright year.
92 2011-08-05 Thomas Quinot <quinot@adacore.com>
94 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
95 statement SCO for a USE clause or a representation clause.
97 2011-08-05 Yannick Moy <moy@adacore.com>
99 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
100 between body and spec for stub.
101 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
102 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
103 pragma precondition or postcondition, for which the enclosing
104 subprogram or package in the AST is not the desired one, return empty.
106 2011-08-05 Thomas Quinot <quinot@adacore.com>
108 * g-expect.adb: Minor reformatting.
110 2011-08-05 Bob Duff <duff@adacore.com>
112 * a-fihema.adb: Comment out OS_Lib.
114 2011-08-05 Matthew Heaney <heaney@adacore.com>
116 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
117 (unbounded multiway tree containers) and a-iteint.ads.
118 * a-comutr.ads, a-comutr.adb:
119 This is the new Ada 2012 unit for unbounded multiway tree containers
120 * a-cimutr.ads, a-cimutr.adb
121 This is the new Ada 2012 unit for indefinite multiway tree containers
122 * a-iteint.ads: New file.
124 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
126 * gcc-interface/Makefile.in (raise-gcc.o): Search
129 2011-08-05 Bob Duff <duff@adacore.com>
131 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
133 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
135 2011-08-05 Ed Schonberg <schonberg@adacore.com>
137 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
138 general indexing aspects of Ada2012. Called when analyzing indexed
139 components when other interpretations fail.
140 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
141 in an expression context where overloading is meaningful. This excludes
142 the occurrence in an aspect specification (efficiency only).
143 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
144 related to iterators can be set by an attribute specification, but
146 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
147 Constant_Indexing and Variable_Indexing.
148 (Check_Indexing_Functions): New procedure to perform legality checks.
149 Additional semantic checks at end of declarations.
151 2011-08-05 Sergey Rybin <rybin@adacore.com>
153 * tree_io.ads: Update ASIS_Version_Number because of the change of the
154 order of calling Tree_Write/Tree_Read routines made for aspects.
156 2011-08-05 Bob Duff <duff@adacore.com>
158 * a-fihema.adb (Finalize): Fix race condition.
160 2011-08-05 Yannick Moy <moy@adacore.com>
162 * sem_ch12.adb (Analyze_Package_Instantiation,
163 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
166 2011-08-05 Ed Schonberg <schonberg@adacore.com>
168 * sem_type.adb (Specific_Type): in an instance, the type-specific
169 operand of an equality check that involves null may have a private
170 type. Use full view to determine legality of construct.
172 2011-08-05 Vincent Celier <celier@adacore.com>
174 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
175 delete or close the file when the call to gnatmake was successful.
177 2011-08-05 Yannick Moy <moy@adacore.com>
179 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
180 Global_Discard_Names.
182 2011-08-05 Ed Schonberg <schonberg@adacore.com>
184 * sinfo.ads: comments on use of entity field for aspect specifications.
186 2011-08-05 Ed Schonberg <schonberg@adacore.com>
188 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
189 node is not itself an entity but a selected component, it is a
190 rewritten parameterless call to an en enclosing synchronized operation,
191 and this expansion will be performed again in the instance, so there is
192 no global information to preserve.
194 2011-08-05 Javier Miranda <miranda@adacore.com>
196 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
197 for renamings of predefined primitives.
198 (In_Predef_Prims_DT): New subprogram.
200 2011-08-05 Ed Schonberg <schonberg@adacore.com>
202 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
203 possible interpretation of name is a reference type, add an
204 interpretation that is the designated type of the reference
205 discriminant of that type.
206 * sem_res.adb (resolve): If the interpretation imposed by context is an
207 implicit dereference, rewrite the node as the deference of the
208 reference discriminant.
209 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
210 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
211 parent type or base type.
212 * sem_ch4.adb (Process_Indexed_Component,
213 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
214 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
215 Check for implicit dereference.
216 (List_Operand_Interps): Indicate when an implicit dereference is
218 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
220 2011-08-05 Thomas Quinot <quinot@adacore.com>
222 * scos.ads: Update documentation of SCO table. Pragma statements can now
223 be marked as disabled (using 'p' instead of 'P' as the statement kind).
224 * par_sco.ads, par_sco.adb: Implement the above change.
225 (Process_Decisions_Defer): Generate a P decision for the first parameter
226 of a dyadic pragma Debug.
227 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
229 * put_scos.adb: Code simplification based on above change.
232 2011-08-05 Robert Dewar <dewar@adacore.com>
234 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
235 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
236 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
237 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
239 2011-08-05 Bob Duff <duff@adacore.com>
241 * a-stunau.ads, g-spipat.adb: Update comments.
243 2011-08-05 Bob Duff <duff@adacore.com>
245 * a-fihema.ads: Minor comment fix.
246 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
248 (Attach, Detach): Remove some unnecessary code.
249 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
251 2011-08-05 Bob Duff <duff@adacore.com>
253 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
254 allocation for Objects component. This simplifies the code somewhat. It
255 is also a little more efficient in the not-so-unusual case where there
256 are no controlled objects allocated.
257 Make Finalization_Started flag atomic.
258 (Finalize): Avoid unnecessary detachment of items from the list.
259 (pcol): Minor cleanup.
261 2011-08-05 Ed Schonberg <schonberg@adacore.com>
263 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
264 package whose name is the same as that of the generic unit, or its
267 2011-08-05 Bob Duff <duff@adacore.com>
269 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
270 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
273 2011-08-05 Arnaud Charlet <charlet@adacore.com>
275 * make.adb (Linking_Phase): No longer need to set source search path
276 before calling gnatlink in CodePeer mode.
277 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
278 gcc in CodePeer mode, since the binder generated file no longer has a
280 * switch.ads, switch.adb (Is_Language_Switch): Removed.
281 * switch-c.adb: Update comment.
283 2011-08-05 Thomas Quinot <quinot@adacore.com>
285 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
287 2011-08-05 Nicolas Roche <roche@adacore.com>
289 * gnat_ugn.texi: Fix minor syntax error issue.
291 2011-08-05 Vincent Celier <celier@adacore.com>
293 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
294 delete or close the file when the call to gnatmake returns a non
295 successful return code.
297 2011-08-05 Ed Schonberg <schonberg@adacore.com>
299 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
300 check, indicate that the copy of the original node does not come from
301 source, to prevent an infinite recursion of the expansion.
303 2011-08-05 Johannes Kanig <kanig@adacore.com>
305 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
306 VC generation for subprogram bodies.
308 2011-08-05 Yannick Moy <moy@adacore.com>
311 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
312 the base type with the smallest allowed base type.
314 2011-08-05 Sergey Rybin <rybin@adacore.com>
316 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
319 2011-08-05 Ed Schonberg <schonberg@adacore.com>
321 * sem_ch12.ads: minor comment updates.
323 2011-08-05 Ed Schonberg <schonberg@adacore.com>
325 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
326 instantiation and a formal package the compiler generates a package
327 renaming declaration so that the generic name within the declaration
328 is interpreted as a renaming of the instance. At the end of a formal
329 package declaration, this renaming must become invisible.
331 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
333 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
334 comparison and rely on concrete entities instead.
336 2011-08-05 Ed Schonberg <schonberg@adacore.com>
338 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
339 and discriminants, to indicate that the type has an access discriminant
340 that supports implicit dereference.
341 * snames.ads-tmpl: Add names of aspects and attributes related to
342 Ada2012 iterators: constant_indexing, default_iterator,
343 iterator_element, implicit_dereference, variable_indexing.
344 * aspects.ads, aspects.adb: entries for iterator-related aspects.
345 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
346 iterator-related aspects.
347 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
349 2011-08-05 Sergey Rybin <rybin@adacore.com>
351 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
352 metrics in gnatmetric to cover new kinds of coupling mentrics.
354 2011-08-05 Steve Baird <baird@adacore.com>
356 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
357 of calling the user-defined main subprogram.
358 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
359 is set) Call_Main_Subprogram ahead of, as opposed to
361 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
362 generation of a "with" of the user-defined main subprogram.
363 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
364 (which is now called from Gen_Main instead).
366 2011-08-05 Emmanuel Briot <briot@adacore.com>
368 * projects.texi: Added reference to the Makefile package.
370 2011-08-05 Thomas Quinot <quinot@adacore.com>
372 * exp_ch7.adb: Minor comment rewording.
374 2011-08-05 Ed Falis <falis@adacore.com>
376 * env.c: Fix comment.
378 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
380 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
381 character comparison and rely on concrete entities instead.
383 2011-08-05 Ed Schonberg <schonberg@adacore.com>
385 * sem_ch3.adb: (Check_Private_Overriding): better error message,
386 suggested by AI95-0068.
388 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
390 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
391 the two potential initialization calls. This accounts for any
392 access-before-elaboration checks which may precede the initialization
394 (Next_Suitable_Statement): New routine. Returns the next real statement
395 after the input node while skipping generated checks.
396 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
397 with comment on usage.
398 Do not generate Elaborate_All when the trigger is a finalization call
399 coming from a type init proc.
400 (Check_Elab_Call): Propagate the initialization procedure context to
401 subsequent calls to Check_A_Call.
402 (Check_Internal_Call_Continue): Propagate the initialization procedure
403 context to subsequent calls to Check_Elab_Call.
404 (Is_Finalization_Procedure): New routine. Returns True if the input
405 entity denotes a [Deep_]Finalize routine.
406 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
407 along with comment on usage.
409 2011-08-05 Vadim Godunko <godunko@adacore.com>
411 * s-atocou.ads: Add list of supported platforms.
413 2011-08-05 Yannick Moy <moy@adacore.com>
415 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
417 * opt.ads (Disable_ALI_File): new Boolean flag
418 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
420 2011-08-05 Ed Falis <falis@adacore.com>
422 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
423 environ is properly defined.
425 2011-08-05 Vincent Celier <celier@adacore.com>
427 * make.adb (Compilation_Phase): Exit immediately when all objects have
428 been found up to date, to avoid multiple exit messages.
429 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
430 same project for languages with no compiler.
431 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
433 2011-08-05 Robert Dewar <dewar@adacore.com>
435 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
436 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
437 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
438 s-atocou-builtin.adb: Minor reformatting.
440 2011-08-05 Yannick Moy <moy@adacore.com>
442 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
443 if the node to wrap is a pragma check, this node and enclosed
444 expression are not expanded, so do not apply any transformations here.
445 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
446 introducing transient scopes.
448 2011-08-05 Jose Ruiz <ruiz@adacore.com>
450 * adaint.c (__gnat_set_writable, __gnat_set_readable,
451 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
452 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
453 routine is available, so we use the default implementation of these
455 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
456 support for copying attributes on VxWorks 6.
458 2011-08-05 Yannick Moy <moy@adacore.com>
460 * debug.adb: Remove use of -gnatd.D.
461 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
462 * opt.ads: Simplify variables for ALFA mode, to keep one only
463 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
466 2011-08-05 Vincent Celier <celier@adacore.com>
468 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
469 Builder'Default_Switches.
471 2011-08-05 Vincent Celier <celier@adacore.com>
473 * makeusg.adb: Add lines for --create-map-file switches.
475 2011-08-05 Ed Schonberg <schonberg@adacore.com>
477 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
478 profile is incomplete and the full view is available, replace it with
480 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
481 incomplete, freezing the subprogram is delayed until the full view is
483 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
484 fixed-point multiplication operator and the predefined operator is
485 resolved in favor of the user-defined one.
487 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
489 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
492 2011-08-04 Ed Schonberg <schonberg@adacore.com>
494 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
495 whether a type lacks user-defined Read or Write operations, or has a
496 component that lacks them.
497 * sem_attr.adb (Check_Stream_Attribute): if restriction
498 No_Default_Stream_Attributes is active, verify that all subcomponent
499 types of the target have user-defined stream operations, and report
501 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
502 * exp_strm.adb: Build_Elementary_Input_Call,
503 Build_Elementary_Write_Call): remove checks for restriction
504 No_Default_Stream_Attributes, now checked in semantics.
506 2011-08-04 Vincent Celier <celier@adacore.com>
508 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
509 switches on the command line, look for all valid --RTS switches in the
510 Builder switches and for each language use the first runtime name found
512 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
513 command line and there is no auto-configuration.
514 (Runtime_Name_Set_For): New function.
516 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
518 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
519 elaborate initialization expression for variable Abort when processing
520 a package body or a declaration.
521 (Create_Finalizer): Propagate the package context when creating the
522 exception-related variables.
523 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
524 For_Package along with usage comment.
526 2011-08-04 Arnaud Charlet <charlet@adacore.com>
528 * gcc-interface/Makefile.in: Clean up targets.
529 Enable new package for atomic counters and copy-on-write implementation
530 of unbounded strings on x86 platforms.
531 * gcc-interface/Make-lang.in: Update dependencies.
533 2011-08-04 Robert Dewar <dewar@adacore.com>
535 * exp_ch7.adb: Minor reformatting.
537 2011-08-04 Robert Dewar <dewar@adacore.com>
539 * exp_strm.adb: Minor reformatting.
541 2011-08-04 Vadim Godunko <godunko@adacore.com>
543 * s-atocou.adb: Replace by dummy version and use on targets where atomic
544 operations are not supported.
545 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
546 * s-atocou-x86.adb: New file.
547 * Makefile.rtl: Add s-atocou.o file
549 2011-08-04 Arnaud Charlet <charlet@adacore.com>
551 * make.adb (Compile): Move setting of CodePeer_Mode to ...
552 (Compilation_Phase): ... here.
553 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
555 2011-08-04 Thomas Quinot <quinot@adacore.com>
557 * Make-generated.in: Fix minor typo in comment.
559 2011-08-04 Thomas Quinot <quinot@adacore.com>
561 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
564 2011-08-04 Robert Dewar <dewar@adacore.com>
566 * a-coinho.adb: Minor reformatting.
568 2011-08-04 Robert Dewar <dewar@adacore.com>
570 * a-coinho.ads: Minor reformatting.
572 2011-08-04 Vadim Godunko <godunko@adacore.com>
574 * s-atocou.ads, s-atocou.adb: New files.
575 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
576 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
577 direct use of GCC's atomic builtins and replace them by use of new
578 atomic counter package.
580 2011-08-04 Ed Schonberg <schonberg@adacore.com>
582 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
584 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
586 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
587 with a call to Get_External_Tag.
588 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
589 subprogram usage. Remove the guard against package declarations and
590 bodies since Build_Cleanup_Statements is no longer invoked in that
592 (Build_Components): Initialize Tagged_Type_Stmts when the context
593 contains at least one library-level tagged type.
594 (Build_Finalizer): New local variables Has_Tagged_Types and
595 Tagged_Type_Stmts along with associated comments on usage. Update the
596 logic to include tagged type processing.
597 (Create_Finalizer): Insert all library-level tagged type unregistration
598 code before the jump block circuitry.
599 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
600 (Expand_N_Package_Declaration): Remove the call to
601 Build_Cleanup_Statements.
602 (Process_Tagged_Type_Declaration): New routine. Generate a call to
603 unregister the external tag of a tagged type.
604 (Processing_Actions): Reimplemented to handle tagged types.
605 (Process_Declarations): Detect the declaration of a library-level
606 tagged type and carry out the appropriate actions.
607 (Unregister_Tagged_Types): Removed. The machinery has been directly
608 merged with Build_Finalizer.
610 2011-08-04 Robert Dewar <dewar@adacore.com>
612 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
613 gnatls.adb, exp_ch3.adb: Minor reformatting.
615 2011-08-04 Marc Sango <sango@adacore.com>
617 * sem_attr.adb (Analyze_Attribute): Replace the message
618 "invisible attribute of}" of the spark restriction violation in
619 attribute reference by the simple message "invisible attribute of type".
620 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
621 two insertion characters: '&' and '}'.
623 2011-08-04 Vadim Godunko <godunko@adacore.com>
625 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
626 * a-coinho.ads, a-coinho.adb: New file.
627 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
629 2011-08-04 Nicolas Roche <roche@adacore.com>
631 * alfa_test.adb: Not all ali files are containing alfa information even
632 if compiled with -gnatd.F. So suppress warning about missing ALFA
635 2011-08-04 Yannick Moy <moy@adacore.com>
637 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
639 * put_alfa.adb: Check that scope name is not empty.
641 2011-08-04 Ed Schonberg <schonberg@adacore.com>
643 * exp_ch3.adb (Stream_Operation_Ok): new predicate
644 Needs_Elementary_Stream_Operation, to determine whether user-defined
645 Read and Write attributes are available for the elementary components
646 of the given type. If only the predefined attributes are available,
647 then when restriction No_Default_Stream_Attributes is active the
648 predefined stream attributes for the composite type cannot be created.
650 2011-08-04 Robert Dewar <dewar@adacore.com>
652 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
653 Put routines in alpha order
655 2011-08-04 Jose Ruiz <ruiz@adacore.com>
657 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
658 * gcc-interface/Make-lang.in: Update dependencies.
660 2011-08-04 Arnaud Charlet <charlet@adacore.com>
662 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
663 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
666 2011-08-04 Robert Dewar <dewar@adacore.com>
668 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
669 lib-xref-alfa.adb: Minor reformatting.
671 2011-08-04 Marc Sango <sango@adacore.com>
673 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
674 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
675 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
678 2011-08-04 Tristan Gingold <gingold@adacore.com>
680 * bindgen.adb (Gen_Adainit_C): Remove.
681 (Gen_Adafinal_C): Ditto.
682 (Gen_Elab_Externals_C): Ditto.
683 (Gen_Elab_Calls_C): Ditto.
684 (Gen_Elab_Order_C): Ditto.
685 (Gen_Elab_Defs_C): Ditto.
686 (Gen_Finalize_Library_C): Ditto.
687 (Gen_Finalize_Library_Defs_C): Ditto.
689 (Gen_Output_File_C): Ditto.
690 (Gen_Restrictions_C): Ditto.
691 (Gen_Versions_C): Ditto.
692 (Write_Info_Ada_C): Ditto.
693 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
694 (Gen_Output_File): Do not force Ada_Bind_File anymore.
695 Always call Gen_Output_File_Ada.
696 * gnatlink.adb (Begin_Info): Now a constant.
698 (Ada_Bind_File): Remove
699 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
700 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
701 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
702 * opt.ads (Ada_Bind_File): Remove.
704 2011-08-04 Thomas Quinot <quinot@adacore.com>
706 * projects.texi: Document target-specific directory in default project
709 2011-08-04 Thomas Quinot <quinot@adacore.com>
711 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
714 2011-08-04 Yannick Moy <moy@adacore.com>
716 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
717 opt.ads, lib-xref.ads: Code clean up.
719 2011-08-04 Yannick Moy <moy@adacore.com>
721 * gnat_rm.texi: Update description of Test_Case
722 * gnat_ugn.texi: Typo.
724 2011-08-04 Ed Falis <falis@adacore.com>
726 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
728 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
730 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
731 it is of type Root_Controlled. This action eliminates fields Prev and
732 Next from type equality.
734 2011-08-04 Yannick Moy <moy@adacore.com>
736 * lib-xref-alfa.adb: Correct typo.
738 2011-08-04 Matthew Heaney <heaney@adacore.com>
740 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
743 2011-08-04 Yannick Moy <moy@adacore.com>
745 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
746 (Analyze_Pragma): allow static string expression for name of Test_Case,
747 instead of simply string literals.
748 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
751 2011-08-04 Vincent Celier <celier@adacore.com>
753 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
754 case suffixes to find truncated main sources.
756 2011-08-04 Tristan Gingold <gingold@adacore.com>
758 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
759 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
760 (Compute_Current_Task): Ditto.
762 2011-08-04 Tristan Gingold <gingold@adacore.com>
764 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
766 2011-08-04 Yannick Moy <moy@adacore.com>
768 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
769 library-level constant.
770 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
771 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
772 used as selector of parameter association, in ALFA mode.
774 2011-08-04 Robert Dewar <dewar@adacore.com>
776 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
777 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
780 2011-08-04 Arnaud Charlet <charlet@adacore.com>
782 * make.adb (Linking_Phase): Set source search path before calling
783 gnatlink in CodePeer mode.
785 2011-08-04 Javier Miranda <miranda@adacore.com>
787 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
788 Remove code which takes care of building TSDs.
789 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
790 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
791 the accessibility check in VM targets.
792 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
793 (Building_Static_DT): Now returns false for VM targets.
794 (Build_VM_TSDs): Removed.
795 (Expand_Interface_Conversion): Generate missing runtime check for
796 conversions to interface types whose target type is unknown at compile
798 (Make_VM_TSD): Add missing code to disable the generation of calls to
799 Check_TSD if the tagged type is not defined at library level, or not
800 has a representation clause specifying its external tag, or -gnatdQ is
802 * exp_disp.ads (Build_VM_TSDs): Removed.
803 (Make_VM_TSDs): Spec relocated from exp_disp.adb
804 * sem_disp.adb (Check_Dispatching_Operation): No code required to
805 register primitives in the dispatch tables in VM targets.
806 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
807 initialization of class-wide interface objects in VM targets.
808 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
811 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
813 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
814 when dotnet-ld cannot be found.
816 2011-08-04 Arnaud Charlet <charlet@adacore.com>
818 * bindgen.adb: Simplify significantly generation of binder body file in
820 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
821 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
824 2011-08-04 Yannick Moy <moy@adacore.com>
826 * sem_prag.adb, sem.ads: Code cleanup.
828 2011-08-04 Tristan Gingold <gingold@adacore.com>
830 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
831 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
833 * s-stusta.adb (Print): Adjust after changes in s-stausa.
834 * gnat_ugn.texi: Update dynamic stack usage section.
836 2011-08-04 Steve Baird <baird@adacore.com>
838 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
839 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
840 contains only a call to the user-defined main subprogram.
841 (Gen_Main_Ada) - If CodePeer_Mode is set, then
842 call the "wrapper" subprogram instead of directly
843 calling the user-defined main subprogram.
845 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
847 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
848 alternatives of a case statement for controlled objects. Rename local
849 variable A to Dead_Alt.
850 (Expand_N_If_Statement): Check the then and else statements of an if
851 statement for controlled objects. Check the then statements of all
852 elsif parts of an if statement for controlled objects.
853 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
855 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
856 detects a loop associated with the expansion of an array object.
857 Augment the processing of the loop statements to account for a possible
858 wrap done by Process_Statements_For_Controlled_Objects.
859 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
860 statements and abortable part of an asynchronous select for controlled
862 (Expand_N_Conditional_Entry_Call): Check the else statements of a
863 conditional entry call for controlled objects.
864 (Expand_N_Selective_Accept): Check the alternatives of a selective
865 accept for controlled objects.
866 (Expand_N_Timed_Entry_Call): Check the entry call and delay
867 alternatives of a timed entry call for controlled objects.
868 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
869 exception handler for controlled objects.
870 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
871 Add formal parameter Nested_Constructs along with its associated
873 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
874 Requires_Cleanup_Actions.
875 (Process_Statements_For_Controlled_Objects): New routine.
876 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
877 routine. Inspect a node which contains a non-handled sequence of
878 statements for controlled objects. If such an object is found, the
879 statements are wrapped in a block.
881 2011-08-04 Bob Duff <duff@adacore.com>
883 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
884 need to compare with Class_Wide_Type (T2), in order to get at the
885 original class-wide type node.
886 * sem_type.ads (Covers): Improve the comment.
887 * einfo.ads (Class_Wide_Type): Improve the comment.
888 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
889 the type of the Deref.
891 2011-08-04 Yannick Moy <moy@adacore.com>
893 * gnat_rm.texi: Document that Test_Case pragma can only appear on
894 separate declarations.
895 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
896 check identifier of pragma argument.
897 (Chain_TC): check that no other test case associated to the same entity
899 (Check_Test_Case): disallow test case inside subprogram body
900 (Analyze_Pragma): correct call to check identifier and not argument
901 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
902 function gets name from test case pragma.
904 2011-08-04 Yannick Moy <moy@adacore.com>
906 * gnat_rm.texi: Document new pragma and aspect.
907 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
908 (No_Duplicates_Allowed): new constant array defining whether duplicates
909 aspects of each kind can appear on the same declaration.
910 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
911 field, which points to a node holding the previous Spec_PPC_List.
912 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
913 through the indirection with Contract.
914 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
915 * par-prag.adb (Prag): do nothing on Test_Case pragma
916 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
918 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
919 component Ensures of Test_Case.
920 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
921 (Analyze_Generic_Subprogram_Declaration,
922 Analyze_Subprogram_Instantiation,
923 Analyze_Abstract_Subprogram_Declaration,
924 Analyze_Subprogram_Body_Helper,
925 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
926 insert contract in subprogram node at point of definition
928 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
929 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
931 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
932 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
933 similar to the analysis of pre/post
934 (Derive_Subprogram): insert contract in subprogram node at point of
936 * sem_prag.adb, sem_prag.ads
937 (Check_Arg_Is_String_Literal, Check_Identifier):
938 new checking procedures to be called in treatment of pragmas
939 (Check_Test_Case): new procedure to check that a Test_Case aspect or
940 pragma is well-formed. This does not check currently that 'Result is
941 used only in the Ensures component of a Test_Case.
942 (Analyze_Pragma): add case for Test_Case
943 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
944 components of a Test_Case.
945 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
946 expressions in the 3rd (and 4th if present) arguments of a Test_Case
947 pragma, treated as spec expressions.
948 (Sig_Flags): add value -1 for Test_Case.
949 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
950 Get_Requires_From_Test_Case_Pragma): getters for both expression
951 components of a Test_Case.
952 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
953 indirection between an entry or [generic] subprogram entity and its
954 pre/post + test-cases.
955 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
956 get/set for fields of an N_Contract node.
957 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
958 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
959 names and pragma for Test_Case.
960 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
962 2011-08-04 Vincent Celier <celier@adacore.com>
964 * gnat_ugn.texi: Improve documentation of gnatmake switch
967 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
969 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
970 type). Initialize Atyp to the appropriate type which is later checked
971 for completion. Rewrite the assertion associated with private type
974 2011-08-04 Ed Falis <falis@adacore.com>
976 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
977 initialize the number of CPUs.
979 2011-08-04 Ed Schonberg <schonberg@adacore.com>
981 * sem_type.adb (Disambiguate): New subsidiary routine
982 In_Same_Declaration_List, to implement AI05-0020: a user-defined
983 equality on an anonymous access type whose designated type is private
984 does not lead to an ambiguity with the universal access equality
985 operator in the body or child units of the defining package. The same
986 is true for a multiplication operator on a private type completed with
989 2011-08-04 Javier Miranda <miranda@adacore.com>
991 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
992 (Normalize_Scalars_Config): Removed.
994 (Register_Opt_Config_Switches): Remove registering config values of
995 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
996 (Restore_Opt_Config_Switches): Remove code which restores the values of
997 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
998 Init_Or_Norm_Scalars.
999 (Save_Opt_Config_Switches): Remove code which saves values of
1000 Init_Or_Norm_Scalars and Normalize_Scalars.
1001 (Set_Opt_Config_Switches): Remove code which restores config values of
1002 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1003 Init_Or_Norm_Scalars.
1005 2011-08-04 Yannick Moy <moy@adacore.com>
1007 * frontend.adb (Frontend): remove previous patch to avoid full
1008 qualification in ALFA mode.
1009 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1010 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1011 unique name for an entity, which could be used to identify the entity
1012 across compilation units.
1014 2011-08-04 Thomas Quinot <quinot@adacore.com>
1017 (Initialize_Default_Project_Path): Add target specific directory
1018 ($prefix/$target/lib/gnat) in front of project path in all cases
1019 (making gnatmake's behaviour consistent with gprbuild).
1020 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1021 Pass target name from Sdefault to project subsystem.
1022 * gnatls.adb: Show new target specific default project directory.
1024 2011-08-04 Johannes Kanig <kanig@adacore.com>
1026 * cstand.adb: Add Information to Identifier in Standard
1027 (Identifer_For): Set Entity to the corresponding entity
1029 2011-08-04 Sergey Rybin <rybin@adacore.com>
1031 * gnat_ugn.texi: Update doc on gnatcheck.
1033 2011-08-04 Yannick Moy <moy@adacore.com>
1035 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1038 2011-08-04 Yannick Moy <moy@adacore.com>
1040 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1041 performing expansion.
1042 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1043 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1044 it is not called in ALFA mode.
1046 2011-08-04 Emmanuel Briot <briot@adacore.com>
1048 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1049 after all, so removed.
1051 2011-08-04 Sergey Rybin <rybin@adacore.com>
1053 * vms_data.ads: Add missing VMS qualifiers.
1055 2011-08-04 Emmanuel Briot <briot@adacore.com>
1057 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1058 the list of files on the command line after processing it through
1061 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1063 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1064 processing for .NET/JVM. These targets can now benefit from
1065 Raise_From_Controlled_Operation and they share the same processing with
1067 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1068 These targets need transient scopes in order to properly finalize short
1069 lived controlled objects.
1070 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1071 NET/JVM. These targets can now benefit from
1072 Raise_From_Controlled_Operation and they share the same processing with
1075 2011-08-04 Geert Bosch <bosch@adacore.com>
1077 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1079 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1081 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1082 Expand_Record_Aggregate, to determine whether aggregate must be
1083 expanded into assignments. This is the case if the ancestor part is
1084 private, regarless of the setting of the flag Has_Private_Ancestor.
1086 2011-08-04 Ed Falis <falis@adacore.com>
1088 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1090 2011-08-04 Bob Duff <duff@adacore.com>
1092 * sinfo.ads: Fix comment.
1094 2011-08-04 Steve Baird <baird@adacore.com>
1096 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1097 choose a package name in much the same way as is
1098 done for JGNAT when VM_Target /= No_VM, except that
1099 a slightly more distinctive prefix string is used.
1101 2011-08-04 Emmanuel Briot <briot@adacore.com>
1103 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1104 gnatmake command line.
1105 This behavior was never documented (and was supported only because of
1106 an early bug in the code). This case might lead to ambiguous cases
1107 (between unit names and truncated base names without suffixes).
1109 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1111 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1112 Remove the external tag of a tagged type from the internal hash table.
1113 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1114 expanded usage of the routine. Strenghten the check for Is_Master. Add
1115 processing for tagged types.
1116 (Build_Finalizer): Create all the necessary lists used in finalizer
1117 creation when the processed context is a package that may contain
1119 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1120 Requires_Cleanup_Actions.
1121 (Expand_N_Package_Body): Package bodies may need clean up code
1122 depending on whether they contain tagged types.
1123 (Expand_N_Package_Declaration): Package declarations may need clean up
1124 code depending on whether they contain tagged types.
1125 (Unregister_Tagged_Types): New routine. Search through a list of
1126 declarations or statements, looking for non-abstract Ada tagged types.
1127 For each such type, generate code to unregister the external tag.
1128 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1129 Requires_Cleanup_Actions.
1130 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1131 through a list of declarations or statements looking for non-abstract
1132 Ada tagged types or controlled objects.
1133 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1134 Requires_Cleanup_Actions.
1135 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1136 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1139 2011-08-04 Vincent Celier <celier@adacore.com>
1141 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1142 has Ada sources, not project Project, because if the root project
1143 Project has no sources of its own, all projects will be deemed without
1146 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1148 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1149 of the No_Param_Proc acc-to-subp type used for initialization of
1150 __gnat_finalize_library_objects so that it's declared at library level
1151 rather than nested inside of the adainit routine.
1153 2011-08-04 Javier Miranda <miranda@adacore.com>
1155 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1156 if the tagged type has a representation clause which specifies its
1159 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1161 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1162 Remove previous procedure with that name.
1163 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1165 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1166 subtype mark, the ancestor cannot have unknown discriminants.
1167 (Resolve_Record_Aggregate): if the type has invisible components
1168 because of a private ancestor, the aggregate is illegal.
1170 2011-08-04 Vincent Celier <celier@adacore.com>
1172 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1173 account switches -gnat2005, -gnat12 and -gnat2012.
1175 2011-08-04 Bob Duff <duff@adacore.com>
1177 * s-tasdeb.ads: Minor comment fix.
1179 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1181 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1183 * switch.ads, switch.adb (Is_Language_Switch): New function.
1185 2011-08-04 Vincent Celier <celier@adacore.com>
1187 * switch-c.adb: Minor comment addition.
1189 2011-08-04 Vincent Celier <celier@adacore.com>
1191 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1192 ending with '=' is followed by a space (missing file name).
1194 2011-08-04 Pascal Obry <obry@adacore.com>
1196 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1198 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1200 * sem_ch12.adb (Analyze_Associations): New routine
1201 Check_Overloaded_Formal_Subprogram to reject a formal package when
1202 there is a named association or a box initialisation for an overloaded
1203 formal subprogram of the corresponding generic.
1205 2011-08-04 Yannick Moy <moy@adacore.com>
1207 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1208 * get_alfa.adb, put_alfa.adb: Read and write new component of
1210 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1212 2011-08-04 Pascal Obry <obry@adacore.com>
1214 * urealp.adb: Minor reformatting.
1216 2011-08-04 Tristan Gingold <gingold@adacore.com>
1218 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1219 Handle the case when Cleanup_Protected_Object returns Empty.
1221 2011-08-04 Yannick Moy <moy@adacore.com>
1223 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1225 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1227 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1228 call, ignore functions.
1230 2011-08-04 Geert Bosch <bosch@adacore.com>
1232 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1235 2011-08-04 Emmanuel Briot <briot@adacore.com>
1237 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1238 as an index for Builder'Switches. This conforms to the documentation.
1239 * make.adb (Insert_Project_Sources): avoid duplicate code
1241 2011-08-04 Emmanuel Briot <briot@adacore.com>
1243 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1244 name on the command line (for instance "../dummy"), never assume it can
1247 2011-08-04 Tristan Gingold <gingold@adacore.com>
1249 * bindgen.adb: Remove code the reference or create the
1250 Break_Start/__gnat_break_start procedure.
1251 * s-stalib.adb (Break_Start): Removed.
1253 2011-08-04 Emmanuel Briot <briot@adacore.com>
1255 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1256 shared with gprbuild.
1258 2011-08-04 Yannick Moy <moy@adacore.com>
1260 * par-ch4.adb (P_Primary): preferentially issue an error message about
1261 a missing parenthesis arount a conditional or case expression in Ada
1262 2012 mode, if we detect that the alignment is not correct for a
1265 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1267 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1268 tag-to-class-wide conversion as needing finalization actions.
1269 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1270 a tag-to-class-wide conversion as needing finalization actions.
1271 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1272 conversion does not need finalization actions.
1273 (Is_Tag_To_CW_Conversion): New routine.
1274 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1275 whether an object is the result of a tag-to-class-wide conversion.
1277 2011-08-04 Yannick Moy <moy@adacore.com>
1279 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1280 the left-hand-side and right-hand-side of a conjunct are inserted when
1281 translating a pre- or postcondition
1282 * sem_ch6.adb: Correct typo in comment
1284 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1286 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1287 Unchecked_Conversion and Unchecked_Deallocation.
1289 2011-08-04 Thomas Quinot <quinot@adacore.com>
1291 * make.adb: Minor reformatting.
1293 2011-08-04 Emmanuel Briot <briot@adacore.com>
1295 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1296 sources in the project and its imported projects, but not in the whole
1299 2011-08-04 Emmanuel Briot <briot@adacore.com>
1301 * make.adb: Remove debug trace.
1303 2011-08-04 Vincent Celier <celier@adacore.com>
1305 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1306 path in canonical form, to be able to compare path names on platforms
1307 such as Windows or Darwin.
1309 2011-08-04 Thomas Quinot <quinot@adacore.com>
1311 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1312 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1313 * scos.ads: Update documentation accordingly.
1314 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1317 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1319 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1320 attribute only if prefix type is scalar.
1322 2011-08-04 Emmanuel Briot <briot@adacore.com>
1324 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1325 in gnatmake for specifying mains on the command line that do not belong
1326 to the main project. These mains must currently all belong to the same
1328 (Ultimate_Extension_Of): removed, since duplicated
1329 Ultimate_Extending_Project.
1331 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1333 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1335 (CodePeer_Mode_String): New.
1336 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1338 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1339 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1340 mode, since no useful elaboration subprogram is needed by CodePeer.
1341 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1342 In this mode, compile binder file with -gnatC and do stop after this
1345 2011-08-04 Vincent Celier <celier@adacore.com>
1347 * exp_ch7.adb: Minor comment fix.
1349 2011-08-04 Robert Dewar <dewar@adacore.com>
1351 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1352 exp_ch4.adb, makeutl.adb: Minor reformatting.
1354 2011-08-04 Emmanuel Briot <briot@adacore.com>
1356 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1357 Create several new subprograms to move code out of Make. This makes the
1358 code more readable, removes code duplication, and is a preparation work
1359 for adding support for aggregate projects.
1361 2011-08-04 Tristan Gingold <gingold@adacore.com>
1363 * s-po32gl.ads, s-po32gl.adb: New files.
1364 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1365 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1366 (Build_Finalization_Collection): Use it.
1367 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1368 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1370 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1371 * gcc-interface/Make-lang.in: Update dependencies.
1373 2011-08-04 Emmanuel Briot <briot@adacore.com>
1375 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1378 2011-08-04 Emmanuel Briot <briot@adacore.com>
1380 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1381 command line is not a file name, also check whether it could be a unit
1384 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1386 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1387 the header of the finalization routine.
1388 If the unit has no finalizer but is a body whose spec has one, then
1389 generate the decrement of the elaboration entity only.
1390 If the unit has a finalizer and is a spec, then do not generate the
1391 decrement of the elaboration entity.
1392 (Gen_Finalize_Library_C): Likewise.
1394 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1396 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1397 (Bounds_Size_Expression): Removed.
1398 (Double_Alignment_Of): New subsidiary routine.
1399 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1400 for a hole in the dope vector of unconstrained arrays due to different
1401 index and element alignments.
1403 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1405 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1406 raise program_error because body has not been seen yet.
1408 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1410 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1413 2011-08-04 Vincent Celier <celier@adacore.com>
1415 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1417 2011-08-04 Yannick Moy <moy@adacore.com>
1419 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1420 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1422 2011-08-04 Thomas Quinot <quinot@adacore.com>
1424 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1425 instantiation in RCI.
1427 2011-08-04 Emmanuel Briot <briot@adacore.com>
1429 * make.adb: Share more code with gprbuild
1431 2011-08-04 Emmanuel Briot <briot@adacore.com>
1433 * projects.texi: Added documentation for the IDE'Gnat project file
1436 2011-08-04 Nicolas Roche <roche@adacore.com>
1438 * gnat_rm.texi: Minor editing.
1440 2011-08-04 Javier Miranda <miranda@adacore.com>
1442 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1443 and the library case for VM targets.
1444 (Gen_Adainit_Ada): Likewise.
1446 2011-08-04 Robert Dewar <dewar@adacore.com>
1448 * g-altive.ads: Minor comment updates.
1449 * prj-nmsc.adb: Minor reformatting.
1451 2011-08-04 Javier Miranda <miranda@adacore.com>
1454 (Normalize_Scalars_Config): Value of the configuration switch set by
1455 pragma Normalize_Scalars when it appears in the gnat.adc file.
1456 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1457 to save and restore settings of this pragma.
1459 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1460 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1462 2011-08-04 Vincent Celier <celier@adacore.com>
1464 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1466 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1468 * makeutl.adb: Minor reformatting.
1470 2011-08-04 Olivier Hainque <hainque@adacore.com>
1472 * g-altive.ads: Update comments to reflect that only the soft
1473 binding is available today.
1475 2011-08-04 Robert Dewar <dewar@adacore.com>
1477 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1478 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1479 * gcc-interface/Make-lang.in: Update dependencies.
1481 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1483 * prj-env.adb: Remove local debug traces.
1485 2011-08-04 Yannick Moy <moy@adacore.com>
1487 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1488 was used instead of Hi_OK, which could cause a read of an uninitialized
1489 value later on. Detected while working on the new warning.
1490 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1492 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1493 in more cases, in order to detect more unreferenced values.
1494 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1495 object for expression, if any.
1497 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1499 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1500 the operand types instead of the Esize.
1502 2011-08-04 Steve Baird <baird@adacore.com>
1504 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1505 enable CodePeer_Mode.
1506 * bindusg.adb (Display): Add help message describing -P binder switch.
1507 * gnat_ugn.texi: Document -P binder switch.
1508 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1509 user-defined main program directly.
1510 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1511 user-defined main program in the context clause of the package body.
1513 2011-08-04 Yannick Moy <moy@adacore.com>
1515 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1516 duplicate of Defining_Entity
1517 (Get_Unique_Entity_For_Decl): rename function into
1518 Unique_Defining_Entity
1519 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1520 (Formal_Proof_On): remove synthesized flag
1521 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1522 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1523 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1524 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1525 Annotate (Formal_Proof)
1527 2011-08-04 Emmanuel Briot <briot@adacore.com>
1529 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1530 source files with non-standard naming schemes, in imported projects
1532 2011-08-04 Emmanuel Briot <briot@adacore.com>
1534 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1535 specified on the gprbuild command line, we need to compile all units
1536 within that file, not just the first one we find
1537 Fix error message for mains that are not found.
1539 2011-08-04 Thomas Quinot <quinot@adacore.com>
1541 * sem_ch6.adb: Update comment.
1542 * sem_ch12.adb: Minor reformatting.
1544 2011-08-04 Bob Duff <duff@adacore.com>
1546 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1547 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1548 race condition whose symptom is to fail to lock Parent. That, in turn,
1549 causes Parent.Awake_Count to be accessed without locking Parent, which
1550 causes another race condition whose symptom is that Parent.Awake_Count
1551 can be off by 1 (either too high or too low). The solution is to lock
1552 Parent unconditionally, and then lock Acceptor, before reading
1553 Acceptor.Terminate_Alternative.
1555 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1557 * debug.adb: Update comment.
1559 2011-08-04 Robert Dewar <dewar@adacore.com>
1561 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1562 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1563 exp_ch6.adb: Minor reformatting.
1565 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1567 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1570 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1572 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1574 2011-08-04 Thomas Quinot <quinot@adacore.com>
1576 * sinfo.ads: Minor reformatting.
1578 2011-08-04 Emmanuel Briot <briot@adacore.com>
1580 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1581 even if there is no location.
1583 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1585 * sem_res.adb, sem_ch4.adb: move check for restriction
1586 No_Task_Hierarchy to resolve_allocator.
1588 2011-08-04 Thomas Quinot <quinot@adacore.com>
1590 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1591 This flag of N_Pragma nodes is not used, remove it as well as all of
1592 the associated circuitry.
1594 2011-08-04 Javier Miranda <miranda@adacore.com>
1596 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1597 runtime check on duplicated externa tags
1598 * debug.adb Document switch -gnatdQ.
1600 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1602 * a-fihema.ads: Minor typo fix.
1604 2011-08-04 Yannick Moy <moy@adacore.com>
1606 * sem_ch10.adb: Minor comment update.
1608 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1610 * einfo.adb: Update the node field usage to reflect the renaming of
1611 Return_Flag to Return_ Flag_Or_Transient_Decl.
1612 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1613 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1614 (Write_Field15_Name): Change Return_Flag to
1615 Return_Flag_Or_Transient_Decl.
1616 * einfo.ads: Rename node field Return_Flag to
1617 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1618 occurrences in entities.
1619 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1620 associated Inline pragma.
1621 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1622 associated Inline pragma.
1623 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1625 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1626 Return_Flag and Set_Return_Flag.
1627 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1628 objects generated for controlled transients declared inside an
1629 Exception_With_Actions. Update the calls to Return_Flag.
1630 (Process_Object_Declaration): Add code to add a null guard for hook
1631 objects generated for controlled transients declared inside an
1632 Exception_With_Actions. Update related comment.
1633 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1634 objects generated for controlled transients declared inside an
1635 Exception_With_Actions. Update the calls to Return_Flag.
1636 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1638 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1640 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1641 positional aggregate.
1643 2011-08-04 Vincent Celier <celier@adacore.com>
1645 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1646 SLOC only for pragmas.
1648 2011-08-04 Emmanuel Briot <briot@adacore.com>
1650 * projects.texi: Minor typo fix.
1652 2011-08-04 Emmanuel Briot <briot@adacore.com>
1654 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1655 on case-sensitive file systems.
1657 2011-08-04 Thomas Quinot <quinot@adacore.com>
1659 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1660 nested in a disabled pragma.
1661 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1662 enclosing pragma, if any, for X decisions.
1664 2011-08-04 Thomas Quinot <quinot@adacore.com>
1666 * sem_prag.adb: Minor reformatting.
1668 2011-08-04 Vincent Celier <celier@adacore.com>
1670 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1671 allowed in no run time mode.
1673 2011-08-04 Vincent Celier <celier@adacore.com>
1675 * make.adb (Check): When -gnatc is used, check for the source file
1676 inside the ALI file with a canonical case file name.
1678 2011-08-04 Emmanuel Briot <briot@adacore.com>
1680 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1681 overriding the separator.
1683 2011-08-04 Robert Dewar <dewar@adacore.com>
1685 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1686 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1688 2011-08-04 Robert Dewar <dewar@adacore.com>
1690 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1692 2011-08-04 Yannick Moy <moy@adacore.com>
1694 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1695 'Result only appears in postcondition of function.
1697 2011-08-04 Thomas Quinot <quinot@adacore.com>
1699 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1700 external tag, include the value of the external tag in the exception
1703 2011-08-04 Yannick Moy <moy@adacore.com>
1705 * sem_attr.adb (Result): modify error message for misplaced 'Result
1707 2011-08-04 Sergey Rybin <rybin@adacore.com>
1709 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1710 clear that the second argument must be an identifier.
1712 2011-08-04 Thomas Quinot <quinot@adacore.com>
1714 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1715 -fpreserve-control-flow, insert an IF statement on the barrier
1716 condition to ensure that a conditional branch instruction is generated.
1718 2011-08-04 Emmanuel Briot <briot@adacore.com>
1720 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1721 (Processing_Flags.Ignore_Missing_With): new flag.
1723 2011-08-04 Emmanuel Briot <briot@adacore.com>
1725 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1726 Source_List_File on case-insensitive systems where the file is actually
1727 on a case-sensitive file system (NFS,...).
1729 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1731 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1732 function return contains a controlled [extension] aggregate and the
1733 return statement is not part of a handled sequence of statements, wrap
1734 the return in a block. This ensures that all controlled temporaries
1735 generated during aggregate resolution will be picked up by the
1736 finalization machinery.
1738 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1740 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1741 components, freeze type before resolution, to ensure that default
1742 initializations are present for all components.
1743 * sem_res.adb (Resolve_Actuals): the designated object of an
1744 accces-to-constant type is a legal actual in a call to an
1745 initialization procedure.
1747 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1749 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1750 N_Unchecked_Type_Conversion to the possible containers of a renamed
1753 2011-08-04 Yannick Moy <moy@adacore.com>
1755 * par-ch13.adb (Aspect_Specifications_Present): recognize
1756 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1757 is issued in Strict mode.
1758 * par.adb: Fix typos in comments.
1760 2011-08-04 Yannick Moy <moy@adacore.com>
1762 * sem_attr.adb (Result): modify error message to take into account Post
1763 aspect when compiling Ada 2012 (or newer) code.
1765 2011-08-04 Nicolas Roche <roche@adacore.com>
1767 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1768 remove need for GCC exceptions.
1770 2011-08-04 Vincent Celier <celier@adacore.com>
1772 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1773 project, not the source file name.
1774 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1775 excluded, continue looking. This excluded source will only be returned
1776 if there is no other source with the same base name that is not locally
1779 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1781 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1782 private and one of the operands is a real literal, use a qualified
1783 expression rather than a conversion which is not meaningful to the
1786 2011-08-04 Yannick Moy <moy@adacore.com>
1788 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1789 corresponding aspect X'Class are allowed, proceed with analysis of the
1790 aspect instead of skipping it.
1792 2011-08-04 Tristan Gingold <gingold@adacore.com>
1794 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1795 This will allow to have an Ada implementation for the subprogram.
1797 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1799 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1800 completion and aspects are present, apply them to the entity for the
1801 type which is currently the partial view, but which is the one that
1803 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1804 applies to a partial view, indicate that the full view has predicates
1805 and delayed aspects.
1806 (Replace_Type_Reference): Handle properly predicates that apply to the
1807 full view of a private completion.
1809 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1811 * layout.adb (Layout_Type): For composite types, do not set Esize.
1812 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1814 (Size_Known): Look at the RM size of components instead of the Esize.
1815 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1816 issue warning and activate Implicit_Packing.
1817 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1818 if the Esize is not known.
1819 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1820 for elementary types only.
1821 (Analyze_Record_Representation_Clause): Look at the RM size instead
1822 of the Esize to issue errors.
1823 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1825 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1827 Look at the RM size instead of the Esize for types if the latter is
1829 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1831 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1833 * sem_type.adb: proper handling of equality not involving anonymous
1836 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1838 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1839 Vis_Decls. When creating a library-level finalizer for a package spec,
1840 both the declaration and body of the finalizer are inserted either in
1841 the visible or private declarations of the package spec.
1843 2011-08-04 Javier Miranda <miranda@adacore.com>
1845 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1846 use of the full-view of a type when invoking Is_Ancestor.
1847 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1848 the full-view of private parents is requested, then use also the
1849 full-view of the parent of the first derivation.
1851 2011-08-04 Tristan Gingold <gingold@adacore.com>
1853 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1854 instead of the locally imported procedure.
1855 * s-taprop-mingw.adb (Enter_Task): Ditto.
1856 * s-valrea.adb (Scan_Real): Ditto.
1857 * s-imgrea.adb (Set_Image_Real): Ditto.
1858 * s-flocon.ads: Make the package pure.
1860 2011-08-04 Thomas Quinot <quinot@adacore.com>
1862 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1863 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1864 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1865 New subprogram, moved here from...
1866 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1867 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1868 rewriting of the last argument into a procedure call statement here...
1869 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1872 2011-08-04 Thomas Quinot <quinot@adacore.com>
1874 * par_sco.adb: Minor reformatting.
1876 2011-08-04 Robert Dewar <dewar@adacore.com>
1878 * erroutc.adb: Minor reformatting.
1880 2011-08-04 Thomas Quinot <quinot@adacore.com>
1882 * par_sco.adb: Comment update.
1884 2011-08-04 Tristan Gingold <gingold@adacore.com>
1886 * s-flocon.ads: New file.
1887 * g-flocon.ads: Now a renaming of s-flocon.
1888 * Makefile.rtl: Add s-flocon.o
1890 2011-08-04 Javier Miranda <miranda@adacore.com>
1892 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1893 constrained, do not attempt to build a subtype of it.
1895 2011-08-04 Yannick Moy <moy@adacore.com>
1897 * errout.ads Change comments: remove 'R'M as an example where quotes
1898 are needed; add ALFA as another case where quotes are not needed
1899 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1900 case where quotes are not needed.
1901 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1902 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1903 Remove all occurrences of 'A'L'F'A
1905 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1907 * sem_ch13.adb: check legality of invariant pragma.
1909 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1911 * bindgen.adb: Add comments.
1913 2011-08-04 Yannick Moy <moy@adacore.com>
1915 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1917 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1918 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1920 2011-08-04 Robert Dewar <dewar@adacore.com>
1922 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1923 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1924 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1926 2011-08-04 Thomas Quinot <quinot@adacore.com>
1928 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1930 2011-08-04 Thomas Quinot <quinot@adacore.com>
1933 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1936 2011-08-04 Robert Dewar <dewar@adacore.com>
1938 * einfo.ads, exp_ch4.adb: Minor reformatting.
1940 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1942 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1944 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1946 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1947 type in all cases to compute list of primitive operations, because full
1948 view may be an itype that is not attached to the list of declarations.
1950 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1952 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1953 library has already been finalized.
1954 (Gen_Adafinal_C): Likewise.
1955 (Gen_Adainit_Ada): Generate an early return if the library has
1956 already been elaborated.
1957 (Gen_Adainit_C): Likewise.
1958 (Gen_Output_File_Ada): Generate an elaboration flag.
1959 (Gen_Output_File_C): Likewise.
1961 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1963 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1964 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1965 built in the first place.
1966 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1967 for CodePeer because Finalize_Address was not built to begin with.
1968 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1970 2011-08-04 Pascal Obry <obry@adacore.com>
1972 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1973 filenames, this ensures unicity of filenames across processes.
1975 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1977 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1978 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1979 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1980 Add False as the actual to From_Abort in the generated call to
1981 Raise_From_Controlled_Operation.
1983 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1985 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1986 so that the ali file name can be retrieved from outside of this package.
1987 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1988 doing nothing in the general case, but used to update the object file
1989 timestamp if directly generated by the backend.
1990 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1991 to a later time than the ali file one.
1993 2011-08-04 Yannick Moy <moy@adacore.com>
1995 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1996 entities whose body contains an Annotate pragma which forces formal
1998 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1999 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2000 Mark_Non_ALFA_Subprogram to pass in a message and node.
2001 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2002 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2003 surrounding subprogram.
2004 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2005 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2006 as not in ALFA is annotated with Formal_Proof being On, then an error
2007 is issued based on the additional parameters for message and node.
2008 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2009 * gcc-interface/Make-lang.in: Update dependencies.
2011 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2013 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2014 Finalize_Address when CodePeer is enabled.
2016 2011-08-04 Pascal Obry <obry@adacore.com>
2018 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2019 the latter returns a pointer to a static buffer which is deallocated
2020 at the end of the routine.
2022 2011-08-04 Yannick Moy <moy@adacore.com>
2024 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2025 after index creation; mark unconstrained base array type generated as
2026 being in/not in ALFA as well
2027 (Make_Index): mark subtype created as in/not in ALFA
2028 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2029 over a loop as in/not in ALFA, depending on its type and form of loop
2032 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2034 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2035 directly to False on .NET and JVM.
2037 2011-08-04 Yannick Moy <moy@adacore.com>
2039 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2040 constraint that subtype must come from source code to be in ALFA, so
2041 that anonymous subtypes can be in ALFA too.
2043 2011-08-04 Yannick Moy <moy@adacore.com>
2045 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2046 reference for ALFA mode.
2047 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2048 procedure public so as to use it from formal verification back-end.
2050 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2052 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2053 invalid checks of the Parameter, making Remove_Switch not working
2056 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2058 * targparm.ads: Update header: no run-time exception is needed on this
2061 2011-08-04 Vincent Celier <celier@adacore.com>
2063 * a-fihema.adb: Use System.IO instead of GNAT.IO
2065 2011-08-04 Thomas Quinot <quinot@adacore.com>
2067 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2068 are forbidden in Compiler_Unit mode.
2070 2011-08-04 Robert Dewar <dewar@adacore.com>
2072 * sem_util.adb: Minor reformatting.
2074 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2076 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2077 library-level finalizers.
2078 (Gen_Finalize_Library_C): Update the import string for library-level
2080 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2081 library-level finalizer.
2082 * exp_ch7.adb: Remove with and use clauses for Stringt.
2083 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2084 Spec_Decl. Add local variable Body_Id. The names of library-level
2085 finalizers are now manually fully qualified and are no longer external.
2086 A single name is now capable of servicing .NET, JVM and non-VM targets.
2087 Pragma Export is no longer required to provide visibility for the name.
2088 (Create_Finalizer_String): Removed.
2089 (New_Finalizer_Name): New routine which mimics New_..._Name.
2091 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2093 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2094 elaboration counter to Standard_Short_Integer.
2095 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2096 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2097 (Gen_Elab_Externals_C): Likewise.
2099 2011-08-04 Ed Falis <falis@adacore.com>
2101 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2102 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2103 system-vxworks-mips.ads, system-vxworks-x86.ads
2104 (Always_Compatible_Rep): set to False for all VxWorks targets.
2106 2011-08-04 Robert Dewar <dewar@adacore.com>
2108 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2109 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2110 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2111 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2112 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2113 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2114 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2115 Minor reformatting and code reorganization.
2117 2011-08-04 Emmanuel Briot <briot@adacore.com>
2119 * projects.texi: Added doc for aggregate projects.
2121 2011-08-04 Emmanuel Briot <briot@adacore.com>
2123 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2124 Add support for overriding the Project_Path in aggregate projects.
2126 2011-08-04 Robert Dewar <dewar@adacore.com>
2128 * a-cofove.ads: Minor reformatting.
2130 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2132 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2133 on the generated code.
2134 (Build_Finalize_Statements): Update the comment on the generated code.
2135 (Build_Initialize_Statements): Update the comment on the generated code.
2136 (Build_Object_Declarations): Add local variable Result. The object
2137 declarations are now built in sequence.
2138 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2141 2011-08-04 Robert Dewar <dewar@adacore.com>
2143 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2145 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2147 * einfo.ads (Elaboration_Entity): Document new definition and use.
2148 (Elaboration_Entity_Required): Adjust to above change.
2149 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2150 * exp_ch12.adb: And with and use for Snames.
2151 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2152 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2153 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2154 <Check_Unit_Name>: Deal with N_Expanded_Name.
2155 <Attribute_Elaborated>: Extend to all unit names.
2156 * sem_elab.adb: And with and use for Uintp.
2157 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2158 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2159 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2160 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2161 from Gen_Adainit_Ada.
2162 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2163 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2164 case, do not call System.Standard_Library.Adafinal; instead call
2165 finalize_library if needed.
2166 (Gen_Adafinal_C): Likewise.
2167 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2168 non-main program case.
2169 (Gen_Adainit_C): Generate a couple of external declarations here.
2170 In the main program case, set SSL.Finalize_Library_Objects.
2171 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2172 (Gen_Elab_Calls_C): Likewise.
2173 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2174 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2175 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2177 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2178 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2180 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2181 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2182 of external declarations. Â Call Gen_Finalize_Library_C.
2184 2011-08-04 Emmanuel Briot <briot@adacore.com>
2186 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2187 Compute_Compilation_Phases): new subprogram.
2188 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2189 The number of mains as well as the various compilation phases that
2190 need to be run are now project tree specific, since various
2191 aggregated trees might have different requirements. In particular,
2192 they do not all require bind or link phases.
2194 2011-08-04 Emmanuel Briot <briot@adacore.com>
2196 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2197 (Project_Tree_Appdata): New type.
2198 It is now possible to associate application-specific data to a project
2199 tree. In particular, this is used in the gprbuild builder to avoid a
2200 number of global tables and htables, especially now that there can be
2201 several project trees loaded at once because of aggregate projects.
2202 (Debug_Name): new procedure.
2203 * projects.texi: Clarify syntax of "**" for Source_Dirs
2205 2011-08-03 Emmanuel Briot <briot@adacore.com>
2207 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2208 the "roots" for a main.
2209 (Fill_From_Project): add support for aggregate projects. Main units
2210 in aggregated projects are now automatically added in the list of
2211 files to build (although this fails later on in gprbuild, because
2212 these files are not using the root proejct tree, so this needs
2214 * gcc-interface/Make-lang.in: Update dependencies.
2216 2011-08-03 Yannick Moy <moy@adacore.com>
2218 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2219 conditional expression in ALFA.
2220 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2221 expressions as not in ALFA.
2223 2011-08-03 Robert Dewar <dewar@adacore.com>
2225 * a-cofove.adb: Minor reformatting.
2227 2011-08-03 Emmanuel Briot <briot@adacore.com>
2229 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2230 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2232 These packages are more logically placed in the Queue package, since
2233 they manipulate the queue. It is also likely that they can be adapted
2234 for gnatmake, thus sharing more code.
2235 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2236 that we could move the above.
2238 2011-08-03 Emmanuel Briot <briot@adacore.com>
2240 * errutil.adb (Finalize): clean up the list of error messages on exit.
2241 Calling this subprogram multiple times will no longer show duplicate
2242 error messages on stderr.
2244 2011-08-03 Emmanuel Briot <briot@adacore.com>
2246 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2247 Getopt_Switches when we have already define a command line
2250 2011-08-03 Yannick Moy <moy@adacore.com>
2252 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2253 in ALFA. Instead, they are considered as assertions to prove.
2254 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2255 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2256 if they have no ELSE part, or if they occur in pre- and postconditions,
2257 where the Condition cannot have side-effects in ALFA
2258 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2259 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2260 Instead, include type conversion between scalar types in ALFA.
2261 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2262 if-and-only-if its type is in ALFA.
2264 2011-08-03 Thomas Quinot <quinot@adacore.com>
2266 * scos.adb, get_scos.adb, put_scos.adb
2267 New code letter for decisions: G (entry guard)
2269 (Traverse_Subprogram_Body): Rename to...
2270 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2271 (Traverse_Protected_Body): New subprogram
2272 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2273 protected bodies and entry bodies.
2275 2011-08-03 Yannick Moy <moy@adacore.com>
2277 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2278 entities with get/set subprograms, which is set on procedure entities
2279 generated by the compiler for a postcondition.
2280 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2281 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2282 entity for a declaration
2283 (Get_Unique_Entity_For_Decl): new function returning an entity which
2284 represents a declaration, so that matching spec and body have the same
2287 2011-08-03 Robert Dewar <dewar@adacore.com>
2289 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2290 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2292 2011-08-03 Yannick Moy <moy@adacore.com>
2294 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2295 library-level because retriction No_Implicit_Dynamic_Code in the
2296 front-end prevents its definition as a local subprogram
2297 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2298 for reuse in other contexts
2299 (Traverse_Declarations_Or_Statements,
2300 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2301 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2302 procedures take a callback parameter to be called on all declarations
2304 (Traverse_All_Compilation_Units): new generic function to traverse a
2305 compilation unit and call a callback parameter on all declarations
2307 2011-08-03 Javier Miranda <miranda@adacore.com>
2309 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2310 in Java since they are always enclosed in a namespace that
2311 differentiates them, and overloaded entities are supported by the VM.
2313 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2315 * checks.adb (Determine_Range): If a computed bound of an operation is
2316 outside the range of the base type of the expression, and overflow
2317 checks are enabled, the result is unknown and cannot be used for any
2318 subsequent constant folding.
2319 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2320 unknown, so is the result of the comparison.
2322 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2324 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2325 From_Abort. When finalization was triggered by an abort, propagate
2326 Standard'Abort_Signal rather than Program_Error.
2327 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2329 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2330 From_Abort. When finalization was triggered by an abort, propagate
2331 Standard'Abort_Signal rather than Program_Error.
2332 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2334 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2335 Abort_Id. Update the calls to Build_Object_Declarations and
2336 Build_Raise_Statement to include Abort_Id.
2337 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2338 calls to Build_Object_Declarations and Build_Raise_Statement to include
2340 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2341 calls to Build_Object_Declarations and Build_Raise_Statement to include
2343 (Build_Components): Create an entity for Abort_Id when exceptions are
2344 allowed on the target.
2345 (Build_Finalizer): New local variable Abort_Id.
2346 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2347 calls to Build_Object_Declarations and Build_Raise_Statement to include
2349 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2350 declaration of flag Abort_Id to preserve the original abort status
2351 before finalization code is executed.
2352 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2353 runtime routine Raise_From_Controlled_Operation.
2354 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2355 Abort_Id. Update the call to Build_Object_Declarations to include
2356 Abort_Id. Update the layout of the finalizer body.
2357 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2358 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2359 clunky code to create all flags and objects related to
2360 exception propagation and replace it with a call to
2361 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2363 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2364 Add new formal Abort_Id and associated comment on its use.
2365 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2367 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2368 Remove the clunky code to create all flags and objects related to
2369 exception propagation and replace it with a call to
2370 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2372 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2374 * s-tassta.adb: Fix minor typos.
2376 2011-08-03 Robert Dewar <dewar@adacore.com>
2378 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2379 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2381 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2383 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2384 to packages. This ensures that the finalizer body will not end up
2385 inside the freeze node.
2386 (Process_Declarations): Add code to detect whether a freeze node has a
2387 nested finalization collection.
2389 2011-08-03 Pascal Obry <obry@adacore.com>
2391 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2392 (Current_Session): Return a not null access to Session_Type.
2393 (Default_Session): Likewise.
2395 2011-08-03 Robert Dewar <dewar@adacore.com>
2397 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2398 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2400 2011-08-03 Pascal Obry <obry@adacore.com>
2402 * g-awk.ads: Minor comment fix.
2404 2011-08-03 Sergey Rybin <rybin@adacore.com>
2406 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2407 the tree structure related to discriminant constraints.
2408 Original_Discriminant cannot be used any more for computing the
2409 defining name for the reference to a discriminant.
2411 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2413 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2414 function is not visibly tagged, this is not a dispatching call and
2415 therfore is not Tag_Indeterminate, even if the function is marked as
2416 dispatching on result.
2418 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2420 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2421 (Expand_N_Free_Statement): Add a guard to protect against run-times
2422 which do not support controlled types.
2423 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2424 against run-times which do not support controlled types.
2425 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2426 against run-times which do not support controlled types.
2427 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2428 against run-times which do not support controlled types.
2429 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2430 protect against run-times which do not support controlled types.
2432 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2434 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2435 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2437 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2439 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2440 modified in the source, to prevent spurious warnings when compiling
2443 2011-08-03 Thomas Quinot <quinot@adacore.com>
2445 * a-except-2005.adb: Minor reformatting.
2447 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2449 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2450 is a renaming declaration in the private part of a package, do not emit
2451 a warning that the with_clause could be moved because the renaming may
2452 be used in the body or in a child unit.
2454 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2456 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2457 Propagate the Comes_From_Source attribute from the original return
2458 object to the renaming.
2460 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2462 * exp_ch7.adb (Build_Raise_Statement): Do not call
2463 Raise_From_Controlled_Operation when this routine is not present in
2464 the run-time library.
2465 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2466 libraries (Ravenscar), tasks are non-terminating, and protected objects
2467 and tasks can only appear at library level, so we do not want
2468 finalization of protected objects nor tasks.
2469 * exp_intr.adb: Minor clarification in comment.
2470 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2471 Gen_Output_File_C): Remove references to finalization of library-level
2472 objects when using restricted run-time libraries.
2474 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2476 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2477 Original_Discriminant only if the parent type is a generic formal.
2479 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2481 * exp_ch13.adb: Add with and use clause for Targparm;
2482 (Expand_N_Free_Statement): Prevent the generation of a custom
2483 Deallocate on .NET/JVM targets since this requires pools and address
2485 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2486 .NET/JVM targets, attach the newly allocated object to the access
2487 type's finalization collection. Do not generate a call to
2488 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2489 exist in the runtime.
2490 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2491 create a custom Allocate for object that do not require initialization.
2492 Attach a newly allocated object to the access type's finalization
2493 collection on .NET/JVM.
2494 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2495 assignment of controlled types on .NET/JVM. The two hidden pointers
2496 Prev and Next and stored and later restored after the assignment takes
2498 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2499 kludge for .NET/JVM to recognize a particular piece of code coming from
2500 Heap_Management and change the call to Finalize into Deep_Finalize.
2501 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2502 finalization collections on .NET/JVM only for types derived from
2503 Controlled. Separate the association of storage pools with a collection
2504 and only allow it on non-.NET/JVM targets.
2505 (Make_Attach_Call): New routine.
2506 (Make_Detach_Call): New routine.
2507 (Process_Object_Declarations): Suppress the generation of
2508 build-in-place return object clean up code on .NET/JVM since it uses
2510 * exp_ch7.ads (Make_Attach_Call): New routine.
2511 (Make_Detach_Call): New routine.
2512 * exp_intr.adb Add with and use clause for Targparm.
2513 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2514 on .NET/JVM targets.
2515 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2516 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2517 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2518 names used in finalization.
2520 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2522 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2523 (Attach, Detach): Lock the current task when chaining an object onto a
2526 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2528 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2529 Rewritten to create the message strings when the exception is not
2530 raised by an abort during finalization.
2531 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2532 Raise_From_Controlled_Operation and update its associated comment.
2533 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2534 Ada.Finalization.Heap_Management provides key functionality
2535 associated with controlled objects on the heap, their creation,
2536 finalization and reclamation. Type Finalization_Collection is
2537 effectively a wrapper which sits ontop of a storage pool and performs
2538 all necessary bookkeeping for all the objects it contains. Each
2539 access-to-controlled or access-to-class-wide type receives a collection
2540 as part of its expansion. The compiler generates buffer code and
2541 invokes Allocate / Deallocate to create and destroy allocated
2543 * a-finali.adb ("="): Removed.
2544 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2545 fields Prev and Next.
2546 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2547 A library unit with at least one controlled object on the library level
2548 has a special finalizer which is invoked by the binder. To signal this,
2549 ali files carry field PF.
2550 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2551 associated comment on field usage.
2552 * a-tags.adb (Get_RC_Offset): Removed.
2553 (Needs_Finalization): New routine.
2554 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2555 Dispatch tables now carry field Needs_Finalization which provides
2556 runtime indication whether a type is controlled or has controlled
2557 components or both. Remove field RC_Offset.
2558 (Get_RC_Offset): Removed along with its associated pragma Export.
2559 Since tagged types with controlled components no longer carry hidden
2560 field _controller, the special mechanism to retrieve its location is no
2562 (Needs_Finalization): New routine.
2563 * atree.ads, atree.adb (Elist24): New routine.
2564 (Set_Elist24): New routine.
2565 * atree.h: Add a define clause for Elist24.
2566 * bindgen.adb New library-level variable Lib_Final_Built.
2567 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2568 presence of a VM target, the routine generates calls to the proper
2569 library finalization routine.
2570 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2571 targets. Set the correct library finalization routine depending on
2572 whether the library has controlled objects or this is a VM compilation.
2573 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2574 to library-level finalizers of compiled units in reverse order of
2575 elaboration. It also produces exception management code and reraises a
2576 potential exception after all units have been finalized.
2577 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2578 library-level finalizers of compiled units in reverse order of
2580 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2581 definitions of all library-level finalizers available to the compilation
2582 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2584 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2585 System.Standard_Library.Adafinal directly. If the library needs
2586 finalization actions, create the sequence of finalization calls.
2587 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2588 Generate a with clause for System.Soft_Links when compiling for a VM.
2589 Remove the code which imports System.Standard_Library.Adafinal as
2590 Do_Finalize. Generate the library finalization routine.
2591 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2592 If the library needs finalization actions, create all the definitions
2593 of library- level finalizers.
2594 (Has_Finalizer): New routine. Determines whether at least one compiled
2595 unit has a library-level finalizer.
2596 Add type Qualification_Mode.
2597 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2598 * einfo.adb: New usage of field 15 as Return_Flag.
2599 Remove Finalization_Chain_Entity from the usages of field 19.
2600 Remove Associated_Final_Chain from the usages of field 23.
2601 New usage of field 23 as Associated_Collection.
2602 New usage of field 24 as Finalizer.
2603 New usage of flag 252 as Is_Processed_Transient.
2604 (Associated_Final_Chain): Removed.
2605 (Associated_Collection): New routine.
2606 (Finalization_Chain_Entity): Removed.
2607 (Finalizer): New routine.
2608 (Is_Finalizer): New routine.
2609 (Is_Processed_Transient): New routine.
2610 (Return_Flag): New routine.
2611 (Set_Associated_Final_Chain): Removed.
2612 (Set_Associated_Collection): New routine.
2613 (Set_Finalization_Chain_Entity): Removed.
2614 (Set_Finalizer): New routine.
2615 (Set_Is_Processed_Transient): New routine.
2616 (Set_Return_Flag): New routine.
2617 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2619 (Write_Field8_Name): Alphabetize the output.
2620 (Write_Field11_Name): Alphabetize the output.
2621 (Write_Field12_Name): Alphabetize the output.
2622 (Write_Field13_Name): Alphabetize the output.
2623 (Write_Field14_Name): Alphabetize the output.
2624 (Write_Field15_Name): Alphabetize the output.
2625 (Write_Field16_Name): Alphabetize the output.
2626 (Write_Field17_Name): Alphabetize the output.
2627 (Write_Field18_Name): Alphabetize the output.
2628 (Write_Field19_Name): Alphabetize the output. Remove the output of
2629 Finalization_Chain_Entity.
2630 (Write_Field20_Name): Alphabetize the output.
2631 (Write_Field21_Name): Alphabetize the output.
2632 (Write_Field22_Name): Alphabetize the output.
2633 (Write_Field23_Name): Alphabetize the output. Remove the output of
2634 Associated_Final_Chain. Add output for Associated_Collection.
2635 (Write_Field24_Name): Alphabetize the output.
2636 (Write_Field25_Name): Add output for Finalizer.
2637 (Write_Field26_Name): Alphabetize the output.
2638 (Write_Field27_Name): Alphabetize the output.
2639 (Write_Field28_Name): Alphabetize the output.
2640 * einfo.ads: Add new field description for Associated_Collection and
2642 Remove Associated_Final_Chain and its uses in nodes.
2643 Remove Finalization_Chain_Entity and its uses in nodes.
2644 Add new field description for Finalizer and its uses in nodes.
2645 Add new synthesized attribute Is_Finalizer.
2646 Add new flag description for Is_Processed_Transient and its uses in
2648 Add new field description for Return_Flag and its uses in nodes.
2649 (Associated_Final_Chain): Removed along with its pragma Inline.
2650 (Associated_Collection): New routine and pragma Inline.
2651 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2652 (Finalizer): New routine and pragma Inline.
2653 (Is_Finalizer): New routine and pragma Inline.
2654 (Is_Processed_Transient): New routine and pragma Inline.
2655 (Return_Flag): New routine and pragma Inline.
2656 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2657 (Set_Associated_Collection): New routine and pragma Inline.
2658 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2659 (Set_Finalizer): New routine and pragma Inline.
2660 (Set_Is_Processed_Transient): New routine and pragma Inline.
2661 (Set_Return_Flag): New routine and pragma Inline.
2662 * exp_aggr.adb: Alphabetize subprograms.
2663 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2664 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2665 associated comments. Remove local variables External_Final_List and
2667 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2668 Ancestor. Remove the retrieval of finalization lists. Update the call to
2670 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2671 lists. Update the call to Late_Expansion.
2672 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2673 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2674 (Gen_Assign): Remove the retrieval of the finalization list used to
2675 build the assignment. Update the calls to Make_Init_Call and
2677 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2678 Remove the mechanism to determine attachment levels and finalization
2679 list retrieval. Remove the processing for coextensions.
2680 (Init_Controller): Removed. Controllers no longer exist.
2681 (Late_Expansion): Remove formals Flist and Obj along with their
2682 associated comments. Update the calls to Build_Record_Aggr_Code and
2683 Build_Array_Aggr_Code.
2684 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2685 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2686 appear in entry bodies, protected subprograms and task bodies.
2687 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2688 * exp_ch3.adb (Add_Final_Chain): Removed.
2689 (Build_Array_Init_Proc): Alphabetize local variables.
2690 (Build_Assignment): Alphabetize local variables. Update the call to
2692 (Build_Class_Wide_Master): Rename local variables to better reflect
2694 (Build_Discriminant_Assignments): Code reformatting.
2695 (Build_Init_Call_Thru): Code reformatting.
2696 (Build_Init_Procedure): Code reformatting. Generate a special version
2697 of Deep_Finalize which is capable of finalizing all initialized
2698 components and ignore the rest.
2699 (Build_Init_Statements): Rename local variables to better reflect their
2701 Reimplement the mechanism to include the creation and update of an index
2702 variable called a "counter". It is used as a bookmark for tracing
2703 initialized and non-initialized components.
2704 (Build_Initialization_Call): Remove local variable Controller_Typ.
2705 Alphabetize all local variables. Remove the initialization of the
2706 record controller and update the call to Make_Init_Call.
2707 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2708 New local variable Counter.
2709 (Constrain_Array): Alphabetize.
2710 (Expand_Freeze_Array_Type): Create a collection instead of a
2712 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2713 Finalize_Address which is used in conjunction with allocated controlled
2715 (Expand_N_Object_Declaration): Remove the creation of a finalization
2716 list for anonymous access types. Update the calls to Make_Init_Call and
2718 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2719 retrieval of finalization lists. Remove the expansion of the record
2720 controller. Create TSS primitive Finalize_Address used in conjunction
2721 with controlled objects on the heap. Create finalization collections
2722 for access-to-controlled record components.
2723 (Expand_Record_Controller): Removed.
2724 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2725 class-wide types now requires additional processing. Create
2726 finalization collections for access-to-controlled types.
2727 (Increment_Counter): New routine.
2728 (Make_Counter): New routine.
2729 (Make_Eq_If): Remove the mention of Name_uController.
2730 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2731 types coming from System.Finalization_Root.
2732 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2733 (Predefined_Primitive_Bodies): There is no longer need to skip types
2734 coming from System.Finalization_Root.
2735 (Stream_Operation_OK): Do not generate stream routines for
2736 type Ada.Finalization.Heap_Management.Finalization_Collection.
2737 * exp_ch3.ads: Alphabetize subprograms.
2738 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2739 Add with and use clause for Lib.
2740 (Complete_Coextension_Finalization): Removed.
2741 (Complete_Controlled_Allocation): New routine. Create a finalization
2742 collection for anonymous access-to-controlled types. Create a custom
2743 Allocate which interfaces with the back end and the machinery in
2745 (Expand_Allocator_Expression): Add necessary calls to
2746 Complete_Controlled_Allocation. Remove the retrieval of finalization
2747 lists. Update the calls to Make_Adjust_Call. Generate a call to
2748 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2749 the associated collection.
2750 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2751 Code clean up. Remove the retrieval of finalization lists and
2753 Update the call to Make_Init_Call. Generate a call to
2754 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2755 the associated collection.
2756 (Get_Allocator_Final_List): Removed. Finalization lists are not
2758 (Suitable_Element): Remove the mention of Name_uController.
2759 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2760 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2761 the left hand side, carry out the assignment and adjust the left hand
2763 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2764 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2765 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2766 BIP_Collection and BIPcollection.
2767 (Build_Heap_Allocator): New routine used to allocate the return object
2768 of a build-in-place function onto a collection.
2769 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2770 (Expand_Call): Do not replace direct calls to Deep routines with their
2772 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2773 and update their occurrences. Add a special return flag to monitor the
2774 [ab]normal execution of the function. The flag is set right before the
2776 Rewrite the mechanism used to allocate a build-in-place return object
2777 on the heap or on a storage pool.
2778 (Is_Direct_Deep_Call): New routine.
2779 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2780 build-in-place function call instead of a final list. Build a call to
2781 Set_Finalize_Address_Ptr to decorate the associated collection.
2782 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2783 order to name the build-in-place function call's result for later
2784 finalization. Add a collection to a build-in-place function call
2785 instead of a final list.
2786 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2787 build-in-place function call instead of a final list. Remove the code
2788 which moves one final list and transforms it into the actual in a
2789 nested build-in-place call.
2790 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2791 build-in-place function call instead of a final list.
2792 (Move_Final_List): Removed.
2793 (Needs_BIP_Collection): New routine.
2794 (Needs_BIP_Final_List): Removed.
2795 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2796 enumeration type BIP_Formal_Kind.
2797 Update the related comment.
2798 (Needs_BIP_Collection): New routine.
2799 (Needs_BIP_Final_List): Removed.
2800 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2801 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2802 majority of subprograms in this unit. Add Name_Finalize_Address to
2803 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2804 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2805 statements for an array type.
2806 (Build_Adjust_Statements): Create the adjust statements for a record
2808 (Build_Cleanup_Statements): New routine. A procedure which given any
2809 construct containing asynchronous calls, references to _master, or is a
2810 task body, a task allocation or a protected body produces the necessary
2811 runtime calls to clean up these constructs.
2812 (Build_Exception_Handler): New routine.
2813 (Build_Final_List): Removed.
2814 (Build_Finalization_Collection): New routine. A core procedure which
2815 creates a collection to service heap allocated controlled objects
2816 associated with an access-to-controlled type.
2817 (Build_Finalize_Statements): Create the finalization statements for a
2819 (Build_Finalizer): New routine. A core procedure which given any
2820 construct with declarations and/or statements detects all objects which
2821 need any type of clean up (controlled objects, protected objects) and
2822 generates all necessary code to clean up the said objects in the proper
2824 (Build_Finalizer_Call): New routine.
2825 (Build_Initialize_Statements): Create the initialization statements for
2826 an array type. The generated routine contains code to finalize partially
2828 (Build_Object_Declarations): New routine.
2829 (Build_Raise_Statement): New routine.
2830 (Clean_Simple_Protected_Objects): Removed.
2831 (Controller_Component): Removed.
2832 (Enclosing_Function): New routine.
2833 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2834 either declarations or statements or both.
2835 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2836 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2838 (Find_Final_List): Removed.
2839 (Global_Flist_Ref): Removed.
2840 (In_Finalization_Root): Removed.
2841 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2842 scope in terms of tree nodes. Process all transient variables within
2844 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2845 generated after the adjust.
2846 (Make_Attach_Call): Removed.
2847 (Make_Call): New routine.
2848 (Make_Clean): Removed.
2849 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2851 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2853 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2855 (Make_Final_Call): Modified to simply create a call to either
2856 Deep_Finalize or Finalize.
2857 (Make_Finalize_Address_Body): New routine.
2858 (Make_Finalize_Address_Stmts): New routine. A function which produces
2859 TSS primitive Finalize_Address used in conjunction with heap allocated
2861 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2862 (Make_Init_Call): Rewritten. There is no longer an attach call
2863 generated after initialization.
2864 (Make_Local_Deep_Finalize): New routine.
2865 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2866 (Make_Transient_Block): Remove the finalization list retrieval and
2868 (Needs_Finalization): Moved to Exp_Util.
2869 (Parent_Field_Type): New routine.
2870 (Preprocess_Components): New routine.
2871 (Process_Transient_Objects): New routine.
2872 (Wrap_HSS_In_Block): New routine.
2873 (Wrap_Transient_Declaration): Remove finalization list management and
2874 controller insertion.
2875 (Wrap_Transient_Expression): Code reformatting.
2876 (Wrap_Transient_Statement): Code reformatting.
2877 * exp_ch7.ads (Build_Final_List): Removed.
2878 (Build_Finalization_Collection): New routine.
2879 (Build_Raise_Statement): New routine.
2880 (Controller_Component): Removed.
2881 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2882 (Find_Final_List): Removed.
2883 (In_Finalization_Root): Removed.
2884 (Is_Simple_Protected_Type): Update related comment.
2885 (Make_Adjust_Call): New parameter profile and associated comments.
2886 (Make_Attach_Call): Removed.
2887 (Make_Final_Call): New parameter profile and associated comments.
2888 (Make_Finalize_Address_Body): New routine.
2889 (Make_Init_Call): New parameter profile and associated comments.
2890 (Make_Local_Deep_Finalize): New routine.
2891 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2892 (Needs_Finalization): Moved to Exp_Util.
2893 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2894 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2895 (Find_Protection_Type): Moved to Exp_Util.
2896 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2897 (Make_DT): Update sequence of dispatch table initialization. Remove the
2898 initialization of field RC_Offset. Add initialization of field Needs_
2900 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2901 Reimplement how an object is first finalized, then deallocated.
2902 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2904 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2905 Register TSS_Finalize_Address with type TSS_Names.
2906 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2907 procedure provides the interface between an allocation / deallocation
2908 and the support machinery in Ada.Finalization.Heap_Management.
2909 (Find_Init_Call): Code reformatting.
2910 (Find_Init_Call_In_List): Code reformatting.
2911 (Find_Protection_Type): Moved from Exp_Ch9.
2912 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2913 (Has_Controlled_Coextensions): Removed.
2914 (Has_Controlled_Objects): New routine.
2915 (In_Library_Level_Package_Body): New routine.
2916 (Insert_Action_After): New routine.
2917 (Is_Finalizable_Transient): New routine. This predicate determines
2918 whether an object declaration is one of the many variants of controlled
2920 (Is_Null_Access_BIP_Func_Call): New routine.
2921 (Is_Non_BIP_Func_Call): New routine.
2922 (Is_Related_To_Func_Return): New routine.
2923 (Needs_Finalization): Moved from Exp_Ch7.
2924 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2925 (Find_Protection_Type): Moved from Exp_Ch9.
2926 (Has_Controlled_Coextensions): Removed.
2927 (Has_Controlled_Objects): New routine.
2928 (In_Library_Level_Package_Body): New routine.
2929 (Insert_Action_After): New routine.
2930 (Is_Finalizable_Transient): New routine.
2931 (Is_Null_Access_BIP_Func_Call): New routine.
2932 (Is_Non_BIP_Func_Call): New routine.
2933 (Is_Related_To_Func_Return): New routine.
2934 (Needs_Finalization): Moved from Exp_ch7.
2935 * expander.adb (Expand): Add a case for N_Free_Statement.
2936 * freeze.adb (Freeze_All): Replace the generation of a finalization
2937 list with a collection for access-to-controlled types.
2938 (Freeze_Entity): Code reformatting.
2939 (Freeze_Record_Type): Remove the freezing of a record controller
2941 (Freeze_Subprogram): Code reformatting.
2942 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2944 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2945 has a library-level finalizer.
2946 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2947 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2948 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2949 files. Add a-fihema to the list of object files.
2951 Alphabetize the associations in type Is_Parameterless_Attribute.
2952 * rtsfind.ads: Ada.Finalization_List.Controller and
2953 System.Finalization_Implementation are no longer a GNAT unit.
2954 Update the range of type Ada_Finalization_Child. Remove the following
2955 recoverable entities:
2957 RE_Attach_To_Final_List
2961 RE_Finalizable_Ptr_Ptr
2962 RE_Global_Final_List
2963 RE_Limited_Record_Controller
2966 RE_Record_Controller
2967 RE_Simple_List_Controller
2969 Add the following recoverable entities:
2971 RE_Add_Offset_To_Address
2975 RE_Exception_Identity
2976 RE_Finalization_Collection
2977 RE_Finalization_Collection_Ptr
2978 RE_Needs_Finalization
2979 RE_Save_Library_Occurrence
2980 RE_Set_Finalize_Address_Ptr
2981 RE_Set_Storage_Pool_Ptr
2983 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2985 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2986 (First_Stored_Discriminant): Remove the mention of Name_uController.
2987 * sem_aux.ads: Comment reformatting.
2988 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2989 to redecorate an already existing class-wide type.
2990 (Decorate_Tagged_Type): New parameter profile and associated comment.
2991 Create a "shadow class-wide type" for a shadow entity.
2992 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2993 of the final chain along with the associated comment.
2994 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2995 Full_Desig and set it to the full view of the designated type.
2996 Initialize the finalization collection to empty.
2997 (Build_Derived_Record_Type): Alphabetize local variables. Code
2999 (Collect_Fixed_Components): Remove the mention of Name_uController.
3000 (Create_Constrained_Components): Remove the mention of Name_uController.
3001 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3002 class-wide type of a shadow entity.
3003 (Process_Full_View): Update the machinery which marks type
3004 Limited_Controlled's entity as limited.
3005 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3006 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3007 list, instead make a collection build-in-place formal.
3008 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3009 a designated type in order to establish a match between the renaming
3010 and the renamed entity.
3011 (Find_Selected_Component): Add guard to prevent spurious exceptions
3012 from being raised on .NET/JVM.
3013 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3014 to the list of primitive that need special processing. Update arrays
3015 C_Names and D_Names.
3016 (Replace_Types): Handle class-wide types.
3017 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3018 different parameter profile, look at the first formal.
3019 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3020 use clauses for Exp_Util.
3021 * sem_res.adb: Remove with and use clauses for Elists.
3022 (Propagate_Coextensions): Removed.
3023 (Resolve_Allocator): Do not propagate the list of coextensions from one
3024 allocator to another.
3025 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3026 Deaccessed_T to Desig_Typ.
3027 (Enter_Name): Remove the mention of Name_uController.
3028 (Gather_Components): Remove the mention of Name_uController.
3029 (Incomplete_Or_Private_View): New routine.
3030 (Is_Coextension_Root): Removed.
3031 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3032 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3033 (Is_Coextension_Root): Removed.
3034 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3035 Controlled types are now derived from a null tagged record. Remove
3036 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3037 * sinfo.adb (Coextensions): Removed.
3038 (Set_Coextensions): Removed.
3039 * sinfo.ads: Remove Coextensions from the explanation of node fields
3040 and its uses in nodes.
3041 Update the field usage of N_Allocator.
3042 (Coextensions): Removed along with its pragma Inline.
3043 (Set_Coextensions): Removed along with its pragma Inline.
3044 * snames.ads-tmpl: Remove names
3049 Name_uLocal_Final_List
3050 Name_Finalization_Root
3057 Name_Finalize_Address
3058 * s-pooglo.adb (Allocate): Add overriding indicator.
3059 (Deallocate): Add overriding indicator.
3060 (Storage_Size): Add overriding indicator.
3061 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3062 than Finalize_Global_List.
3063 (Null_Finalize_Global_List): Removed.
3064 (Save_Library_Occurrence): New routine.
3065 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3066 initialization. Add variable Finalize_Library_Objects along with its
3067 pragma Export. Add variables Library_Exception and
3068 Library_Exception_Set along with their pragma Export.
3069 (Null_Finalize_Global_List): Removed.
3070 (Save_Library_Occurrence): New routine.
3071 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3072 rather than Finalize_Global_List.
3073 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3074 of the constructed node.
3076 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3078 * link.c: Include "auto-host.h" before system headers.
3080 2011-08-03 Vincent Celier <celier@adacore.com>
3082 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3083 that are not extended. Do not check if a library project that is
3084 extended should be regenerated. Do not add to table Library_Paths the
3085 libraries that are in extended projects. Link only with libraries that
3086 are in libray projects that are not extended.
3087 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3088 for a library project that is extended.
3090 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3092 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3093 conforming subprogram renamings that appear to be completions if they
3094 are not fully conformant.
3095 Such renamings are homographs but not completions.
3096 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3097 names in a subprogram renaming that appears in an instance.
3099 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3101 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3102 not immutably limited, build actual subtype from expression to provide
3103 proper bounds to caller.
3105 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3107 * sem_ch8.adb: Minor comment correction.
3109 2011-08-03 Thomas Quinot <quinot@adacore.com>
3111 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3112 returning a limited array, use an extended return statement.
3114 2011-08-03 Vincent Celier <celier@adacore.com>
3116 * make.adb (Initialize): If --subdirs= is used, but no project file is
3117 specified, attempt to create the specify subdir if it does not already
3118 exist and use it as the object directory as if -D had been specified.
3120 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3122 * s-tpopsp-vms.adb: New file.
3123 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3124 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3126 2011-08-03 Emmanuel Briot <briot@adacore.com>
3128 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3131 2011-08-03 Yannick Moy <moy@adacore.com>
3133 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3134 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3135 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3136 detect that an array has static bounds.
3138 2011-08-03 Thomas Quinot <quinot@adacore.com>
3140 * exp_dist.adb: Minor reformatting.
3142 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3144 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3145 (ATCB_Key): Removed, not always used.
3147 2011-08-03 Emmanuel Briot <briot@adacore.com>
3149 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3150 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3151 most remaining global variables.
3153 2011-08-03 Robert Dewar <dewar@adacore.com>
3155 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3156 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3159 2011-08-03 Javier Miranda <miranda@adacore.com>
3161 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3162 that must be passed by copy in VM targets.
3164 2011-08-03 Emmanuel Briot <briot@adacore.com>
3166 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3167 duplicates a similar htable now in the project tree.
3169 2011-08-03 Claire Dross <dross@adacore.com>
3171 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3172 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3173 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3174 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3175 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3176 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3177 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3180 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3182 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3183 (ATCB_Key): Removed, not always used.
3184 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3186 * s-tpopsp-tls.adb: New file.
3187 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3188 x86/x64/ia64/powerpc/sparc Linux.
3190 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3192 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3193 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3195 2011-08-03 Thomas Quinot <quinot@adacore.com>
3197 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3198 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3199 Fix type selection for mapping integer types to PolyORB types.
3201 2011-08-03 Bob Duff <duff@adacore.com>
3203 * sem_ch7.adb: Minor comment clarification.
3205 2011-08-03 Bob Duff <duff@adacore.com>
3207 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3208 an error analyzing a choice, skip further processing. Further
3209 processing could cause a crash or cascade errors.
3211 2011-08-03 Emmanuel Briot <briot@adacore.com>
3213 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3214 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3215 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3216 prj-env.ads (Shared_Project_Tree_Data): new type
3217 An aggregate project and its aggregated trees need to share the common
3218 data structures used for lists of strings, packages,... This makes the
3219 code simpler since otherwise we have to pass the root tree (also used
3220 for the configuration file data) in addition to the current project
3221 tree. This also avoids ambiguities as to which tree should be used.
3222 And finally this saves a bit of memory.
3223 (For_Every_Project_Imported): new parameter Tree.
3224 Since aggregated projects are using a different tree, we need to let
3225 the caller know which tree to use to manipulate the returned project.
3227 2011-08-03 Robert Dewar <dewar@adacore.com>
3229 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3230 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3231 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3232 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3234 2011-08-03 Javier Miranda <miranda@adacore.com>
3236 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3237 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3239 2011-08-03 Bob Duff <duff@adacore.com>
3241 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3244 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3246 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3247 g-sehash.ads: Fix typo. Update header.
3249 2011-08-03 Thomas Quinot <quinot@adacore.com>
3251 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3254 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3256 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3257 prefixes of private types along with records, since the selector may be
3259 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3260 private types along with records, since the selector may be a
3263 2011-08-03 Emmanuel Briot <briot@adacore.com>
3265 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3267 2011-08-03 Javier Miranda <miranda@adacore.com>
3269 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3270 Tagged_Type_Expansion.
3272 2011-08-03 Yannick Moy <moy@adacore.com>
3275 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3276 concatenation is the name of a constant
3278 2011-08-03 Emmanuel Briot <briot@adacore.com>
3280 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3281 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3282 (Process_Declarative_Items): new parameter Child_Env.
3284 2011-08-03 Yannick Moy <moy@adacore.com>
3286 * alfa.ads Update format of ALFA section in ALI file in order to add a
3287 mapping from bodies to specs when both are present
3288 (ALFA_Scope_Record): add components for spec file/scope
3289 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3291 (Collect_ALFA): after all scopes have been collected, fill in the spec
3292 information when relevant
3293 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3296 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3298 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3299 code unit to decide whether to add internally generated subprograms.
3301 2011-08-03 Javier Miranda <miranda@adacore.com>
3303 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3305 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3308 2011-08-03 Emmanuel Briot <briot@adacore.com>
3310 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3311 code with Makeutl.Get_Switches.
3312 * prj-tree.adb: Update comment.
3314 2011-08-03 Thomas Quinot <quinot@adacore.com>
3316 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3317 subprogram with a limited formal that does not support external
3320 2011-08-03 Yannick Moy <moy@adacore.com>
3322 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3324 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3325 not from current unit in two phases, because it is not possible to
3326 change the table while iterating over its content.
3327 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3329 2011-08-03 Sergey Rybin <rybin@adacore.com>
3331 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3332 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3334 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3336 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3337 and the component type is composite, this is ambiguous for predefined
3338 concatenation, but if the node is not overloaded and the entity is a use
3339 -defined function its profile can be used to resolve that aggregate.
3341 2011-08-03 Robert Dewar <dewar@adacore.com>
3343 * exp_ch4.adb: Minor code cleanup.
3345 2011-08-03 Thomas Quinot <quinot@adacore.com>
3347 * exp_dist.adb: Do not generate distribution stubs if serious errors
3348 have been diagnosed.
3350 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3352 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3353 the first formal of a primitive operation, go to the base type to
3354 handle properly an access to a derived type with constrained
3356 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3357 user-defined function that is only use-visible.
3359 2011-08-03 Robert Dewar <dewar@adacore.com>
3361 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3362 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3363 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3364 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3365 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3366 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3367 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3368 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3370 2011-08-03 Robert Dewar <dewar@adacore.com>
3372 * repinfo.adb (List_Mechanism): Add handling of
3373 Convention_Ada_Pass_By_XXX.
3374 * sem_mech.adb (Set_Mechanism): Ditto.
3375 * sem_prag.adb (Process_Convention): Add entries for
3376 Convention_Ada_Pass_By_XXX.
3377 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3379 2011-08-03 Pascal Obry <obry@adacore.com>
3381 * makeutl.adb: Minor reformatting.
3383 2011-08-03 Vincent Celier <celier@adacore.com>
3386 (Get_File_Name) If the file cannot be found when there are no config
3387 pragmas file and May_Fail is True, return No_File instead of the file
3388 name, to be consistent.
3390 2011-08-03 Pascal Obry <obry@adacore.com>
3392 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3395 2011-08-03 Javier Miranda <miranda@adacore.com>
3398 (Same_Representation): In VM targets the representation of arrays with
3399 aliased components differs from arrays with non-aliased components.
3401 2011-08-03 Emmanuel Briot <briot@adacore.com>
3403 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3404 not systematically lower case attribute indexes that contain no "."
3405 Fix definition of several Naming attributes, which take
3406 a unit name as index and therefore should be case insensitive.
3407 Minor refactoring (reduce length of variable names).
3409 2011-08-03 Emmanuel Briot <briot@adacore.com>
3411 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3413 2011-08-03 Emmanuel Briot <briot@adacore.com>
3415 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3416 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3417 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3418 prj-tree.ads (Prj.Tree.Environment): new type.
3420 2011-08-03 Emmanuel Briot <briot@adacore.com>
3422 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3423 prj-tree.adb, prj-tree.ads (Environment): new type.
3425 2011-08-03 Emmanuel Briot <briot@adacore.com>
3427 * prj-tree.ads: Remove unused variable.
3429 2011-08-03 Yannick Moy <moy@adacore.com>
3431 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3432 issuing messages related to SPARK restriction violation.
3434 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3436 * sem_ch6.adb: guard against error nodes in return statements.
3438 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3440 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3441 a warning can only appear on a configuration file, so emit warning
3442 without further checks.
3444 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3446 * s-interr.ads: add overriding keyword.
3448 2011-08-03 Geert Bosch <bosch@adacore.com>
3450 * exp_attr.adb: Fix minor typo.
3452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3454 * par-ch4.adb: improve error recovery.
3456 2011-08-03 Emmanuel Briot <briot@adacore.com>
3458 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3459 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3462 2011-08-03 Emmanuel Briot <briot@adacore.com>
3464 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3465 "external" as an attribute name in aggregate projects.
3467 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3469 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3470 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3471 from 0, so we need to adjust.
3473 2011-08-03 Emmanuel Briot <briot@adacore.com>
3475 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3476 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3478 2011-08-03 Yannick Moy <moy@adacore.com>
3480 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3481 restriction on overloaded entity if the entity is not an operator.
3483 2011-08-03 Yannick Moy <moy@adacore.com>
3485 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3486 restrict.ads: Rename remaining Check_Formal_Restriction* into
3487 Check_SPARK_Restriction*.
3489 2011-08-03 Emmanuel Briot <briot@adacore.com>
3491 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3492 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3494 (Project_Empty): removed
3495 (Empty_Project): new parameter Qualifier
3496 This is used to have fields specific to aggregate projects, cleaner
3497 New field to store the list of aggregated projects.
3498 (Check_Aggregate_Project): removed
3499 (Process_Aggregated_Projects, Free): new subprograms.
3501 2011-08-03 Olivier Hainque <hainque@adacore.com>
3503 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3505 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3507 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3508 explicit dereference of an unconstrained type, create a constrained
3509 subtype for it, as is done for function calls that return an
3512 2011-08-03 Thomas Quinot <quinot@adacore.com>
3514 * g-pehage.adb (Finalize): Avoid possible double-free.
3516 2011-08-03 Steve Baird <baird@adacore.com>
3518 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3519 Elab_Spec/Body attrs in CodePeer_Mode.
3521 2011-08-03 Javier Miranda <miranda@adacore.com>
3523 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3524 low bound is not known at compile time but they have no others choice.
3525 Done because in this case the bounds can be obtained directly from the
3528 2011-08-03 Ed Falis <falis@adacore.com>
3530 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3531 on VxWorks SMP. Remove unusable constant ANY_CPU.
3533 2011-08-03 Emmanuel Briot <briot@adacore.com>
3535 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3536 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3537 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3538 Prj.Env.Initialize_Empty): new subprograms
3539 (Get_Env, Find_Project): remove parameter Target_Name.
3541 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3543 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3544 as a condition for the delayed call to Derived_Subprograms done for the
3545 case of the rewriting of a derived type that constrains the
3546 discriminants of its parent type.
3547 Avoids redundant subprogram derivations for private subtype derivations.
3549 2011-08-03 Javier Miranda <miranda@adacore.com>
3551 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3552 Build_Record_Aggr_Code.
3553 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3554 discriminants in extension aggregates.
3556 2011-08-03 Emmanuel Briot <briot@adacore.com>
3558 * prj-pp.adb (Print): also output project qualifiers, since in
3559 particular "aggregate" is mandatory in an aggregate project.
3561 2011-08-03 Emmanuel Briot <briot@adacore.com>
3563 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3564 (Debug_Output): new function.
3566 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3568 * gnat_ugn.texi: Document -Wstack-usage.
3569 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3571 2011-08-03 Thomas Quinot <quinot@adacore.com>
3573 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3574 have keyword LIMITED.
3576 2011-08-03 Yannick Moy <moy@adacore.com>
3578 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3579 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3580 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3581 section (does not happen in compiler, only if code directly calls
3583 * get_alfa.adb, get_alfa.ads: New files.
3584 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3586 * lib-xref-alfa.adb: New file.
3587 * lib-xref.adb, lib-xref.ads
3588 (Xref_Entry): redefine information needed in cross-references for ALFA.
3589 Push ALFA treatments in separated local package.
3590 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3591 identifiers. Return entity of package body instead of spec. Return
3592 Empty for a scope with no location.
3593 (Generate_Reference): adapt to new components for ALFA information.
3594 Remove the need for D references on definitions.
3595 (Is_Local_Reference): moved to ALFA local package
3596 (Output_References): extract subfunction as Extract_Source_Name
3597 (Output_Local_References): remove procedure, replaced by filtering of
3598 cross-references in package ALFA and printing in Put_ALFA.
3599 (Write_Entity_Name): remove procedure
3600 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3601 print exact name of entity as it appears in source file
3602 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3603 * put_alfa.adb, put_alfa.ads: New files.
3604 * xref_lib.adb (Search_Xref): protect read of cross-references against
3605 reading other sections of the ALI file, in gnatxref
3606 (Search): protect read of cross-references against reading other
3607 sections of the ALI file, in gnatfind.
3608 * gcc-interface/Make-lang.in: Update dependencies.
3610 2011-08-03 Thomas Quinot <quinot@adacore.com>
3612 * sem_ch3.adb: Minor reformatting.
3614 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3616 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3617 raising an exception.
3619 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3621 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3622 type, always use 1 as the lower bound or string, even if lower bound of
3623 context is not static, to handle properly null strings in a non-static
3626 2011-08-03 Bob Duff <duff@adacore.com>
3628 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3629 always legal on the right-hand side of an assignment statement; there
3630 is always an applicable index constraint in this case. Therefore, the
3631 check for Pkind = N_Assignment_Statement is now unconditional -- it
3632 doesn't depend on whether Is_Constrained (Typ).
3634 2011-08-03 Robert Dewar <dewar@adacore.com>
3636 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3638 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3640 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3641 for an itype created within a generic unit.
3643 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3645 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3646 suppresses all inlining.
3648 2011-08-03 Robert Dewar <dewar@adacore.com>
3650 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3651 exp_aggr.adb: Minor reformatting.
3653 2011-08-03 Thomas Quinot <quinot@adacore.com>
3655 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3656 tagged assignment when discriminant checks are suppressed. This is
3657 useless and extremely costly in terms of static stack usage.
3659 2011-08-03 Bob Duff <duff@adacore.com>
3661 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3662 of generics, because this leads to the wrong entity in the wrong scope,
3663 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3665 (Process_Interface_Name): Follow Alias for instances of generics, to
3666 correct for the above change.
3668 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3670 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3671 is an integer literal it is always safe to replace the reference. In
3672 addition, if the reference appears in the generated code for an object
3673 declaration it is necessary to copy because otherwise the reference
3674 might be to the uninitilized value of the discriminant of the object
3677 2011-08-03 Pascal Obry <obry@adacore.com>
3679 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3680 ACL used, in this case we want to check for ending .exe, not .exe
3681 anywhere in the path.
3683 2011-08-03 Sergey Rybin <rybin@adacore.com>
3685 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3686 the tree structure (semantic decoration of references to record
3689 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3691 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3692 choices of a named array aggregate, bail out when any choices are
3693 marked as Errors_Posted.
3695 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3697 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3698 in which entity is frozen, to handle properly loop variables in
3701 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3703 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3704 subtype is not static, compute the upper bound using attributes, to
3705 handle properly index types that are not integer types.
3707 2011-08-03 Bob Duff <duff@adacore.com>
3709 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3710 Update copyright notice.
3712 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3714 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3715 Original_Discriminant if within an instance.
3716 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3718 2011-08-03 Thomas Quinot <quinot@adacore.com>
3720 * einfo.ads: Minor reformatting.
3722 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3724 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3725 composite type with an unfrozen subcomponent, in the profile of a
3726 primitive operation.
3728 2011-08-03 Robert Dewar <dewar@adacore.com>
3730 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3732 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3734 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3735 unconstrained type with discriminants is initialized with an aggregate,
3736 use the constrained subtype of the aggregate as the type of the object,
3737 because it is immutable, and this allows the back-end to generate no
3738 code for the object declaration.
3740 2011-08-03 Robert Dewar <dewar@adacore.com>
3742 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3743 comparison operand is variable, and turns out to be zero or negative.
3745 2011-08-03 Javier Miranda <miranda@adacore.com>
3748 (Expand_Dispatching_Constructor_Call): Disable expansion of
3749 code required for native targets. Done to avoid generating
3750 references to unavailable runtime entities in VM targets.
3752 (Expand_N_Object_Declaration): Add missing support to handle
3753 the explicit initialization of class-wide interface objects.
3756 2011-08-03 Matthew Heaney <heaney@adacore.com>
3758 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3760 2011-08-03 Matthew Heaney <heaney@adacore.com>
3762 * a-cbdlli.adb (Splice): move source items from first to last
3764 2011-08-03 Yannick Moy <moy@adacore.com>
3766 * sem_util.ads: comment added.
3768 2011-08-03 Javier Miranda <miranda@adacore.com>
3771 (Expand_Record_Aggregate): In VM targets disable the expansion into
3772 assignments of aggregates whose type is not known at compile time.
3774 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3776 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3777 protected entries and task entries, to build the proper renaming
3778 declaration for entry formals, used in debugging.
3779 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3780 parameters in the same way.
3782 2011-08-02 Robert Dewar <dewar@adacore.com>
3784 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3785 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3786 code reorganization.
3788 2011-08-02 Robert Dewar <dewar@adacore.com>
3790 * debug.adb: Debug flag d.P to suppress length comparison optimization
3791 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3792 comparison of Length by comparing First/Last instead.
3794 2011-08-02 Matthew Heaney <heaney@adacore.com>
3796 * a-cobove.ads: Code clean up.
3798 2011-08-02 Vincent Celier <celier@adacore.com>
3800 * adaint.c (file_names_case_sensitive_cache): New static int.
3801 (__gnat_get_file_names_case_sensitive): Cache the return value in
3802 file_names_case_sensitive_cache at the first invocation, to avoid
3803 multiple calls to getenv.
3805 2011-08-02 Bob Duff <duff@adacore.com>
3807 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3809 2011-08-02 Yannick Moy <moy@adacore.com>
3811 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3812 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3813 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3814 indicate that we are in a precondition or postcondition. This is used in
3815 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3816 decide whether to flag the spec or body of the current subprogram as
3819 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3821 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3823 * a-extiin.ads: New file.
3825 2011-08-02 Bob Duff <duff@adacore.com>
3827 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3828 now raises Name_Error instead of Use_Error in certain cases. The other
3829 parts of this AI were already implemented properly.
3831 2011-08-02 Vincent Celier <celier@adacore.com>
3833 * link.c: Only import "auto-host.h" when building the gnattools.
3835 2011-08-02 Yannick Moy <moy@adacore.com>
3837 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3838 which calls a local subprogram, so extract subprogram
3839 from Mark_Non_ALFA_Subprogram_Body.
3841 2011-08-02 Javier Miranda <miranda@adacore.com>
3844 (Extract_Dispatching_Call): If the type of the dispatching object is an
3845 access type then return an explicit dereference in the Object out-mode
3848 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3850 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3851 compatibility checks for all indexes of an array subtype, not just the
3852 first. Reset Has_Dynamic_Range_Check on the subtype before each
3853 potential check to ensure that Insert_Range_Checks will not elide any
3854 of the dynamic checks.
3856 2011-08-02 Yannick Moy <moy@adacore.com>
3858 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3859 SPARK restriction at parsing time.
3860 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3861 directive only if the SPARK restriction is set for this unit.
3863 2011-08-02 Yannick Moy <moy@adacore.com>
3865 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3866 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3867 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3868 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3869 Mark_Non_ALFA_Subprogram_Body.
3870 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3873 2011-08-02 Yannick Moy <moy@adacore.com>
3875 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3878 2011-08-02 Robert Dewar <dewar@adacore.com>
3880 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3881 exp_ch3.adb: Minor reformatting.
3883 2011-08-02 Emmanuel Briot <briot@adacore.com>
3885 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3886 files, not any regular file.
3887 (__gnat_locate_file_with_predicate): new subprogram.
3889 2011-08-02 Yannick Moy <moy@adacore.com>
3891 * sinfo.adb, sinfo.ads: Restrict the use of flags
3892 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3893 nodes, plus N_Subtype_Declaration for the 2nd one.
3895 2011-08-02 Sergey Rybin <rybin@adacore.com>
3897 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3898 - fix bugs in the description of Source_Trace;
3899 - get rid of UNIT_NAME;
3901 2011-08-02 Javier Miranda <miranda@adacore.com>
3904 (Build_Dispatching_Requeue): Adding support for VM targets
3905 since we cannot directly reference the Tag entity.
3906 * exp_sel.adb (Build_K): Adding support for VM targets.
3907 (Build_S_Assignment): Adding support for VM targets.
3909 (Default_Prim_Op_Position): In VM targets do not restrict availability
3910 of predefined interface primitives to compiling in Ada 2005 mode.
3911 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3912 restricted to compiling in Ada 2005 mode.
3913 (Make_VM_TSD): Generate code that declares and initializes the OSD
3914 record. Needed to support dispatching calls through synchronized
3917 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3918 primitives associated with synchronized interfaces.
3919 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3920 primitives associated with synchronized interfaces.
3922 2011-08-02 Yannick Moy <moy@adacore.com>
3924 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3925 statements hidden in SPARK if preceded by the HIDE directive
3926 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3927 exception handlers as hidden in SPARK if preceded by the HIDE directive
3928 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3929 if starting with the HIDE directive
3930 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3931 starting with the HIDE directive; mark the declarations in a private
3932 part as hidden in SPARK if the private part starts with the HIDE
3934 * restrict.adb, restrict.ads
3935 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3936 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3937 argument node belongs to a part which is hidden in SPARK
3938 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3939 parts in SPARK; protect the possibly costly call to
3940 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3941 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3942 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3943 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3945 (Scan): recognize special comment starting with '#' and followed by
3946 SPARK keyword "hide" as a HIDE directive.
3948 2011-08-02 Yannick Moy <moy@adacore.com>
3950 * types.ads, erroutc.ads: Minor reformatting.
3952 2011-08-02 Vincent Celier <celier@adacore.com>
3954 * link.c: Add response file support for cross platforms.
3956 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3958 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3959 in an association, set parent field of copy before partial analysis.
3960 * sem_res.adb (Resolve_Slice): create reference to itype only when
3961 expansion is enabled.
3963 2011-08-02 Yannick Moy <moy@adacore.com>
3965 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3966 for new flag denoting which subprogram bodies are in ALFA
3967 * restrict.adb, sem_ch7.adb: Update comment
3968 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3969 sem_ch9.adb, sem_res.adb: Add calls to
3970 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3971 * sem_ch6.adb (Analyze_Function_Return): add calls to
3972 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3973 middle of the body, and extended return.
3974 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3975 False when missing return.
3976 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3977 to True for subprograms whose spec is in ALFA. Remove later on the flag
3978 on the entity used for a subprogram body when there exists a separate
3980 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3981 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3982 False, otherwise do nothing.
3984 2011-08-02 Robert Dewar <dewar@adacore.com>
3986 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3988 2011-08-02 Yannick Moy <moy@adacore.com>
3990 * sem_ch4.ads: minor formatting.
3992 2011-08-02 Yannick Moy <moy@adacore.com>
3994 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3995 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3996 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3997 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3998 opt.ads: cleanup of SPARK mode
4000 2011-08-02 Yannick Moy <moy@adacore.com>
4002 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4004 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4005 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4007 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4008 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4009 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4010 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4012 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4014 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4015 functions whose return type is not in ALFA.
4016 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4018 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4019 parameter's type is not in ALFA.
4020 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4023 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4025 * sem_ch6 (Analyze_Expression_Function): treat the function as
4026 Inline_Always, and introduce a subprogram declaration for it when it is
4028 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4029 expression functions, so that the back-end can determine whether they
4030 can in fact be inlined.
4031 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4032 a function body comes from an expression function.
4034 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4036 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4037 null exclusions to test Can_Never_Be_Null on the anonymous access types
4038 of the formals rather than testing the formals themselves. Exclude this
4039 check in cases where the Old_Formal is marked as a controlling formal,
4040 to avoid issuing spurious errors for bodies completing dispatching
4041 operations (due to the flag not getting set on controlling access
4042 formals in body specs).
4043 (Find_Corresponding_Spec): When checking full and subtype conformance of
4044 subprogram bodies in instances, pass Designated and E in that order, for
4045 consistency with the expected order of the formals (New_Id followed by
4048 2011-08-02 Robert Dewar <dewar@adacore.com>
4050 * sem_ch8.adb: Minor reformatting.
4052 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4054 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4055 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4056 primitive operations of class-wide actuals.
4058 2011-08-02 Javier Miranda <miranda@adacore.com>
4060 * exp_atag.ads, exp_atag.adb
4061 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4062 since its value is implicitly passed in argument Typ.
4063 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4064 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4065 Build_Common_Dispatching_Select_Statements.
4067 2011-08-02 Robert Dewar <dewar@adacore.com>
4069 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4070 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4073 2011-08-02 Robert Dewar <dewar@adacore.com>
4075 * sem_res.adb: Minor reformatting.
4076 * sem_prag.adb: Minor reformatting.
4078 2011-08-02 Javier Miranda <miranda@adacore.com>
4080 * exp_atag.adb, exp_atags.ads
4081 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4082 by the tagged type Entity. Required to use this routine in the VM
4083 targets since we do not have available the Tag entity in the VM
4086 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4087 Ada.Tags has not been previously loaded.
4089 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4090 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4092 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4093 view of enclosing scopes. Required to handle enclosing scopes that
4094 are synchronized types whose full view is a task type.
4096 (Build_VM_TSDs): Minor code improvement to avoid generating and
4097 analyzing lists with empty nodes.
4098 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4099 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4100 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4101 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4102 (Make_Select_Specific_Data_Table): Add support for VM targets.
4103 (Make_VM_TSD): Generate code to initialize the SSD structure of
4106 2011-08-02 Yannick Moy <moy@adacore.com>
4108 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4109 cross-references section in ALI.
4110 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4111 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4113 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4114 subprogram or package entity of a node
4115 (Is_Local_Reference_Type): new function returns True for references
4116 selected in local cross-references.
4117 (Lt): function extracted from Lt in Output_References
4118 (Write_Entity_Name): function extracted from Output_References
4119 (Generate_Definition): generate reference with type 'D' for definition
4120 of objects (object declaration and parameter specification), with
4121 appropriate locations and units, for use in local cross-references.
4122 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4123 references of type 'I' for initialization in object definition.
4124 (Output_References): move part of function Lt and procedure
4125 Write_Entity_Name outside of the body. Ignore references of types 'D'
4126 and 'I' introduced for local cross-references.
4127 (Output_Local_References): new procedure to output the local
4128 cross-references sections.
4129 (Lref_Entity_Status): new array defining whether an entity is a local
4130 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4131 with 'I' type when initialization expression is present.
4132 * get_scos.adb, get_scos.ads: Correct comments and typos
4134 2011-08-02 Javier Miranda <miranda@adacore.com>
4136 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4138 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4140 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4143 2011-08-02 Vincent Celier <celier@adacore.com>
4145 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4146 (No_Space_Img): New function
4147 (Find_Excluded_Sources): When reading from a file, record the file name
4148 and the line number for each excluded source.
4149 (Mark_Excluded_Sources): When reporting an error, if the excluded
4150 sources were read from a file, include file name and line number in
4153 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4155 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4157 2011-08-02 Robert Dewar <dewar@adacore.com>
4159 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4161 2011-08-02 Javier Miranda <miranda@adacore.com>
4163 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4164 generation of TSDs to the DOTNET compiler.
4165 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4166 generation of TSDs to the DOTNET compiler.
4168 2011-08-02 Javier Miranda <miranda@adacore.com>
4170 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4171 record of all the tagged types declared inside library level package
4172 declarations, library level package bodies or library level subprograms.
4173 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4174 associated with a given tagged type.
4175 (Build_VM_TSDs): New subprogram.
4176 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4177 compilation units that are subprograms.
4178 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4179 compilation units that are package bodies.
4180 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4181 units that are a package declaration or a package instantiation.
4182 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4183 reorganization to improve the error generated by the frontend when the
4184 function Ada.Tags.Secondary_Tag is not available.
4185 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4186 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4188 2011-08-02 Javier Miranda <miranda@adacore.com>
4190 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4192 2011-08-02 Robert Dewar <dewar@adacore.com>
4194 * s-imenne.ads: Minor reformatting.
4196 2011-08-02 Robert Dewar <dewar@adacore.com>
4198 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4199 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4200 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4202 2011-08-02 Robert Dewar <dewar@adacore.com>
4204 * einfo.ads (Materialize_Entity): Document this is only for renamings
4205 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4206 required debug information in the case where we transform the object
4207 declaration into a renaming declaration.
4208 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4210 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4213 2011-08-02 Robert Dewar <dewar@adacore.com>
4215 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4216 Suppress_Init_Procs.
4217 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4218 Suppress_Initialization/Initialization_Suppressed.
4219 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4220 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4221 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4222 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4224 2011-08-02 Robert Dewar <dewar@adacore.com>
4226 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4229 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4231 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4232 only have inheritable classwide pre/postconditions.
4234 2011-08-02 Javier Miranda <miranda@adacore.com>
4236 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4237 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4238 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4239 checks if the external tag of a type is the same as the external tag
4240 of some other declaration.
4242 2011-08-02 Thomas Quinot <quinot@adacore.com>
4244 * s-taskin.ads: Minor reformatting.
4246 2011-08-02 Emmanuel Briot <briot@adacore.com>
4248 * g-comlin.adb (Display_Help): swap the order in which it prints the
4249 short help and the general usage.
4251 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4253 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4254 the aspect declarations and attach them to the generic copy for
4255 subsequent analysis.
4256 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4257 declarations of the generic tree to the new subprogram declarations.
4258 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4259 conditions that apply to a subprogram instance.
4261 2011-08-02 Robert Dewar <dewar@adacore.com>
4263 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4267 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4268 private type with a tagged full view is not derived in the immediate
4269 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4271 2011-08-02 Robert Dewar <dewar@adacore.com>
4273 * exp_ch4.adb: Minor reformatting.
4275 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4277 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4278 Ada2012 iterator, the loop will be rewritten during expansion into a
4279 while loop with a cursor and an element declaration. Do not analyze the
4280 body in this case, because if the container is for indefinite types the
4281 actual subtype of the elements will only be determined when the cursor
4282 declaration is analyzed.
4284 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4286 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4287 size/alignment related attributes in CodePeer_Mode.
4289 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4291 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4292 Prepend_Element, since this can result in the operation getting the
4293 wrong slot in the full type's dispatch table if the full type has
4294 inherited operations. The incomplete type's operation will get added
4295 to the proper position in the full type's primitives
4296 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4297 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4298 dispatching operations, since there are cases where nonprimitive
4299 subprograms can get added to the list of incomplete dependents (such
4300 as subprograms in nested packages).
4301 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4302 private part when determining whether to add a primitive with a
4303 parameter of a tagged incomplete type to the Private_Dependents list.
4304 Such primitives can also occur in the visible part, and should not have
4305 been excluded from being private dependents.
4306 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4307 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4308 list of a Taft-amendment incomplete type is a primitive before issuing
4309 an error that the full type must appear in the same unit. There are
4310 cases where nonprimitives can be in the list (such as subprograms in
4312 * sem_disp.adb (Derives_From): Use correct condition for checking that
4313 a formal's type is derived from the type of the corresponding formal in
4314 the parent subprogram (the condition was completely wrong). Add
4315 checking that was missing for controlling result types being derived
4316 from the result type of the parent operation.
4318 2011-08-02 Yannick Moy <moy@adacore.com>
4320 * errout.adb (First_Node): minor renaming
4321 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4324 2011-08-02 Yannick Moy <moy@adacore.com>
4326 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4327 before accessing operands.
4328 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4329 decide whether an initialization expression respects SPARK rules, as
4330 the plain node is the expanded one. This allows for more valid warnings
4332 * gnat_rm.texi: Minor update.
4334 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4336 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4339 2011-08-02 Robert Dewar <dewar@adacore.com>
4341 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4343 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4345 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4346 loop statements and the element renaming declaration with a block when
4347 the element type is controlled.
4349 2011-08-02 Yannick Moy <moy@adacore.com>
4351 * sinfo.ads: Minor formatting.
4353 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4355 * sem_aggr.adb (Add_Association): if the association has a box and no
4356 expression, use the Sloc of the aggregate itself for the new
4358 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4361 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4363 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4364 When a container is provided via a function call, generate a renaming
4365 of the function result. This avoids the creation of a transient scope
4366 and the premature finalization of the container.
4367 * exp_ch7.adb (Is_Container_Cursor): Removed.
4368 (Wrap_Transient_Declaration): Remove the supression of the finalization
4369 of the list controller when the declaration denotes a container cursor,
4372 2011-08-02 Yannick Moy <moy@adacore.com>
4374 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4375 node is from source, instead of the original node being from source.
4377 (Resolve_Array_Aggregate): refine the check for a static expression, to
4378 recognize also static ranges
4379 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4380 Array_Type_Declaration): postpone the test for the type being a subtype
4381 mark after the type has been resolved, so that component-selection and
4382 expanded-name are discriminated.
4383 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4384 to distinguish the case of an iteration scheme, so that an error is
4385 issed on a non-static range in SPARK except in an iteration scheme.
4386 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4387 In_Iter_Schm = True.
4388 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4389 user-defined operators so that they are allowed in renaming
4391 (Find_Selected_Component): refine the check for prefixing of operators
4392 so that they are allowed in renaming. Move the checks for restrictions
4393 on selector name after analysis discriminated between
4394 component-selection and expanded-name.
4395 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4396 concatenation argument of string type if it is static.
4397 * sem_util.adb, sem_util.ads
4398 (Check_Later_Vs_Basic_Declarations): add a new function
4399 Is_Later_Declarative_Item to decice which declarations are allowed as
4400 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4401 mode, add that renamings are considered as later items.
4402 (Enclosing_Package): new function to return the enclosing package
4403 (Enter_Name): correct the rule for homonyms in SPARK
4404 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4405 from source (result of expansion) to avoid issuing wrong warnings.
4407 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4409 * errout.adb: On anything but an expression First_Node returns its
4412 2011-08-02 Pascal Obry <obry@adacore.com>
4414 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4416 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4418 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4419 Set the associated loop as the related expression of internally
4421 * exp_ch7.adb (Is_Container_Cursor): New routine.
4422 (Wrap_Transient_Declaration): Supress the finalization of the list
4423 controller when the declaration denotes a container cursor.
4425 2011-08-02 Yannick Moy <moy@adacore.com>
4427 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4429 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4430 expression is a simple expression. This check cannot be performed in
4431 the semantics, so just drop it.
4432 (P_Index_Or_Discriminant_Constraint): move check that the index or
4433 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4434 semantics. Other cases were previously checked in the semantics.
4435 * par-ch4.adb (P_Name): move checks that a selector name is not
4436 character literal or an operator symbol to Find_Selected_Component in
4438 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4439 declarations are not placed after later declarations in a separate
4440 procedure in Sem_Util (possibly not the best choice?), to be used both
4441 during parsing, for Ada 83 mode, and during semantic analysis, for
4443 * par-endh.adb (Check_End): move check that end label is not missing
4444 to Process_End_Label in the semantics
4445 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4446 the special case for SPARK restriction
4447 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4448 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4449 parameter Force to issue the error message even on internal node (used
4450 for generated end label). Call Check_Restriction to check when an error
4451 must be issued. In SPARK mode, issue an error message even if the
4452 restriction is not set.
4453 (Check_Restriction): new procedure with an additional out parameter to
4454 inform the caller that a message has been issued
4455 * sem_aggr.adb: Minor modification of message
4456 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4457 instead of issuing an error message directly
4458 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4459 declarations are not placed after later declarations, by calling
4460 Check_Later_Vs_Basic_Declarations
4461 (Analyze_Subtype_Declaration): move here the check that an index or
4462 discriminant constraint must be a subtype mark. Change the check that
4463 a subtype of String must start at one so that it works on subtype marks.
4464 * sem_ch4.adb (Analyze_Call): move here the check that a named
4465 association cannot follow a positional one in a call
4466 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4467 instead of issuing an error message directly
4468 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4469 selector name is not a character literal or an operator symbol. Move
4470 here the check that the prefix of an expanded name cannot be a
4471 subprogram or a loop statement.
4472 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4473 procedure called from parsing and semantics to check that basic
4474 declarations are not placed after later declarations
4475 (Process_End_Label): move here the check that end label is not missing
4477 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4479 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4480 representation clause in codepeer mode, since it confuses CodePeer and
4481 does not bring useful info.
4483 2011-08-02 Ed Falis <falis@adacore.com>
4485 * init.c: initialize fp hw on MILS.
4487 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4489 * errout.adb (First_Node): for bodies, return the node itself (small
4490 optimization). For other nodes, do not check source_unit if the node
4491 comes from Standard.
4493 2011-08-02 Robert Dewar <dewar@adacore.com>
4495 * exp_ch3.adb: Minor comment additions.
4496 * sem_ch13.adb: Minor reformatting.
4498 2011-08-02 Pascal Obry <obry@adacore.com>
4500 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4502 2011-08-02 Robert Dewar <dewar@adacore.com>
4504 * sem_attr.adb: Minor reformatting.
4506 2011-08-02 Robert Dewar <dewar@adacore.com>
4508 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4509 (Has_Default_Component_Value): Removed
4510 * einfo.ads Comment updates
4511 (Has_Default_Aspect): Replaces Has_Default_Value
4512 (Has_Default_Component_Value): Removed
4514 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4516 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4517 (Get_Simple_Init_Val): Handle Default_Value aspect
4518 (Needs_Simple_Initialization): Handle Default_Value aspect
4519 * exp_ch3.ads: Needs_Simple_Initialization
4520 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4521 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4523 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4524 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4525 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4527 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4529 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4530 package containing iteration primitives.
4531 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4533 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4535 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4536 "of", pre-analyze expression in case it is a function call with
4537 finalization actions that must be placed ahead of the loop.
4538 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4539 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4541 2011-08-02 Geert Bosch <bosch@adacore.com>
4543 * cstand.adb (Create_Float_Types): Only consider C's long double for
4544 Long_Long_Float, in addition to double.
4546 2011-08-02 Robert Dewar <dewar@adacore.com>
4548 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4549 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4550 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4555 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4558 2011-08-02 Javier Miranda <miranda@adacore.com>
4560 * einfo.ads, einfo.adb
4561 (Original_Access_Type): Move this attribute to Node26 since there was
4562 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4563 which causes conflicts and breaks the generation of the .NET compiler.
4564 (Interface_Name): Add missing documentation on JGNAT only uses of
4567 2011-08-02 Geert Bosch <bosch@adacore.com>
4569 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4570 (Find_Back_End_Float_Type): Likewise
4571 (Create_Back_End_Float_Types): Likewise
4572 (Create_Float_Types): Likewise
4573 (Register_Float_Type): Likewise
4574 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4575 Nlist and split out type selection in new local Find_Base_Type function.
4576 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4578 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4580 2011-08-02 Robert Dewar <dewar@adacore.com>
4582 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4584 * opt.ads: Minor comment change.
4585 * sem_ch12.adb: Minor code reorganization.
4587 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4589 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4590 subtype's list of rep items to the list on the full subtype in the case
4591 where the lists are the same.
4593 2011-08-02 Geert Bosch <bosch@adacore.com>
4595 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4596 using the one from System.Strings, which also deallocates all strings.
4598 2011-08-02 Geert Bosch <bosch@adacore.com>
4600 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4602 * gcc-interface/Make-lang.in: Update dependencies.
4604 2011-08-02 Olivier Hainque <hainque@adacore.com>
4606 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4609 2011-08-02 Javier Miranda <miranda@adacore.com>
4611 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4612 associated with anonymous access to subprograms.
4614 2011-08-02 Geert Bosch <bosch@adacore.com>
4617 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4618 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4619 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4620 (Add_Symbol_Definition): Move to switch-c.adb
4621 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4622 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4623 (Add_Symbol_Definition): Move to switch-c.adb.
4624 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4626 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4628 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4629 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4631 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4632 (Add_Symbol_Definition): Moved from Prepcomp.
4633 * switch-c.ads: Update copyright notice. Use String_List instead of
4634 Argument_List, removing dependency on System.OS_Lib.
4636 2011-08-02 Yannick Moy <moy@adacore.com>
4638 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4639 mode on initialization expression which does not respect SPARK
4641 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4642 if the tree referenced by its argument represents an initialization
4643 expression in SPARK, suitable for initializing an object in an object
4646 2011-08-02 Javier Miranda <miranda@adacore.com>
4648 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4649 internally generated access to subprogram with its associated protected
4651 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4653 2011-08-02 Geert Bosch <bosch@adacore.com>
4655 * cstand.adb (Register_Float_Type): Print information about type to
4656 register, if the Debug_Flag_Dot_B is set.
4657 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4658 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4659 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4660 with a requested precision of more than Max_Digits digits and no more
4661 than Max_Base_Digits digits, if a range specification is present and the
4662 Predefined_Float_Types list has a suitable type to derive from.
4663 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4664 case of type completion with pragma Import
4666 (Process_Import_Predefined_Type): Processing to complete a type
4667 with pragma Import. Currently supports floating point types only.
4668 (Set_Convention_From_Pragma): Do nothing without underlying type.
4669 (Process_Convention): Guard against absence of underlying type,
4670 which may happen when importing incomplete types.
4671 (Process_Import_Or_Interface): Handle case of importing predefined
4672 types. Tweak error message.
4674 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4676 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4677 functions to previous change. Reorganize code slightly.
4679 2011-08-02 Geert Bosch <bosch@adacore.com>
4681 * back_end.ads (Register_Type_Proc): New call back procedure type for
4682 allowing the back end to provide information about available types.
4683 (Register_Back_End_Types): New procedure to register back end types.
4684 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4686 * cstand.adb (Back_End_Float_Types): New list for floating point types
4687 supported by the back end.
4688 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4689 (Copy_Float_Type): New procedure to make new copies of predefined types.
4690 (Register_Float_Type): New call back procedure to populate the BEFT list
4691 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4692 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4693 (Create_Float_Types): New procedure to create entities for floating
4694 point types predefined in Standard, and put these and any remaining
4695 BEFTs on the Predefined_Float_Types list.
4696 * stand.ads (Predefined_Float_Types): New list for predefined floating
4697 point types that do not have declarations in package Standard.
4699 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4701 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4702 entity node for the unit containing the parameter.
4703 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4704 (Add_Inlined_Subprogram): Likewise.
4705 * gcc-interface/Make-lang.in: Update dependencies.
4707 2011-08-02 Thomas Quinot <quinot@adacore.com>
4709 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4712 2011-08-02 Geert Bosch <bosch@adacore.com>
4714 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4716 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4718 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4719 computed value of Base_Type.
4721 2011-08-02 Yannick Moy <moy@adacore.com>
4723 * restrict.adb (Check_Restriction): issue an error for any use of
4724 class-wide, even if the No_Dispatch restriction is not set.
4725 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4726 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4727 when completing a private extension, the type named in the private part
4728 is not the same as that named in the visible part.
4729 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4730 of an inherited primitive operations of a tagged type or type extension
4731 that returns the tagged type.
4732 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4733 function which returns True for an implicit operation inherited by the
4734 derived type declaration for the argument type.
4735 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4738 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4740 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4741 Process_Bounds, to perform analysis with expansion of a range or an
4742 expression that is the iteration scheme for a loop.
4743 (Analyze_Iterator_Specification): If domain of iteration is given by a
4744 function call with a controlled result, as is the case if call returns
4745 a predefined container, ensure that finalization actions are properly
4747 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4749 2011-08-02 Javier Miranda <miranda@adacore.com>
4751 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4752 * gcc-interface/Make-lang.in: Update dependencies.
4754 2011-08-02 Javier Miranda <miranda@adacore.com>
4756 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4757 determine if the analysis is performed using N or Original_Node (N).
4758 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4759 functionality of routine Is_Variable avoids code duplication.
4760 * checks.adb (Determine_Range): Handle temporaries generated by
4761 Remove_Side_Effects.
4763 2011-08-02 Javier Miranda <miranda@adacore.com>
4765 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4766 expansion of the condition. Required since the previous analysis was
4767 done with expansion disabled (see Resolve_Quantified_Expression) and
4768 hence checks were not inserted and record comparisons have not been
4771 2011-08-02 Ed Falis <falis@adacore.com>
4773 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4776 2011-08-02 Bob Duff <duff@adacore.com>
4778 * opt.ads: Minor comment fix.
4780 2011-08-02 Bob Duff <duff@adacore.com>
4782 * sem_ch12.adb (Analyze_Package_Instantiation,
4783 Analyze_Subprogram_Instantiation): Turn off style checking while
4784 analyzing an instance. Whatever style checks that apply to the generic
4785 unit should apply, so it makes no sense to apply them in an instance.
4786 This was causing trouble when compiling an instance of a runtime
4787 unit that violates the -gnatyO switch.
4788 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4789 one of the two case statements, causing spurious errors.
4791 2011-08-02 Robert Dewar <dewar@adacore.com>
4793 * uname.adb: Minor reformatting.
4794 * gnatcmd.adb: Minor reformatting.
4795 * exp_attr.adb: Minor reformatting.
4797 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4799 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4800 No_Dispatching_Calls, do not look for the Assign primitive, because
4801 predefined primitives are not created in this case.
4803 2011-08-02 Bob Duff <duff@adacore.com>
4805 * stylesw.ads: Minor comment fixes.
4807 2011-08-02 Robert Dewar <dewar@adacore.com>
4809 * freeze.adb (Add_To_Result): New procedure.
4811 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4813 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4814 time, if the specific run-time routines for handling streams of strings
4815 are not available, use the default mechanism.
4817 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4819 * s-regpat.ads: Fix typo.
4821 2011-08-02 Vincent Celier <celier@adacore.com>
4823 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4824 not null, call it to create the in memory config project file without
4825 parsing an existing default config project file.
4827 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4829 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4831 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4833 * sem_elim.adb: an abstract subprogram does not need an eliminate
4834 pragma for its descendant to be eliminable.
4836 2011-08-02 Ed Falis <falis@adacore.com>
4838 * init.c: revert to handling before previous checkin for VxWorks
4839 * s-intman-vxworks.adb: delete unnecessary declarations related to
4840 using Ada interrupt facilities for handling signals.
4841 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4842 * s-intman-vxworks.ads: Import __gnat_install_handler as
4843 Initialize_Interrupts.
4844 * s-taprop-vxworks.adb: Delete Signal_Mask.
4845 (Abort_Handler): change construction of mask to unblock exception
4848 2011-08-02 Jerome Guitton <guitton@adacore.com>
4850 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4851 Debug_Raise_Exception before propagation starts.
4853 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4855 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4856 to Restriction_Check_Required.
4857 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4858 * sem_res.adb (Resolve_Call): Likewise.
4859 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4861 2011-08-02 Bob Duff <duff@adacore.com>
4863 * stylesw.ads: Update comment.
4864 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4865 * errout.ads: Remove obsolete comment.
4867 2011-08-02 Javier Miranda <miranda@adacore.com>
4869 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4870 (Set_Is_Safe_To_Reevaluate): new procedure.
4871 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4872 assignment is allowed on safe-to-reevaluate variables.
4873 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4874 temporary created to remove side effects in expressions that use
4875 the secondary stack as safe-to-reevaluate.
4876 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4877 variables that are not true constants.
4879 2011-08-02 Robert Dewar <dewar@adacore.com>
4881 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4882 sem_res.adb, sem_ch6.adb: Minor reformatting.
4884 2011-08-02 Jerome Guitton <guitton@adacore.com>
4886 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4888 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4890 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4891 not set Overridden_Operation if subprogram is an initialization
4894 2011-08-02 Yannick Moy <moy@adacore.com>
4896 * par-ch6.adb: Correct obsolete name in comments
4897 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4898 which takes two message arguments (existing function takes one), with
4899 second message used for continuation.
4900 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4901 block statements that originate from a source block statement, not
4902 generated block statements
4903 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4904 symmetry with procedure case
4905 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4906 function to issue an error in formal mode if a package specification
4907 contains more than one tagged type or type extension.
4908 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4909 parameters matching formals of tagged types are objects (or ancestor
4910 type conversions of objects), not general expressions. Issue an error
4911 on view conversions that are not involving ancestor conversion of an
4913 (Resolve_Type_Conversion): in formal mode, issue an error on the
4914 operand of an ancestor type conversion which is not an object
4915 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4916 procedure so that it works also for actuals of function calls
4917 (Is_Actual_Tagged_Parameter): new function which determines if its
4918 argument is an actual parameter of a formal of tagged type in a
4920 (Is_SPARK_Object_Reference): new function which determines if the tree
4921 referenced by its argument represents an object in SPARK
4923 2011-08-02 Robert Dewar <dewar@adacore.com>
4925 * sem_ch3.adb: Minor reformatting
4926 Minor comment addition
4927 Minor error msg text change
4929 2011-08-02 Javier Miranda <miranda@adacore.com>
4931 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4932 function. Used to be more precise when we generate a variable plus one
4933 assignment to remove side effects in the evaluation of the Bound
4935 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4936 of the bound expression to force its re-analysis and thus expand the
4937 associated transient scope (if required). Code cleanup replacing the
4938 previous code that declared the constant entity by an invocation to
4939 routine Force_Evaluation which centralizes this work in the frontend.
4941 2011-08-02 Robert Dewar <dewar@adacore.com>
4943 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4944 (Base_Type): Now uses improved Is_Base_Type function
4945 * einfo.ads (Base_Type): Inline this function
4947 2011-08-02 Robert Dewar <dewar@adacore.com>
4949 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4950 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4952 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4954 * gcc-interface/Make-lang.in: Update dependencies.
4955 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4958 2011-08-02 Yannick Moy <moy@adacore.com>
4960 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4961 non-simple expression used in delta constraint
4962 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4963 index constraint which is not a subtype mark
4964 * par.adb: With and use Restrict
4965 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4966 mode on component type which is not a subtype mark and default
4967 expression on component
4968 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4969 of string which does not have a lower index bound equal to 1
4970 (Array_Type_Declaration): issue an error in formal mode on index or
4971 component type which is not a subtype mark, and on aliased keyword on
4973 (Derived_Type_Declaration): issue an error in formal mode on interface,
4974 limited or abstract type
4975 (Record_Type_Declaration): issue an error in formal mode on interface
4976 (Record_Type_Definition): issue an error in formal mode on tagged types
4977 and type extensions not declared in the specification of a library unit
4978 package; on null non-tagged record; on variant part
4980 2011-08-02 Vincent Celier <celier@adacore.com>
4982 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4983 not declared for qualified library project when Library_Name is not
4984 declared, but Library_Dir is.
4986 2011-08-02 Robert Dewar <dewar@adacore.com>
4988 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4989 pragmas (affects aspects [Component_]Default_Value
4990 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4991 component type for the resolution
4993 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4995 * einfo.adb (Base_Type): Tune implementation for speed.
4997 2011-08-02 Robert Dewar <dewar@adacore.com>
4999 * freeze.adb: Minor reformatting.
5001 2011-08-02 Thomas Quinot <quinot@adacore.com>
5003 * scos.ads: Update comments.
5005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5007 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5008 base type, because the parent may be a subtype of a private type whose
5009 convention is established in a private part.
5011 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5013 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5014 statement in a block when the expansion of the return expression has
5015 created a finalization chain.
5016 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5017 with the parent node.
5018 Add N_Extended_Return_Statement to handle the case where a transient
5019 object declaration appears in the Return_Object_Declarations list of
5020 an extended return statement.
5022 2011-08-02 Matthew Gingell <gingell@adacore.com>
5024 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5025 unused parameter 'name'.
5027 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5029 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5030 inherited operation, check whether its alias, which is the source
5031 operastion that it renames, has been marked eliminated.
5033 2011-08-02 Javier Miranda <miranda@adacore.com>
5035 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5036 in-mode parameter whose type is an access type since it can be used to
5037 modify its designated object. Enforce code that handles as safe an
5038 access type that is not access-to-constant but it is the result of a
5039 previous removal of side-effects.
5040 (Remove_Side_Effects): Minor code reorganization of cases which require
5041 no action. Done to incorporate documentation on new cases uncovered
5042 working in this ticket: no action needed if this routine was invoked
5043 too early and the nodes are not yet decorated.
5044 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5045 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5046 were issued with actuals that are implicitly provided by
5049 2011-08-02 Robert Dewar <dewar@adacore.com>
5051 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5053 2011-08-02 Yannick Moy <moy@adacore.com>
5055 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5056 to issue an error in formal mode on attribute not supported in this mode
5057 (Analyze_Attribute): issue errors on standard attributes not supported
5059 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5060 comment, and issue error in formal mode on modulus which is not a power
5062 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5064 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5066 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5067 operator on modular type (except 'not').
5069 2011-08-02 Robert Dewar <dewar@adacore.com>
5071 * gnat_rm.texi: Minor reformatting.
5073 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5075 * s-osinte-linux.ads: Minor comment update and reformatting.
5076 * i-cexten.ads: Make this unit pure, as for its parent.
5077 Will allow its usage in more contexts if needed.
5079 2011-08-02 Robert Dewar <dewar@adacore.com>
5081 * s-utf_32.ads: Minor comment fix.
5083 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5085 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5086 operation of a tagged synchronized type, handle the case where the
5087 controlling argument is overloaded.
5089 2011-08-02 Yannick Moy <moy@adacore.com>
5091 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5092 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5093 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5094 SPARK mode and formal verification mode on processing SPARK restriction
5095 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5096 requiring consistency checking.
5098 2011-08-02 Robert Dewar <dewar@adacore.com>
5100 * sem_res.adb: Minor reformatting.
5102 2011-08-02 Robert Dewar <dewar@adacore.com>
5104 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5105 a-cforse.ads: Remove unneeded with of Ada.Containers
5106 Remove commented out pragma Inline's
5107 Move specifications of new subprograms to the actual specs
5109 2011-08-02 Yannick Moy <moy@adacore.com>
5111 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5112 a-cforse.ads: Update comments.
5114 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5116 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5118 2011-08-02 Robert Dewar <dewar@adacore.com>
5120 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5121 a-cforse.ads, a-cofove.ads: Minor reformatting.
5123 2011-08-02 Claire Dross <dross@adacore.com>
5125 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5126 a-cofove.ads: Add comments.
5128 2011-08-02 Yannick Moy <moy@adacore.com>
5130 * gnat_rm.texi: Document formal containers.
5132 2011-08-02 Emmanuel Briot <briot@adacore.com>
5134 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5137 2011-08-02 Robert Dewar <dewar@adacore.com>
5139 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5142 2011-08-02 Robert Dewar <dewar@adacore.com>
5144 * aspects.adb: New aspects Default_Value and Default_Component_Value
5145 New format of Aspect_Names table checks for omitted entries
5146 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5147 handling of boolean aspects for derived types.
5148 New aspects Default_Value and Default_Component_Value
5149 New format of Aspect_Names table checks for omitted entries
5150 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5151 (Has_Default_Value): New flag
5152 (Has_Default_Component_Value): New flag
5153 (Has_Default_Value): New flag
5154 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5156 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5157 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5158 Default_Value and Default_Component_Value
5159 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5160 New aspects Default_Value and Default_Component_Value
5161 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5162 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5164 2011-08-02 Vincent Celier <celier@adacore.com>
5166 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5167 inherit library kind.
5169 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5171 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5174 2011-08-02 Robert Dewar <dewar@adacore.com>
5176 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5178 2011-08-02 Yannick Moy <moy@adacore.com>
5180 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5182 2011-08-02 Robert Dewar <dewar@adacore.com>
5184 * impunit.adb: Add comment.
5186 2011-08-02 Yannick Moy <moy@adacore.com>
5188 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5189 qualification of aggregates in formal mode
5190 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5192 (Resolve_Aggregate): complete the test that an aggregate is adequately
5193 qualified in formal mode
5195 2011-08-02 Pascal Obry <obry@adacore.com>
5197 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5198 * mlib-prj.adb: Supress warning when compiling binder generated file.
5199 (Build_Library): Supress all warnings when compiling the binder
5202 2011-08-02 Yannick Moy <moy@adacore.com>
5204 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5206 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5207 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5208 Add with/use clauses to make Check_Formal_Restriction visible
5210 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5212 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5213 in-parameters when type of the generic formal is private in the generic
5214 spec and non-private in the body.
5216 2011-08-02 Claire Dross <dross@adacore.com>
5218 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5219 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5220 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5221 * impunit.adb, Makefile.rtl: Take new files into account.
5223 2011-08-02 Robert Dewar <dewar@adacore.com>
5225 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5226 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5228 2011-08-02 Yannick Moy <moy@adacore.com>
5230 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5232 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5233 matching static array bounds, taking into account the special case of
5235 * sem_ch3.adb: Typo in comment.
5237 2011-08-02 Yannick Moy <moy@adacore.com>
5239 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5240 which issues an error in formal mode if its argument node is originally
5242 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5243 has a discriminant specification so that it does not include the case
5245 (Derived_Type_Declaration): move here the test that a derived type has a
5246 discriminant specification
5247 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5248 first element of a component association before accessing its choices
5249 (presence of component association is not enough)
5250 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5251 declaration is a library item before accessing the next element in a
5252 list, as library items are not member of lists
5253 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5254 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5255 Check_Formal_Restriction whenever possible.
5257 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5259 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5260 reference when needed.
5262 2011-08-02 Bob Duff <duff@adacore.com>
5264 * gnat_ugn.texi: Fix typo.
5266 2011-08-02 Vincent Celier <celier@adacore.com>
5268 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5269 archive file name. Do not use the full path name of archives for Open
5272 2011-08-02 Robert Dewar <dewar@adacore.com>
5274 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5275 Analyze_Aspect_Specifications
5277 (Analyze_Aspect_Specifications): New handling for boolean aspects
5278 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5279 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5280 sequence for Analyze_Aspect_Specifications
5281 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5282 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5284 2011-08-02 Robert Dewar <dewar@adacore.com>
5286 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5287 aspects, since these no longer exist.
5289 2011-08-02 Robert Dewar <dewar@adacore.com>
5291 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5292 semicolon, do not try to see if there are aspects following it.
5293 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5296 2011-08-02 Robert Dewar <dewar@adacore.com>
5298 * sem_ch8.adb, aspects.ads: Minor reformatting.
5300 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5302 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5303 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5305 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5307 2011-08-02 Yannick Moy <moy@adacore.com>
5309 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5310 mode on subprogram declaration outside of package specification, unless
5311 it is followed by a pragma Import
5312 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5313 Access_Type_Declaration): issue error in formal mode on access type
5314 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5316 (Analyze_Object_Declaration): issue error in formal mode on object
5317 declaration which does not respect SPARK restrictions
5318 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5319 declaration which does not respect SPARK restrictions
5320 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5321 error in formal mode on digits or delta constraint
5322 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5323 decimal fixed point type
5324 (Derived_Type_Declaration): issue error in formal mode on derived type
5325 other than type extensions of tagged record types
5326 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5327 with check on access definition
5328 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5329 mode on protected definition.
5330 (Analyze_Task_Definition): issue error in formal mode on task definition
5332 2011-08-02 Robert Dewar <dewar@adacore.com>
5334 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5336 2011-08-02 Javier Miranda <miranda@adacore.com>
5338 * sem_ch6.adb (Can_Override_Operator): New function.
5339 (Verify_Overriding_Indicator): Add missing code to check overriding
5340 indicator in operators. Fixes regression.
5341 (Check_Overriding_Indicator): Minor reformating after replacing the
5342 code that evaluates if the subprogram can override an operator by
5343 invocations to the above new function.
5345 (Write_Field26_Name): Add missing code to ensure that, following
5346 the documentation in einfo.ads, this field is not shown as attribute
5347 "Static_Initialization" on non-dispatching functions.
5349 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5351 * sem_res.adb (Resolve_Call): A call to
5352 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5353 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5354 i.e., when the second parameter is of type Time_Span.
5356 2011-08-02 Vincent Celier <celier@adacore.com>
5358 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5359 with an archive instead of -L<library dir> -l<library name>.
5361 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5363 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5364 mark the base types In_Use in addition to making the operations
5367 2011-08-02 Ed Falis <falis@adacore.com>
5369 * init.c: add and setup __gnat_signal_mask for the exception signals
5370 * s-inmaop-vxworks.adb: new file.
5371 * s-intman-vxworks.adb: remove unnecessary initializations and
5373 * s-intman-vxworks.ads: remove unnecessary variable
5374 * s-taprop-vxworks.adb: simplify signal initialization
5376 2011-08-02 Robert Dewar <dewar@adacore.com>
5378 * sem_ch8.adb: Minor code reorganization, comment updates.
5380 2011-08-02 Robert Dewar <dewar@adacore.com>
5382 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5383 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5385 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5386 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5388 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5390 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5391 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5392 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5393 use_type_clauses, to handle more efficiently use_type and use_all_type
5395 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5396 Ada2012 Use_All_Type clause.
5397 (Use_Class_Wide_Operations): new procedure.
5399 2011-08-02 Robert Dewar <dewar@adacore.com>
5401 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5402 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5403 expression to expression function.
5405 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5407 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5408 if types are compatible.
5410 2011-08-02 Yannick Moy <moy@adacore.com>
5412 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5413 returns True if its argument array types have same dimension and same
5414 static bounds at each index.
5415 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5416 OUT or IN OUT paramaters which are not view conversions in SPARK.
5417 (Resolve_Arithmetic_Op): issue an error in formal mode on
5418 multiplication or division with operands of fixed point types which are
5419 not qualified or explicitly converted.
5420 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5421 Boolean or array type (except String) operands.
5422 (Resolve_Equality_Op): issue an error in formal mode on equality
5423 operators for array types other than String with non-matching static
5425 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5426 for array types with non-matching static bounds. Factorize the code in
5427 Matching_Static_Array_Bounds.
5428 (Resolve_Qualified_Expression): issue an error in formal mode on
5429 qualified expressions for array types with non-matching static bounds.
5430 (Resolve_Type_Conversion): issue an error in formal mode on type
5431 conversion for array types with non-matching static bounds
5433 2011-08-02 Robert Dewar <dewar@adacore.com>
5435 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5437 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5439 * par-ch9.adb: save location of entry for proper error message.
5441 2011-08-02 Javier Miranda <miranda@adacore.com>
5443 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5444 (Use_Full_View) which permits this routine to climb through the
5445 ancestors using the full-view of private parents.
5446 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5447 Use_Full_View to true in calls to Is_Ancestor.
5448 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5449 true in call to Is_Ancestor.
5450 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5451 Use_Full_View to true in call to Is_Ancestor.
5452 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5453 call to Is_Ancestor.
5454 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5455 Use_Full_View to true in calls to Is_Ancestor.
5456 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5457 Make_Select_Specific_Data_Table, Register_Primitive,
5458 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5459 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5460 to true in call to Is_Ancestor.
5461 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5462 Use_Full_View to true in calls to Is_Ancestor.
5464 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5465 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5467 2011-08-02 Robert Dewar <dewar@adacore.com>
5469 * gnat_rm.texi: Minor reformatting.
5470 * sem_prag.adb: Minor reformatting.
5472 2011-08-02 Tristan Gingold <gingold@adacore.com>
5474 * vms_data.ads: Add VMS qualifier for -gnateP.
5476 2011-08-02 Robert Dewar <dewar@adacore.com>
5478 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5479 * par-ch7.adb (P_Package): Proper placement of aspects for package
5481 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5482 (End_Statements): Add Is_Sloc parameterr
5483 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5484 (Check_End): Ad Is_Sloc parameter
5485 (End_Statements): Add Is_Sloc parameterr
5487 2011-08-02 Vincent Celier <celier@adacore.com>
5489 * ug_words: Add VMS qualifier equivalent to -gnateP:
5490 /SYMBOL_PREPROCESSING.
5492 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5494 * gnat-style.texi: For hexadecimal numeric literals the typical
5495 grouping of digits is 4 to represent 2 bytes.
5496 A procedure spec which is split into several lines is indented two
5499 2011-08-02 Yannick Moy <moy@adacore.com>
5501 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5502 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5503 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5505 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5506 choice in array aggregate
5507 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5509 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5510 positional and named aggregate for record, or others in record
5511 aggregate, or multiple choice in record aggregate
5512 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5513 array operands to logical operations AND, OR and XOR do not have the
5514 same static lower and higher bounds
5515 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5517 2011-08-01 Robert Dewar <dewar@adacore.com>
5519 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5520 Replaces Last_Source_Node_In_Sequence.
5521 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5522 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5523 parens and blank in string (this was inconsistently implemented).
5525 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5526 blank in string (this was inconsistently implemented).
5528 (Set_Global_Switches): Set formal mode switches appropriately
5529 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5531 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5532 call Set_Error_Msg_Lang to set "spark" as language name.
5533 * par.adb: Remove unnecessary call to set formal language for errout
5534 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5535 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5537 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5538 calls to it, moved after resolution so that types are known
5539 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5540 result of concatenation is not of type String
5541 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5542 concatenation is not properly restricted
5543 * gnat_rm.texi: Add doc on pragma Spark_95.
5544 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5545 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5546 * gcc-interface/Make-lang.in: Update dependencies.
5548 2011-08-01 Javier Miranda <miranda@adacore.com>
5550 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5551 condition that detects if the overridden operation must replace an
5554 2011-08-01 Javier Miranda <miranda@adacore.com>
5556 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5557 code declarations inserted by Insert_Actions in each alternative of the
5558 N_Case_Expression node.
5560 2011-08-01 Robert Dewar <dewar@adacore.com>
5562 * sem_ch6.adb: Minor code reorganization.
5563 * sem_util.adb: Minor reformatting.
5565 2011-08-01 Pascal Obry <obry@adacore.com>
5567 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5568 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5570 2011-08-01 Yannick Moy <moy@adacore.com>
5572 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5573 literal or operator symbol which is prefixed
5574 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5575 mode on access attributes.
5576 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5577 that concatenation operands are properly restricted in formal mode
5578 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5579 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5580 result of the concatenation has a type different from String.
5581 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5582 Analyze_Quantified_Expression, Analyze_Slice,
5583 Analyze_Null): issue an error in formal mode on unsupported constructs
5585 (Analyze_Block_Statement): only issue error on source block statement
5586 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5587 function which returns the last node in a list of nodes for which
5588 Comes_From_Source returns True, if any
5589 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5590 Last_Source_Node_In_Sequence
5591 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5592 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5593 mode on unsupported constructs
5594 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5595 rest of the actions may be needed later on since the error is marked as
5597 * sinfo.ads: Typos in comments.
5599 2011-08-01 Pascal Obry <obry@adacore.com>
5601 * projects.texi: Minor editing.
5603 2011-08-01 Yannick Moy <moy@adacore.com>
5605 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5606 insertion character ~~
5607 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5608 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5609 with insertion character ~~
5610 (Set_Msg_Text): treat insertion character ~~
5611 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5612 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5613 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5614 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5615 errors related to the formal language restriction not serious
5616 (insertion character |).
5617 * par.adb (Par): set formal language for error messages if needed
5618 * sem_ch6.adb (Check_Missing_Return): take into account possible
5619 generated statements at the end of the function
5620 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5621 enumeration value to define a new pragma SPARK_95
5622 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5623 SPARK_Version): new type and variables to store the SPARK version
5625 (SPARK_Mode): return True when SPARK_Version is set
5626 * par-prag.adb: Correct indentation
5627 (Prag): take Pragma_SPARK_95 into account
5628 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5631 2011-08-01 Robert Dewar <dewar@adacore.com>
5633 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5634 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5635 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5637 2011-08-01 Pascal Obry <obry@adacore.com>
5639 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5640 Target_Name to Get_Path call.
5641 (Parse_Single_Project): Likewise.
5642 (Post_Parse_Context_Clause): Likewise.
5643 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5644 Call Initialise_Project_Path with the proper Target_Name.
5645 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5647 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5648 with the proper Target_Name.
5649 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5651 (Parse_Project_And_Apply_Config): Likewise.
5652 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5653 This is fine as this part of the code is supporting only native
5655 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5656 is fine as this part of the code is supporting only native compilation.
5658 2011-08-01 Yannick Moy <moy@adacore.com>
5660 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5661 of homonym, unless the homonym is one of the cases allowed in SPARK
5662 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5663 package declaration occurring after a body.
5665 2011-08-01 Robert Dewar <dewar@adacore.com>
5667 * checks.adb, exp_ch4.adb: Minor reformatting.
5669 2011-08-01 Javier Miranda <miranda@adacore.com>
5671 * einfo.ads (Access_Disp_Table): Fix documentation.
5672 (Dispatch_Table_Wrappers): Fix documentation.
5674 2011-08-01 Pascal Obry <obry@adacore.com>
5676 * prj-env.adb, prj-env.ads: Minor reformatting.
5678 2011-08-01 Yannick Moy <moy@adacore.com>
5680 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5681 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5682 procedures out of these packages.
5683 * errout.ads, errout.adb
5684 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5685 procedures in of this package
5686 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5687 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5688 on misplaced later vs initial declarations, like in Ada 83
5689 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5690 formal mode on attribute of private type whose full type declaration
5692 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5693 package declaration inside a package specification
5694 (Analyze_Full_Type_Declaration): issue error in formal mode on
5695 controlled type or discriminant type
5696 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5697 user-defined operator means that it should come from the source
5698 (New_Overloaded_Entity): issue error in formal mode on overloaded
5700 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5702 2011-08-01 Thomas Quinot <quinot@adacore.com>
5704 * atree.adb: Minor reformatting.
5705 * checks.adb: Minor reformatting.
5707 2011-08-01 Vincent Celier <celier@adacore.com>
5709 * s-parame-vms-ia64.ads: Fix typo in comment
5711 * s-parame-vms-restrict.ads: Removed, unused.
5713 2011-08-01 Javier Miranda <miranda@adacore.com>
5716 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5718 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5719 * sem_ch3.ads, sem_ch3.adb
5720 (Is_Constant_Bound): New extended version of the subprogram that was
5721 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5722 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5723 * sem_aux.ads (Constant_Value): Fix typo in comment.
5724 * checks.adb (Generate_Index_Checks): New implementation which, for
5725 array objects with constant bounds, generates the runtime check
5726 referencing the bounds of the array type. For other cases this routine
5727 provides its previous behavior obtaining such values from the array
5729 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5731 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5732 we cannot have semantic interpretations of the new node.
5734 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5736 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5739 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5741 * sem_ch8.adb: Minor code editing.
5742 * s-vxwext.adb: Remove trailing space.
5743 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5744 consistency with other files.
5746 2011-08-01 Thomas Quinot <quinot@adacore.com>
5748 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5750 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5752 * par-ch10.adb: reject parameterized expressions as compilation unit.
5753 * sem_ch4.adb: handle properly conditional expression with overloaded
5754 then_clause and no else_clause.
5756 2011-08-01 Tristan Gingold <gingold@adacore.com>
5758 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5759 like done by System.Aux_DEC.
5760 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5762 2011-08-01 Yannick Moy <moy@adacore.com>
5764 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5765 missing label at end of declaration (subprogram or package)
5766 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5767 of positional and named parameter association
5768 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5769 Error_Msg_SP which adds a prefix to the error message giving the name
5770 of the formal language analyzed
5771 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5772 access result type in subprogram, unconstrained array as result type,.
5773 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5775 * sem_ch8.adb: Code clean up.
5777 2011-08-01 Javier Miranda <miranda@adacore.com>
5779 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5780 * einfo.ads (Access_Disp_Table): Fix documentation.
5781 (Dispatch_Table_Wrappers): Fix documentation.
5782 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5783 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5784 to enforce the documentation of this attribute.
5785 (Set_Is_Interface): Cleanup the assertion.
5786 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5787 the Underlying_Type entity before reading attribute Access_Disp_Table.
5788 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5789 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5790 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5791 the Underlying_Type entity before reading attribute Access_Disp_Table.
5792 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5793 Locate the Underlying_Type entity before reading attribute
5796 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5798 * s-poosiz.ads: Additional overriding indicators.
5800 2011-08-01 Yannick Moy <moy@adacore.com>
5802 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5804 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5805 parameter specification does not include a subtype mark.
5806 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5807 formal mode on abstract subprogram.
5808 (Analyze_Subprogram_Specification): issue error in formal mode on
5809 user-defined operator.
5810 (Process_Formals): issue error in formal mode on access parameter and
5812 * sem_ch9.adb (Analyze_Abort_Statement,
5813 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5814 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5815 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5816 Analyze_Requeue, Analyze_Selective_Accept,
5817 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5818 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5819 issue error in formal mode on user-defined raise statement.
5821 2011-08-01 Thomas Quinot <quinot@adacore.com>
5823 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5824 declaration being hidden when overriding an implicit inherited
5826 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5827 (-gnats), do not complain about a source file that contains only a
5830 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5832 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5833 variable if already set.
5835 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5837 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5838 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5839 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5840 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5841 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5842 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5843 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5844 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5845 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5846 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5847 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5848 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5849 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5850 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5851 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5852 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5853 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5854 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5855 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5856 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5857 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5858 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5859 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5860 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5861 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5862 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5863 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5864 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5865 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5866 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5867 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5868 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5869 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5870 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5871 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5872 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5873 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5874 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5875 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5876 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5877 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5878 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5879 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5880 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5881 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5882 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5883 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5884 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5885 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5886 Use GNAT instead of GNARL.
5888 2011-08-01 Bob Duff <duff@adacore.com>
5890 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5891 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5892 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5895 2011-08-01 Yannick Moy <moy@adacore.com>
5897 * debug.adb (d.D) reverve flag for the SPARK mode
5898 (d.E) reverve flag for SPARK generation mode
5899 (d.F) reverve flag for Why generation mode
5900 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5901 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5902 functions which return True when the corresponding modes are set
5903 (Formal_Language): return "spark" or "alfa" when in formal verification
5905 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5906 Error_Msg to prefix the error message with a tag giving the formal
5908 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5909 message with a tag giving the formal language
5910 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5912 (Analyze_Case_Statement): issue error in formal mode on case statement
5913 with a single "others" case alternative
5914 (Analyze_Exit_Statement): issue errors in formal mode on exit
5915 statements which do not respect SPARK restrictions
5916 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5917 (Check_Unreachable_Code): always issue an error (not a warning) in
5918 formal mode on unreachable code (concerns both code after an infinite
5919 loop and after an unconditional jump, both not allowed in SPARK)
5920 * sem_ch6.adb (Analyze_Return_Statement): add call to
5921 Set_Return_Present for a procedure containing a return statement
5922 (already done for functions in Analyze_Function_Return)
5923 (Analyze_Function_Return): issue error in formal mode on extended
5924 return or if return is not last statement in function
5925 (Check_Missing_Return): issue error in formal mode if function does
5926 not end with return or if procedure contains a return
5927 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5928 function to detect if there is an inner scope of its parameter S which
5931 2011-08-01 Thomas Quinot <quinot@adacore.com>
5933 * sem_ch6.ads: Minor reformatting.
5935 2011-08-01 Javier Miranda <miranda@adacore.com>
5937 * sem_util.adb (Abstract_Interface_List): Complete condition when
5938 processing private type declarations to avoid reading unavailable
5940 (Is_Synchronized_Tagged_Type): Complete condition when processing
5941 private extension declaration nodes to avoid reading unavailable
5944 2011-08-01 Thomas Quinot <quinot@adacore.com>
5946 * sem_ch3.adb: Minor reformatting.
5948 2011-08-01 Thomas Quinot <quinot@adacore.com>
5950 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5951 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5952 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5953 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5954 for VMS, instead parametrize the common implementation with
5955 System.Parameters declarations.
5957 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5959 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5961 2011-08-01 Tristan Gingold <gingold@adacore.com>
5963 * seh_init.c: Fix SEH handler installation on win64.
5965 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5967 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5968 double analysis of an anonymous access to subprogram, because it can
5969 lead to improper sharing of profiles and a back-end crash.
5971 2011-08-01 Robert Dewar <dewar@adacore.com>
5973 * make.adb, sem_ch4.adb: Minor reformatting.
5974 * gcc-interface/Make-lang.in: Update dependencies.
5975 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5977 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5979 * gnat_rm.texi: Fix definition of Long_Integer.
5981 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5983 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5984 to prevent storage exhaustion.
5985 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5986 finalized is a function body, insert the cleanup code before the final
5987 return statement, to prevent spurious warnings.
5988 * s-pooglo.ads: add overriding indicator.
5990 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5992 * sem_ch4.adb (Operator_Check): improve error message when both a
5993 with_clause and a use_clause are needed to make operator usage legal.
5994 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5995 determine whether a compilation unit is visible within an other,
5996 either through a with_clause in the current unit, or a with_clause in
5997 its library unit or one one of its parents.
5999 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6001 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6002 over an arbitrary expression of an array or container type.
6003 * lib-xref.adb: clarify comment.
6005 2011-08-01 Bob Duff <duff@adacore.com>
6007 * einfo.ads: Minor reformatting.
6008 * debug.adb: Minor comment improvement.
6010 2011-08-01 Javier Miranda <miranda@adacore.com>
6012 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6013 consider hidden subprograms as valid candidates.
6015 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6017 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6019 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6021 * gnat_ugn.texi: Fix typo.
6023 2011-08-01 Robert Dewar <dewar@adacore.com>
6025 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6026 lib-xref.adb: Minor reformatting
6028 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6030 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6031 when to generate a call to Move_Final_List.
6032 (Has_Controlled_Parts): Remove this function.
6034 2011-08-01 Geert Bosch <bosch@adacore.com>
6036 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6039 2011-08-01 Thomas Quinot <quinot@adacore.com>
6041 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6042 explicit raise of a predefined exception as Comes_From_Source if the
6043 original N_Raise_Statement comes from source.
6045 2011-08-01 Robert Dewar <dewar@adacore.com>
6047 * sinfo.ads: Add comment.
6048 * sem_ch6.adb: Minor reformatting.
6050 2011-08-01 Robert Dewar <dewar@adacore.com>
6052 * freeze.adb (Freeze_Entity): Refine check for bad component size
6053 clause to avoid rejecting confirming clause when atomic/aliased present.
6055 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6057 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6058 better determine whether an entity reference is a write.
6059 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6061 * lib-xref.adb (Output_References): Do no suppress a read reference at
6062 the same location as an immediately preceeding modify-reference, to
6063 handle properly in-out actuals.
6065 2011-08-01 Tristan Gingold <gingold@adacore.com>
6067 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6069 2011-08-01 Quentin Ochem <ochem@adacore.com>
6071 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6072 heap to compute the result.
6074 2011-08-01 Robert Dewar <dewar@adacore.com>
6076 * atree.ads: Minor reformatting.
6078 2011-08-01 Emmanuel Briot <briot@adacore.com>
6080 * g-expect.adb (Get_Command_Output): Fix memory leak.
6082 2011-08-01 Geert Bosch <bosch@adacore.com>
6084 * cstand.adb (P_Float_Type): New procedure to print the definition of
6085 predefined fpt types.
6086 (P_Mixed_Name): New procedure to print a name using mixed case
6087 (Print_Standard): Use P_Float_Type for printing floating point types
6088 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6089 precision IEEE float.
6091 2011-08-01 Thomas Quinot <quinot@adacore.com>
6093 * sem_ch3.adb: Minor reformatting.
6095 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6097 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6098 the completion of a generic function, insert the new body rather than
6099 rewriting the original.
6101 2011-08-01 Yannick Moy <moy@adacore.com>
6103 * sinfo.ads, errout.ads: Typos in comments.
6105 2011-08-01 Robert Dewar <dewar@adacore.com>
6107 * par-endh.adb: Minor reformatting.
6109 2011-08-01 Robert Dewar <dewar@adacore.com>
6111 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6112 (Pre_Post_Aspects): New subtype.
6113 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6114 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6115 * par-ch7.adb (P_Package): Remove Decl parameter
6116 (P_Package): Handle new syntax for aspects (before IS)
6117 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6119 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6120 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6121 (P_Package): Remove Decl parameter
6122 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6124 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6126 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6127 * sinfo.ads: Document new syntax for aspects in packages etc.
6128 * sprint.adb: Handle new syntax of aspects before IS in package
6130 2011-08-01 Thomas Quinot <quinot@adacore.com>
6132 * atree.ads: Minor reformatting.
6133 * sem_prag.adb: Minor reformatting.
6135 2011-08-01 Robert Dewar <dewar@adacore.com>
6137 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6138 case expr alternative.
6140 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6142 * sem_ch12.adb: Fix typo.
6144 2011-08-01 Geert Bosch <bosch@adacore.com>
6146 * sem_prag.adb (Check_No_Link_Name): New procedure.
6147 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6148 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6149 instead of Standard_Long_Long_Float_Size global. Preparation for
6150 eventual removal of per type constants.
6151 * exp_util.ads (Get_Stream_Size): New function returning the stream
6152 size value of subtype E.
6153 * exp_util.adb (Get_Stream_Size): Implement new function.
6154 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6156 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6158 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6160 2011-08-01 Geert Bosch <bosch@adacore.com>
6162 * cstand.adb: Fix comments.
6163 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6166 2011-08-01 Robert Dewar <dewar@adacore.com>
6168 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6170 2011-08-01 Geert Bosch <bosch@adacore.com>
6172 * atree.ads: Fix comment.
6174 2011-08-01 Robert Dewar <dewar@adacore.com>
6176 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6177 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6178 * par.adb: Add with for Namet.Sp.
6179 * par-tchk.adb: Minor reformatting.
6181 2011-08-01 Vincent Celier <celier@adacore.com>
6183 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6184 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6185 of the init procedure of a SAL.
6186 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6189 2011-08-01 Thomas Quinot <quinot@adacore.com>
6191 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6194 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6196 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6198 2011-08-01 Thomas Quinot <quinot@adacore.com>
6200 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6201 conformant with its spec (return True only for types that have
6202 an overriding Initialize primitive operation that prevents them from
6203 having preelaborable initialization).
6204 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6205 initialization for controlled types in Ada 2005 or later mode.
6207 2011-08-01 Robert Dewar <dewar@adacore.com>
6209 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6211 (Same_Aspect): New function.
6212 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6213 Type_Invariant, Precondition, Postcondition.
6214 * snames.ads-tmpl: Add Name_Type_Invariant.
6216 2011-08-01 Robert Dewar <dewar@adacore.com>
6218 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6220 (Freeze_All_Ent): Fix error in handling inherited aspects.
6221 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6222 already analyzed, but don't skip entire processing of a declaration,
6223 that's wrong in some cases of declarations being rewritten.
6224 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6225 Don't delay for integer, string literals
6226 Treat predicates in usual manner for delay, remove special case code,
6228 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6229 (Build_Predicate_Function): Update saved expression in aspect
6230 (Build_Invariant_Procedure): Update saved expression in aspect
6231 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6232 of replacement of discriminant references if the reference is simple.
6234 2011-08-01 Robert Dewar <dewar@adacore.com>
6236 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6237 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6238 Static_Predicate and Dynamic_Predicate.
6239 (Build_Predicate_Function): Add processing for Static_Predicate
6240 and Dynamic_Predicate.
6241 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6242 (From_Static_Predicate): New flag
6243 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6245 2011-08-01 Robert Dewar <dewar@adacore.com>
6247 * usage.adb: Documentation cleanup for Ada version modes in usage.
6248 * expander.adb: Minor reformatting.
6250 2011-08-01 Robert Dewar <dewar@adacore.com>
6252 * atree.ads: Minor comment fix.
6253 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6254 a-witeio.ads, sem_prag.adb: Minor reformatting.
6256 2011-08-01 Doug Rupp <rupp@adacore.com>
6258 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6259 pointers. Use descrip.h header file for convenience. Add some
6262 2011-08-01 Robert Dewar <dewar@adacore.com>
6264 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6265 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6266 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6268 (Check_Aspect_At_End_Of_Declarations): New procedure
6269 (Analye_Aspect_Specification): Minor changes for above procedures
6270 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6271 specification node as well.
6273 2011-08-01 Pascal Obry <obry@adacore.com>
6275 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6276 Windows files. Use GetFilesAttributes() in this case to check for file
6277 existence instead of returning with an error code.
6279 2011-08-01 Vincent Celier <celier@adacore.com>
6281 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6282 High is above Source length.
6284 2011-08-01 Robert Dewar <dewar@adacore.com>
6286 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6288 2011-08-01 Robert Dewar <dewar@adacore.com>
6290 * aspects.ads (Boolean_Aspects): New subtype.
6291 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6292 for derived types in cases where the parent type and derived type have
6294 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6295 with aspects when parent type also has aspects.
6296 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6297 boolean expression at this point).
6298 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6299 accordance with final decision on the Ada 2012 feature.
6300 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6302 2011-08-01 Matthew Heaney <heaney@adacore.com>
6304 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6306 2011-08-01 Pascal Obry <obry@adacore.com>
6308 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6309 Fix Replace_Slice when High is above current string size.
6310 (Replace_Slice): Fix DL computation when High is above current
6313 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6315 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6317 2011-08-01 Matthew Heaney <heaney@adacore.com>
6319 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6322 2011-08-01 Pascal Obry <obry@adacore.com>
6324 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6327 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6329 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6330 access to protected subprograms in generic bodies.
6331 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6332 protected type, indicate that the convention of the subprogram is
6333 Convention_Protected, because it may be used in subsequent declarations
6334 within the protected declaration.
6336 2011-08-01 Vincent Celier <celier@adacore.com>
6338 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6339 and "final" procedures when the name of the library is "ada", to avoid
6340 duplicate symbols "adainit" and "adafinal" in executables.
6342 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6344 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6345 quantified expression that appears within a postcondition and uses the
6346 Ada2012 'Result attribute.
6348 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6350 * init.c (__gnat_error_handler): Cast reason to int.
6351 (__gnat_install_handler): Explain sa_sigaction use.
6353 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6355 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6356 subprogram has copy-in copy-out parameters, try to promote the mode of
6357 the return type if it is passed in registers.
6359 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6361 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6362 left operand as addressable.
6364 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6366 * gcc-interface/gigi.h (build_function_stub): Remove.
6367 (build_return_expr): Likewise.
6368 (convert_vms_descriptor): Declare.
6369 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6370 (build_function_stub): Move to...
6371 * gcc-interface/utils2.c (build_return_expr): Move to...
6372 * gcc-interface/trans.c (build_function_stub): ...here.
6373 (build_return_expr): ...here.
6374 (Subprogram_Body_to_gnu): Add local variable for language_function.
6375 Disconnect the parameter attributes cache, if any, once done with it.
6376 Call end_subprog_body only after setting the end_locus.
6377 Build the stub associated with the function, if any, at the very end.
6378 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6379 variables and streamline control flow.
6381 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6384 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6387 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6390 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6391 Assign to act.sa_sigaction.
6392 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6393 current->return_address to char * before arithmetic.
6395 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6397 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6398 Correct argument types.
6399 Extract code from reason.
6400 (__gnat_install_handler): Assign to act.sa_sigaction.
6402 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6404 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6405 (GNAT1_OBJS): ...here.
6407 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6410 * g-socthi-mingw.adb (Fill): Fix formatting.
6412 * gcc-interface/gigi.h: Move around comment.
6414 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6417 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6419 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6422 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6424 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6426 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6427 range comparison if Pmode is SImode.
6429 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6430 Eric Botcazou <ebotcazou@adacore.com>
6432 * adadecode.c: Wrap up in extern "C" block.
6433 * adadecode.h: Likewise.
6434 * adaint.c: Likewise. Remove 'const' keyword.
6435 * adaint.h: Likewise.
6437 * atree.h: Likewise.
6439 * cstreams.c: Likewise.
6443 * final.c: Likewise.
6445 * initialize.c: Likewise.
6447 * namet.h: Likewise.
6448 * nlists.h: Likewise.
6449 * raise.c: Likewise.
6450 * raise.h: Likewise.
6451 * repinfo.h: Likewise.
6452 * seh_init.c: Likewise.
6453 * targext.c: Likewise.
6454 * tracebak.c: Likewise.
6455 * uintp.h: Likewise.
6456 * urealp.h: Likewise.
6457 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6458 * xsinfo.adb: Likewise.
6459 * xsnamest.adb: Likewise.
6460 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6461 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6462 * gcc-interface/misc.c: Likewise.
6463 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6464 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6465 ada/targext.o here...
6466 (GNAT_ADA_OBJS): ...and not here.
6467 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6468 (GNATBIND_OBJS): Reorder.
6470 2011-07-07 Richard Henderson <rth@redhat.com>
6472 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6473 dwarf2out_frame_init.
6475 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6477 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6479 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6482 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6484 2011-07-06 Richard Guenther <rguenther@suse.de>
6486 * gcc-interface/misc.c (gnat_init): Merge calls to
6487 build_common_tree_nodes and build_common_tree_nodes_2.
6488 Re-initialize boolean_false_node.
6490 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6491 Olivier Hainque <hainque@adacore.com>
6492 Nicolas Setton <setton@adacore.com>
6494 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6495 the type according to the ARTIFICIAL_P parameter.
6496 (create_type_decl): Likewise.
6497 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6499 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6501 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6502 (gnatbind): Likewise.
6504 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6506 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6508 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6510 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6511 local variable throughout. Remove useless call to Base_Type.
6512 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6513 Take it also into account for the volatileness of the field. Set the
6514 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6516 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6518 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6519 on a dereference built for a by-ref object if it has an address clause.
6521 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6523 * einfo.ads (Address_Taken): Document use for the second argument of
6524 Asm_Input and Asm_Output attributes.
6525 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6526 argument is an entity name, then set Address_Taken on it.
6527 <Attribute_Asm_Output>: Likewise.
6528 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6529 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6530 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6531 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6533 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6536 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6538 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6540 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6541 (ada/utils.o): Update dependencies.
6542 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6543 ../../../libcpp/libcpp.a.
6544 * gcc-interface/utils.c: Include common/common-target.h.
6545 (process_attributes): Use targetm_common.have_named_sections.
6547 2011-06-07 Richard Guenther <rguenther@suse.de>
6549 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6552 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6554 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6555 TREE_THIS_NOTRAP flag.
6557 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6559 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6562 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6564 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6565 constants whose full view has discriminants specially.
6567 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6569 * gcc-interface/utils.c: Include diagnostic.h.
6570 (gnat_write_global_declarations): Output debug information for all
6571 global type declarations before finalizing the compilation unit.
6572 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6574 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6576 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6578 2011-05-25 Kai Tietz <ktietz@redhat.com>
6580 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6581 initialization instead of const/none-const pointer assignment.
6583 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6585 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6586 $(EXTRA_GNAT1_OBJS).
6587 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6588 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6589 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6590 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6591 libcommon-target.a instead of prefix.o.
6593 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6596 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6598 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6600 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6601 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6602 instead of version.o.
6604 2011-05-18 Kai Tietz <ktietz@redhat.com>
6606 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6607 boolean_false_node instead of integer_zero_node.
6608 (convert_with_check): Likewise.
6609 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6611 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6613 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6614 type of the parameter is an unconstrained array, convert the actual to
6615 the type of the formal in the In Out and Out cases as well.
6617 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6619 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6620 call build_function_type_array or build_varargs_function_type_array
6622 (create_subprog_type): Don't call build_function_type; call
6623 build_function_type_vec instead.
6625 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6627 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6628 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6629 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6631 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6633 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6635 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6636 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6638 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6640 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6642 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6644 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6645 instead of accessing TYPE_ARG_TYPES directly.
6646 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6648 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6651 * gcc-interface/gigi.h (get_variant_part): Declare.
6652 * gcc-interface/decl.c (get_variant_part): Make global.
6653 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6654 types have the same constant size, are record types and T1 has a
6655 variant part while T2 doesn't.
6657 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6659 * gcc-interface/utils.c (begin_subprog_body): Do not call
6661 (end_subprog_body): Likewise.
6663 2011-05-04 Richard Guenther <rguenther@suse.de>
6665 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6667 (pos_to_constructor): Likewise.
6669 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6670 Eric Botcazou <ebotcazou@adacore.com>
6672 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6673 of build_function_type. Adjust calls to...
6674 (build_raise_check): ...this. Do not take a void_tree parameter.
6675 Call build_function_type_list instead of build_function_type.
6676 Fix head comment and swap couple of conditional blocks.
6678 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6680 * gnatvsn.ads (Library_Version): Bump to 4.7.
6681 (Current_Year): Bump to 2011.
6683 2011-04-29 Michael Matz <matz@suse.de>
6685 * gcc-interface/misc.c (gnat_handle_option): Set
6686 warn_maybe_uninitialized.
6688 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6690 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6691 the Watson/McCabe paper.
6693 2011-04-23 Jim Meyering <meyering@redhat.com>
6695 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6697 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6699 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6702 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6704 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6706 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6707 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6708 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6709 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6710 <all>: Do not set flags on the reused DECL node coming from an alias.
6711 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6712 don't need debug info here...
6713 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6714 (gigi): Adjust calls to create_subprog_decl.
6715 (build_raise_check): Likewise.
6716 (establish_gnat_vms_condition_handler): Likewise.
6717 (Compilation_Unit_to_gnu): Likewise.
6718 (gnat_to_gnu): Likewise.
6720 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6722 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6723 (NO_REORDER_ADAFLAGS): New variable.
6724 (EXTRA_GNATTOOLS): Always define.
6725 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6726 Clean up and adjust list of files compiled with special options.
6727 * gcc-interface/Make-lang.in: Likewise.
6728 (ada/decl.o): Cosmetical change.
6729 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6731 2011-04-20 Jim Meyering <meyering@redhat.com>
6733 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6735 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6737 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6738 $(CFLAGS) on the link line.
6740 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6742 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6743 padded type built for the return type if it is unconstrained.
6745 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6747 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6749 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6751 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6752 before calling TREE_CHAIN.
6753 * gcc-interface/misc.c (gnat_init_ts): New function.
6754 (LANG_HOOKS_INIT_TS): Define.
6756 2011-04-12 Martin Jambor <mjambor@suse.cz>
6758 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6759 instead of cgraph_node.
6761 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6763 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6764 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6767 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6769 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6770 of aggregate types that contain a placeholder.
6772 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6774 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6776 (handle_type_generic_attribute): Likewise.
6778 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6781 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6783 2011-04-04 Kai Tietz <ktietz@redhat.com>
6786 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6789 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6791 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6792 type case, do not strip a padding type around the array type.
6794 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6796 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6799 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6801 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6802 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6803 code for -feliminate-unused-debug-types.
6804 (gnat_post_options): Likewise.
6806 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6808 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6809 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6812 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6814 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6815 DECL_ARTIFICIAL flag on enumeration types.
6817 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6819 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6820 fat pointer types artificial unconditionally.
6821 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6824 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6826 * gcc-interface/gigi.h (get_dummy_type): Declare.
6827 (build_dummy_unc_pointer_types): Likewise.
6828 (finish_fat_pointer_type): Likewise.
6829 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6830 fat pointer type has been built, complete it in place.
6831 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6832 and thin pointers. Remove useless variable.
6833 (finish_fat_pointer_type): Make global and move to...
6834 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6835 (get_dummy_type): New function.
6836 (build_dummy_unc_pointer_types): Likewise.
6837 (gnat_pushdecl): Propage the name to the anonymous variants only.
6838 (update_pointer_to): Only adjust the pointer types in the unconstrained
6841 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6843 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6844 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6845 if this is a Taft amendment type and the full declaration is available.
6846 * gcc-interface/trans.c (process_type): Likewise.
6847 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6848 (process_freeze_entity): Likewise.
6849 * gcc-interface/utils.c (dummy_global): New static variable.
6850 (gnat_write_global_declarations): If there are types declared as used
6851 at the global level, insert them in the global hash table.
6853 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6855 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6856 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6857 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6859 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6860 flag of the type accordingly.
6861 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6863 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6865 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6866 finalizing types when updating the pointers to the designated type.
6867 <all>: Finalize the deferred types even if we didn't defer processing
6868 of incomplete types in this invocation.
6870 2011-04-01 Olivier Hainque <hainque@adacore.com>
6871 Nicolas Setton <setton@adacore.com>
6872 Eric Botcazou <ebotcazou@adacore.com>
6874 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6875 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6877 2011-03-28 Kai Tietz <ktietz@redhat.com>
6879 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6881 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6882 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6884 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6886 2011-03-28 Tristan Gingold <gingold@adacore.com>
6889 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6890 Use ada output of gnatbind.
6891 (ada/b_gnatb.adb): Ditto.
6892 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6893 (ada.mostlyclean, ada.stage1)
6894 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6895 (ada.stagefeedback): Adjust.
6896 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6897 Use ada output of gnatbind.
6898 (b_gnatm.adb): Ditto.
6899 (b_gnatl.o, b_gnatm.o): New rules.
6901 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6903 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6904 for the padded type built to support a specified size or alignment.
6906 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6908 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6909 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6910 unconditionally to the end of the unit when the designated type is
6912 <all>: Rename local variable. Attempt to un-defer types only and do it
6913 for limited_with'ed types as well.
6914 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6915 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6916 consistently and remove redundant call to finalize_from_with_types.
6918 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6920 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6921 subprograms without a previous spec declared in the same unit.
6922 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6923 subprograms at the end of the unit instead of at the beginning.
6924 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6925 isn't public for the special handling of non-inline functions nested
6926 inside inline external functions.
6928 2011-03-25 Jeff Law <law@redhat.com>
6930 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6932 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6934 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6935 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6936 to compute Set_Size_Depends_On_Discriminant.
6937 (Layout_Type): Call it on array types in back-end layout mode.
6938 * sem_util.adb (Requires_Transient_Scope): Return true for array
6939 types only if the size depends on the value of discriminants.
6940 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6941 type if the RHS is a call to a function that returns an unconstrained
6942 type with default discriminant.
6944 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6946 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6947 non-conversion to the nominal result type at the end.
6949 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6951 * gcc-interface/trans.c (create_temporary): New function taken from...
6952 (create_init_temporary): ...here. Call it.
6953 (call_to_gnu): Create the temporary for the return value early, if any.
6954 Create it for a function with copy-in/copy-out parameters if there is
6955 no target; in other cases of copy-in/copy-out, use another temporary.
6956 Push the new binding level lazily. Add and rename local variables.
6958 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6960 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6962 (set_rm_size): Likewise.
6964 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6966 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6967 for the padded type built in order to support a specified alignment.
6968 Fix incorrect formatting.
6970 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6973 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6975 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6977 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6978 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6979 to the end of the list. Adjust recursive call. Rename local variable.
6980 If REORDER is true, reorder components of the record type.
6981 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6982 components_to_record and adjust the parameter list.
6984 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6986 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6987 disabled, use the variable for bounds of loop iteration scheme.
6989 2011-03-21 Kai Tietz <ktietz@redhat.com>
6992 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6994 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6996 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6997 out whether the expression is read-only. Short-circuit placeholder
6998 case and rename a couple of local variables.
7000 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7002 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7003 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7004 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7005 (convert): Deal with conversions from a smaller form type specially.
7007 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7009 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7010 its argument, except for the special -I- switch.
7012 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7014 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7017 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7019 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7021 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7023 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7025 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7026 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7027 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7028 Do not generate the check directly, instead instantiate the template
7029 check present in the descriptor.
7030 (make_descriptor_field): Move around.
7031 (build_vms_descriptor32): Build a template check in the POINTER field.
7032 (build_vms_descriptor): Remove useless suffixes.
7033 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7035 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7038 * targext.c: Include target files if IN_RTS is defined.
7040 2011-01-26 Richard Guenther <rguenther@suse.de>
7043 * targext.c: Include config.h.
7044 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7047 2011-01-04 Pascal Obry <obry@adacore.com>
7048 Eric Botcazou <ebotcazou@adacore.com>
7050 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7052 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7054 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7055 end-of-case on the end label and its associated gotos, if any.
7057 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7059 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7060 expressions of the parameter cache within the statement group of
7063 2011-01-04 Olivier Hainque <hainque@adacore.com>
7064 Eric Botcazou <ebotcazou@adacore.com>
7066 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7067 (set_end_locus_from_node): New function.
7068 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7069 make and the function end_locus.
7070 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7071 for the elaboration subprogram.
7072 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7073 set the end_locus of the expression as well.
7075 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7078 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7079 variables that are referenced in exception handlers volatile.
7083 Copyright (C) 2011 Free Software Foundation, Inc.
7085 Copying and distribution of this file, with or without modification,
7086 are permitted in any medium without royalty provided the copyright
7087 notice and this notice are preserved.
7089 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7090 - fix bugs in the description of Source_Trace;
7091 - get rid of UNIT_NAME;
7093 2011-08-02 Javier Miranda <miranda@adacore.com>
7096 (Build_Dispatching_Requeue): Adding support for VM targets
7097 since we cannot directly reference the Tag entity.
7098 * exp_sel.adb (Build_K): Adding support for VM targets.
7099 (Build_S_Assignment): Adding support for VM targets.
7101 (Default_Prim_Op_Position): In VM targets do not restrict availability
7102 of predefined interface primitives to compiling in Ada 2005 mode.
7103 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7104 restricted to compiling in Ada 2005 mode.
7105 (Make_VM_TSD): Generate code that declares and initializes the OSD
7106 record. Needed to support dispatching calls through synchronized
7109 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7110 primitives associated with synchronized interfaces.
7111 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7112 primitives associated with synchronized interfaces.
7114 2011-08-02 Yannick Moy <moy@adacore.com>
7116 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7117 statements hidden in SPARK if preceded by the HIDE directive
7118 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7119 exception handlers as hidden in SPARK if preceded by the HIDE directive
7120 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7121 if starting with the HIDE directive
7122 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7123 starting with the HIDE directive; mark the declarations in a private
7124 part as hidden in SPARK if the private part starts with the HIDE
7126 * restrict.adb, restrict.ads
7127 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7128 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7129 argument node belongs to a part which is hidden in SPARK
7130 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7131 parts in SPARK; protect the possibly costly call to
7132 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7133 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7134 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7135 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7137 (Scan): recognize special comment starting with '#' and followed by
7138 SPARK keyword "hide" as a HIDE directive.
7140 2011-08-02 Yannick Moy <moy@adacore.com>
7142 * types.ads, erroutc.ads: Minor reformatting.
7144 2011-08-02 Vincent Celier <celier@adacore.com>
7146 * link.c: Add response file support for cross platforms.
7148 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7150 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7151 in an association, set parent field of copy before partial analysis.
7152 * sem_res.adb (Resolve_Slice): create reference to itype only when
7153 expansion is enabled.
7155 2011-08-02 Yannick Moy <moy@adacore.com>
7157 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7158 for new flag denoting which subprogram bodies are in ALFA
7159 * restrict.adb, sem_ch7.adb: Update comment
7160 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7161 sem_ch9.adb, sem_res.adb: Add calls to
7162 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7163 * sem_ch6.adb (Analyze_Function_Return): add calls to
7164 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7165 middle of the body, and extended return.
7166 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7167 False when missing return.
7168 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7169 to True for subprograms whose spec is in ALFA. Remove later on the flag
7170 on the entity used for a subprogram body when there exists a separate
7172 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7173 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7174 False, otherwise do nothing.
7176 2011-08-02 Robert Dewar <dewar@adacore.com>
7178 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7180 2011-08-02 Yannick Moy <moy@adacore.com>
7182 * sem_ch4.ads: minor formatting.
7184 2011-08-02 Yannick Moy <moy@adacore.com>
7186 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7187 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7188 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7189 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7190 opt.ads: cleanup of SPARK mode
7192 2011-08-02 Yannick Moy <moy@adacore.com>
7194 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7196 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7197 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7199 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7200 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7201 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7202 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7204 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7206 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7207 functions whose return type is not in ALFA.
7208 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7210 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7211 parameter's type is not in ALFA.
7212 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7215 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7217 * sem_ch6 (Analyze_Expression_Function): treat the function as
7218 Inline_Always, and introduce a subprogram declaration for it when it is
7220 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7221 expression functions, so that the back-end can determine whether they
7222 can in fact be inlined.
7223 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7224 a function body comes from an expression function.
7226 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7228 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7229 null exclusions to test Can_Never_Be_Null on the anonymous access types
7230 of the formals rather than testing the formals themselves. Exclude this
7231 check in cases where the Old_Formal is marked as a controlling formal,
7232 to avoid issuing spurious errors for bodies completing dispatching
7233 operations (due to the flag not getting set on controlling access
7234 formals in body specs).
7235 (Find_Corresponding_Spec): When checking full and subtype conformance of
7236 subprogram bodies in instances, pass Designated and E in that order, for
7237 consistency with the expected order of the formals (New_Id followed by
7240 2011-08-02 Robert Dewar <dewar@adacore.com>
7242 * sem_ch8.adb: Minor reformatting.
7244 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7246 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7247 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7248 primitive operations of class-wide actuals.
7250 2011-08-02 Javier Miranda <miranda@adacore.com>
7252 * exp_atag.ads, exp_atag.adb
7253 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7254 since its value is implicitly passed in argument Typ.
7255 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7256 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7257 Build_Common_Dispatching_Select_Statements.
7259 2011-08-02 Robert Dewar <dewar@adacore.com>
7261 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7262 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7265 2011-08-02 Robert Dewar <dewar@adacore.com>
7267 * sem_res.adb: Minor reformatting.
7268 * sem_prag.adb: Minor reformatting.
7270 2011-08-02 Javier Miranda <miranda@adacore.com>
7272 * exp_atag.adb, exp_atags.ads
7273 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7274 by the tagged type Entity. Required to use this routine in the VM
7275 targets since we do not have available the Tag entity in the VM
7278 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7279 Ada.Tags has not been previously loaded.
7281 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7282 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7284 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7285 view of enclosing scopes. Required to handle enclosing scopes that
7286 are synchronized types whose full view is a task type.
7288 (Build_VM_TSDs): Minor code improvement to avoid generating and
7289 analyzing lists with empty nodes.
7290 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7291 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7292 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7293 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7294 (Make_Select_Specific_Data_Table): Add support for VM targets.
7295 (Make_VM_TSD): Generate code to initialize the SSD structure of
7298 2011-08-02 Yannick Moy <moy@adacore.com>
7300 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7301 cross-references section in ALI.
7302 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7303 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7305 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7306 subprogram or package entity of a node
7307 (Is_Local_Reference_Type): new function returns True for references
7308 selected in local cross-references.
7309 (Lt): function extracted from Lt in Output_References
7310 (Write_Entity_Name): function extracted from Output_References
7311 (Generate_Definition): generate reference with type 'D' for definition
7312 of objects (object declaration and parameter specification), with
7313 appropriate locations and units, for use in local cross-references.
7314 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7315 references of type 'I' for initialization in object definition.
7316 (Output_References): move part of function Lt and procedure
7317 Write_Entity_Name outside of the body. Ignore references of types 'D'
7318 and 'I' introduced for local cross-references.
7319 (Output_Local_References): new procedure to output the local
7320 cross-references sections.
7321 (Lref_Entity_Status): new array defining whether an entity is a local
7322 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7323 with 'I' type when initialization expression is present.
7324 * get_scos.adb, get_scos.ads: Correct comments and typos
7326 2011-08-02 Javier Miranda <miranda@adacore.com>
7328 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7330 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7332 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7335 2011-08-02 Vincent Celier <celier@adacore.com>
7337 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7338 (No_Space_Img): New function
7339 (Find_Excluded_Sources): When reading from a file, record the file name
7340 and the line number for each excluded source.
7341 (Mark_Excluded_Sources): When reporting an error, if the excluded
7342 sources were read from a file, include file name and line number in
7345 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7347 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7349 2011-08-02 Robert Dewar <dewar@adacore.com>
7351 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7353 2011-08-02 Javier Miranda <miranda@adacore.com>
7355 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7356 generation of TSDs to the DOTNET compiler.
7357 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7358 generation of TSDs to the DOTNET compiler.
7360 2011-08-02 Javier Miranda <miranda@adacore.com>
7362 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7363 record of all the tagged types declared inside library level package
7364 declarations, library level package bodies or library level subprograms.
7365 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7366 associated with a given tagged type.
7367 (Build_VM_TSDs): New subprogram.
7368 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7369 compilation units that are subprograms.
7370 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7371 compilation units that are package bodies.
7372 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7373 units that are a package declaration or a package instantiation.
7374 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7375 reorganization to improve the error generated by the frontend when the
7376 function Ada.Tags.Secondary_Tag is not available.
7377 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7378 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7380 2011-08-02 Javier Miranda <miranda@adacore.com>
7382 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7384 2011-08-02 Robert Dewar <dewar@adacore.com>
7386 * s-imenne.ads: Minor reformatting.
7388 2011-08-02 Robert Dewar <dewar@adacore.com>
7390 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7391 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7392 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7394 2011-08-02 Robert Dewar <dewar@adacore.com>
7396 * einfo.ads (Materialize_Entity): Document this is only for renamings
7397 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7398 required debug information in the case where we transform the object
7399 declaration into a renaming declaration.
7400 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7402 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7405 2011-08-02 Robert Dewar <dewar@adacore.com>
7407 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7408 Suppress_Init_Procs.
7409 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7410 Suppress_Initialization/Initialization_Suppressed.
7411 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7412 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7413 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7414 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7416 2011-08-02 Robert Dewar <dewar@adacore.com>
7418 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7421 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7423 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7424 only have inheritable classwide pre/postconditions.
7426 2011-08-02 Javier Miranda <miranda@adacore.com>
7428 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7429 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7430 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7431 checks if the external tag of a type is the same as the external tag
7432 of some other declaration.
7434 2011-08-02 Thomas Quinot <quinot@adacore.com>
7436 * s-taskin.ads: Minor reformatting.
7438 2011-08-02 Emmanuel Briot <briot@adacore.com>
7440 * g-comlin.adb (Display_Help): swap the order in which it prints the
7441 short help and the general usage.
7443 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7445 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7446 the aspect declarations and attach them to the generic copy for
7447 subsequent analysis.
7448 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7449 declarations of the generic tree to the new subprogram declarations.
7450 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7451 conditions that apply to a subprogram instance.
7453 2011-08-02 Robert Dewar <dewar@adacore.com>
7455 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7459 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7460 private type with a tagged full view is not derived in the immediate
7461 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7463 2011-08-02 Robert Dewar <dewar@adacore.com>
7465 * exp_ch4.adb: Minor reformatting.
7467 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7469 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7470 Ada2012 iterator, the loop will be rewritten during expansion into a
7471 while loop with a cursor and an element declaration. Do not analyze the
7472 body in this case, because if the container is for indefinite types the
7473 actual subtype of the elements will only be determined when the cursor
7474 declaration is analyzed.
7476 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7478 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7479 size/alignment related attributes in CodePeer_Mode.
7481 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7483 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7484 Prepend_Element, since this can result in the operation getting the
7485 wrong slot in the full type's dispatch table if the full type has
7486 inherited operations. The incomplete type's operation will get added
7487 to the proper position in the full type's primitives
7488 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7489 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7490 dispatching operations, since there are cases where nonprimitive
7491 subprograms can get added to the list of incomplete dependents (such
7492 as subprograms in nested packages).
7493 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7494 private part when determining whether to add a primitive with a
7495 parameter of a tagged incomplete type to the Private_Dependents list.
7496 Such primitives can also occur in the visible part, and should not have
7497 been excluded from being private dependents.
7498 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7499 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7500 list of a Taft-amendment incomplete type is a primitive before issuing
7501 an error that the full type must appear in the same unit. There are
7502 cases where nonprimitives can be in the list (such as subprograms in
7504 * sem_disp.adb (Derives_From): Use correct condition for checking that
7505 a formal's type is derived from the type of the corresponding formal in
7506 the parent subprogram (the condition was completely wrong). Add
7507 checking that was missing for controlling result types being derived
7508 from the result type of the parent operation.
7510 2011-08-02 Yannick Moy <moy@adacore.com>
7512 * errout.adb (First_Node): minor renaming
7513 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7516 2011-08-02 Yannick Moy <moy@adacore.com>
7518 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7519 before accessing operands.
7520 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7521 decide whether an initialization expression respects SPARK rules, as
7522 the plain node is the expanded one. This allows for more valid warnings
7524 * gnat_rm.texi: Minor update.
7526 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7528 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7531 2011-08-02 Robert Dewar <dewar@adacore.com>
7533 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7535 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7537 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7538 loop statements and the element renaming declaration with a block when
7539 the element type is controlled.
7541 2011-08-02 Yannick Moy <moy@adacore.com>
7543 * sinfo.ads: Minor formatting.
7545 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7547 * sem_aggr.adb (Add_Association): if the association has a box and no
7548 expression, use the Sloc of the aggregate itself for the new
7550 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7553 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7555 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7556 When a container is provided via a function call, generate a renaming
7557 of the function result. This avoids the creation of a transient scope
7558 and the premature finalization of the container.
7559 * exp_ch7.adb (Is_Container_Cursor): Removed.
7560 (Wrap_Transient_Declaration): Remove the supression of the finalization
7561 of the list controller when the declaration denotes a container cursor,
7564 2011-08-02 Yannick Moy <moy@adacore.com>
7566 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7567 node is from source, instead of the original node being from source.
7569 (Resolve_Array_Aggregate): refine the check for a static expression, to
7570 recognize also static ranges
7571 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7572 Array_Type_Declaration): postpone the test for the type being a subtype
7573 mark after the type has been resolved, so that component-selection and
7574 expanded-name are discriminated.
7575 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7576 to distinguish the case of an iteration scheme, so that an error is
7577 issed on a non-static range in SPARK except in an iteration scheme.
7578 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7579 In_Iter_Schm = True.
7580 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7581 user-defined operators so that they are allowed in renaming
7583 (Find_Selected_Component): refine the check for prefixing of operators
7584 so that they are allowed in renaming. Move the checks for restrictions
7585 on selector name after analysis discriminated between
7586 component-selection and expanded-name.
7587 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7588 concatenation argument of string type if it is static.
7589 * sem_util.adb, sem_util.ads
7590 (Check_Later_Vs_Basic_Declarations): add a new function
7591 Is_Later_Declarative_Item to decice which declarations are allowed as
7592 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7593 mode, add that renamings are considered as later items.
7594 (Enclosing_Package): new function to return the enclosing package
7595 (Enter_Name): correct the rule for homonyms in SPARK
7596 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7597 from source (result of expansion) to avoid issuing wrong warnings.
7599 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7601 * errout.adb: On anything but an expression First_Node returns its
7604 2011-08-02 Pascal Obry <obry@adacore.com>
7606 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7608 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7610 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7611 Set the associated loop as the related expression of internally
7613 * exp_ch7.adb (Is_Container_Cursor): New routine.
7614 (Wrap_Transient_Declaration): Supress the finalization of the list
7615 controller when the declaration denotes a container cursor.
7617 2011-08-02 Yannick Moy <moy@adacore.com>
7619 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7621 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7622 expression is a simple expression. This check cannot be performed in
7623 the semantics, so just drop it.
7624 (P_Index_Or_Discriminant_Constraint): move check that the index or
7625 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7626 semantics. Other cases were previously checked in the semantics.
7627 * par-ch4.adb (P_Name): move checks that a selector name is not
7628 character literal or an operator symbol to Find_Selected_Component in
7630 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7631 declarations are not placed after later declarations in a separate
7632 procedure in Sem_Util (possibly not the best choice?), to be used both
7633 during parsing, for Ada 83 mode, and during semantic analysis, for
7635 * par-endh.adb (Check_End): move check that end label is not missing
7636 to Process_End_Label in the semantics
7637 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7638 the special case for SPARK restriction
7639 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7640 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7641 parameter Force to issue the error message even on internal node (used
7642 for generated end label). Call Check_Restriction to check when an error
7643 must be issued. In SPARK mode, issue an error message even if the
7644 restriction is not set.
7645 (Check_Restriction): new procedure with an additional out parameter to
7646 inform the caller that a message has been issued
7647 * sem_aggr.adb: Minor modification of message
7648 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7649 instead of issuing an error message directly
7650 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7651 declarations are not placed after later declarations, by calling
7652 Check_Later_Vs_Basic_Declarations
7653 (Analyze_Subtype_Declaration): move here the check that an index or
7654 discriminant constraint must be a subtype mark. Change the check that
7655 a subtype of String must start at one so that it works on subtype marks.
7656 * sem_ch4.adb (Analyze_Call): move here the check that a named
7657 association cannot follow a positional one in a call
7658 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7659 instead of issuing an error message directly
7660 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7661 selector name is not a character literal or an operator symbol. Move
7662 here the check that the prefix of an expanded name cannot be a
7663 subprogram or a loop statement.
7664 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7665 procedure called from parsing and semantics to check that basic
7666 declarations are not placed after later declarations
7667 (Process_End_Label): move here the check that end label is not missing
7669 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7671 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7672 representation clause in codepeer mode, since it confuses CodePeer and
7673 does not bring useful info.
7675 2011-08-02 Ed Falis <falis@adacore.com>
7677 * init.c: initialize fp hw on MILS.
7679 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7681 * errout.adb (First_Node): for bodies, return the node itself (small
7682 optimization). For other nodes, do not check source_unit if the node
7683 comes from Standard.
7685 2011-08-02 Robert Dewar <dewar@adacore.com>
7687 * exp_ch3.adb: Minor comment additions.
7688 * sem_ch13.adb: Minor reformatting.
7690 2011-08-02 Pascal Obry <obry@adacore.com>
7692 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7694 2011-08-02 Robert Dewar <dewar@adacore.com>
7696 * sem_attr.adb: Minor reformatting.
7698 2011-08-02 Robert Dewar <dewar@adacore.com>
7700 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7701 (Has_Default_Component_Value): Removed
7702 * einfo.ads Comment updates
7703 (Has_Default_Aspect): Replaces Has_Default_Value
7704 (Has_Default_Component_Value): Removed
7706 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7708 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7709 (Get_Simple_Init_Val): Handle Default_Value aspect
7710 (Needs_Simple_Initialization): Handle Default_Value aspect
7711 * exp_ch3.ads: Needs_Simple_Initialization
7712 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7713 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7715 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7716 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7717 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7719 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7721 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7722 package containing iteration primitives.
7723 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7725 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7727 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7728 "of", pre-analyze expression in case it is a function call with
7729 finalization actions that must be placed ahead of the loop.
7730 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7731 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7733 2011-08-02 Geert Bosch <bosch@adacore.com>
7735 * cstand.adb (Create_Float_Types): Only consider C's long double for
7736 Long_Long_Float, in addition to double.
7738 2011-08-02 Robert Dewar <dewar@adacore.com>
7740 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7741 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7742 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7745 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7747 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7750 2011-08-02 Javier Miranda <miranda@adacore.com>
7752 * einfo.ads, einfo.adb
7753 (Original_Access_Type): Move this attribute to Node26 since there was
7754 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7755 which causes conflicts and breaks the generation of the .NET compiler.
7756 (Interface_Name): Add missing documentation on JGNAT only uses of
7759 2011-08-02 Geert Bosch <bosch@adacore.com>
7761 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7762 (Find_Back_End_Float_Type): Likewise
7763 (Create_Back_End_Float_Types): Likewise
7764 (Create_Float_Types): Likewise
7765 (Register_Float_Type): Likewise
7766 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7767 Nlist and split out type selection in new local Find_Base_Type function.
7768 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7770 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7772 2011-08-02 Robert Dewar <dewar@adacore.com>
7774 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7776 * opt.ads: Minor comment change.
7777 * sem_ch12.adb: Minor code reorganization.
7779 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7781 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7782 subtype's list of rep items to the list on the full subtype in the case
7783 where the lists are the same.
7785 2011-08-02 Geert Bosch <bosch@adacore.com>
7787 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7788 using the one from System.Strings, which also deallocates all strings.
7790 2011-08-02 Geert Bosch <bosch@adacore.com>
7792 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7794 * gcc-interface/Make-lang.in: Update dependencies.
7796 2011-08-02 Olivier Hainque <hainque@adacore.com>
7798 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7801 2011-08-02 Javier Miranda <miranda@adacore.com>
7803 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7804 associated with anonymous access to subprograms.
7806 2011-08-02 Geert Bosch <bosch@adacore.com>
7809 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7810 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7811 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7812 (Add_Symbol_Definition): Move to switch-c.adb
7813 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7814 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7815 (Add_Symbol_Definition): Move to switch-c.adb.
7816 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7818 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7820 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7821 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7823 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7824 (Add_Symbol_Definition): Moved from Prepcomp.
7825 * switch-c.ads: Update copyright notice. Use String_List instead of
7826 Argument_List, removing dependency on System.OS_Lib.
7828 2011-08-02 Yannick Moy <moy@adacore.com>
7830 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7831 mode on initialization expression which does not respect SPARK
7833 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7834 if the tree referenced by its argument represents an initialization
7835 expression in SPARK, suitable for initializing an object in an object
7838 2011-08-02 Javier Miranda <miranda@adacore.com>
7840 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7841 internally generated access to subprogram with its associated protected
7843 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7845 2011-08-02 Geert Bosch <bosch@adacore.com>
7847 * cstand.adb (Register_Float_Type): Print information about type to
7848 register, if the Debug_Flag_Dot_B is set.
7849 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7850 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7851 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7852 with a requested precision of more than Max_Digits digits and no more
7853 than Max_Base_Digits digits, if a range specification is present and the
7854 Predefined_Float_Types list has a suitable type to derive from.
7855 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7856 case of type completion with pragma Import
7858 (Process_Import_Predefined_Type): Processing to complete a type
7859 with pragma Import. Currently supports floating point types only.
7860 (Set_Convention_From_Pragma): Do nothing without underlying type.
7861 (Process_Convention): Guard against absence of underlying type,
7862 which may happen when importing incomplete types.
7863 (Process_Import_Or_Interface): Handle case of importing predefined
7864 types. Tweak error message.
7866 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7868 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7869 functions to previous change. Reorganize code slightly.
7871 2011-08-02 Geert Bosch <bosch@adacore.com>
7873 * back_end.ads (Register_Type_Proc): New call back procedure type for
7874 allowing the back end to provide information about available types.
7875 (Register_Back_End_Types): New procedure to register back end types.
7876 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7878 * cstand.adb (Back_End_Float_Types): New list for floating point types
7879 supported by the back end.
7880 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7881 (Copy_Float_Type): New procedure to make new copies of predefined types.
7882 (Register_Float_Type): New call back procedure to populate the BEFT list
7883 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7884 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7885 (Create_Float_Types): New procedure to create entities for floating
7886 point types predefined in Standard, and put these and any remaining
7887 BEFTs on the Predefined_Float_Types list.
7888 * stand.ads (Predefined_Float_Types): New list for predefined floating
7889 point types that do not have declarations in package Standard.
7891 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7893 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7894 entity node for the unit containing the parameter.
7895 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7896 (Add_Inlined_Subprogram): Likewise.
7897 * gcc-interface/Make-lang.in: Update dependencies.
7899 2011-08-02 Thomas Quinot <quinot@adacore.com>
7901 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7904 2011-08-02 Geert Bosch <bosch@adacore.com>
7906 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7908 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7910 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7911 computed value of Base_Type.
7913 2011-08-02 Yannick Moy <moy@adacore.com>
7915 * restrict.adb (Check_Restriction): issue an error for any use of
7916 class-wide, even if the No_Dispatch restriction is not set.
7917 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7918 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7919 when completing a private extension, the type named in the private part
7920 is not the same as that named in the visible part.
7921 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7922 of an inherited primitive operations of a tagged type or type extension
7923 that returns the tagged type.
7924 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7925 function which returns True for an implicit operation inherited by the
7926 derived type declaration for the argument type.
7927 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7930 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7932 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7933 Process_Bounds, to perform analysis with expansion of a range or an
7934 expression that is the iteration scheme for a loop.
7935 (Analyze_Iterator_Specification): If domain of iteration is given by a
7936 function call with a controlled result, as is the case if call returns
7937 a predefined container, ensure that finalization actions are properly
7939 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7941 2011-08-02 Javier Miranda <miranda@adacore.com>
7943 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7944 * gcc-interface/Make-lang.in: Update dependencies.
7946 2011-08-02 Javier Miranda <miranda@adacore.com>
7948 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7949 determine if the analysis is performed using N or Original_Node (N).
7950 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7951 functionality of routine Is_Variable avoids code duplication.
7952 * checks.adb (Determine_Range): Handle temporaries generated by
7953 Remove_Side_Effects.
7955 2011-08-02 Javier Miranda <miranda@adacore.com>
7957 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7958 expansion of the condition. Required since the previous analysis was
7959 done with expansion disabled (see Resolve_Quantified_Expression) and
7960 hence checks were not inserted and record comparisons have not been
7963 2011-08-02 Ed Falis <falis@adacore.com>
7965 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7968 2011-08-02 Bob Duff <duff@adacore.com>
7970 * opt.ads: Minor comment fix.
7972 2011-08-02 Bob Duff <duff@adacore.com>
7974 * sem_ch12.adb (Analyze_Package_Instantiation,
7975 Analyze_Subprogram_Instantiation): Turn off style checking while
7976 analyzing an instance. Whatever style checks that apply to the generic
7977 unit should apply, so it makes no sense to apply them in an instance.
7978 This was causing trouble when compiling an instance of a runtime
7979 unit that violates the -gnatyO switch.
7980 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7981 one of the two case statements, causing spurious errors.
7983 2011-08-02 Robert Dewar <dewar@adacore.com>
7985 * uname.adb: Minor reformatting.
7986 * gnatcmd.adb: Minor reformatting.
7987 * exp_attr.adb: Minor reformatting.
7989 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7991 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7992 No_Dispatching_Calls, do not look for the Assign primitive, because
7993 predefined primitives are not created in this case.
7995 2011-08-02 Bob Duff <duff@adacore.com>
7997 * stylesw.ads: Minor comment fixes.
7999 2011-08-02 Robert Dewar <dewar@adacore.com>
8001 * freeze.adb (Add_To_Result): New procedure.
8003 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8005 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8006 time, if the specific run-time routines for handling streams of strings
8007 are not available, use the default mechanism.
8009 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8011 * s-regpat.ads: Fix typo.
8013 2011-08-02 Vincent Celier <celier@adacore.com>
8015 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8016 not null, call it to create the in memory config project file without
8017 parsing an existing default config project file.
8019 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8021 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8023 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8025 * sem_elim.adb: an abstract subprogram does not need an eliminate
8026 pragma for its descendant to be eliminable.
8028 2011-08-02 Ed Falis <falis@adacore.com>
8030 * init.c: revert to handling before previous checkin for VxWorks
8031 * s-intman-vxworks.adb: delete unnecessary declarations related to
8032 using Ada interrupt facilities for handling signals.
8033 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8034 * s-intman-vxworks.ads: Import __gnat_install_handler as
8035 Initialize_Interrupts.
8036 * s-taprop-vxworks.adb: Delete Signal_Mask.
8037 (Abort_Handler): change construction of mask to unblock exception
8040 2011-08-02 Jerome Guitton <guitton@adacore.com>
8042 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8043 Debug_Raise_Exception before propagation starts.
8045 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8047 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8048 to Restriction_Check_Required.
8049 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8050 * sem_res.adb (Resolve_Call): Likewise.
8051 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8053 2011-08-02 Bob Duff <duff@adacore.com>
8055 * stylesw.ads: Update comment.
8056 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8057 * errout.ads: Remove obsolete comment.
8059 2011-08-02 Javier Miranda <miranda@adacore.com>
8061 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8062 (Set_Is_Safe_To_Reevaluate): new procedure.
8063 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8064 assignment is allowed on safe-to-reevaluate variables.
8065 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8066 temporary created to remove side effects in expressions that use
8067 the secondary stack as safe-to-reevaluate.
8068 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8069 variables that are not true constants.
8071 2011-08-02 Robert Dewar <dewar@adacore.com>
8073 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8074 sem_res.adb, sem_ch6.adb: Minor reformatting.
8076 2011-08-02 Jerome Guitton <guitton@adacore.com>
8078 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8080 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8082 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8083 not set Overridden_Operation if subprogram is an initialization
8086 2011-08-02 Yannick Moy <moy@adacore.com>
8088 * par-ch6.adb: Correct obsolete name in comments
8089 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8090 which takes two message arguments (existing function takes one), with
8091 second message used for continuation.
8092 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8093 block statements that originate from a source block statement, not
8094 generated block statements
8095 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8096 symmetry with procedure case
8097 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8098 function to issue an error in formal mode if a package specification
8099 contains more than one tagged type or type extension.
8100 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8101 parameters matching formals of tagged types are objects (or ancestor
8102 type conversions of objects), not general expressions. Issue an error
8103 on view conversions that are not involving ancestor conversion of an
8105 (Resolve_Type_Conversion): in formal mode, issue an error on the
8106 operand of an ancestor type conversion which is not an object
8107 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8108 procedure so that it works also for actuals of function calls
8109 (Is_Actual_Tagged_Parameter): new function which determines if its
8110 argument is an actual parameter of a formal of tagged type in a
8112 (Is_SPARK_Object_Reference): new function which determines if the tree
8113 referenced by its argument represents an object in SPARK
8115 2011-08-02 Robert Dewar <dewar@adacore.com>
8117 * sem_ch3.adb: Minor reformatting
8118 Minor comment addition
8119 Minor error msg text change
8121 2011-08-02 Javier Miranda <miranda@adacore.com>
8123 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8124 function. Used to be more precise when we generate a variable plus one
8125 assignment to remove side effects in the evaluation of the Bound
8127 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8128 of the bound expression to force its re-analysis and thus expand the
8129 associated transient scope (if required). Code cleanup replacing the
8130 previous code that declared the constant entity by an invocation to
8131 routine Force_Evaluation which centralizes this work in the frontend.
8133 2011-08-02 Robert Dewar <dewar@adacore.com>
8135 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8136 (Base_Type): Now uses improved Is_Base_Type function
8137 * einfo.ads (Base_Type): Inline this function
8139 2011-08-02 Robert Dewar <dewar@adacore.com>
8141 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8142 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8144 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8146 * gcc-interface/Make-lang.in: Update dependencies.
8147 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8150 2011-08-02 Yannick Moy <moy@adacore.com>
8152 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8153 non-simple expression used in delta constraint
8154 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8155 index constraint which is not a subtype mark
8156 * par.adb: With and use Restrict
8157 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8158 mode on component type which is not a subtype mark and default
8159 expression on component
8160 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8161 of string which does not have a lower index bound equal to 1
8162 (Array_Type_Declaration): issue an error in formal mode on index or
8163 component type which is not a subtype mark, and on aliased keyword on
8165 (Derived_Type_Declaration): issue an error in formal mode on interface,
8166 limited or abstract type
8167 (Record_Type_Declaration): issue an error in formal mode on interface
8168 (Record_Type_Definition): issue an error in formal mode on tagged types
8169 and type extensions not declared in the specification of a library unit
8170 package; on null non-tagged record; on variant part
8172 2011-08-02 Vincent Celier <celier@adacore.com>
8174 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8175 not declared for qualified library project when Library_Name is not
8176 declared, but Library_Dir is.
8178 2011-08-02 Robert Dewar <dewar@adacore.com>
8180 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8181 pragmas (affects aspects [Component_]Default_Value
8182 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8183 component type for the resolution
8185 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8187 * einfo.adb (Base_Type): Tune implementation for speed.
8189 2011-08-02 Robert Dewar <dewar@adacore.com>
8191 * freeze.adb: Minor reformatting.
8193 2011-08-02 Thomas Quinot <quinot@adacore.com>
8195 * scos.ads: Update comments.
8197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8199 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8200 base type, because the parent may be a subtype of a private type whose
8201 convention is established in a private part.
8203 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8205 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8206 statement in a block when the expansion of the return expression has
8207 created a finalization chain.
8208 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8209 with the parent node.
8210 Add N_Extended_Return_Statement to handle the case where a transient
8211 object declaration appears in the Return_Object_Declarations list of
8212 an extended return statement.
8214 2011-08-02 Matthew Gingell <gingell@adacore.com>
8216 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8217 unused parameter 'name'.
8219 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8221 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8222 inherited operation, check whether its alias, which is the source
8223 operastion that it renames, has been marked eliminated.
8225 2011-08-02 Javier Miranda <miranda@adacore.com>
8227 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8228 in-mode parameter whose type is an access type since it can be used to
8229 modify its designated object. Enforce code that handles as safe an
8230 access type that is not access-to-constant but it is the result of a
8231 previous removal of side-effects.
8232 (Remove_Side_Effects): Minor code reorganization of cases which require
8233 no action. Done to incorporate documentation on new cases uncovered
8234 working in this ticket: no action needed if this routine was invoked
8235 too early and the nodes are not yet decorated.
8236 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8237 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8238 were issued with actuals that are implicitly provided by
8241 2011-08-02 Robert Dewar <dewar@adacore.com>
8243 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8245 2011-08-02 Yannick Moy <moy@adacore.com>
8247 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8248 to issue an error in formal mode on attribute not supported in this mode
8249 (Analyze_Attribute): issue errors on standard attributes not supported
8251 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8252 comment, and issue error in formal mode on modulus which is not a power
8254 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8256 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8258 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8259 operator on modular type (except 'not').
8261 2011-08-02 Robert Dewar <dewar@adacore.com>
8263 * gnat_rm.texi: Minor reformatting.
8265 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8267 * s-osinte-linux.ads: Minor comment update and reformatting.
8268 * i-cexten.ads: Make this unit pure, as for its parent.
8269 Will allow its usage in more contexts if needed.
8271 2011-08-02 Robert Dewar <dewar@adacore.com>
8273 * s-utf_32.ads: Minor comment fix.
8275 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8277 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8278 operation of a tagged synchronized type, handle the case where the
8279 controlling argument is overloaded.
8281 2011-08-02 Yannick Moy <moy@adacore.com>
8283 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8284 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8285 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8286 SPARK mode and formal verification mode on processing SPARK restriction
8287 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8288 requiring consistency checking.
8290 2011-08-02 Robert Dewar <dewar@adacore.com>
8292 * sem_res.adb: Minor reformatting.
8294 2011-08-02 Robert Dewar <dewar@adacore.com>
8296 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8297 a-cforse.ads: Remove unneeded with of Ada.Containers
8298 Remove commented out pragma Inline's
8299 Move specifications of new subprograms to the actual specs
8301 2011-08-02 Yannick Moy <moy@adacore.com>
8303 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8304 a-cforse.ads: Update comments.
8306 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8308 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8310 2011-08-02 Robert Dewar <dewar@adacore.com>
8312 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8313 a-cforse.ads, a-cofove.ads: Minor reformatting.
8315 2011-08-02 Claire Dross <dross@adacore.com>
8317 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8318 a-cofove.ads: Add comments.
8320 2011-08-02 Yannick Moy <moy@adacore.com>
8322 * gnat_rm.texi: Document formal containers.
8324 2011-08-02 Emmanuel Briot <briot@adacore.com>
8326 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8329 2011-08-02 Robert Dewar <dewar@adacore.com>
8331 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8334 2011-08-02 Robert Dewar <dewar@adacore.com>
8336 * aspects.adb: New aspects Default_Value and Default_Component_Value
8337 New format of Aspect_Names table checks for omitted entries
8338 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8339 handling of boolean aspects for derived types.
8340 New aspects Default_Value and Default_Component_Value
8341 New format of Aspect_Names table checks for omitted entries
8342 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8343 (Has_Default_Value): New flag
8344 (Has_Default_Component_Value): New flag
8345 (Has_Default_Value): New flag
8346 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8348 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8349 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8350 Default_Value and Default_Component_Value
8351 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8352 New aspects Default_Value and Default_Component_Value
8353 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8354 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8356 2011-08-02 Vincent Celier <celier@adacore.com>
8358 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8359 inherit library kind.
8361 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8363 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8366 2011-08-02 Robert Dewar <dewar@adacore.com>
8368 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8370 2011-08-02 Yannick Moy <moy@adacore.com>
8372 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8374 2011-08-02 Robert Dewar <dewar@adacore.com>
8376 * impunit.adb: Add comment.
8378 2011-08-02 Yannick Moy <moy@adacore.com>
8380 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8381 qualification of aggregates in formal mode
8382 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8384 (Resolve_Aggregate): complete the test that an aggregate is adequately
8385 qualified in formal mode
8387 2011-08-02 Pascal Obry <obry@adacore.com>
8389 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8390 * mlib-prj.adb: Supress warning when compiling binder generated file.
8391 (Build_Library): Supress all warnings when compiling the binder
8394 2011-08-02 Yannick Moy <moy@adacore.com>
8396 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8398 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8399 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8400 Add with/use clauses to make Check_Formal_Restriction visible
8402 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8404 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8405 in-parameters when type of the generic formal is private in the generic
8406 spec and non-private in the body.
8408 2011-08-02 Claire Dross <dross@adacore.com>
8410 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8411 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8412 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8413 * impunit.adb, Makefile.rtl: Take new files into account.
8415 2011-08-02 Robert Dewar <dewar@adacore.com>
8417 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8418 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8420 2011-08-02 Yannick Moy <moy@adacore.com>
8422 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8424 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8425 matching static array bounds, taking into account the special case of
8427 * sem_ch3.adb: Typo in comment.
8429 2011-08-02 Yannick Moy <moy@adacore.com>
8431 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8432 which issues an error in formal mode if its argument node is originally
8434 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8435 has a discriminant specification so that it does not include the case
8437 (Derived_Type_Declaration): move here the test that a derived type has a
8438 discriminant specification
8439 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8440 first element of a component association before accessing its choices
8441 (presence of component association is not enough)
8442 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8443 declaration is a library item before accessing the next element in a
8444 list, as library items are not member of lists
8445 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8446 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8447 Check_Formal_Restriction whenever possible.
8449 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8451 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8452 reference when needed.
8454 2011-08-02 Bob Duff <duff@adacore.com>
8456 * gnat_ugn.texi: Fix typo.
8458 2011-08-02 Vincent Celier <celier@adacore.com>
8460 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8461 archive file name. Do not use the full path name of archives for Open
8464 2011-08-02 Robert Dewar <dewar@adacore.com>
8466 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8467 Analyze_Aspect_Specifications
8469 (Analyze_Aspect_Specifications): New handling for boolean aspects
8470 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8471 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8472 sequence for Analyze_Aspect_Specifications
8473 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8474 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8476 2011-08-02 Robert Dewar <dewar@adacore.com>
8478 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8479 aspects, since these no longer exist.
8481 2011-08-02 Robert Dewar <dewar@adacore.com>
8483 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8484 semicolon, do not try to see if there are aspects following it.
8485 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8488 2011-08-02 Robert Dewar <dewar@adacore.com>
8490 * sem_ch8.adb, aspects.ads: Minor reformatting.
8492 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8494 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8495 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8497 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8499 2011-08-02 Yannick Moy <moy@adacore.com>
8501 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8502 mode on subprogram declaration outside of package specification, unless
8503 it is followed by a pragma Import
8504 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8505 Access_Type_Declaration): issue error in formal mode on access type
8506 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8508 (Analyze_Object_Declaration): issue error in formal mode on object
8509 declaration which does not respect SPARK restrictions
8510 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8511 declaration which does not respect SPARK restrictions
8512 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8513 error in formal mode on digits or delta constraint
8514 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8515 decimal fixed point type
8516 (Derived_Type_Declaration): issue error in formal mode on derived type
8517 other than type extensions of tagged record types
8518 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8519 with check on access definition
8520 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8521 mode on protected definition.
8522 (Analyze_Task_Definition): issue error in formal mode on task definition
8524 2011-08-02 Robert Dewar <dewar@adacore.com>
8526 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8528 2011-08-02 Javier Miranda <miranda@adacore.com>
8530 * sem_ch6.adb (Can_Override_Operator): New function.
8531 (Verify_Overriding_Indicator): Add missing code to check overriding
8532 indicator in operators. Fixes regression.
8533 (Check_Overriding_Indicator): Minor reformating after replacing the
8534 code that evaluates if the subprogram can override an operator by
8535 invocations to the above new function.
8537 (Write_Field26_Name): Add missing code to ensure that, following
8538 the documentation in einfo.ads, this field is not shown as attribute
8539 "Static_Initialization" on non-dispatching functions.
8541 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8543 * sem_res.adb (Resolve_Call): A call to
8544 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8545 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8546 i.e., when the second parameter is of type Time_Span.
8548 2011-08-02 Vincent Celier <celier@adacore.com>
8550 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8551 with an archive instead of -L<library dir> -l<library name>.
8553 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8555 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8556 mark the base types In_Use in addition to making the operations
8559 2011-08-02 Ed Falis <falis@adacore.com>
8561 * init.c: add and setup __gnat_signal_mask for the exception signals
8562 * s-inmaop-vxworks.adb: new file.
8563 * s-intman-vxworks.adb: remove unnecessary initializations and
8565 * s-intman-vxworks.ads: remove unnecessary variable
8566 * s-taprop-vxworks.adb: simplify signal initialization
8568 2011-08-02 Robert Dewar <dewar@adacore.com>
8570 * sem_ch8.adb: Minor code reorganization, comment updates.
8572 2011-08-02 Robert Dewar <dewar@adacore.com>
8574 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8575 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8577 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8578 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8580 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8582 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8583 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8584 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8585 use_type_clauses, to handle more efficiently use_type and use_all_type
8587 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8588 Ada2012 Use_All_Type clause.
8589 (Use_Class_Wide_Operations): new procedure.
8591 2011-08-02 Robert Dewar <dewar@adacore.com>
8593 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8594 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8595 expression to expression function.
8597 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8599 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8600 if types are compatible.
8602 2011-08-02 Yannick Moy <moy@adacore.com>
8604 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8605 returns True if its argument array types have same dimension and same
8606 static bounds at each index.
8607 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8608 OUT or IN OUT paramaters which are not view conversions in SPARK.
8609 (Resolve_Arithmetic_Op): issue an error in formal mode on
8610 multiplication or division with operands of fixed point types which are
8611 not qualified or explicitly converted.
8612 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8613 Boolean or array type (except String) operands.
8614 (Resolve_Equality_Op): issue an error in formal mode on equality
8615 operators for array types other than String with non-matching static
8617 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8618 for array types with non-matching static bounds. Factorize the code in
8619 Matching_Static_Array_Bounds.
8620 (Resolve_Qualified_Expression): issue an error in formal mode on
8621 qualified expressions for array types with non-matching static bounds.
8622 (Resolve_Type_Conversion): issue an error in formal mode on type
8623 conversion for array types with non-matching static bounds
8625 2011-08-02 Robert Dewar <dewar@adacore.com>
8627 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8629 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8631 * par-ch9.adb: save location of entry for proper error message.
8633 2011-08-02 Javier Miranda <miranda@adacore.com>
8635 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8636 (Use_Full_View) which permits this routine to climb through the
8637 ancestors using the full-view of private parents.
8638 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8639 Use_Full_View to true in calls to Is_Ancestor.
8640 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8641 true in call to Is_Ancestor.
8642 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8643 Use_Full_View to true in call to Is_Ancestor.
8644 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8645 call to Is_Ancestor.
8646 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8647 Use_Full_View to true in calls to Is_Ancestor.
8648 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8649 Make_Select_Specific_Data_Table, Register_Primitive,
8650 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8651 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8652 to true in call to Is_Ancestor.
8653 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8654 Use_Full_View to true in calls to Is_Ancestor.
8656 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8657 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8659 2011-08-02 Robert Dewar <dewar@adacore.com>
8661 * gnat_rm.texi: Minor reformatting.
8662 * sem_prag.adb: Minor reformatting.
8664 2011-08-02 Tristan Gingold <gingold@adacore.com>
8666 * vms_data.ads: Add VMS qualifier for -gnateP.
8668 2011-08-02 Robert Dewar <dewar@adacore.com>
8670 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8671 * par-ch7.adb (P_Package): Proper placement of aspects for package
8673 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8674 (End_Statements): Add Is_Sloc parameterr
8675 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8676 (Check_End): Ad Is_Sloc parameter
8677 (End_Statements): Add Is_Sloc parameterr
8679 2011-08-02 Vincent Celier <celier@adacore.com>
8681 * ug_words: Add VMS qualifier equivalent to -gnateP:
8682 /SYMBOL_PREPROCESSING.
8684 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8686 * gnat-style.texi: For hexadecimal numeric literals the typical
8687 grouping of digits is 4 to represent 2 bytes.
8688 A procedure spec which is split into several lines is indented two
8691 2011-08-02 Yannick Moy <moy@adacore.com>
8693 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8694 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8695 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8697 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8698 choice in array aggregate
8699 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8701 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8702 positional and named aggregate for record, or others in record
8703 aggregate, or multiple choice in record aggregate
8704 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8705 array operands to logical operations AND, OR and XOR do not have the
8706 same static lower and higher bounds
8707 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8709 2011-08-01 Robert Dewar <dewar@adacore.com>
8711 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8712 Replaces Last_Source_Node_In_Sequence.
8713 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8714 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8715 parens and blank in string (this was inconsistently implemented).
8717 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8718 blank in string (this was inconsistently implemented).
8720 (Set_Global_Switches): Set formal mode switches appropriately
8721 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8723 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8724 call Set_Error_Msg_Lang to set "spark" as language name.
8725 * par.adb: Remove unnecessary call to set formal language for errout
8726 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8727 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8729 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8730 calls to it, moved after resolution so that types are known
8731 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8732 result of concatenation is not of type String
8733 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8734 concatenation is not properly restricted
8735 * gnat_rm.texi: Add doc on pragma Spark_95.
8736 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8737 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8738 * gcc-interface/Make-lang.in: Update dependencies.
8740 2011-08-01 Javier Miranda <miranda@adacore.com>
8742 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8743 condition that detects if the overridden operation must replace an
8746 2011-08-01 Javier Miranda <miranda@adacore.com>
8748 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8749 code declarations inserted by Insert_Actions in each alternative of the
8750 N_Case_Expression node.
8752 2011-08-01 Robert Dewar <dewar@adacore.com>
8754 * sem_ch6.adb: Minor code reorganization.
8755 * sem_util.adb: Minor reformatting.
8757 2011-08-01 Pascal Obry <obry@adacore.com>
8759 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8760 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8762 2011-08-01 Yannick Moy <moy@adacore.com>
8764 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8765 literal or operator symbol which is prefixed
8766 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8767 mode on access attributes.
8768 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8769 that concatenation operands are properly restricted in formal mode
8770 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8771 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8772 result of the concatenation has a type different from String.
8773 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8774 Analyze_Quantified_Expression, Analyze_Slice,
8775 Analyze_Null): issue an error in formal mode on unsupported constructs
8777 (Analyze_Block_Statement): only issue error on source block statement
8778 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8779 function which returns the last node in a list of nodes for which
8780 Comes_From_Source returns True, if any
8781 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8782 Last_Source_Node_In_Sequence
8783 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8784 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8785 mode on unsupported constructs
8786 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8787 rest of the actions may be needed later on since the error is marked as
8789 * sinfo.ads: Typos in comments.
8791 2011-08-01 Pascal Obry <obry@adacore.com>
8793 * projects.texi: Minor editing.
8795 2011-08-01 Yannick Moy <moy@adacore.com>
8797 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8798 insertion character ~~
8799 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8800 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8801 with insertion character ~~
8802 (Set_Msg_Text): treat insertion character ~~
8803 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8804 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8805 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8806 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8807 errors related to the formal language restriction not serious
8808 (insertion character |).
8809 * par.adb (Par): set formal language for error messages if needed
8810 * sem_ch6.adb (Check_Missing_Return): take into account possible
8811 generated statements at the end of the function
8812 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8813 enumeration value to define a new pragma SPARK_95
8814 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8815 SPARK_Version): new type and variables to store the SPARK version
8817 (SPARK_Mode): return True when SPARK_Version is set
8818 * par-prag.adb: Correct indentation
8819 (Prag): take Pragma_SPARK_95 into account
8820 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8823 2011-08-01 Robert Dewar <dewar@adacore.com>
8825 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8826 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8827 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8829 2011-08-01 Pascal Obry <obry@adacore.com>
8831 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8832 Target_Name to Get_Path call.
8833 (Parse_Single_Project): Likewise.
8834 (Post_Parse_Context_Clause): Likewise.
8835 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8836 Call Initialise_Project_Path with the proper Target_Name.
8837 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8839 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8840 with the proper Target_Name.
8841 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8843 (Parse_Project_And_Apply_Config): Likewise.
8844 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8845 This is fine as this part of the code is supporting only native
8847 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8848 is fine as this part of the code is supporting only native compilation.
8850 2011-08-01 Yannick Moy <moy@adacore.com>
8852 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8853 of homonym, unless the homonym is one of the cases allowed in SPARK
8854 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8855 package declaration occurring after a body.
8857 2011-08-01 Robert Dewar <dewar@adacore.com>
8859 * checks.adb, exp_ch4.adb: Minor reformatting.
8861 2011-08-01 Javier Miranda <miranda@adacore.com>
8863 * einfo.ads (Access_Disp_Table): Fix documentation.
8864 (Dispatch_Table_Wrappers): Fix documentation.
8866 2011-08-01 Pascal Obry <obry@adacore.com>
8868 * prj-env.adb, prj-env.ads: Minor reformatting.
8870 2011-08-01 Yannick Moy <moy@adacore.com>
8872 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8873 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8874 procedures out of these packages.
8875 * errout.ads, errout.adb
8876 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8877 procedures in of this package
8878 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8879 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8880 on misplaced later vs initial declarations, like in Ada 83
8881 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8882 formal mode on attribute of private type whose full type declaration
8884 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8885 package declaration inside a package specification
8886 (Analyze_Full_Type_Declaration): issue error in formal mode on
8887 controlled type or discriminant type
8888 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8889 user-defined operator means that it should come from the source
8890 (New_Overloaded_Entity): issue error in formal mode on overloaded
8892 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8894 2011-08-01 Thomas Quinot <quinot@adacore.com>
8896 * atree.adb: Minor reformatting.
8897 * checks.adb: Minor reformatting.
8899 2011-08-01 Vincent Celier <celier@adacore.com>
8901 * s-parame-vms-ia64.ads: Fix typo in comment
8903 * s-parame-vms-restrict.ads: Removed, unused.
8905 2011-08-01 Javier Miranda <miranda@adacore.com>
8908 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8910 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8911 * sem_ch3.ads, sem_ch3.adb
8912 (Is_Constant_Bound): New extended version of the subprogram that was
8913 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8914 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8915 * sem_aux.ads (Constant_Value): Fix typo in comment.
8916 * checks.adb (Generate_Index_Checks): New implementation which, for
8917 array objects with constant bounds, generates the runtime check
8918 referencing the bounds of the array type. For other cases this routine
8919 provides its previous behavior obtaining such values from the array
8921 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8923 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8924 we cannot have semantic interpretations of the new node.
8926 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8928 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8931 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8933 * sem_ch8.adb: Minor code editing.
8934 * s-vxwext.adb: Remove trailing space.
8935 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8936 consistency with other files.
8938 2011-08-01 Thomas Quinot <quinot@adacore.com>
8940 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8942 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8944 * par-ch10.adb: reject parameterized expressions as compilation unit.
8945 * sem_ch4.adb: handle properly conditional expression with overloaded
8946 then_clause and no else_clause.
8948 2011-08-01 Tristan Gingold <gingold@adacore.com>
8950 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8951 like done by System.Aux_DEC.
8952 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8954 2011-08-01 Yannick Moy <moy@adacore.com>
8956 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8957 missing label at end of declaration (subprogram or package)
8958 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8959 of positional and named parameter association
8960 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8961 Error_Msg_SP which adds a prefix to the error message giving the name
8962 of the formal language analyzed
8963 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8964 access result type in subprogram, unconstrained array as result type,.
8965 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8967 * sem_ch8.adb: Code clean up.
8969 2011-08-01 Javier Miranda <miranda@adacore.com>
8971 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8972 * einfo.ads (Access_Disp_Table): Fix documentation.
8973 (Dispatch_Table_Wrappers): Fix documentation.
8974 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8975 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8976 to enforce the documentation of this attribute.
8977 (Set_Is_Interface): Cleanup the assertion.
8978 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8979 the Underlying_Type entity before reading attribute Access_Disp_Table.
8980 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8981 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8982 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8983 the Underlying_Type entity before reading attribute Access_Disp_Table.
8984 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8985 Locate the Underlying_Type entity before reading attribute
8988 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8990 * s-poosiz.ads: Additional overriding indicators.
8992 2011-08-01 Yannick Moy <moy@adacore.com>
8994 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8996 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8997 parameter specification does not include a subtype mark.
8998 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8999 formal mode on abstract subprogram.
9000 (Analyze_Subprogram_Specification): issue error in formal mode on
9001 user-defined operator.
9002 (Process_Formals): issue error in formal mode on access parameter and
9004 * sem_ch9.adb (Analyze_Abort_Statement,
9005 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9006 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9007 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9008 Analyze_Requeue, Analyze_Selective_Accept,
9009 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9010 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9011 issue error in formal mode on user-defined raise statement.
9013 2011-08-01 Thomas Quinot <quinot@adacore.com>
9015 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9016 declaration being hidden when overriding an implicit inherited
9018 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9019 (-gnats), do not complain about a source file that contains only a
9022 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9024 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9025 variable if already set.
9027 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9029 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9030 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9031 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9032 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9033 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9034 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9035 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9036 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9037 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9038 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9039 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9040 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9041 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9042 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9043 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9044 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9045 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9046 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9047 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9048 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9049 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9050 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9051 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9052 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9053 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9054 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9055 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9056 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9057 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9058 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9059 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9060 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9061 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9062 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9063 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9064 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9065 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9066 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9067 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9068 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9069 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9070 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9071 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9072 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9073 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9074 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9075 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9076 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9077 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9078 Use GNAT instead of GNARL.
9080 2011-08-01 Bob Duff <duff@adacore.com>
9082 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9083 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9084 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9087 2011-08-01 Yannick Moy <moy@adacore.com>
9089 * debug.adb (d.D) reverve flag for the SPARK mode
9090 (d.E) reverve flag for SPARK generation mode
9091 (d.F) reverve flag for Why generation mode
9092 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9093 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9094 functions which return True when the corresponding modes are set
9095 (Formal_Language): return "spark" or "alfa" when in formal verification
9097 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9098 Error_Msg to prefix the error message with a tag giving the formal
9100 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9101 message with a tag giving the formal language
9102 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9104 (Analyze_Case_Statement): issue error in formal mode on case statement
9105 with a single "others" case alternative
9106 (Analyze_Exit_Statement): issue errors in formal mode on exit
9107 statements which do not respect SPARK restrictions
9108 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9109 (Check_Unreachable_Code): always issue an error (not a warning) in
9110 formal mode on unreachable code (concerns both code after an infinite
9111 loop and after an unconditional jump, both not allowed in SPARK)
9112 * sem_ch6.adb (Analyze_Return_Statement): add call to
9113 Set_Return_Present for a procedure containing a return statement
9114 (already done for functions in Analyze_Function_Return)
9115 (Analyze_Function_Return): issue error in formal mode on extended
9116 return or if return is not last statement in function
9117 (Check_Missing_Return): issue error in formal mode if function does
9118 not end with return or if procedure contains a return
9119 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9120 function to detect if there is an inner scope of its parameter S which
9123 2011-08-01 Thomas Quinot <quinot@adacore.com>
9125 * sem_ch6.ads: Minor reformatting.
9127 2011-08-01 Javier Miranda <miranda@adacore.com>
9129 * sem_util.adb (Abstract_Interface_List): Complete condition when
9130 processing private type declarations to avoid reading unavailable
9132 (Is_Synchronized_Tagged_Type): Complete condition when processing
9133 private extension declaration nodes to avoid reading unavailable
9136 2011-08-01 Thomas Quinot <quinot@adacore.com>
9138 * sem_ch3.adb: Minor reformatting.
9140 2011-08-01 Thomas Quinot <quinot@adacore.com>
9142 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9143 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9144 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9145 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9146 for VMS, instead parametrize the common implementation with
9147 System.Parameters declarations.
9149 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9151 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9153 2011-08-01 Tristan Gingold <gingold@adacore.com>
9155 * seh_init.c: Fix SEH handler installation on win64.
9157 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9159 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9160 double analysis of an anonymous access to subprogram, because it can
9161 lead to improper sharing of profiles and a back-end crash.
9163 2011-08-01 Robert Dewar <dewar@adacore.com>
9165 * make.adb, sem_ch4.adb: Minor reformatting.
9166 * gcc-interface/Make-lang.in: Update dependencies.
9167 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9169 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9171 * gnat_rm.texi: Fix definition of Long_Integer.
9173 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9175 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9176 to prevent storage exhaustion.
9177 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9178 finalized is a function body, insert the cleanup code before the final
9179 return statement, to prevent spurious warnings.
9180 * s-pooglo.ads: add overriding indicator.
9182 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9184 * sem_ch4.adb (Operator_Check): improve error message when both a
9185 with_clause and a use_clause are needed to make operator usage legal.
9186 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9187 determine whether a compilation unit is visible within an other,
9188 either through a with_clause in the current unit, or a with_clause in
9189 its library unit or one one of its parents.
9191 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9193 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9194 over an arbitrary expression of an array or container type.
9195 * lib-xref.adb: clarify comment.
9197 2011-08-01 Bob Duff <duff@adacore.com>
9199 * einfo.ads: Minor reformatting.
9200 * debug.adb: Minor comment improvement.
9202 2011-08-01 Javier Miranda <miranda@adacore.com>
9204 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9205 consider hidden subprograms as valid candidates.
9207 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9209 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9211 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9213 * gnat_ugn.texi: Fix typo.
9215 2011-08-01 Robert Dewar <dewar@adacore.com>
9217 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9218 lib-xref.adb: Minor reformatting
9220 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9222 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9223 when to generate a call to Move_Final_List.
9224 (Has_Controlled_Parts): Remove this function.
9226 2011-08-01 Geert Bosch <bosch@adacore.com>
9228 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9231 2011-08-01 Thomas Quinot <quinot@adacore.com>
9233 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9234 explicit raise of a predefined exception as Comes_From_Source if the
9235 original N_Raise_Statement comes from source.
9237 2011-08-01 Robert Dewar <dewar@adacore.com>
9239 * sinfo.ads: Add comment.
9240 * sem_ch6.adb: Minor reformatting.
9242 2011-08-01 Robert Dewar <dewar@adacore.com>
9244 * freeze.adb (Freeze_Entity): Refine check for bad component size
9245 clause to avoid rejecting confirming clause when atomic/aliased present.
9247 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9249 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9250 better determine whether an entity reference is a write.
9251 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9253 * lib-xref.adb (Output_References): Do no suppress a read reference at
9254 the same location as an immediately preceeding modify-reference, to
9255 handle properly in-out actuals.
9257 2011-08-01 Tristan Gingold <gingold@adacore.com>
9259 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9261 2011-08-01 Quentin Ochem <ochem@adacore.com>
9263 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9264 heap to compute the result.
9266 2011-08-01 Robert Dewar <dewar@adacore.com>
9268 * atree.ads: Minor reformatting.
9270 2011-08-01 Emmanuel Briot <briot@adacore.com>
9272 * g-expect.adb (Get_Command_Output): Fix memory leak.
9274 2011-08-01 Geert Bosch <bosch@adacore.com>
9276 * cstand.adb (P_Float_Type): New procedure to print the definition of
9277 predefined fpt types.
9278 (P_Mixed_Name): New procedure to print a name using mixed case
9279 (Print_Standard): Use P_Float_Type for printing floating point types
9280 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9281 precision IEEE float.
9283 2011-08-01 Thomas Quinot <quinot@adacore.com>
9285 * sem_ch3.adb: Minor reformatting.
9287 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9289 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9290 the completion of a generic function, insert the new body rather than
9291 rewriting the original.
9293 2011-08-01 Yannick Moy <moy@adacore.com>
9295 * sinfo.ads, errout.ads: Typos in comments.
9297 2011-08-01 Robert Dewar <dewar@adacore.com>
9299 * par-endh.adb: Minor reformatting.
9301 2011-08-01 Robert Dewar <dewar@adacore.com>
9303 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9304 (Pre_Post_Aspects): New subtype.
9305 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9306 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9307 * par-ch7.adb (P_Package): Remove Decl parameter
9308 (P_Package): Handle new syntax for aspects (before IS)
9309 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9311 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9312 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9313 (P_Package): Remove Decl parameter
9314 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9316 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9318 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9319 * sinfo.ads: Document new syntax for aspects in packages etc.
9320 * sprint.adb: Handle new syntax of aspects before IS in package
9322 2011-08-01 Thomas Quinot <quinot@adacore.com>
9324 * atree.ads: Minor reformatting.
9325 * sem_prag.adb: Minor reformatting.
9327 2011-08-01 Robert Dewar <dewar@adacore.com>
9329 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9330 case expr alternative.
9332 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9334 * sem_ch12.adb: Fix typo.
9336 2011-08-01 Geert Bosch <bosch@adacore.com>
9338 * sem_prag.adb (Check_No_Link_Name): New procedure.
9339 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9340 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9341 instead of Standard_Long_Long_Float_Size global. Preparation for
9342 eventual removal of per type constants.
9343 * exp_util.ads (Get_Stream_Size): New function returning the stream
9344 size value of subtype E.
9345 * exp_util.adb (Get_Stream_Size): Implement new function.
9346 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9348 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9350 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9352 2011-08-01 Geert Bosch <bosch@adacore.com>
9354 * cstand.adb: Fix comments.
9355 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9358 2011-08-01 Robert Dewar <dewar@adacore.com>
9360 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9362 2011-08-01 Geert Bosch <bosch@adacore.com>
9364 * atree.ads: Fix comment.
9366 2011-08-01 Robert Dewar <dewar@adacore.com>
9368 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9369 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9370 * par.adb: Add with for Namet.Sp.
9371 * par-tchk.adb: Minor reformatting.
9373 2011-08-01 Vincent Celier <celier@adacore.com>
9375 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9376 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9377 of the init procedure of a SAL.
9378 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9381 2011-08-01 Thomas Quinot <quinot@adacore.com>
9383 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9386 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9388 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9390 2011-08-01 Thomas Quinot <quinot@adacore.com>
9392 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9393 conformant with its spec (return True only for types that have
9394 an overriding Initialize primitive operation that prevents them from
9395 having preelaborable initialization).
9396 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9397 initialization for controlled types in Ada 2005 or later mode.
9399 2011-08-01 Robert Dewar <dewar@adacore.com>
9401 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9403 (Same_Aspect): New function.
9404 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9405 Type_Invariant, Precondition, Postcondition.
9406 * snames.ads-tmpl: Add Name_Type_Invariant.
9408 2011-08-01 Robert Dewar <dewar@adacore.com>
9410 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9412 (Freeze_All_Ent): Fix error in handling inherited aspects.
9413 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9414 already analyzed, but don't skip entire processing of a declaration,
9415 that's wrong in some cases of declarations being rewritten.
9416 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9417 Don't delay for integer, string literals
9418 Treat predicates in usual manner for delay, remove special case code,
9420 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9421 (Build_Predicate_Function): Update saved expression in aspect
9422 (Build_Invariant_Procedure): Update saved expression in aspect
9423 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9424 of replacement of discriminant references if the reference is simple.
9426 2011-08-01 Robert Dewar <dewar@adacore.com>
9428 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9429 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9430 Static_Predicate and Dynamic_Predicate.
9431 (Build_Predicate_Function): Add processing for Static_Predicate
9432 and Dynamic_Predicate.
9433 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9434 (From_Static_Predicate): New flag
9435 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9437 2011-08-01 Robert Dewar <dewar@adacore.com>
9439 * usage.adb: Documentation cleanup for Ada version modes in usage.
9440 * expander.adb: Minor reformatting.
9442 2011-08-01 Robert Dewar <dewar@adacore.com>
9444 * atree.ads: Minor comment fix.
9445 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9446 a-witeio.ads, sem_prag.adb: Minor reformatting.
9448 2011-08-01 Doug Rupp <rupp@adacore.com>
9450 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9451 pointers. Use descrip.h header file for convenience. Add some
9454 2011-08-01 Robert Dewar <dewar@adacore.com>
9456 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9457 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9458 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9460 (Check_Aspect_At_End_Of_Declarations): New procedure
9461 (Analye_Aspect_Specification): Minor changes for above procedures
9462 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9463 specification node as well.
9465 2011-08-01 Pascal Obry <obry@adacore.com>
9467 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9468 Windows files. Use GetFilesAttributes() in this case to check for file
9469 existence instead of returning with an error code.
9471 2011-08-01 Vincent Celier <celier@adacore.com>
9473 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9474 High is above Source length.
9476 2011-08-01 Robert Dewar <dewar@adacore.com>
9478 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9480 2011-08-01 Robert Dewar <dewar@adacore.com>
9482 * aspects.ads (Boolean_Aspects): New subtype.
9483 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9484 for derived types in cases where the parent type and derived type have
9486 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9487 with aspects when parent type also has aspects.
9488 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9489 boolean expression at this point).
9490 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9491 accordance with final decision on the Ada 2012 feature.
9492 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9494 2011-08-01 Matthew Heaney <heaney@adacore.com>
9496 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9498 2011-08-01 Pascal Obry <obry@adacore.com>
9500 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9501 Fix Replace_Slice when High is above current string size.
9502 (Replace_Slice): Fix DL computation when High is above current
9505 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9507 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9509 2011-08-01 Matthew Heaney <heaney@adacore.com>
9511 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9514 2011-08-01 Pascal Obry <obry@adacore.com>
9516 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9519 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9521 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9522 access to protected subprograms in generic bodies.
9523 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9524 protected type, indicate that the convention of the subprogram is
9525 Convention_Protected, because it may be used in subsequent declarations
9526 within the protected declaration.
9528 2011-08-01 Vincent Celier <celier@adacore.com>
9530 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9531 and "final" procedures when the name of the library is "ada", to avoid
9532 duplicate symbols "adainit" and "adafinal" in executables.
9534 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9536 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9537 quantified expression that appears within a postcondition and uses the
9538 Ada2012 'Result attribute.
9540 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9542 * init.c (__gnat_error_handler): Cast reason to int.
9543 (__gnat_install_handler): Explain sa_sigaction use.
9545 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9547 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9548 subprogram has copy-in copy-out parameters, try to promote the mode of
9549 the return type if it is passed in registers.
9551 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9553 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9554 left operand as addressable.
9556 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9558 * gcc-interface/gigi.h (build_function_stub): Remove.
9559 (build_return_expr): Likewise.
9560 (convert_vms_descriptor): Declare.
9561 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9562 (build_function_stub): Move to...
9563 * gcc-interface/utils2.c (build_return_expr): Move to...
9564 * gcc-interface/trans.c (build_function_stub): ...here.
9565 (build_return_expr): ...here.
9566 (Subprogram_Body_to_gnu): Add local variable for language_function.
9567 Disconnect the parameter attributes cache, if any, once done with it.
9568 Call end_subprog_body only after setting the end_locus.
9569 Build the stub associated with the function, if any, at the very end.
9570 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9571 variables and streamline control flow.
9573 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9576 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9579 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9582 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9583 Assign to act.sa_sigaction.
9584 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9585 current->return_address to char * before arithmetic.
9587 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9589 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9590 Correct argument types.
9591 Extract code from reason.
9592 (__gnat_install_handler): Assign to act.sa_sigaction.
9594 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9596 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9597 (GNAT1_OBJS): ...here.
9599 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9602 * g-socthi-mingw.adb (Fill): Fix formatting.
9604 * gcc-interface/gigi.h: Move around comment.
9606 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9609 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9611 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9614 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9616 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9618 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9619 range comparison if Pmode is SImode.
9621 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9622 Eric Botcazou <ebotcazou@adacore.com>
9624 * adadecode.c: Wrap up in extern "C" block.
9625 * adadecode.h: Likewise.
9626 * adaint.c: Likewise. Remove 'const' keyword.
9627 * adaint.h: Likewise.
9629 * atree.h: Likewise.
9631 * cstreams.c: Likewise.
9635 * final.c: Likewise.
9637 * initialize.c: Likewise.
9639 * namet.h: Likewise.
9640 * nlists.h: Likewise.
9641 * raise.c: Likewise.
9642 * raise.h: Likewise.
9643 * repinfo.h: Likewise.
9644 * seh_init.c: Likewise.
9645 * targext.c: Likewise.
9646 * tracebak.c: Likewise.
9647 * uintp.h: Likewise.
9648 * urealp.h: Likewise.
9649 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9650 * xsinfo.adb: Likewise.
9651 * xsnamest.adb: Likewise.
9652 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9653 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9654 * gcc-interface/misc.c: Likewise.
9655 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9656 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9657 ada/targext.o here...
9658 (GNAT_ADA_OBJS): ...and not here.
9659 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9660 (GNATBIND_OBJS): Reorder.
9662 2011-07-07 Richard Henderson <rth@redhat.com>
9664 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9665 dwarf2out_frame_init.
9667 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9669 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9671 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9674 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9676 2011-07-06 Richard Guenther <rguenther@suse.de>
9678 * gcc-interface/misc.c (gnat_init): Merge calls to
9679 build_common_tree_nodes and build_common_tree_nodes_2.
9680 Re-initialize boolean_false_node.
9682 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9683 Olivier Hainque <hainque@adacore.com>
9684 Nicolas Setton <setton@adacore.com>
9686 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9687 the type according to the ARTIFICIAL_P parameter.
9688 (create_type_decl): Likewise.
9689 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9691 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9693 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9694 (gnatbind): Likewise.
9696 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9698 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9700 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9702 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9703 local variable throughout. Remove useless call to Base_Type.
9704 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9705 Take it also into account for the volatileness of the field. Set the
9706 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9708 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9710 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9711 on a dereference built for a by-ref object if it has an address clause.
9713 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9715 * einfo.ads (Address_Taken): Document use for the second argument of
9716 Asm_Input and Asm_Output attributes.
9717 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9718 argument is an entity name, then set Address_Taken on it.
9719 <Attribute_Asm_Output>: Likewise.
9720 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9721 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9722 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9723 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9725 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9728 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9730 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9732 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9733 (ada/utils.o): Update dependencies.
9734 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9735 ../../../libcpp/libcpp.a.
9736 * gcc-interface/utils.c: Include common/common-target.h.
9737 (process_attributes): Use targetm_common.have_named_sections.
9739 2011-06-07 Richard Guenther <rguenther@suse.de>
9741 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9744 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9746 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9747 TREE_THIS_NOTRAP flag.
9749 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9751 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9754 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9756 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9757 constants whose full view has discriminants specially.
9759 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9761 * gcc-interface/utils.c: Include diagnostic.h.
9762 (gnat_write_global_declarations): Output debug information for all
9763 global type declarations before finalizing the compilation unit.
9764 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9766 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9768 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9770 2011-05-25 Kai Tietz <ktietz@redhat.com>
9772 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9773 initialization instead of const/none-const pointer assignment.
9775 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9777 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9778 $(EXTRA_GNAT1_OBJS).
9779 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9780 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9781 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9782 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9783 libcommon-target.a instead of prefix.o.
9785 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9788 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9790 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9792 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9793 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9794 instead of version.o.
9796 2011-05-18 Kai Tietz <ktietz@redhat.com>
9798 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9799 boolean_false_node instead of integer_zero_node.
9800 (convert_with_check): Likewise.
9801 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9803 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9805 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9806 type of the parameter is an unconstrained array, convert the actual to
9807 the type of the formal in the In Out and Out cases as well.
9809 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9811 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9812 call build_function_type_array or build_varargs_function_type_array
9814 (create_subprog_type): Don't call build_function_type; call
9815 build_function_type_vec instead.
9817 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9819 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9820 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9821 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9823 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9825 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9827 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9828 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9830 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9832 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9834 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9836 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9837 instead of accessing TYPE_ARG_TYPES directly.
9838 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9840 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9843 * gcc-interface/gigi.h (get_variant_part): Declare.
9844 * gcc-interface/decl.c (get_variant_part): Make global.
9845 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9846 types have the same constant size, are record types and T1 has a
9847 variant part while T2 doesn't.
9849 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9851 * gcc-interface/utils.c (begin_subprog_body): Do not call
9853 (end_subprog_body): Likewise.
9855 2011-05-04 Richard Guenther <rguenther@suse.de>
9857 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9859 (pos_to_constructor): Likewise.
9861 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9862 Eric Botcazou <ebotcazou@adacore.com>
9864 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9865 of build_function_type. Adjust calls to...
9866 (build_raise_check): ...this. Do not take a void_tree parameter.
9867 Call build_function_type_list instead of build_function_type.
9868 Fix head comment and swap couple of conditional blocks.
9870 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9872 * gnatvsn.ads (Library_Version): Bump to 4.7.
9873 (Current_Year): Bump to 2011.
9875 2011-04-29 Michael Matz <matz@suse.de>
9877 * gcc-interface/misc.c (gnat_handle_option): Set
9878 warn_maybe_uninitialized.
9880 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9882 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9883 the Watson/McCabe paper.
9885 2011-04-23 Jim Meyering <meyering@redhat.com>
9887 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9889 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9891 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9894 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9896 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9898 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9899 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9900 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9901 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9902 <all>: Do not set flags on the reused DECL node coming from an alias.
9903 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9904 don't need debug info here...
9905 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9906 (gigi): Adjust calls to create_subprog_decl.
9907 (build_raise_check): Likewise.
9908 (establish_gnat_vms_condition_handler): Likewise.
9909 (Compilation_Unit_to_gnu): Likewise.
9910 (gnat_to_gnu): Likewise.
9912 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9914 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9915 (NO_REORDER_ADAFLAGS): New variable.
9916 (EXTRA_GNATTOOLS): Always define.
9917 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9918 Clean up and adjust list of files compiled with special options.
9919 * gcc-interface/Make-lang.in: Likewise.
9920 (ada/decl.o): Cosmetical change.
9921 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9923 2011-04-20 Jim Meyering <meyering@redhat.com>
9925 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9927 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9929 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9930 $(CFLAGS) on the link line.
9932 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9934 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9935 padded type built for the return type if it is unconstrained.
9937 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9939 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9941 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9943 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9944 before calling TREE_CHAIN.
9945 * gcc-interface/misc.c (gnat_init_ts): New function.
9946 (LANG_HOOKS_INIT_TS): Define.
9948 2011-04-12 Martin Jambor <mjambor@suse.cz>
9950 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9951 instead of cgraph_node.
9953 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9955 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9956 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9959 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9961 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9962 of aggregate types that contain a placeholder.
9964 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9966 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9968 (handle_type_generic_attribute): Likewise.
9970 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9973 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9975 2011-04-04 Kai Tietz <ktietz@redhat.com>
9978 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9981 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9983 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9984 type case, do not strip a padding type around the array type.
9986 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9988 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9991 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9993 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9994 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9995 code for -feliminate-unused-debug-types.
9996 (gnat_post_options): Likewise.
9998 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10000 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10001 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10004 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10006 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10007 DECL_ARTIFICIAL flag on enumeration types.
10009 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10011 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10012 fat pointer types artificial unconditionally.
10013 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10016 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10018 * gcc-interface/gigi.h (get_dummy_type): Declare.
10019 (build_dummy_unc_pointer_types): Likewise.
10020 (finish_fat_pointer_type): Likewise.
10021 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10022 fat pointer type has been built, complete it in place.
10023 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10024 and thin pointers. Remove useless variable.
10025 (finish_fat_pointer_type): Make global and move to...
10026 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10027 (get_dummy_type): New function.
10028 (build_dummy_unc_pointer_types): Likewise.
10029 (gnat_pushdecl): Propage the name to the anonymous variants only.
10030 (update_pointer_to): Only adjust the pointer types in the unconstrained
10033 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10035 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10036 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10037 if this is a Taft amendment type and the full declaration is available.
10038 * gcc-interface/trans.c (process_type): Likewise.
10039 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10040 (process_freeze_entity): Likewise.
10041 * gcc-interface/utils.c (dummy_global): New static variable.
10042 (gnat_write_global_declarations): If there are types declared as used
10043 at the global level, insert them in the global hash table.
10045 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10047 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10048 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10049 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10051 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10052 flag of the type accordingly.
10053 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10055 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10057 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10058 finalizing types when updating the pointers to the designated type.
10059 <all>: Finalize the deferred types even if we didn't defer processing
10060 of incomplete types in this invocation.
10062 2011-04-01 Olivier Hainque <hainque@adacore.com>
10063 Nicolas Setton <setton@adacore.com>
10064 Eric Botcazou <ebotcazou@adacore.com>
10066 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10067 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10069 2011-03-28 Kai Tietz <ktietz@redhat.com>
10071 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10073 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10074 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10076 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10078 2011-03-28 Tristan Gingold <gingold@adacore.com>
10081 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10082 Use ada output of gnatbind.
10083 (ada/b_gnatb.adb): Ditto.
10084 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10085 (ada.mostlyclean, ada.stage1)
10086 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10087 (ada.stagefeedback): Adjust.
10088 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10089 Use ada output of gnatbind.
10090 (b_gnatm.adb): Ditto.
10091 (b_gnatl.o, b_gnatm.o): New rules.
10093 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10095 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10096 for the padded type built to support a specified size or alignment.
10098 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10100 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10101 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10102 unconditionally to the end of the unit when the designated type is
10104 <all>: Rename local variable. Attempt to un-defer types only and do it
10105 for limited_with'ed types as well.
10106 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10107 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10108 consistently and remove redundant call to finalize_from_with_types.
10110 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10112 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10113 subprograms without a previous spec declared in the same unit.
10114 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10115 subprograms at the end of the unit instead of at the beginning.
10116 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10117 isn't public for the special handling of non-inline functions nested
10118 inside inline external functions.
10120 2011-03-25 Jeff Law <law@redhat.com>
10122 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10124 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10126 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10127 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10128 to compute Set_Size_Depends_On_Discriminant.
10129 (Layout_Type): Call it on array types in back-end layout mode.
10130 * sem_util.adb (Requires_Transient_Scope): Return true for array
10131 types only if the size depends on the value of discriminants.
10132 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10133 type if the RHS is a call to a function that returns an unconstrained
10134 type with default discriminant.
10136 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10138 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10139 non-conversion to the nominal result type at the end.
10141 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10143 * gcc-interface/trans.c (create_temporary): New function taken from...
10144 (create_init_temporary): ...here. Call it.
10145 (call_to_gnu): Create the temporary for the return value early, if any.
10146 Create it for a function with copy-in/copy-out parameters if there is
10147 no target; in other cases of copy-in/copy-out, use another temporary.
10148 Push the new binding level lazily. Add and rename local variables.
10150 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10152 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10154 (set_rm_size): Likewise.
10156 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10158 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10159 for the padded type built in order to support a specified alignment.
10160 Fix incorrect formatting.
10162 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10165 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10167 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10169 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10170 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10171 to the end of the list. Adjust recursive call. Rename local variable.
10172 If REORDER is true, reorder components of the record type.
10173 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10174 components_to_record and adjust the parameter list.
10176 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10178 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10179 disabled, use the variable for bounds of loop iteration scheme.
10181 2011-03-21 Kai Tietz <ktietz@redhat.com>
10184 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10186 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10188 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10189 out whether the expression is read-only. Short-circuit placeholder
10190 case and rename a couple of local variables.
10192 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10194 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10195 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10196 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10197 (convert): Deal with conversions from a smaller form type specially.
10199 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10201 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10202 its argument, except for the special -I- switch.
10204 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10206 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10209 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10211 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10213 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10215 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10217 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10218 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10219 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10220 Do not generate the check directly, instead instantiate the template
10221 check present in the descriptor.
10222 (make_descriptor_field): Move around.
10223 (build_vms_descriptor32): Build a template check in the POINTER field.
10224 (build_vms_descriptor): Remove useless suffixes.
10225 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10227 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10230 * targext.c: Include target files if IN_RTS is defined.
10232 2011-01-26 Richard Guenther <rguenther@suse.de>
10235 * targext.c: Include config.h.
10236 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10239 2011-01-04 Pascal Obry <obry@adacore.com>
10240 Eric Botcazou <ebotcazou@adacore.com>
10242 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10244 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10246 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10247 end-of-case on the end label and its associated gotos, if any.
10249 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10251 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10252 expressions of the parameter cache within the statement group of
10253 the CICO mechanism.
10255 2011-01-04 Olivier Hainque <hainque@adacore.com>
10256 Eric Botcazou <ebotcazou@adacore.com>
10258 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10259 (set_end_locus_from_node): New function.
10260 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10261 make and the function end_locus.
10262 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10263 for the elaboration subprogram.
10264 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10265 set the end_locus of the expression as well.
10267 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10270 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10271 variables that are referenced in exception handlers volatile.
10275 Copyright (C) 2011 Free Software Foundation, Inc.
10277 Copying and distribution of this file, with or without modification,
10278 are permitted in any medium without royalty provided the copyright
10279 notice and this notice are preserved.