1 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3 * gcc-interface/Makefile.in (raise-gcc.o): Search
6 2011-08-05 Bob Duff <duff@adacore.com>
8 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
10 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
12 2011-08-05 Ed Schonberg <schonberg@adacore.com>
14 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
15 general indexing aspects of Ada2012. Called when analyzing indexed
16 components when other interpretations fail.
17 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
18 in an expression context where overloading is meaningful. This excludes
19 the occurrence in an aspect specification (efficiency only).
20 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
21 related to iterators can be set by an attribute specification, but
23 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
24 Constant_Indexing and Variable_Indexing.
25 (Check_Indexing_Functions): New procedure to perform legality checks.
26 Additional semantic checks at end of declarations.
28 2011-08-05 Sergey Rybin <rybin@adacore.com>
30 * tree_io.ads: Update ASIS_Version_Number because of the change of the
31 order of calling Tree_Write/Tree_Read routines made for aspects.
33 2011-08-05 Bob Duff <duff@adacore.com>
35 * a-fihema.adb (Finalize): Fix race condition.
37 2011-08-05 Yannick Moy <moy@adacore.com>
39 * sem_ch12.adb (Analyze_Package_Instantiation,
40 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
43 2011-08-05 Ed Schonberg <schonberg@adacore.com>
45 * sem_type.adb (Specific_Type): in an instance, the type-specific
46 operand of an equality check that involves null may have a private
47 type. Use full view to determine legality of construct.
49 2011-08-05 Vincent Celier <celier@adacore.com>
51 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
52 delete or close the file when the call to gnatmake was successful.
54 2011-08-05 Yannick Moy <moy@adacore.com>
56 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
59 2011-08-05 Ed Schonberg <schonberg@adacore.com>
61 * sinfo.ads: comments on use of entity field for aspect specifications.
63 2011-08-05 Ed Schonberg <schonberg@adacore.com>
65 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
66 node is not itself an entity but a selected component, it is a
67 rewritten parameterless call to an en enclosing synchronized operation,
68 and this expansion will be performed again in the instance, so there is
69 no global information to preserve.
71 2011-08-05 Javier Miranda <miranda@adacore.com>
73 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
74 for renamings of predefined primitives.
75 (In_Predef_Prims_DT): New subprogram.
77 2011-08-05 Ed Schonberg <schonberg@adacore.com>
79 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
80 possible interpretation of name is a reference type, add an
81 interpretation that is the designated type of the reference
82 discriminant of that type.
83 * sem_res.adb (resolve): If the interpretation imposed by context is an
84 implicit dereference, rewrite the node as the deference of the
85 reference discriminant.
86 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
87 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
88 parent type or base type.
89 * sem_ch4.adb (Process_Indexed_Component,
90 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
91 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
92 Check for implicit dereference.
93 (List_Operand_Interps): Indicate when an implicit dereference is
95 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
97 2011-08-05 Thomas Quinot <quinot@adacore.com>
99 * scos.ads: Update documentation of SCO table. Pragma statements can now
100 be marked as disabled (using 'p' instead of 'P' as the statement kind).
101 * par_sco.ads, par_sco.adb: Implement the above change.
102 (Process_Decisions_Defer): Generate a P decision for the first parameter
103 of a dyadic pragma Debug.
104 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
106 * put_scos.adb: Code simplification based on above change.
109 2011-08-05 Robert Dewar <dewar@adacore.com>
111 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
112 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
113 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
114 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
116 2011-08-05 Bob Duff <duff@adacore.com>
118 * a-stunau.ads, g-spipat.adb: Update comments.
120 2011-08-05 Bob Duff <duff@adacore.com>
122 * a-fihema.ads: Minor comment fix.
123 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
125 (Attach, Detach): Remove some unnecessary code.
126 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
128 2011-08-05 Bob Duff <duff@adacore.com>
130 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
131 allocation for Objects component. This simplifies the code somewhat. It
132 is also a little more efficient in the not-so-unusual case where there
133 are no controlled objects allocated.
134 Make Finalization_Started flag atomic.
135 (Finalize): Avoid unnecessary detachment of items from the list.
136 (pcol): Minor cleanup.
138 2011-08-05 Ed Schonberg <schonberg@adacore.com>
140 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
141 package whose name is the same as that of the generic unit, or its
144 2011-08-05 Bob Duff <duff@adacore.com>
146 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
147 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
150 2011-08-05 Arnaud Charlet <charlet@adacore.com>
152 * make.adb (Linking_Phase): No longer need to set source search path
153 before calling gnatlink in CodePeer mode.
154 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
155 gcc in CodePeer mode, since the binder generated file no longer has a
157 * switch.ads, switch.adb (Is_Language_Switch): Removed.
158 * switch-c.adb: Update comment.
160 2011-08-05 Thomas Quinot <quinot@adacore.com>
162 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
164 2011-08-05 Nicolas Roche <roche@adacore.com>
166 * gnat_ugn.texi: Fix minor syntax error issue.
168 2011-08-05 Vincent Celier <celier@adacore.com>
170 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
171 delete or close the file when the call to gnatmake returns a non
172 successful return code.
174 2011-08-05 Ed Schonberg <schonberg@adacore.com>
176 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
177 check, indicate that the copy of the original node does not come from
178 source, to prevent an infinite recursion of the expansion.
180 2011-08-05 Johannes Kanig <kanig@adacore.com>
182 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
183 VC generation for subprogram bodies.
185 2011-08-05 Yannick Moy <moy@adacore.com>
188 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
189 the base type with the smallest allowed base type.
191 2011-08-05 Sergey Rybin <rybin@adacore.com>
193 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
196 2011-08-05 Ed Schonberg <schonberg@adacore.com>
198 * sem_ch12.ads: minor comment updates.
200 2011-08-05 Ed Schonberg <schonberg@adacore.com>
202 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
203 instantiation and a formal package the compiler generates a package
204 renaming declaration so that the generic name within the declaration
205 is interpreted as a renaming of the instance. At the end of a formal
206 package declaration, this renaming must become invisible.
208 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
210 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
211 comparison and rely on concrete entities instead.
213 2011-08-05 Ed Schonberg <schonberg@adacore.com>
215 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
216 and discriminants, to indicate that the type has an access discriminant
217 that supports implicit dereference.
218 * snames.ads-tmpl: Add names of aspects and attributes related to
219 Ada2012 iterators: constant_indexing, default_iterator,
220 iterator_element, implicit_dereference, variable_indexing.
221 * aspects.ads, aspects.adb: entries for iterator-related aspects.
222 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
223 iterator-related aspects.
224 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
226 2011-08-05 Sergey Rybin <rybin@adacore.com>
228 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
229 metrics in gnatmetric to cover new kinds of coupling mentrics.
231 2011-08-05 Steve Baird <baird@adacore.com>
233 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
234 of calling the user-defined main subprogram.
235 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
236 is set) Call_Main_Subprogram ahead of, as opposed to
238 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
239 generation of a "with" of the user-defined main subprogram.
240 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
241 (which is now called from Gen_Main instead).
243 2011-08-05 Emmanuel Briot <briot@adacore.com>
245 * projects.texi: Added reference to the Makefile package.
247 2011-08-05 Thomas Quinot <quinot@adacore.com>
249 * exp_ch7.adb: Minor comment rewording.
251 2011-08-05 Ed Falis <falis@adacore.com>
253 * env.c: Fix comment.
255 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
257 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
258 character comparison and rely on concrete entities instead.
260 2011-08-05 Ed Schonberg <schonberg@adacore.com>
262 * sem_ch3.adb: (Check_Private_Overriding): better error message,
263 suggested by AI95-0068.
265 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
267 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
268 the two potential initialization calls. This accounts for any
269 access-before-elaboration checks which may precede the initialization
271 (Next_Suitable_Statement): New routine. Returns the next real statement
272 after the input node while skipping generated checks.
273 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
274 with comment on usage.
275 Do not generate Elaborate_All when the trigger is a finalization call
276 coming from a type init proc.
277 (Check_Elab_Call): Propagate the initialization procedure context to
278 subsequent calls to Check_A_Call.
279 (Check_Internal_Call_Continue): Propagate the initialization procedure
280 context to subsequent calls to Check_Elab_Call.
281 (Is_Finalization_Procedure): New routine. Returns True if the input
282 entity denotes a [Deep_]Finalize routine.
283 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
284 along with comment on usage.
286 2011-08-05 Vadim Godunko <godunko@adacore.com>
288 * s-atocou.ads: Add list of supported platforms.
290 2011-08-05 Yannick Moy <moy@adacore.com>
292 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
294 * opt.ads (Disable_ALI_File): new Boolean flag
295 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
297 2011-08-05 Ed Falis <falis@adacore.com>
299 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
300 environ is properly defined.
302 2011-08-05 Vincent Celier <celier@adacore.com>
304 * make.adb (Compilation_Phase): Exit immediately when all objects have
305 been found up to date, to avoid multiple exit messages.
306 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
307 same project for languages with no compiler.
308 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
310 2011-08-05 Robert Dewar <dewar@adacore.com>
312 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
313 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
314 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
315 s-atocou-builtin.adb: Minor reformatting.
317 2011-08-05 Yannick Moy <moy@adacore.com>
319 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
320 if the node to wrap is a pragma check, this node and enclosed
321 expression are not expanded, so do not apply any transformations here.
322 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
323 introducing transient scopes.
325 2011-08-05 Jose Ruiz <ruiz@adacore.com>
327 * adaint.c (__gnat_set_writable, __gnat_set_readable,
328 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
329 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
330 routine is available, so we use the default implementation of these
332 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
333 support for copying attributes on VxWorks 6.
335 2011-08-05 Yannick Moy <moy@adacore.com>
337 * debug.adb: Remove use of -gnatd.D.
338 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
339 * opt.ads: Simplify variables for ALFA mode, to keep one only
340 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
343 2011-08-05 Vincent Celier <celier@adacore.com>
345 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
346 Builder'Default_Switches.
348 2011-08-05 Vincent Celier <celier@adacore.com>
350 * makeusg.adb: Add lines for --create-map-file switches.
352 2011-08-05 Ed Schonberg <schonberg@adacore.com>
354 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
355 profile is incomplete and the full view is available, replace it with
357 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
358 incomplete, freezing the subprogram is delayed until the full view is
360 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
361 fixed-point multiplication operator and the predefined operator is
362 resolved in favor of the user-defined one.
364 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
366 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
369 2011-08-04 Ed Schonberg <schonberg@adacore.com>
371 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
372 whether a type lacks user-defined Read or Write operations, or has a
373 component that lacks them.
374 * sem_attr.adb (Check_Stream_Attribute): if restriction
375 No_Default_Stream_Attributes is active, verify that all subcomponent
376 types of the target have user-defined stream operations, and report
378 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
379 * exp_strm.adb: Build_Elementary_Input_Call,
380 Build_Elementary_Write_Call): remove checks for restriction
381 No_Default_Stream_Attributes, now checked in semantics.
383 2011-08-04 Vincent Celier <celier@adacore.com>
385 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
386 switches on the command line, look for all valid --RTS switches in the
387 Builder switches and for each language use the first runtime name found
389 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
390 command line and there is no auto-configuration.
391 (Runtime_Name_Set_For): New function.
393 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
395 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
396 elaborate initialization expression for variable Abort when processing
397 a package body or a declaration.
398 (Create_Finalizer): Propagate the package context when creating the
399 exception-related variables.
400 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
401 For_Package along with usage comment.
403 2011-08-04 Arnaud Charlet <charlet@adacore.com>
405 * gcc-interface/Makefile.in: Clean up targets.
406 Enable new package for atomic counters and copy-on-write implementation
407 of unbounded strings on x86 platforms.
408 * gcc-interface/Make-lang.in: Update dependencies.
410 2011-08-04 Robert Dewar <dewar@adacore.com>
412 * exp_ch7.adb: Minor reformatting.
414 2011-08-04 Robert Dewar <dewar@adacore.com>
416 * exp_strm.adb: Minor reformatting.
418 2011-08-04 Vadim Godunko <godunko@adacore.com>
420 * s-atocou.adb: Replace by dummy version and use on targets where atomic
421 operations are not supported.
422 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
423 * s-atocou-x86.adb: New file.
424 * Makefile.rtl: Add s-atocou.o file
426 2011-08-04 Arnaud Charlet <charlet@adacore.com>
428 * make.adb (Compile): Move setting of CodePeer_Mode to ...
429 (Compilation_Phase): ... here.
430 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
432 2011-08-04 Thomas Quinot <quinot@adacore.com>
434 * Make-generated.in: Fix minor typo in comment.
436 2011-08-04 Thomas Quinot <quinot@adacore.com>
438 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
441 2011-08-04 Robert Dewar <dewar@adacore.com>
443 * a-coinho.adb: Minor reformatting.
445 2011-08-04 Robert Dewar <dewar@adacore.com>
447 * a-coinho.ads: Minor reformatting.
449 2011-08-04 Vadim Godunko <godunko@adacore.com>
451 * s-atocou.ads, s-atocou.adb: New files.
452 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
453 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
454 direct use of GCC's atomic builtins and replace them by use of new
455 atomic counter package.
457 2011-08-04 Ed Schonberg <schonberg@adacore.com>
459 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
461 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
463 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
464 with a call to Get_External_Tag.
465 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
466 subprogram usage. Remove the guard against package declarations and
467 bodies since Build_Cleanup_Statements is no longer invoked in that
469 (Build_Components): Initialize Tagged_Type_Stmts when the context
470 contains at least one library-level tagged type.
471 (Build_Finalizer): New local variables Has_Tagged_Types and
472 Tagged_Type_Stmts along with associated comments on usage. Update the
473 logic to include tagged type processing.
474 (Create_Finalizer): Insert all library-level tagged type unregistration
475 code before the jump block circuitry.
476 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
477 (Expand_N_Package_Declaration): Remove the call to
478 Build_Cleanup_Statements.
479 (Process_Tagged_Type_Declaration): New routine. Generate a call to
480 unregister the external tag of a tagged type.
481 (Processing_Actions): Reimplemented to handle tagged types.
482 (Process_Declarations): Detect the declaration of a library-level
483 tagged type and carry out the appropriate actions.
484 (Unregister_Tagged_Types): Removed. The machinery has been directly
485 merged with Build_Finalizer.
487 2011-08-04 Robert Dewar <dewar@adacore.com>
489 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
490 gnatls.adb, exp_ch3.adb: Minor reformatting.
492 2011-08-04 Marc Sango <sango@adacore.com>
494 * sem_attr.adb (Analyze_Attribute): Replace the message
495 "invisible attribute of}" of the spark restriction violation in
496 attribute reference by the simple message "invisible attribute of type".
497 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
498 two insertion characters: '&' and '}'.
500 2011-08-04 Vadim Godunko <godunko@adacore.com>
502 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
503 * a-coinho.ads, a-coinho.adb: New file.
504 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
506 2011-08-04 Nicolas Roche <roche@adacore.com>
508 * alfa_test.adb: Not all ali files are containing alfa information even
509 if compiled with -gnatd.F. So suppress warning about missing ALFA
512 2011-08-04 Yannick Moy <moy@adacore.com>
514 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
516 * put_alfa.adb: Check that scope name is not empty.
518 2011-08-04 Ed Schonberg <schonberg@adacore.com>
520 * exp_ch3.adb (Stream_Operation_Ok): new predicate
521 Needs_Elementary_Stream_Operation, to determine whether user-defined
522 Read and Write attributes are available for the elementary components
523 of the given type. If only the predefined attributes are available,
524 then when restriction No_Default_Stream_Attributes is active the
525 predefined stream attributes for the composite type cannot be created.
527 2011-08-04 Robert Dewar <dewar@adacore.com>
529 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
530 Put routines in alpha order
532 2011-08-04 Jose Ruiz <ruiz@adacore.com>
534 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
535 * gcc-interface/Make-lang.in: Update dependencies.
537 2011-08-04 Arnaud Charlet <charlet@adacore.com>
539 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
540 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
543 2011-08-04 Robert Dewar <dewar@adacore.com>
545 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
546 lib-xref-alfa.adb: Minor reformatting.
548 2011-08-04 Marc Sango <sango@adacore.com>
550 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
551 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
552 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
555 2011-08-04 Tristan Gingold <gingold@adacore.com>
557 * bindgen.adb (Gen_Adainit_C): Remove.
558 (Gen_Adafinal_C): Ditto.
559 (Gen_Elab_Externals_C): Ditto.
560 (Gen_Elab_Calls_C): Ditto.
561 (Gen_Elab_Order_C): Ditto.
562 (Gen_Elab_Defs_C): Ditto.
563 (Gen_Finalize_Library_C): Ditto.
564 (Gen_Finalize_Library_Defs_C): Ditto.
566 (Gen_Output_File_C): Ditto.
567 (Gen_Restrictions_C): Ditto.
568 (Gen_Versions_C): Ditto.
569 (Write_Info_Ada_C): Ditto.
570 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
571 (Gen_Output_File): Do not force Ada_Bind_File anymore.
572 Always call Gen_Output_File_Ada.
573 * gnatlink.adb (Begin_Info): Now a constant.
575 (Ada_Bind_File): Remove
576 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
577 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
578 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
579 * opt.ads (Ada_Bind_File): Remove.
581 2011-08-04 Thomas Quinot <quinot@adacore.com>
583 * projects.texi: Document target-specific directory in default project
586 2011-08-04 Thomas Quinot <quinot@adacore.com>
588 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
591 2011-08-04 Yannick Moy <moy@adacore.com>
593 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
594 opt.ads, lib-xref.ads: Code clean up.
596 2011-08-04 Yannick Moy <moy@adacore.com>
598 * gnat_rm.texi: Update description of Test_Case
599 * gnat_ugn.texi: Typo.
601 2011-08-04 Ed Falis <falis@adacore.com>
603 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
605 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
607 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
608 it is of type Root_Controlled. This action eliminates fields Prev and
609 Next from type equality.
611 2011-08-04 Yannick Moy <moy@adacore.com>
613 * lib-xref-alfa.adb: Correct typo.
615 2011-08-04 Matthew Heaney <heaney@adacore.com>
617 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
620 2011-08-04 Yannick Moy <moy@adacore.com>
622 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
623 (Analyze_Pragma): allow static string expression for name of Test_Case,
624 instead of simply string literals.
625 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
628 2011-08-04 Vincent Celier <celier@adacore.com>
630 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
631 case suffixes to find truncated main sources.
633 2011-08-04 Tristan Gingold <gingold@adacore.com>
635 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
636 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
637 (Compute_Current_Task): Ditto.
639 2011-08-04 Tristan Gingold <gingold@adacore.com>
641 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
643 2011-08-04 Yannick Moy <moy@adacore.com>
645 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
646 library-level constant.
647 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
648 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
649 used as selector of parameter association, in ALFA mode.
651 2011-08-04 Robert Dewar <dewar@adacore.com>
653 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
654 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
657 2011-08-04 Arnaud Charlet <charlet@adacore.com>
659 * make.adb (Linking_Phase): Set source search path before calling
660 gnatlink in CodePeer mode.
662 2011-08-04 Javier Miranda <miranda@adacore.com>
664 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
665 Remove code which takes care of building TSDs.
666 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
667 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
668 the accessibility check in VM targets.
669 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
670 (Building_Static_DT): Now returns false for VM targets.
671 (Build_VM_TSDs): Removed.
672 (Expand_Interface_Conversion): Generate missing runtime check for
673 conversions to interface types whose target type is unknown at compile
675 (Make_VM_TSD): Add missing code to disable the generation of calls to
676 Check_TSD if the tagged type is not defined at library level, or not
677 has a representation clause specifying its external tag, or -gnatdQ is
679 * exp_disp.ads (Build_VM_TSDs): Removed.
680 (Make_VM_TSDs): Spec relocated from exp_disp.adb
681 * sem_disp.adb (Check_Dispatching_Operation): No code required to
682 register primitives in the dispatch tables in VM targets.
683 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
684 initialization of class-wide interface objects in VM targets.
685 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
688 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
690 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
691 when dotnet-ld cannot be found.
693 2011-08-04 Arnaud Charlet <charlet@adacore.com>
695 * bindgen.adb: Simplify significantly generation of binder body file in
697 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
698 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
701 2011-08-04 Yannick Moy <moy@adacore.com>
703 * sem_prag.adb, sem.ads: Code cleanup.
705 2011-08-04 Tristan Gingold <gingold@adacore.com>
707 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
708 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
710 * s-stusta.adb (Print): Adjust after changes in s-stausa.
711 * gnat_ugn.texi: Update dynamic stack usage section.
713 2011-08-04 Steve Baird <baird@adacore.com>
715 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
716 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
717 contains only a call to the user-defined main subprogram.
718 (Gen_Main_Ada) - If CodePeer_Mode is set, then
719 call the "wrapper" subprogram instead of directly
720 calling the user-defined main subprogram.
722 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
724 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
725 alternatives of a case statement for controlled objects. Rename local
726 variable A to Dead_Alt.
727 (Expand_N_If_Statement): Check the then and else statements of an if
728 statement for controlled objects. Check the then statements of all
729 elsif parts of an if statement for controlled objects.
730 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
732 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
733 detects a loop associated with the expansion of an array object.
734 Augment the processing of the loop statements to account for a possible
735 wrap done by Process_Statements_For_Controlled_Objects.
736 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
737 statements and abortable part of an asynchronous select for controlled
739 (Expand_N_Conditional_Entry_Call): Check the else statements of a
740 conditional entry call for controlled objects.
741 (Expand_N_Selective_Accept): Check the alternatives of a selective
742 accept for controlled objects.
743 (Expand_N_Timed_Entry_Call): Check the entry call and delay
744 alternatives of a timed entry call for controlled objects.
745 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
746 exception handler for controlled objects.
747 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
748 Add formal parameter Nested_Constructs along with its associated
750 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
751 Requires_Cleanup_Actions.
752 (Process_Statements_For_Controlled_Objects): New routine.
753 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
754 routine. Inspect a node which contains a non-handled sequence of
755 statements for controlled objects. If such an object is found, the
756 statements are wrapped in a block.
758 2011-08-04 Bob Duff <duff@adacore.com>
760 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
761 need to compare with Class_Wide_Type (T2), in order to get at the
762 original class-wide type node.
763 * sem_type.ads (Covers): Improve the comment.
764 * einfo.ads (Class_Wide_Type): Improve the comment.
765 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
766 the type of the Deref.
768 2011-08-04 Yannick Moy <moy@adacore.com>
770 * gnat_rm.texi: Document that Test_Case pragma can only appear on
771 separate declarations.
772 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
773 check identifier of pragma argument.
774 (Chain_TC): check that no other test case associated to the same entity
776 (Check_Test_Case): disallow test case inside subprogram body
777 (Analyze_Pragma): correct call to check identifier and not argument
778 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
779 function gets name from test case pragma.
781 2011-08-04 Yannick Moy <moy@adacore.com>
783 * gnat_rm.texi: Document new pragma and aspect.
784 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
785 (No_Duplicates_Allowed): new constant array defining whether duplicates
786 aspects of each kind can appear on the same declaration.
787 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
788 field, which points to a node holding the previous Spec_PPC_List.
789 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
790 through the indirection with Contract.
791 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
792 * par-prag.adb (Prag): do nothing on Test_Case pragma
793 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
795 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
796 component Ensures of Test_Case.
797 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
798 (Analyze_Generic_Subprogram_Declaration,
799 Analyze_Subprogram_Instantiation,
800 Analyze_Abstract_Subprogram_Declaration,
801 Analyze_Subprogram_Body_Helper,
802 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
803 insert contract in subprogram node at point of definition
805 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
806 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
808 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
809 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
810 similar to the analysis of pre/post
811 (Derive_Subprogram): insert contract in subprogram node at point of
813 * sem_prag.adb, sem_prag.ads
814 (Check_Arg_Is_String_Literal, Check_Identifier):
815 new checking procedures to be called in treatment of pragmas
816 (Check_Test_Case): new procedure to check that a Test_Case aspect or
817 pragma is well-formed. This does not check currently that 'Result is
818 used only in the Ensures component of a Test_Case.
819 (Analyze_Pragma): add case for Test_Case
820 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
821 components of a Test_Case.
822 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
823 expressions in the 3rd (and 4th if present) arguments of a Test_Case
824 pragma, treated as spec expressions.
825 (Sig_Flags): add value -1 for Test_Case.
826 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
827 Get_Requires_From_Test_Case_Pragma): getters for both expression
828 components of a Test_Case.
829 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
830 indirection between an entry or [generic] subprogram entity and its
831 pre/post + test-cases.
832 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
833 get/set for fields of an N_Contract node.
834 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
835 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
836 names and pragma for Test_Case.
837 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
839 2011-08-04 Vincent Celier <celier@adacore.com>
841 * gnat_ugn.texi: Improve documentation of gnatmake switch
844 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
846 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
847 type). Initialize Atyp to the appropriate type which is later checked
848 for completion. Rewrite the assertion associated with private type
851 2011-08-04 Ed Falis <falis@adacore.com>
853 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
854 initialize the number of CPUs.
856 2011-08-04 Ed Schonberg <schonberg@adacore.com>
858 * sem_type.adb (Disambiguate): New subsidiary routine
859 In_Same_Declaration_List, to implement AI05-0020: a user-defined
860 equality on an anonymous access type whose designated type is private
861 does not lead to an ambiguity with the universal access equality
862 operator in the body or child units of the defining package. The same
863 is true for a multiplication operator on a private type completed with
866 2011-08-04 Javier Miranda <miranda@adacore.com>
868 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
869 (Normalize_Scalars_Config): Removed.
871 (Register_Opt_Config_Switches): Remove registering config values of
872 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
873 (Restore_Opt_Config_Switches): Remove code which restores the values of
874 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
875 Init_Or_Norm_Scalars.
876 (Save_Opt_Config_Switches): Remove code which saves values of
877 Init_Or_Norm_Scalars and Normalize_Scalars.
878 (Set_Opt_Config_Switches): Remove code which restores config values of
879 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
880 Init_Or_Norm_Scalars.
882 2011-08-04 Yannick Moy <moy@adacore.com>
884 * frontend.adb (Frontend): remove previous patch to avoid full
885 qualification in ALFA mode.
886 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
887 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
888 unique name for an entity, which could be used to identify the entity
889 across compilation units.
891 2011-08-04 Thomas Quinot <quinot@adacore.com>
894 (Initialize_Default_Project_Path): Add target specific directory
895 ($prefix/$target/lib/gnat) in front of project path in all cases
896 (making gnatmake's behaviour consistent with gprbuild).
897 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
898 Pass target name from Sdefault to project subsystem.
899 * gnatls.adb: Show new target specific default project directory.
901 2011-08-04 Johannes Kanig <kanig@adacore.com>
903 * cstand.adb: Add Information to Identifier in Standard
904 (Identifer_For): Set Entity to the corresponding entity
906 2011-08-04 Sergey Rybin <rybin@adacore.com>
908 * gnat_ugn.texi: Update doc on gnatcheck.
910 2011-08-04 Yannick Moy <moy@adacore.com>
912 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
915 2011-08-04 Yannick Moy <moy@adacore.com>
917 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
918 performing expansion.
919 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
920 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
921 it is not called in ALFA mode.
923 2011-08-04 Emmanuel Briot <briot@adacore.com>
925 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
926 after all, so removed.
928 2011-08-04 Sergey Rybin <rybin@adacore.com>
930 * vms_data.ads: Add missing VMS qualifiers.
932 2011-08-04 Emmanuel Briot <briot@adacore.com>
934 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
935 the list of files on the command line after processing it through
938 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
940 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
941 processing for .NET/JVM. These targets can now benefit from
942 Raise_From_Controlled_Operation and they share the same processing with
944 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
945 These targets need transient scopes in order to properly finalize short
946 lived controlled objects.
947 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
948 NET/JVM. These targets can now benefit from
949 Raise_From_Controlled_Operation and they share the same processing with
952 2011-08-04 Geert Bosch <bosch@adacore.com>
954 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
956 2011-08-04 Ed Schonberg <schonberg@adacore.com>
958 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
959 Expand_Record_Aggregate, to determine whether aggregate must be
960 expanded into assignments. This is the case if the ancestor part is
961 private, regarless of the setting of the flag Has_Private_Ancestor.
963 2011-08-04 Ed Falis <falis@adacore.com>
965 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
967 2011-08-04 Bob Duff <duff@adacore.com>
969 * sinfo.ads: Fix comment.
971 2011-08-04 Steve Baird <baird@adacore.com>
973 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
974 choose a package name in much the same way as is
975 done for JGNAT when VM_Target /= No_VM, except that
976 a slightly more distinctive prefix string is used.
978 2011-08-04 Emmanuel Briot <briot@adacore.com>
980 * makeutl.adb (Complete_Mains): no longer accept unit names on the
981 gnatmake command line.
982 This behavior was never documented (and was supported only because of
983 an early bug in the code). This case might lead to ambiguous cases
984 (between unit names and truncated base names without suffixes).
986 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
988 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
989 Remove the external tag of a tagged type from the internal hash table.
990 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
991 expanded usage of the routine. Strenghten the check for Is_Master. Add
992 processing for tagged types.
993 (Build_Finalizer): Create all the necessary lists used in finalizer
994 creation when the processed context is a package that may contain
996 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
997 Requires_Cleanup_Actions.
998 (Expand_N_Package_Body): Package bodies may need clean up code
999 depending on whether they contain tagged types.
1000 (Expand_N_Package_Declaration): Package declarations may need clean up
1001 code depending on whether they contain tagged types.
1002 (Unregister_Tagged_Types): New routine. Search through a list of
1003 declarations or statements, looking for non-abstract Ada tagged types.
1004 For each such type, generate code to unregister the external tag.
1005 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1006 Requires_Cleanup_Actions.
1007 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1008 through a list of declarations or statements looking for non-abstract
1009 Ada tagged types or controlled objects.
1010 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1011 Requires_Cleanup_Actions.
1012 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1013 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1016 2011-08-04 Vincent Celier <celier@adacore.com>
1018 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1019 has Ada sources, not project Project, because if the root project
1020 Project has no sources of its own, all projects will be deemed without
1023 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1025 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1026 of the No_Param_Proc acc-to-subp type used for initialization of
1027 __gnat_finalize_library_objects so that it's declared at library level
1028 rather than nested inside of the adainit routine.
1030 2011-08-04 Javier Miranda <miranda@adacore.com>
1032 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1033 if the tagged type has a representation clause which specifies its
1036 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1038 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1039 Remove previous procedure with that name.
1040 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1042 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1043 subtype mark, the ancestor cannot have unknown discriminants.
1044 (Resolve_Record_Aggregate): if the type has invisible components
1045 because of a private ancestor, the aggregate is illegal.
1047 2011-08-04 Vincent Celier <celier@adacore.com>
1049 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1050 account switches -gnat2005, -gnat12 and -gnat2012.
1052 2011-08-04 Bob Duff <duff@adacore.com>
1054 * s-tasdeb.ads: Minor comment fix.
1056 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1058 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1060 * switch.ads, switch.adb (Is_Language_Switch): New function.
1062 2011-08-04 Vincent Celier <celier@adacore.com>
1064 * switch-c.adb: Minor comment addition.
1066 2011-08-04 Vincent Celier <celier@adacore.com>
1068 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1069 ending with '=' is followed by a space (missing file name).
1071 2011-08-04 Pascal Obry <obry@adacore.com>
1073 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1075 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1077 * sem_ch12.adb (Analyze_Associations): New routine
1078 Check_Overloaded_Formal_Subprogram to reject a formal package when
1079 there is a named association or a box initialisation for an overloaded
1080 formal subprogram of the corresponding generic.
1082 2011-08-04 Yannick Moy <moy@adacore.com>
1084 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1085 * get_alfa.adb, put_alfa.adb: Read and write new component of
1087 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1089 2011-08-04 Pascal Obry <obry@adacore.com>
1091 * urealp.adb: Minor reformatting.
1093 2011-08-04 Tristan Gingold <gingold@adacore.com>
1095 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1096 Handle the case when Cleanup_Protected_Object returns Empty.
1098 2011-08-04 Yannick Moy <moy@adacore.com>
1100 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1102 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1104 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1105 call, ignore functions.
1107 2011-08-04 Geert Bosch <bosch@adacore.com>
1109 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1112 2011-08-04 Emmanuel Briot <briot@adacore.com>
1114 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1115 as an index for Builder'Switches. This conforms to the documentation.
1116 * make.adb (Insert_Project_Sources): avoid duplicate code
1118 2011-08-04 Emmanuel Briot <briot@adacore.com>
1120 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1121 name on the command line (for instance "../dummy"), never assume it can
1124 2011-08-04 Tristan Gingold <gingold@adacore.com>
1126 * bindgen.adb: Remove code the reference or create the
1127 Break_Start/__gnat_break_start procedure.
1128 * s-stalib.adb (Break_Start): Removed.
1130 2011-08-04 Emmanuel Briot <briot@adacore.com>
1132 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1133 shared with gprbuild.
1135 2011-08-04 Yannick Moy <moy@adacore.com>
1137 * par-ch4.adb (P_Primary): preferentially issue an error message about
1138 a missing parenthesis arount a conditional or case expression in Ada
1139 2012 mode, if we detect that the alignment is not correct for a
1142 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1144 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1145 tag-to-class-wide conversion as needing finalization actions.
1146 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1147 a tag-to-class-wide conversion as needing finalization actions.
1148 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1149 conversion does not need finalization actions.
1150 (Is_Tag_To_CW_Conversion): New routine.
1151 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1152 whether an object is the result of a tag-to-class-wide conversion.
1154 2011-08-04 Yannick Moy <moy@adacore.com>
1156 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1157 the left-hand-side and right-hand-side of a conjunct are inserted when
1158 translating a pre- or postcondition
1159 * sem_ch6.adb: Correct typo in comment
1161 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1163 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1164 Unchecked_Conversion and Unchecked_Deallocation.
1166 2011-08-04 Thomas Quinot <quinot@adacore.com>
1168 * make.adb: Minor reformatting.
1170 2011-08-04 Emmanuel Briot <briot@adacore.com>
1172 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1173 sources in the project and its imported projects, but not in the whole
1176 2011-08-04 Emmanuel Briot <briot@adacore.com>
1178 * make.adb: Remove debug trace.
1180 2011-08-04 Vincent Celier <celier@adacore.com>
1182 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1183 path in canonical form, to be able to compare path names on platforms
1184 such as Windows or Darwin.
1186 2011-08-04 Thomas Quinot <quinot@adacore.com>
1188 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1189 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1190 * scos.ads: Update documentation accordingly.
1191 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1194 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1196 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1197 attribute only if prefix type is scalar.
1199 2011-08-04 Emmanuel Briot <briot@adacore.com>
1201 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1202 in gnatmake for specifying mains on the command line that do not belong
1203 to the main project. These mains must currently all belong to the same
1205 (Ultimate_Extension_Of): removed, since duplicated
1206 Ultimate_Extending_Project.
1208 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1210 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1212 (CodePeer_Mode_String): New.
1213 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1215 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1216 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1217 mode, since no useful elaboration subprogram is needed by CodePeer.
1218 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1219 In this mode, compile binder file with -gnatC and do stop after this
1222 2011-08-04 Vincent Celier <celier@adacore.com>
1224 * exp_ch7.adb: Minor comment fix.
1226 2011-08-04 Robert Dewar <dewar@adacore.com>
1228 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1229 exp_ch4.adb, makeutl.adb: Minor reformatting.
1231 2011-08-04 Emmanuel Briot <briot@adacore.com>
1233 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1234 Create several new subprograms to move code out of Make. This makes the
1235 code more readable, removes code duplication, and is a preparation work
1236 for adding support for aggregate projects.
1238 2011-08-04 Tristan Gingold <gingold@adacore.com>
1240 * s-po32gl.ads, s-po32gl.adb: New files.
1241 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1242 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1243 (Build_Finalization_Collection): Use it.
1244 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1245 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1247 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1248 * gcc-interface/Make-lang.in: Update dependencies.
1250 2011-08-04 Emmanuel Briot <briot@adacore.com>
1252 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1255 2011-08-04 Emmanuel Briot <briot@adacore.com>
1257 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1258 command line is not a file name, also check whether it could be a unit
1261 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1263 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1264 the header of the finalization routine.
1265 If the unit has no finalizer but is a body whose spec has one, then
1266 generate the decrement of the elaboration entity only.
1267 If the unit has a finalizer and is a spec, then do not generate the
1268 decrement of the elaboration entity.
1269 (Gen_Finalize_Library_C): Likewise.
1271 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1273 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1274 (Bounds_Size_Expression): Removed.
1275 (Double_Alignment_Of): New subsidiary routine.
1276 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1277 for a hole in the dope vector of unconstrained arrays due to different
1278 index and element alignments.
1280 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1282 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1283 raise program_error because body has not been seen yet.
1285 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1287 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1290 2011-08-04 Vincent Celier <celier@adacore.com>
1292 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1294 2011-08-04 Yannick Moy <moy@adacore.com>
1296 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1297 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1299 2011-08-04 Thomas Quinot <quinot@adacore.com>
1301 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1302 instantiation in RCI.
1304 2011-08-04 Emmanuel Briot <briot@adacore.com>
1306 * make.adb: Share more code with gprbuild
1308 2011-08-04 Emmanuel Briot <briot@adacore.com>
1310 * projects.texi: Added documentation for the IDE'Gnat project file
1313 2011-08-04 Nicolas Roche <roche@adacore.com>
1315 * gnat_rm.texi: Minor editing.
1317 2011-08-04 Javier Miranda <miranda@adacore.com>
1319 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1320 and the library case for VM targets.
1321 (Gen_Adainit_Ada): Likewise.
1323 2011-08-04 Robert Dewar <dewar@adacore.com>
1325 * g-altive.ads: Minor comment updates.
1326 * prj-nmsc.adb: Minor reformatting.
1328 2011-08-04 Javier Miranda <miranda@adacore.com>
1331 (Normalize_Scalars_Config): Value of the configuration switch set by
1332 pragma Normalize_Scalars when it appears in the gnat.adc file.
1333 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1334 to save and restore settings of this pragma.
1336 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1337 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1339 2011-08-04 Vincent Celier <celier@adacore.com>
1341 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1343 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1345 * makeutl.adb: Minor reformatting.
1347 2011-08-04 Olivier Hainque <hainque@adacore.com>
1349 * g-altive.ads: Update comments to reflect that only the soft
1350 binding is available today.
1352 2011-08-04 Robert Dewar <dewar@adacore.com>
1354 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1355 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1356 * gcc-interface/Make-lang.in: Update dependencies.
1358 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1360 * prj-env.adb: Remove local debug traces.
1362 2011-08-04 Yannick Moy <moy@adacore.com>
1364 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1365 was used instead of Hi_OK, which could cause a read of an uninitialized
1366 value later on. Detected while working on the new warning.
1367 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1369 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1370 in more cases, in order to detect more unreferenced values.
1371 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1372 object for expression, if any.
1374 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1376 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1377 the operand types instead of the Esize.
1379 2011-08-04 Steve Baird <baird@adacore.com>
1381 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1382 enable CodePeer_Mode.
1383 * bindusg.adb (Display): Add help message describing -P binder switch.
1384 * gnat_ugn.texi: Document -P binder switch.
1385 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1386 user-defined main program directly.
1387 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1388 user-defined main program in the context clause of the package body.
1390 2011-08-04 Yannick Moy <moy@adacore.com>
1392 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1393 duplicate of Defining_Entity
1394 (Get_Unique_Entity_For_Decl): rename function into
1395 Unique_Defining_Entity
1396 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1397 (Formal_Proof_On): remove synthesized flag
1398 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1399 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1400 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1401 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1402 Annotate (Formal_Proof)
1404 2011-08-04 Emmanuel Briot <briot@adacore.com>
1406 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1407 source files with non-standard naming schemes, in imported projects
1409 2011-08-04 Emmanuel Briot <briot@adacore.com>
1411 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1412 specified on the gprbuild command line, we need to compile all units
1413 within that file, not just the first one we find
1414 Fix error message for mains that are not found.
1416 2011-08-04 Thomas Quinot <quinot@adacore.com>
1418 * sem_ch6.adb: Update comment.
1419 * sem_ch12.adb: Minor reformatting.
1421 2011-08-04 Bob Duff <duff@adacore.com>
1423 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1424 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1425 race condition whose symptom is to fail to lock Parent. That, in turn,
1426 causes Parent.Awake_Count to be accessed without locking Parent, which
1427 causes another race condition whose symptom is that Parent.Awake_Count
1428 can be off by 1 (either too high or too low). The solution is to lock
1429 Parent unconditionally, and then lock Acceptor, before reading
1430 Acceptor.Terminate_Alternative.
1432 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1434 * debug.adb: Update comment.
1436 2011-08-04 Robert Dewar <dewar@adacore.com>
1438 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1439 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1440 exp_ch6.adb: Minor reformatting.
1442 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1444 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1447 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1449 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1451 2011-08-04 Thomas Quinot <quinot@adacore.com>
1453 * sinfo.ads: Minor reformatting.
1455 2011-08-04 Emmanuel Briot <briot@adacore.com>
1457 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1458 even if there is no location.
1460 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1462 * sem_res.adb, sem_ch4.adb: move check for restriction
1463 No_Task_Hierarchy to resolve_allocator.
1465 2011-08-04 Thomas Quinot <quinot@adacore.com>
1467 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1468 This flag of N_Pragma nodes is not used, remove it as well as all of
1469 the associated circuitry.
1471 2011-08-04 Javier Miranda <miranda@adacore.com>
1473 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1474 runtime check on duplicated externa tags
1475 * debug.adb Document switch -gnatdQ.
1477 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1479 * a-fihema.ads: Minor typo fix.
1481 2011-08-04 Yannick Moy <moy@adacore.com>
1483 * sem_ch10.adb: Minor comment update.
1485 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1487 * einfo.adb: Update the node field usage to reflect the renaming of
1488 Return_Flag to Return_ Flag_Or_Transient_Decl.
1489 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1490 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1491 (Write_Field15_Name): Change Return_Flag to
1492 Return_Flag_Or_Transient_Decl.
1493 * einfo.ads: Rename node field Return_Flag to
1494 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1495 occurrences in entities.
1496 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1497 associated Inline pragma.
1498 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1499 associated Inline pragma.
1500 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1502 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1503 Return_Flag and Set_Return_Flag.
1504 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1505 objects generated for controlled transients declared inside an
1506 Exception_With_Actions. Update the calls to Return_Flag.
1507 (Process_Object_Declaration): Add code to add a null guard for hook
1508 objects generated for controlled transients declared inside an
1509 Exception_With_Actions. Update related comment.
1510 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1511 objects generated for controlled transients declared inside an
1512 Exception_With_Actions. Update the calls to Return_Flag.
1513 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1515 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1517 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1518 positional aggregate.
1520 2011-08-04 Vincent Celier <celier@adacore.com>
1522 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1523 SLOC only for pragmas.
1525 2011-08-04 Emmanuel Briot <briot@adacore.com>
1527 * projects.texi: Minor typo fix.
1529 2011-08-04 Emmanuel Briot <briot@adacore.com>
1531 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1532 on case-sensitive file systems.
1534 2011-08-04 Thomas Quinot <quinot@adacore.com>
1536 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1537 nested in a disabled pragma.
1538 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1539 enclosing pragma, if any, for X decisions.
1541 2011-08-04 Thomas Quinot <quinot@adacore.com>
1543 * sem_prag.adb: Minor reformatting.
1545 2011-08-04 Vincent Celier <celier@adacore.com>
1547 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1548 allowed in no run time mode.
1550 2011-08-04 Vincent Celier <celier@adacore.com>
1552 * make.adb (Check): When -gnatc is used, check for the source file
1553 inside the ALI file with a canonical case file name.
1555 2011-08-04 Emmanuel Briot <briot@adacore.com>
1557 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1558 overriding the separator.
1560 2011-08-04 Robert Dewar <dewar@adacore.com>
1562 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1563 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1565 2011-08-04 Robert Dewar <dewar@adacore.com>
1567 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1569 2011-08-04 Yannick Moy <moy@adacore.com>
1571 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1572 'Result only appears in postcondition of function.
1574 2011-08-04 Thomas Quinot <quinot@adacore.com>
1576 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1577 external tag, include the value of the external tag in the exception
1580 2011-08-04 Yannick Moy <moy@adacore.com>
1582 * sem_attr.adb (Result): modify error message for misplaced 'Result
1584 2011-08-04 Sergey Rybin <rybin@adacore.com>
1586 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1587 clear that the second argument must be an identifier.
1589 2011-08-04 Thomas Quinot <quinot@adacore.com>
1591 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1592 -fpreserve-control-flow, insert an IF statement on the barrier
1593 condition to ensure that a conditional branch instruction is generated.
1595 2011-08-04 Emmanuel Briot <briot@adacore.com>
1597 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1598 (Processing_Flags.Ignore_Missing_With): new flag.
1600 2011-08-04 Emmanuel Briot <briot@adacore.com>
1602 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1603 Source_List_File on case-insensitive systems where the file is actually
1604 on a case-sensitive file system (NFS,...).
1606 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1608 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1609 function return contains a controlled [extension] aggregate and the
1610 return statement is not part of a handled sequence of statements, wrap
1611 the return in a block. This ensures that all controlled temporaries
1612 generated during aggregate resolution will be picked up by the
1613 finalization machinery.
1615 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1617 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1618 components, freeze type before resolution, to ensure that default
1619 initializations are present for all components.
1620 * sem_res.adb (Resolve_Actuals): the designated object of an
1621 accces-to-constant type is a legal actual in a call to an
1622 initialization procedure.
1624 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1626 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1627 N_Unchecked_Type_Conversion to the possible containers of a renamed
1630 2011-08-04 Yannick Moy <moy@adacore.com>
1632 * par-ch13.adb (Aspect_Specifications_Present): recognize
1633 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1634 is issued in Strict mode.
1635 * par.adb: Fix typos in comments.
1637 2011-08-04 Yannick Moy <moy@adacore.com>
1639 * sem_attr.adb (Result): modify error message to take into account Post
1640 aspect when compiling Ada 2012 (or newer) code.
1642 2011-08-04 Nicolas Roche <roche@adacore.com>
1644 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1645 remove need for GCC exceptions.
1647 2011-08-04 Vincent Celier <celier@adacore.com>
1649 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1650 project, not the source file name.
1651 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1652 excluded, continue looking. This excluded source will only be returned
1653 if there is no other source with the same base name that is not locally
1656 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1658 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1659 private and one of the operands is a real literal, use a qualified
1660 expression rather than a conversion which is not meaningful to the
1663 2011-08-04 Yannick Moy <moy@adacore.com>
1665 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1666 corresponding aspect X'Class are allowed, proceed with analysis of the
1667 aspect instead of skipping it.
1669 2011-08-04 Tristan Gingold <gingold@adacore.com>
1671 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1672 This will allow to have an Ada implementation for the subprogram.
1674 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1676 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1677 completion and aspects are present, apply them to the entity for the
1678 type which is currently the partial view, but which is the one that
1680 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1681 applies to a partial view, indicate that the full view has predicates
1682 and delayed aspects.
1683 (Replace_Type_Reference): Handle properly predicates that apply to the
1684 full view of a private completion.
1686 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1688 * layout.adb (Layout_Type): For composite types, do not set Esize.
1689 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1691 (Size_Known): Look at the RM size of components instead of the Esize.
1692 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1693 issue warning and activate Implicit_Packing.
1694 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1695 if the Esize is not known.
1696 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1697 for elementary types only.
1698 (Analyze_Record_Representation_Clause): Look at the RM size instead
1699 of the Esize to issue errors.
1700 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1702 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1704 Look at the RM size instead of the Esize for types if the latter is
1706 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1708 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1710 * sem_type.adb: proper handling of equality not involving anonymous
1713 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1715 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1716 Vis_Decls. When creating a library-level finalizer for a package spec,
1717 both the declaration and body of the finalizer are inserted either in
1718 the visible or private declarations of the package spec.
1720 2011-08-04 Javier Miranda <miranda@adacore.com>
1722 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1723 use of the full-view of a type when invoking Is_Ancestor.
1724 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1725 the full-view of private parents is requested, then use also the
1726 full-view of the parent of the first derivation.
1728 2011-08-04 Tristan Gingold <gingold@adacore.com>
1730 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1731 instead of the locally imported procedure.
1732 * s-taprop-mingw.adb (Enter_Task): Ditto.
1733 * s-valrea.adb (Scan_Real): Ditto.
1734 * s-imgrea.adb (Set_Image_Real): Ditto.
1735 * s-flocon.ads: Make the package pure.
1737 2011-08-04 Thomas Quinot <quinot@adacore.com>
1739 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1740 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1741 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1742 New subprogram, moved here from...
1743 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1744 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1745 rewriting of the last argument into a procedure call statement here...
1746 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1749 2011-08-04 Thomas Quinot <quinot@adacore.com>
1751 * par_sco.adb: Minor reformatting.
1753 2011-08-04 Robert Dewar <dewar@adacore.com>
1755 * erroutc.adb: Minor reformatting.
1757 2011-08-04 Thomas Quinot <quinot@adacore.com>
1759 * par_sco.adb: Comment update.
1761 2011-08-04 Tristan Gingold <gingold@adacore.com>
1763 * s-flocon.ads: New file.
1764 * g-flocon.ads: Now a renaming of s-flocon.
1765 * Makefile.rtl: Add s-flocon.o
1767 2011-08-04 Javier Miranda <miranda@adacore.com>
1769 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1770 constrained, do not attempt to build a subtype of it.
1772 2011-08-04 Yannick Moy <moy@adacore.com>
1774 * errout.ads Change comments: remove 'R'M as an example where quotes
1775 are needed; add ALFA as another case where quotes are not needed
1776 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1777 case where quotes are not needed.
1778 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1779 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1780 Remove all occurrences of 'A'L'F'A
1782 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1784 * sem_ch13.adb: check legality of invariant pragma.
1786 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1788 * bindgen.adb: Add comments.
1790 2011-08-04 Yannick Moy <moy@adacore.com>
1792 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1794 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1795 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1797 2011-08-04 Robert Dewar <dewar@adacore.com>
1799 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1800 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1801 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1803 2011-08-04 Thomas Quinot <quinot@adacore.com>
1805 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1807 2011-08-04 Thomas Quinot <quinot@adacore.com>
1810 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1813 2011-08-04 Robert Dewar <dewar@adacore.com>
1815 * einfo.ads, exp_ch4.adb: Minor reformatting.
1817 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1819 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1821 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1823 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1824 type in all cases to compute list of primitive operations, because full
1825 view may be an itype that is not attached to the list of declarations.
1827 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1829 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1830 library has already been finalized.
1831 (Gen_Adafinal_C): Likewise.
1832 (Gen_Adainit_Ada): Generate an early return if the library has
1833 already been elaborated.
1834 (Gen_Adainit_C): Likewise.
1835 (Gen_Output_File_Ada): Generate an elaboration flag.
1836 (Gen_Output_File_C): Likewise.
1838 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1840 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1841 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1842 built in the first place.
1843 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1844 for CodePeer because Finalize_Address was not built to begin with.
1845 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1847 2011-08-04 Pascal Obry <obry@adacore.com>
1849 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1850 filenames, this ensures unicity of filenames across processes.
1852 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1854 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1855 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1856 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1857 Add False as the actual to From_Abort in the generated call to
1858 Raise_From_Controlled_Operation.
1860 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1862 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1863 so that the ali file name can be retrieved from outside of this package.
1864 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1865 doing nothing in the general case, but used to update the object file
1866 timestamp if directly generated by the backend.
1867 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1868 to a later time than the ali file one.
1870 2011-08-04 Yannick Moy <moy@adacore.com>
1872 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1873 entities whose body contains an Annotate pragma which forces formal
1875 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1876 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1877 Mark_Non_ALFA_Subprogram to pass in a message and node.
1878 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1879 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1880 surrounding subprogram.
1881 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1882 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1883 as not in ALFA is annotated with Formal_Proof being On, then an error
1884 is issued based on the additional parameters for message and node.
1885 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1886 * gcc-interface/Make-lang.in: Update dependencies.
1888 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1890 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1891 Finalize_Address when CodePeer is enabled.
1893 2011-08-04 Pascal Obry <obry@adacore.com>
1895 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1896 the latter returns a pointer to a static buffer which is deallocated
1897 at the end of the routine.
1899 2011-08-04 Yannick Moy <moy@adacore.com>
1901 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1902 after index creation; mark unconstrained base array type generated as
1903 being in/not in ALFA as well
1904 (Make_Index): mark subtype created as in/not in ALFA
1905 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1906 over a loop as in/not in ALFA, depending on its type and form of loop
1909 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1911 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1912 directly to False on .NET and JVM.
1914 2011-08-04 Yannick Moy <moy@adacore.com>
1916 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1917 constraint that subtype must come from source code to be in ALFA, so
1918 that anonymous subtypes can be in ALFA too.
1920 2011-08-04 Yannick Moy <moy@adacore.com>
1922 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1923 reference for ALFA mode.
1924 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1925 procedure public so as to use it from formal verification back-end.
1927 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1929 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1930 invalid checks of the Parameter, making Remove_Switch not working
1933 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1935 * targparm.ads: Update header: no run-time exception is needed on this
1938 2011-08-04 Vincent Celier <celier@adacore.com>
1940 * a-fihema.adb: Use System.IO instead of GNAT.IO
1942 2011-08-04 Thomas Quinot <quinot@adacore.com>
1944 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1945 are forbidden in Compiler_Unit mode.
1947 2011-08-04 Robert Dewar <dewar@adacore.com>
1949 * sem_util.adb: Minor reformatting.
1951 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1953 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
1954 library-level finalizers.
1955 (Gen_Finalize_Library_C): Update the import string for library-level
1957 (Gen_Finalize_Library_Defs_C): Update the definition name of a
1958 library-level finalizer.
1959 * exp_ch7.adb: Remove with and use clauses for Stringt.
1960 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
1961 Spec_Decl. Add local variable Body_Id. The names of library-level
1962 finalizers are now manually fully qualified and are no longer external.
1963 A single name is now capable of servicing .NET, JVM and non-VM targets.
1964 Pragma Export is no longer required to provide visibility for the name.
1965 (Create_Finalizer_String): Removed.
1966 (New_Finalizer_Name): New routine which mimics New_..._Name.
1968 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1970 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
1971 elaboration counter to Standard_Short_Integer.
1972 * sem_util.adb (Build_Elaboration_Entity): Likewise.
1973 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
1974 (Gen_Elab_Externals_C): Likewise.
1976 2011-08-04 Ed Falis <falis@adacore.com>
1978 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1979 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1980 system-vxworks-mips.ads, system-vxworks-x86.ads
1981 (Always_Compatible_Rep): set to False for all VxWorks targets.
1983 2011-08-04 Robert Dewar <dewar@adacore.com>
1985 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
1986 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
1987 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
1988 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
1989 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
1990 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
1991 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
1992 Minor reformatting and code reorganization.
1994 2011-08-04 Emmanuel Briot <briot@adacore.com>
1996 * projects.texi: Added doc for aggregate projects.
1998 2011-08-04 Emmanuel Briot <briot@adacore.com>
2000 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2001 Add support for overriding the Project_Path in aggregate projects.
2003 2011-08-04 Robert Dewar <dewar@adacore.com>
2005 * a-cofove.ads: Minor reformatting.
2007 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2009 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2010 on the generated code.
2011 (Build_Finalize_Statements): Update the comment on the generated code.
2012 (Build_Initialize_Statements): Update the comment on the generated code.
2013 (Build_Object_Declarations): Add local variable Result. The object
2014 declarations are now built in sequence.
2015 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2018 2011-08-04 Robert Dewar <dewar@adacore.com>
2020 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2022 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2024 * einfo.ads (Elaboration_Entity): Document new definition and use.
2025 (Elaboration_Entity_Required): Adjust to above change.
2026 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2027 * exp_ch12.adb: And with and use for Snames.
2028 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2029 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2030 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2031 <Check_Unit_Name>: Deal with N_Expanded_Name.
2032 <Attribute_Elaborated>: Extend to all unit names.
2033 * sem_elab.adb: And with and use for Uintp.
2034 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2035 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2036 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2037 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2038 from Gen_Adainit_Ada.
2039 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2040 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2041 case, do not call System.Standard_Library.Adafinal; instead call
2042 finalize_library if needed.
2043 (Gen_Adafinal_C): Likewise.
2044 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2045 non-main program case.
2046 (Gen_Adainit_C): Generate a couple of external declarations here.
2047 In the main program case, set SSL.Finalize_Library_Objects.
2048 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2049 (Gen_Elab_Calls_C): Likewise.
2050 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2051 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2052 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2054 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2055 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2057 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2058 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2059 of external declarations. Â Call Gen_Finalize_Library_C.
2061 2011-08-04 Emmanuel Briot <briot@adacore.com>
2063 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2064 Compute_Compilation_Phases): new subprogram.
2065 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2066 The number of mains as well as the various compilation phases that
2067 need to be run are now project tree specific, since various
2068 aggregated trees might have different requirements. In particular,
2069 they do not all require bind or link phases.
2071 2011-08-04 Emmanuel Briot <briot@adacore.com>
2073 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2074 (Project_Tree_Appdata): New type.
2075 It is now possible to associate application-specific data to a project
2076 tree. In particular, this is used in the gprbuild builder to avoid a
2077 number of global tables and htables, especially now that there can be
2078 several project trees loaded at once because of aggregate projects.
2079 (Debug_Name): new procedure.
2080 * projects.texi: Clarify syntax of "**" for Source_Dirs
2082 2011-08-03 Emmanuel Briot <briot@adacore.com>
2084 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2085 the "roots" for a main.
2086 (Fill_From_Project): add support for aggregate projects. Main units
2087 in aggregated projects are now automatically added in the list of
2088 files to build (although this fails later on in gprbuild, because
2089 these files are not using the root proejct tree, so this needs
2091 * gcc-interface/Make-lang.in: Update dependencies.
2093 2011-08-03 Yannick Moy <moy@adacore.com>
2095 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2096 conditional expression in ALFA.
2097 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2098 expressions as not in ALFA.
2100 2011-08-03 Robert Dewar <dewar@adacore.com>
2102 * a-cofove.adb: Minor reformatting.
2104 2011-08-03 Emmanuel Briot <briot@adacore.com>
2106 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2107 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2109 These packages are more logically placed in the Queue package, since
2110 they manipulate the queue. It is also likely that they can be adapted
2111 for gnatmake, thus sharing more code.
2112 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2113 that we could move the above.
2115 2011-08-03 Emmanuel Briot <briot@adacore.com>
2117 * errutil.adb (Finalize): clean up the list of error messages on exit.
2118 Calling this subprogram multiple times will no longer show duplicate
2119 error messages on stderr.
2121 2011-08-03 Emmanuel Briot <briot@adacore.com>
2123 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2124 Getopt_Switches when we have already define a command line
2127 2011-08-03 Yannick Moy <moy@adacore.com>
2129 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2130 in ALFA. Instead, they are considered as assertions to prove.
2131 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2132 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2133 if they have no ELSE part, or if they occur in pre- and postconditions,
2134 where the Condition cannot have side-effects in ALFA
2135 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2136 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2137 Instead, include type conversion between scalar types in ALFA.
2138 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2139 if-and-only-if its type is in ALFA.
2141 2011-08-03 Thomas Quinot <quinot@adacore.com>
2143 * scos.adb, get_scos.adb, put_scos.adb
2144 New code letter for decisions: G (entry guard)
2146 (Traverse_Subprogram_Body): Rename to...
2147 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2148 (Traverse_Protected_Body): New subprogram
2149 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2150 protected bodies and entry bodies.
2152 2011-08-03 Yannick Moy <moy@adacore.com>
2154 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2155 entities with get/set subprograms, which is set on procedure entities
2156 generated by the compiler for a postcondition.
2157 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2158 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2159 entity for a declaration
2160 (Get_Unique_Entity_For_Decl): new function returning an entity which
2161 represents a declaration, so that matching spec and body have the same
2164 2011-08-03 Robert Dewar <dewar@adacore.com>
2166 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2167 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2169 2011-08-03 Yannick Moy <moy@adacore.com>
2171 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2172 library-level because retriction No_Implicit_Dynamic_Code in the
2173 front-end prevents its definition as a local subprogram
2174 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2175 for reuse in other contexts
2176 (Traverse_Declarations_Or_Statements,
2177 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2178 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2179 procedures take a callback parameter to be called on all declarations
2181 (Traverse_All_Compilation_Units): new generic function to traverse a
2182 compilation unit and call a callback parameter on all declarations
2184 2011-08-03 Javier Miranda <miranda@adacore.com>
2186 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2187 in Java since they are always enclosed in a namespace that
2188 differentiates them, and overloaded entities are supported by the VM.
2190 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2192 * checks.adb (Determine_Range): If a computed bound of an operation is
2193 outside the range of the base type of the expression, and overflow
2194 checks are enabled, the result is unknown and cannot be used for any
2195 subsequent constant folding.
2196 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2197 unknown, so is the result of the comparison.
2199 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2201 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2202 From_Abort. When finalization was triggered by an abort, propagate
2203 Standard'Abort_Signal rather than Program_Error.
2204 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2206 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2207 From_Abort. When finalization was triggered by an abort, propagate
2208 Standard'Abort_Signal rather than Program_Error.
2209 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2211 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2212 Abort_Id. Update the calls to Build_Object_Declarations and
2213 Build_Raise_Statement to include Abort_Id.
2214 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2215 calls to Build_Object_Declarations and Build_Raise_Statement to include
2217 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2218 calls to Build_Object_Declarations and Build_Raise_Statement to include
2220 (Build_Components): Create an entity for Abort_Id when exceptions are
2221 allowed on the target.
2222 (Build_Finalizer): New local variable Abort_Id.
2223 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2224 calls to Build_Object_Declarations and Build_Raise_Statement to include
2226 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2227 declaration of flag Abort_Id to preserve the original abort status
2228 before finalization code is executed.
2229 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2230 runtime routine Raise_From_Controlled_Operation.
2231 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2232 Abort_Id. Update the call to Build_Object_Declarations to include
2233 Abort_Id. Update the layout of the finalizer body.
2234 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2235 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2236 clunky code to create all flags and objects related to
2237 exception propagation and replace it with a call to
2238 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2240 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2241 Add new formal Abort_Id and associated comment on its use.
2242 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2244 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2245 Remove the clunky code to create all flags and objects related to
2246 exception propagation and replace it with a call to
2247 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2249 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2251 * s-tassta.adb: Fix minor typos.
2253 2011-08-03 Robert Dewar <dewar@adacore.com>
2255 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2256 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2258 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2260 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2261 to packages. This ensures that the finalizer body will not end up
2262 inside the freeze node.
2263 (Process_Declarations): Add code to detect whether a freeze node has a
2264 nested finalization collection.
2266 2011-08-03 Pascal Obry <obry@adacore.com>
2268 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2269 (Current_Session): Return a not null access to Session_Type.
2270 (Default_Session): Likewise.
2272 2011-08-03 Robert Dewar <dewar@adacore.com>
2274 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2275 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2277 2011-08-03 Pascal Obry <obry@adacore.com>
2279 * g-awk.ads: Minor comment fix.
2281 2011-08-03 Sergey Rybin <rybin@adacore.com>
2283 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2284 the tree structure related to discriminant constraints.
2285 Original_Discriminant cannot be used any more for computing the
2286 defining name for the reference to a discriminant.
2288 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2290 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2291 function is not visibly tagged, this is not a dispatching call and
2292 therfore is not Tag_Indeterminate, even if the function is marked as
2293 dispatching on result.
2295 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2297 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2298 (Expand_N_Free_Statement): Add a guard to protect against run-times
2299 which do not support controlled types.
2300 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2301 against run-times which do not support controlled types.
2302 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2303 against run-times which do not support controlled types.
2304 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2305 against run-times which do not support controlled types.
2306 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2307 protect against run-times which do not support controlled types.
2309 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2311 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2312 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2314 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2316 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2317 modified in the source, to prevent spurious warnings when compiling
2320 2011-08-03 Thomas Quinot <quinot@adacore.com>
2322 * a-except-2005.adb: Minor reformatting.
2324 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2326 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2327 is a renaming declaration in the private part of a package, do not emit
2328 a warning that the with_clause could be moved because the renaming may
2329 be used in the body or in a child unit.
2331 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2333 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2334 Propagate the Comes_From_Source attribute from the original return
2335 object to the renaming.
2337 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2339 * exp_ch7.adb (Build_Raise_Statement): Do not call
2340 Raise_From_Controlled_Operation when this routine is not present in
2341 the run-time library.
2342 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2343 libraries (Ravenscar), tasks are non-terminating, and protected objects
2344 and tasks can only appear at library level, so we do not want
2345 finalization of protected objects nor tasks.
2346 * exp_intr.adb: Minor clarification in comment.
2347 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2348 Gen_Output_File_C): Remove references to finalization of library-level
2349 objects when using restricted run-time libraries.
2351 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2353 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2354 Original_Discriminant only if the parent type is a generic formal.
2356 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2358 * exp_ch13.adb: Add with and use clause for Targparm;
2359 (Expand_N_Free_Statement): Prevent the generation of a custom
2360 Deallocate on .NET/JVM targets since this requires pools and address
2362 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2363 .NET/JVM targets, attach the newly allocated object to the access
2364 type's finalization collection. Do not generate a call to
2365 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2366 exist in the runtime.
2367 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2368 create a custom Allocate for object that do not require initialization.
2369 Attach a newly allocated object to the access type's finalization
2370 collection on .NET/JVM.
2371 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2372 assignment of controlled types on .NET/JVM. The two hidden pointers
2373 Prev and Next and stored and later restored after the assignment takes
2375 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2376 kludge for .NET/JVM to recognize a particular piece of code coming from
2377 Heap_Management and change the call to Finalize into Deep_Finalize.
2378 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2379 finalization collections on .NET/JVM only for types derived from
2380 Controlled. Separate the association of storage pools with a collection
2381 and only allow it on non-.NET/JVM targets.
2382 (Make_Attach_Call): New routine.
2383 (Make_Detach_Call): New routine.
2384 (Process_Object_Declarations): Suppress the generation of
2385 build-in-place return object clean up code on .NET/JVM since it uses
2387 * exp_ch7.ads (Make_Attach_Call): New routine.
2388 (Make_Detach_Call): New routine.
2389 * exp_intr.adb Add with and use clause for Targparm.
2390 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2391 on .NET/JVM targets.
2392 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2393 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2394 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2395 names used in finalization.
2397 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2399 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2400 (Attach, Detach): Lock the current task when chaining an object onto a
2403 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2405 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2406 Rewritten to create the message strings when the exception is not
2407 raised by an abort during finalization.
2408 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2409 Raise_From_Controlled_Operation and update its associated comment.
2410 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2411 Ada.Finalization.Heap_Management provides key functionality
2412 associated with controlled objects on the heap, their creation,
2413 finalization and reclamation. Type Finalization_Collection is
2414 effectively a wrapper which sits ontop of a storage pool and performs
2415 all necessary bookkeeping for all the objects it contains. Each
2416 access-to-controlled or access-to-class-wide type receives a collection
2417 as part of its expansion. The compiler generates buffer code and
2418 invokes Allocate / Deallocate to create and destroy allocated
2420 * a-finali.adb ("="): Removed.
2421 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2422 fields Prev and Next.
2423 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2424 A library unit with at least one controlled object on the library level
2425 has a special finalizer which is invoked by the binder. To signal this,
2426 ali files carry field PF.
2427 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2428 associated comment on field usage.
2429 * a-tags.adb (Get_RC_Offset): Removed.
2430 (Needs_Finalization): New routine.
2431 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2432 Dispatch tables now carry field Needs_Finalization which provides
2433 runtime indication whether a type is controlled or has controlled
2434 components or both. Remove field RC_Offset.
2435 (Get_RC_Offset): Removed along with its associated pragma Export.
2436 Since tagged types with controlled components no longer carry hidden
2437 field _controller, the special mechanism to retrieve its location is no
2439 (Needs_Finalization): New routine.
2440 * atree.ads, atree.adb (Elist24): New routine.
2441 (Set_Elist24): New routine.
2442 * atree.h: Add a define clause for Elist24.
2443 * bindgen.adb New library-level variable Lib_Final_Built.
2444 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2445 presence of a VM target, the routine generates calls to the proper
2446 library finalization routine.
2447 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2448 targets. Set the correct library finalization routine depending on
2449 whether the library has controlled objects or this is a VM compilation.
2450 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2451 to library-level finalizers of compiled units in reverse order of
2452 elaboration. It also produces exception management code and reraises a
2453 potential exception after all units have been finalized.
2454 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2455 library-level finalizers of compiled units in reverse order of
2457 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2458 definitions of all library-level finalizers available to the compilation
2459 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2461 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2462 System.Standard_Library.Adafinal directly. If the library needs
2463 finalization actions, create the sequence of finalization calls.
2464 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2465 Generate a with clause for System.Soft_Links when compiling for a VM.
2466 Remove the code which imports System.Standard_Library.Adafinal as
2467 Do_Finalize. Generate the library finalization routine.
2468 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2469 If the library needs finalization actions, create all the definitions
2470 of library- level finalizers.
2471 (Has_Finalizer): New routine. Determines whether at least one compiled
2472 unit has a library-level finalizer.
2473 Add type Qualification_Mode.
2474 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2475 * einfo.adb: New usage of field 15 as Return_Flag.
2476 Remove Finalization_Chain_Entity from the usages of field 19.
2477 Remove Associated_Final_Chain from the usages of field 23.
2478 New usage of field 23 as Associated_Collection.
2479 New usage of field 24 as Finalizer.
2480 New usage of flag 252 as Is_Processed_Transient.
2481 (Associated_Final_Chain): Removed.
2482 (Associated_Collection): New routine.
2483 (Finalization_Chain_Entity): Removed.
2484 (Finalizer): New routine.
2485 (Is_Finalizer): New routine.
2486 (Is_Processed_Transient): New routine.
2487 (Return_Flag): New routine.
2488 (Set_Associated_Final_Chain): Removed.
2489 (Set_Associated_Collection): New routine.
2490 (Set_Finalization_Chain_Entity): Removed.
2491 (Set_Finalizer): New routine.
2492 (Set_Is_Processed_Transient): New routine.
2493 (Set_Return_Flag): New routine.
2494 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2496 (Write_Field8_Name): Alphabetize the output.
2497 (Write_Field11_Name): Alphabetize the output.
2498 (Write_Field12_Name): Alphabetize the output.
2499 (Write_Field13_Name): Alphabetize the output.
2500 (Write_Field14_Name): Alphabetize the output.
2501 (Write_Field15_Name): Alphabetize the output.
2502 (Write_Field16_Name): Alphabetize the output.
2503 (Write_Field17_Name): Alphabetize the output.
2504 (Write_Field18_Name): Alphabetize the output.
2505 (Write_Field19_Name): Alphabetize the output. Remove the output of
2506 Finalization_Chain_Entity.
2507 (Write_Field20_Name): Alphabetize the output.
2508 (Write_Field21_Name): Alphabetize the output.
2509 (Write_Field22_Name): Alphabetize the output.
2510 (Write_Field23_Name): Alphabetize the output. Remove the output of
2511 Associated_Final_Chain. Add output for Associated_Collection.
2512 (Write_Field24_Name): Alphabetize the output.
2513 (Write_Field25_Name): Add output for Finalizer.
2514 (Write_Field26_Name): Alphabetize the output.
2515 (Write_Field27_Name): Alphabetize the output.
2516 (Write_Field28_Name): Alphabetize the output.
2517 * einfo.ads: Add new field description for Associated_Collection and
2519 Remove Associated_Final_Chain and its uses in nodes.
2520 Remove Finalization_Chain_Entity and its uses in nodes.
2521 Add new field description for Finalizer and its uses in nodes.
2522 Add new synthesized attribute Is_Finalizer.
2523 Add new flag description for Is_Processed_Transient and its uses in
2525 Add new field description for Return_Flag and its uses in nodes.
2526 (Associated_Final_Chain): Removed along with its pragma Inline.
2527 (Associated_Collection): New routine and pragma Inline.
2528 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2529 (Finalizer): New routine and pragma Inline.
2530 (Is_Finalizer): New routine and pragma Inline.
2531 (Is_Processed_Transient): New routine and pragma Inline.
2532 (Return_Flag): New routine and pragma Inline.
2533 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2534 (Set_Associated_Collection): New routine and pragma Inline.
2535 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2536 (Set_Finalizer): New routine and pragma Inline.
2537 (Set_Is_Processed_Transient): New routine and pragma Inline.
2538 (Set_Return_Flag): New routine and pragma Inline.
2539 * exp_aggr.adb: Alphabetize subprograms.
2540 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2541 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2542 associated comments. Remove local variables External_Final_List and
2544 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2545 Ancestor. Remove the retrieval of finalization lists. Update the call to
2547 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2548 lists. Update the call to Late_Expansion.
2549 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2550 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2551 (Gen_Assign): Remove the retrieval of the finalization list used to
2552 build the assignment. Update the calls to Make_Init_Call and
2554 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2555 Remove the mechanism to determine attachment levels and finalization
2556 list retrieval. Remove the processing for coextensions.
2557 (Init_Controller): Removed. Controllers no longer exist.
2558 (Late_Expansion): Remove formals Flist and Obj along with their
2559 associated comments. Update the calls to Build_Record_Aggr_Code and
2560 Build_Array_Aggr_Code.
2561 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2562 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2563 appear in entry bodies, protected subprograms and task bodies.
2564 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2565 * exp_ch3.adb (Add_Final_Chain): Removed.
2566 (Build_Array_Init_Proc): Alphabetize local variables.
2567 (Build_Assignment): Alphabetize local variables. Update the call to
2569 (Build_Class_Wide_Master): Rename local variables to better reflect
2571 (Build_Discriminant_Assignments): Code reformatting.
2572 (Build_Init_Call_Thru): Code reformatting.
2573 (Build_Init_Procedure): Code reformatting. Generate a special version
2574 of Deep_Finalize which is capable of finalizing all initialized
2575 components and ignore the rest.
2576 (Build_Init_Statements): Rename local variables to better reflect their
2578 Reimplement the mechanism to include the creation and update of an index
2579 variable called a "counter". It is used as a bookmark for tracing
2580 initialized and non-initialized components.
2581 (Build_Initialization_Call): Remove local variable Controller_Typ.
2582 Alphabetize all local variables. Remove the initialization of the
2583 record controller and update the call to Make_Init_Call.
2584 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2585 New local variable Counter.
2586 (Constrain_Array): Alphabetize.
2587 (Expand_Freeze_Array_Type): Create a collection instead of a
2589 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2590 Finalize_Address which is used in conjunction with allocated controlled
2592 (Expand_N_Object_Declaration): Remove the creation of a finalization
2593 list for anonymous access types. Update the calls to Make_Init_Call and
2595 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2596 retrieval of finalization lists. Remove the expansion of the record
2597 controller. Create TSS primitive Finalize_Address used in conjunction
2598 with controlled objects on the heap. Create finalization collections
2599 for access-to-controlled record components.
2600 (Expand_Record_Controller): Removed.
2601 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2602 class-wide types now requires additional processing. Create
2603 finalization collections for access-to-controlled types.
2604 (Increment_Counter): New routine.
2605 (Make_Counter): New routine.
2606 (Make_Eq_If): Remove the mention of Name_uController.
2607 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2608 types coming from System.Finalization_Root.
2609 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2610 (Predefined_Primitive_Bodies): There is no longer need to skip types
2611 coming from System.Finalization_Root.
2612 (Stream_Operation_OK): Do not generate stream routines for
2613 type Ada.Finalization.Heap_Management.Finalization_Collection.
2614 * exp_ch3.ads: Alphabetize subprograms.
2615 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2616 Add with and use clause for Lib.
2617 (Complete_Coextension_Finalization): Removed.
2618 (Complete_Controlled_Allocation): New routine. Create a finalization
2619 collection for anonymous access-to-controlled types. Create a custom
2620 Allocate which interfaces with the back end and the machinery in
2622 (Expand_Allocator_Expression): Add necessary calls to
2623 Complete_Controlled_Allocation. Remove the retrieval of finalization
2624 lists. Update the calls to Make_Adjust_Call. Generate a call to
2625 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2626 the associated collection.
2627 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2628 Code clean up. Remove the retrieval of finalization lists and
2630 Update the call to Make_Init_Call. Generate a call to
2631 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2632 the associated collection.
2633 (Get_Allocator_Final_List): Removed. Finalization lists are not
2635 (Suitable_Element): Remove the mention of Name_uController.
2636 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2637 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2638 the left hand side, carry out the assignment and adjust the left hand
2640 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2641 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2642 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2643 BIP_Collection and BIPcollection.
2644 (Build_Heap_Allocator): New routine used to allocate the return object
2645 of a build-in-place function onto a collection.
2646 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2647 (Expand_Call): Do not replace direct calls to Deep routines with their
2649 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2650 and update their occurrences. Add a special return flag to monitor the
2651 [ab]normal execution of the function. The flag is set right before the
2653 Rewrite the mechanism used to allocate a build-in-place return object
2654 on the heap or on a storage pool.
2655 (Is_Direct_Deep_Call): New routine.
2656 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2657 build-in-place function call instead of a final list. Build a call to
2658 Set_Finalize_Address_Ptr to decorate the associated collection.
2659 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2660 order to name the build-in-place function call's result for later
2661 finalization. Add a collection to a build-in-place function call
2662 instead of a final list.
2663 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2664 build-in-place function call instead of a final list. Remove the code
2665 which moves one final list and transforms it into the actual in a
2666 nested build-in-place call.
2667 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2668 build-in-place function call instead of a final list.
2669 (Move_Final_List): Removed.
2670 (Needs_BIP_Collection): New routine.
2671 (Needs_BIP_Final_List): Removed.
2672 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2673 enumeration type BIP_Formal_Kind.
2674 Update the related comment.
2675 (Needs_BIP_Collection): New routine.
2676 (Needs_BIP_Final_List): Removed.
2677 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2678 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2679 majority of subprograms in this unit. Add Name_Finalize_Address to
2680 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2681 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2682 statements for an array type.
2683 (Build_Adjust_Statements): Create the adjust statements for a record
2685 (Build_Cleanup_Statements): New routine. A procedure which given any
2686 construct containing asynchronous calls, references to _master, or is a
2687 task body, a task allocation or a protected body produces the necessary
2688 runtime calls to clean up these constructs.
2689 (Build_Exception_Handler): New routine.
2690 (Build_Final_List): Removed.
2691 (Build_Finalization_Collection): New routine. A core procedure which
2692 creates a collection to service heap allocated controlled objects
2693 associated with an access-to-controlled type.
2694 (Build_Finalize_Statements): Create the finalization statements for a
2696 (Build_Finalizer): New routine. A core procedure which given any
2697 construct with declarations and/or statements detects all objects which
2698 need any type of clean up (controlled objects, protected objects) and
2699 generates all necessary code to clean up the said objects in the proper
2701 (Build_Finalizer_Call): New routine.
2702 (Build_Initialize_Statements): Create the initialization statements for
2703 an array type. The generated routine contains code to finalize partially
2705 (Build_Object_Declarations): New routine.
2706 (Build_Raise_Statement): New routine.
2707 (Clean_Simple_Protected_Objects): Removed.
2708 (Controller_Component): Removed.
2709 (Enclosing_Function): New routine.
2710 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2711 either declarations or statements or both.
2712 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2713 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2715 (Find_Final_List): Removed.
2716 (Global_Flist_Ref): Removed.
2717 (In_Finalization_Root): Removed.
2718 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2719 scope in terms of tree nodes. Process all transient variables within
2721 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2722 generated after the adjust.
2723 (Make_Attach_Call): Removed.
2724 (Make_Call): New routine.
2725 (Make_Clean): Removed.
2726 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2728 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2730 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2732 (Make_Final_Call): Modified to simply create a call to either
2733 Deep_Finalize or Finalize.
2734 (Make_Finalize_Address_Body): New routine.
2735 (Make_Finalize_Address_Stmts): New routine. A function which produces
2736 TSS primitive Finalize_Address used in conjunction with heap allocated
2738 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2739 (Make_Init_Call): Rewritten. There is no longer an attach call
2740 generated after initialization.
2741 (Make_Local_Deep_Finalize): New routine.
2742 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2743 (Make_Transient_Block): Remove the finalization list retrieval and
2745 (Needs_Finalization): Moved to Exp_Util.
2746 (Parent_Field_Type): New routine.
2747 (Preprocess_Components): New routine.
2748 (Process_Transient_Objects): New routine.
2749 (Wrap_HSS_In_Block): New routine.
2750 (Wrap_Transient_Declaration): Remove finalization list management and
2751 controller insertion.
2752 (Wrap_Transient_Expression): Code reformatting.
2753 (Wrap_Transient_Statement): Code reformatting.
2754 * exp_ch7.ads (Build_Final_List): Removed.
2755 (Build_Finalization_Collection): New routine.
2756 (Build_Raise_Statement): New routine.
2757 (Controller_Component): Removed.
2758 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2759 (Find_Final_List): Removed.
2760 (In_Finalization_Root): Removed.
2761 (Is_Simple_Protected_Type): Update related comment.
2762 (Make_Adjust_Call): New parameter profile and associated comments.
2763 (Make_Attach_Call): Removed.
2764 (Make_Final_Call): New parameter profile and associated comments.
2765 (Make_Finalize_Address_Body): New routine.
2766 (Make_Init_Call): New parameter profile and associated comments.
2767 (Make_Local_Deep_Finalize): New routine.
2768 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2769 (Needs_Finalization): Moved to Exp_Util.
2770 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2771 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2772 (Find_Protection_Type): Moved to Exp_Util.
2773 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2774 (Make_DT): Update sequence of dispatch table initialization. Remove the
2775 initialization of field RC_Offset. Add initialization of field Needs_
2777 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2778 Reimplement how an object is first finalized, then deallocated.
2779 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2781 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2782 Register TSS_Finalize_Address with type TSS_Names.
2783 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2784 procedure provides the interface between an allocation / deallocation
2785 and the support machinery in Ada.Finalization.Heap_Management.
2786 (Find_Init_Call): Code reformatting.
2787 (Find_Init_Call_In_List): Code reformatting.
2788 (Find_Protection_Type): Moved from Exp_Ch9.
2789 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2790 (Has_Controlled_Coextensions): Removed.
2791 (Has_Controlled_Objects): New routine.
2792 (In_Library_Level_Package_Body): New routine.
2793 (Insert_Action_After): New routine.
2794 (Is_Finalizable_Transient): New routine. This predicate determines
2795 whether an object declaration is one of the many variants of controlled
2797 (Is_Null_Access_BIP_Func_Call): New routine.
2798 (Is_Non_BIP_Func_Call): New routine.
2799 (Is_Related_To_Func_Return): New routine.
2800 (Needs_Finalization): Moved from Exp_Ch7.
2801 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2802 (Find_Protection_Type): Moved from Exp_Ch9.
2803 (Has_Controlled_Coextensions): Removed.
2804 (Has_Controlled_Objects): New routine.
2805 (In_Library_Level_Package_Body): New routine.
2806 (Insert_Action_After): New routine.
2807 (Is_Finalizable_Transient): New routine.
2808 (Is_Null_Access_BIP_Func_Call): New routine.
2809 (Is_Non_BIP_Func_Call): New routine.
2810 (Is_Related_To_Func_Return): New routine.
2811 (Needs_Finalization): Moved from Exp_ch7.
2812 * expander.adb (Expand): Add a case for N_Free_Statement.
2813 * freeze.adb (Freeze_All): Replace the generation of a finalization
2814 list with a collection for access-to-controlled types.
2815 (Freeze_Entity): Code reformatting.
2816 (Freeze_Record_Type): Remove the freezing of a record controller
2818 (Freeze_Subprogram): Code reformatting.
2819 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2821 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2822 has a library-level finalizer.
2823 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2824 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2825 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2826 files. Add a-fihema to the list of object files.
2828 Alphabetize the associations in type Is_Parameterless_Attribute.
2829 * rtsfind.ads: Ada.Finalization_List.Controller and
2830 System.Finalization_Implementation are no longer a GNAT unit.
2831 Update the range of type Ada_Finalization_Child. Remove the following
2832 recoverable entities:
2834 RE_Attach_To_Final_List
2838 RE_Finalizable_Ptr_Ptr
2839 RE_Global_Final_List
2840 RE_Limited_Record_Controller
2843 RE_Record_Controller
2844 RE_Simple_List_Controller
2846 Add the following recoverable entities:
2848 RE_Add_Offset_To_Address
2852 RE_Exception_Identity
2853 RE_Finalization_Collection
2854 RE_Finalization_Collection_Ptr
2855 RE_Needs_Finalization
2856 RE_Save_Library_Occurrence
2857 RE_Set_Finalize_Address_Ptr
2858 RE_Set_Storage_Pool_Ptr
2860 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2862 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2863 (First_Stored_Discriminant): Remove the mention of Name_uController.
2864 * sem_aux.ads: Comment reformatting.
2865 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2866 to redecorate an already existing class-wide type.
2867 (Decorate_Tagged_Type): New parameter profile and associated comment.
2868 Create a "shadow class-wide type" for a shadow entity.
2869 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2870 of the final chain along with the associated comment.
2871 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2872 Full_Desig and set it to the full view of the designated type.
2873 Initialize the finalization collection to empty.
2874 (Build_Derived_Record_Type): Alphabetize local variables. Code
2876 (Collect_Fixed_Components): Remove the mention of Name_uController.
2877 (Create_Constrained_Components): Remove the mention of Name_uController.
2878 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2879 class-wide type of a shadow entity.
2880 (Process_Full_View): Update the machinery which marks type
2881 Limited_Controlled's entity as limited.
2882 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2883 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2884 list, instead make a collection build-in-place formal.
2885 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2886 a designated type in order to establish a match between the renaming
2887 and the renamed entity.
2888 (Find_Selected_Component): Add guard to prevent spurious exceptions
2889 from being raised on .NET/JVM.
2890 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2891 to the list of primitive that need special processing. Update arrays
2892 C_Names and D_Names.
2893 (Replace_Types): Handle class-wide types.
2894 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2895 different parameter profile, look at the first formal.
2896 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2897 use clauses for Exp_Util.
2898 * sem_res.adb: Remove with and use clauses for Elists.
2899 (Propagate_Coextensions): Removed.
2900 (Resolve_Allocator): Do not propagate the list of coextensions from one
2901 allocator to another.
2902 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2903 Deaccessed_T to Desig_Typ.
2904 (Enter_Name): Remove the mention of Name_uController.
2905 (Gather_Components): Remove the mention of Name_uController.
2906 (Incomplete_Or_Private_View): New routine.
2907 (Is_Coextension_Root): Removed.
2908 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2909 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2910 (Is_Coextension_Root): Removed.
2911 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2912 Controlled types are now derived from a null tagged record. Remove
2913 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2914 * sinfo.adb (Coextensions): Removed.
2915 (Set_Coextensions): Removed.
2916 * sinfo.ads: Remove Coextensions from the explanation of node fields
2917 and its uses in nodes.
2918 Update the field usage of N_Allocator.
2919 (Coextensions): Removed along with its pragma Inline.
2920 (Set_Coextensions): Removed along with its pragma Inline.
2921 * snames.ads-tmpl: Remove names
2926 Name_uLocal_Final_List
2927 Name_Finalization_Root
2934 Name_Finalize_Address
2935 * s-pooglo.adb (Allocate): Add overriding indicator.
2936 (Deallocate): Add overriding indicator.
2937 (Storage_Size): Add overriding indicator.
2938 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2939 than Finalize_Global_List.
2940 (Null_Finalize_Global_List): Removed.
2941 (Save_Library_Occurrence): New routine.
2942 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2943 initialization. Add variable Finalize_Library_Objects along with its
2944 pragma Export. Add variables Library_Exception and
2945 Library_Exception_Set along with their pragma Export.
2946 (Null_Finalize_Global_List): Removed.
2947 (Save_Library_Occurrence): New routine.
2948 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2949 rather than Finalize_Global_List.
2950 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2951 of the constructed node.
2953 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2955 * link.c: Include "auto-host.h" before system headers.
2957 2011-08-03 Vincent Celier <celier@adacore.com>
2959 * make.adb (Gnatmake): Add to table Library_Projs only library projects
2960 that are not extended. Do not check if a library project that is
2961 extended should be regenerated. Do not add to table Library_Paths the
2962 libraries that are in extended projects. Link only with libraries that
2963 are in libray projects that are not extended.
2964 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
2965 for a library project that is extended.
2967 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2969 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
2970 conforming subprogram renamings that appear to be completions if they
2971 are not fully conformant.
2972 Such renamings are homographs but not completions.
2973 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
2974 names in a subprogram renaming that appears in an instance.
2976 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2978 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
2979 not immutably limited, build actual subtype from expression to provide
2980 proper bounds to caller.
2982 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2984 * sem_ch8.adb: Minor comment correction.
2986 2011-08-03 Thomas Quinot <quinot@adacore.com>
2988 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
2989 returning a limited array, use an extended return statement.
2991 2011-08-03 Vincent Celier <celier@adacore.com>
2993 * make.adb (Initialize): If --subdirs= is used, but no project file is
2994 specified, attempt to create the specify subdir if it does not already
2995 exist and use it as the object directory as if -D had been specified.
2997 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2999 * s-tpopsp-vms.adb: New file.
3000 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3001 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3003 2011-08-03 Emmanuel Briot <briot@adacore.com>
3005 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3008 2011-08-03 Yannick Moy <moy@adacore.com>
3010 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3011 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3012 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3013 detect that an array has static bounds.
3015 2011-08-03 Thomas Quinot <quinot@adacore.com>
3017 * exp_dist.adb: Minor reformatting.
3019 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3021 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3022 (ATCB_Key): Removed, not always used.
3024 2011-08-03 Emmanuel Briot <briot@adacore.com>
3026 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3027 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3028 most remaining global variables.
3030 2011-08-03 Robert Dewar <dewar@adacore.com>
3032 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3033 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3036 2011-08-03 Javier Miranda <miranda@adacore.com>
3038 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3039 that must be passed by copy in VM targets.
3041 2011-08-03 Emmanuel Briot <briot@adacore.com>
3043 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3044 duplicates a similar htable now in the project tree.
3046 2011-08-03 Claire Dross <dross@adacore.com>
3048 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3049 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3050 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3051 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3052 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3053 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3054 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3057 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3059 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3060 (ATCB_Key): Removed, not always used.
3061 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3063 * s-tpopsp-tls.adb: New file.
3064 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3065 x86/x64/ia64/powerpc/sparc Linux.
3067 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3069 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3070 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3072 2011-08-03 Thomas Quinot <quinot@adacore.com>
3074 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3075 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3076 Fix type selection for mapping integer types to PolyORB types.
3078 2011-08-03 Bob Duff <duff@adacore.com>
3080 * sem_ch7.adb: Minor comment clarification.
3082 2011-08-03 Bob Duff <duff@adacore.com>
3084 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3085 an error analyzing a choice, skip further processing. Further
3086 processing could cause a crash or cascade errors.
3088 2011-08-03 Emmanuel Briot <briot@adacore.com>
3090 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3091 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3092 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3093 prj-env.ads (Shared_Project_Tree_Data): new type
3094 An aggregate project and its aggregated trees need to share the common
3095 data structures used for lists of strings, packages,... This makes the
3096 code simpler since otherwise we have to pass the root tree (also used
3097 for the configuration file data) in addition to the current project
3098 tree. This also avoids ambiguities as to which tree should be used.
3099 And finally this saves a bit of memory.
3100 (For_Every_Project_Imported): new parameter Tree.
3101 Since aggregated projects are using a different tree, we need to let
3102 the caller know which tree to use to manipulate the returned project.
3104 2011-08-03 Robert Dewar <dewar@adacore.com>
3106 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3107 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3108 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3109 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3111 2011-08-03 Javier Miranda <miranda@adacore.com>
3113 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3114 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3116 2011-08-03 Bob Duff <duff@adacore.com>
3118 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3121 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3123 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3124 g-sehash.ads: Fix typo. Update header.
3126 2011-08-03 Thomas Quinot <quinot@adacore.com>
3128 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3131 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3133 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3134 prefixes of private types along with records, since the selector may be
3136 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3137 private types along with records, since the selector may be a
3140 2011-08-03 Emmanuel Briot <briot@adacore.com>
3142 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3144 2011-08-03 Javier Miranda <miranda@adacore.com>
3146 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3147 Tagged_Type_Expansion.
3149 2011-08-03 Yannick Moy <moy@adacore.com>
3152 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3153 concatenation is the name of a constant
3155 2011-08-03 Emmanuel Briot <briot@adacore.com>
3157 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3158 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3159 (Process_Declarative_Items): new parameter Child_Env.
3161 2011-08-03 Yannick Moy <moy@adacore.com>
3163 * alfa.ads Update format of ALFA section in ALI file in order to add a
3164 mapping from bodies to specs when both are present
3165 (ALFA_Scope_Record): add components for spec file/scope
3166 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3168 (Collect_ALFA): after all scopes have been collected, fill in the spec
3169 information when relevant
3170 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3173 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3175 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3176 code unit to decide whether to add internally generated subprograms.
3178 2011-08-03 Javier Miranda <miranda@adacore.com>
3180 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3182 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3185 2011-08-03 Emmanuel Briot <briot@adacore.com>
3187 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3188 code with Makeutl.Get_Switches.
3189 * prj-tree.adb: Update comment.
3191 2011-08-03 Thomas Quinot <quinot@adacore.com>
3193 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3194 subprogram with a limited formal that does not support external
3197 2011-08-03 Yannick Moy <moy@adacore.com>
3199 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3201 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3202 not from current unit in two phases, because it is not possible to
3203 change the table while iterating over its content.
3204 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3206 2011-08-03 Sergey Rybin <rybin@adacore.com>
3208 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3209 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3211 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3213 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3214 and the component type is composite, this is ambiguous for predefined
3215 concatenation, but if the node is not overloaded and the entity is a use
3216 -defined function its profile can be used to resolve that aggregate.
3218 2011-08-03 Robert Dewar <dewar@adacore.com>
3220 * exp_ch4.adb: Minor code cleanup.
3222 2011-08-03 Thomas Quinot <quinot@adacore.com>
3224 * exp_dist.adb: Do not generate distribution stubs if serious errors
3225 have been diagnosed.
3227 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3229 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3230 the first formal of a primitive operation, go to the base type to
3231 handle properly an access to a derived type with constrained
3233 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3234 user-defined function that is only use-visible.
3236 2011-08-03 Robert Dewar <dewar@adacore.com>
3238 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3239 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3240 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3241 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3242 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3243 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3244 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3245 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3247 2011-08-03 Robert Dewar <dewar@adacore.com>
3249 * repinfo.adb (List_Mechanism): Add handling of
3250 Convention_Ada_Pass_By_XXX.
3251 * sem_mech.adb (Set_Mechanism): Ditto.
3252 * sem_prag.adb (Process_Convention): Add entries for
3253 Convention_Ada_Pass_By_XXX.
3254 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3256 2011-08-03 Pascal Obry <obry@adacore.com>
3258 * makeutl.adb: Minor reformatting.
3260 2011-08-03 Vincent Celier <celier@adacore.com>
3263 (Get_File_Name) If the file cannot be found when there are no config
3264 pragmas file and May_Fail is True, return No_File instead of the file
3265 name, to be consistent.
3267 2011-08-03 Pascal Obry <obry@adacore.com>
3269 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3272 2011-08-03 Javier Miranda <miranda@adacore.com>
3275 (Same_Representation): In VM targets the representation of arrays with
3276 aliased components differs from arrays with non-aliased components.
3278 2011-08-03 Emmanuel Briot <briot@adacore.com>
3280 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3281 not systematically lower case attribute indexes that contain no "."
3282 Fix definition of several Naming attributes, which take
3283 a unit name as index and therefore should be case insensitive.
3284 Minor refactoring (reduce length of variable names).
3286 2011-08-03 Emmanuel Briot <briot@adacore.com>
3288 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3290 2011-08-03 Emmanuel Briot <briot@adacore.com>
3292 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3293 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3294 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3295 prj-tree.ads (Prj.Tree.Environment): new type.
3297 2011-08-03 Emmanuel Briot <briot@adacore.com>
3299 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3300 prj-tree.adb, prj-tree.ads (Environment): new type.
3302 2011-08-03 Emmanuel Briot <briot@adacore.com>
3304 * prj-tree.ads: Remove unused variable.
3306 2011-08-03 Yannick Moy <moy@adacore.com>
3308 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3309 issuing messages related to SPARK restriction violation.
3311 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3313 * sem_ch6.adb: guard against error nodes in return statements.
3315 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3317 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3318 a warning can only appear on a configuration file, so emit warning
3319 without further checks.
3321 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3323 * s-interr.ads: add overriding keyword.
3325 2011-08-03 Geert Bosch <bosch@adacore.com>
3327 * exp_attr.adb: Fix minor typo.
3329 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3331 * par-ch4.adb: improve error recovery.
3333 2011-08-03 Emmanuel Briot <briot@adacore.com>
3335 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3336 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3339 2011-08-03 Emmanuel Briot <briot@adacore.com>
3341 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3342 "external" as an attribute name in aggregate projects.
3344 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3346 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3347 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3348 from 0, so we need to adjust.
3350 2011-08-03 Emmanuel Briot <briot@adacore.com>
3352 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3353 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3355 2011-08-03 Yannick Moy <moy@adacore.com>
3357 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3358 restriction on overloaded entity if the entity is not an operator.
3360 2011-08-03 Yannick Moy <moy@adacore.com>
3362 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3363 restrict.ads: Rename remaining Check_Formal_Restriction* into
3364 Check_SPARK_Restriction*.
3366 2011-08-03 Emmanuel Briot <briot@adacore.com>
3368 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3369 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3371 (Project_Empty): removed
3372 (Empty_Project): new parameter Qualifier
3373 This is used to have fields specific to aggregate projects, cleaner
3374 New field to store the list of aggregated projects.
3375 (Check_Aggregate_Project): removed
3376 (Process_Aggregated_Projects, Free): new subprograms.
3378 2011-08-03 Olivier Hainque <hainque@adacore.com>
3380 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3382 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3384 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3385 explicit dereference of an unconstrained type, create a constrained
3386 subtype for it, as is done for function calls that return an
3389 2011-08-03 Thomas Quinot <quinot@adacore.com>
3391 * g-pehage.adb (Finalize): Avoid possible double-free.
3393 2011-08-03 Steve Baird <baird@adacore.com>
3395 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3396 Elab_Spec/Body attrs in CodePeer_Mode.
3398 2011-08-03 Javier Miranda <miranda@adacore.com>
3400 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3401 low bound is not known at compile time but they have no others choice.
3402 Done because in this case the bounds can be obtained directly from the
3405 2011-08-03 Ed Falis <falis@adacore.com>
3407 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3408 on VxWorks SMP. Remove unusable constant ANY_CPU.
3410 2011-08-03 Emmanuel Briot <briot@adacore.com>
3412 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3413 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3414 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3415 Prj.Env.Initialize_Empty): new subprograms
3416 (Get_Env, Find_Project): remove parameter Target_Name.
3418 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3420 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3421 as a condition for the delayed call to Derived_Subprograms done for the
3422 case of the rewriting of a derived type that constrains the
3423 discriminants of its parent type.
3424 Avoids redundant subprogram derivations for private subtype derivations.
3426 2011-08-03 Javier Miranda <miranda@adacore.com>
3428 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3429 Build_Record_Aggr_Code.
3430 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3431 discriminants in extension aggregates.
3433 2011-08-03 Emmanuel Briot <briot@adacore.com>
3435 * prj-pp.adb (Print): also output project qualifiers, since in
3436 particular "aggregate" is mandatory in an aggregate project.
3438 2011-08-03 Emmanuel Briot <briot@adacore.com>
3440 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3441 (Debug_Output): new function.
3443 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3445 * gnat_ugn.texi: Document -Wstack-usage.
3446 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3448 2011-08-03 Thomas Quinot <quinot@adacore.com>
3450 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3451 have keyword LIMITED.
3453 2011-08-03 Yannick Moy <moy@adacore.com>
3455 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3456 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3457 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3458 section (does not happen in compiler, only if code directly calls
3460 * get_alfa.adb, get_alfa.ads: New files.
3461 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3463 * lib-xref-alfa.adb: New file.
3464 * lib-xref.adb, lib-xref.ads
3465 (Xref_Entry): redefine information needed in cross-references for ALFA.
3466 Push ALFA treatments in separated local package.
3467 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3468 identifiers. Return entity of package body instead of spec. Return
3469 Empty for a scope with no location.
3470 (Generate_Reference): adapt to new components for ALFA information.
3471 Remove the need for D references on definitions.
3472 (Is_Local_Reference): moved to ALFA local package
3473 (Output_References): extract subfunction as Extract_Source_Name
3474 (Output_Local_References): remove procedure, replaced by filtering of
3475 cross-references in package ALFA and printing in Put_ALFA.
3476 (Write_Entity_Name): remove procedure
3477 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3478 print exact name of entity as it appears in source file
3479 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3480 * put_alfa.adb, put_alfa.ads: New files.
3481 * xref_lib.adb (Search_Xref): protect read of cross-references against
3482 reading other sections of the ALI file, in gnatxref
3483 (Search): protect read of cross-references against reading other
3484 sections of the ALI file, in gnatfind.
3485 * gcc-interface/Make-lang.in: Update dependencies.
3487 2011-08-03 Thomas Quinot <quinot@adacore.com>
3489 * sem_ch3.adb: Minor reformatting.
3491 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3493 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3494 raising an exception.
3496 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3498 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3499 type, always use 1 as the lower bound or string, even if lower bound of
3500 context is not static, to handle properly null strings in a non-static
3503 2011-08-03 Bob Duff <duff@adacore.com>
3505 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3506 always legal on the right-hand side of an assignment statement; there
3507 is always an applicable index constraint in this case. Therefore, the
3508 check for Pkind = N_Assignment_Statement is now unconditional -- it
3509 doesn't depend on whether Is_Constrained (Typ).
3511 2011-08-03 Robert Dewar <dewar@adacore.com>
3513 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3515 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3517 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3518 for an itype created within a generic unit.
3520 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3522 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3523 suppresses all inlining.
3525 2011-08-03 Robert Dewar <dewar@adacore.com>
3527 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3528 exp_aggr.adb: Minor reformatting.
3530 2011-08-03 Thomas Quinot <quinot@adacore.com>
3532 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3533 tagged assignment when discriminant checks are suppressed. This is
3534 useless and extremely costly in terms of static stack usage.
3536 2011-08-03 Bob Duff <duff@adacore.com>
3538 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3539 of generics, because this leads to the wrong entity in the wrong scope,
3540 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3542 (Process_Interface_Name): Follow Alias for instances of generics, to
3543 correct for the above change.
3545 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3547 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3548 is an integer literal it is always safe to replace the reference. In
3549 addition, if the reference appears in the generated code for an object
3550 declaration it is necessary to copy because otherwise the reference
3551 might be to the uninitilized value of the discriminant of the object
3554 2011-08-03 Pascal Obry <obry@adacore.com>
3556 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3557 ACL used, in this case we want to check for ending .exe, not .exe
3558 anywhere in the path.
3560 2011-08-03 Sergey Rybin <rybin@adacore.com>
3562 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3563 the tree structure (semantic decoration of references to record
3566 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3568 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3569 choices of a named array aggregate, bail out when any choices are
3570 marked as Errors_Posted.
3572 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3574 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3575 in which entity is frozen, to handle properly loop variables in
3578 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3580 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3581 subtype is not static, compute the upper bound using attributes, to
3582 handle properly index types that are not integer types.
3584 2011-08-03 Bob Duff <duff@adacore.com>
3586 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3587 Update copyright notice.
3589 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3591 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3592 Original_Discriminant if within an instance.
3593 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3595 2011-08-03 Thomas Quinot <quinot@adacore.com>
3597 * einfo.ads: Minor reformatting.
3599 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3601 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3602 composite type with an unfrozen subcomponent, in the profile of a
3603 primitive operation.
3605 2011-08-03 Robert Dewar <dewar@adacore.com>
3607 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3609 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3611 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3612 unconstrained type with discriminants is initialized with an aggregate,
3613 use the constrained subtype of the aggregate as the type of the object,
3614 because it is immutable, and this allows the back-end to generate no
3615 code for the object declaration.
3617 2011-08-03 Robert Dewar <dewar@adacore.com>
3619 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3620 comparison operand is variable, and turns out to be zero or negative.
3622 2011-08-03 Javier Miranda <miranda@adacore.com>
3625 (Expand_Dispatching_Constructor_Call): Disable expansion of
3626 code required for native targets. Done to avoid generating
3627 references to unavailable runtime entities in VM targets.
3629 (Expand_N_Object_Declaration): Add missing support to handle
3630 the explicit initialization of class-wide interface objects.
3633 2011-08-03 Matthew Heaney <heaney@adacore.com>
3635 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3637 2011-08-03 Matthew Heaney <heaney@adacore.com>
3639 * a-cbdlli.adb (Splice): move source items from first to last
3641 2011-08-03 Yannick Moy <moy@adacore.com>
3643 * sem_util.ads: comment added.
3645 2011-08-03 Javier Miranda <miranda@adacore.com>
3648 (Expand_Record_Aggregate): In VM targets disable the expansion into
3649 assignments of aggregates whose type is not known at compile time.
3651 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3653 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3654 protected entries and task entries, to build the proper renaming
3655 declaration for entry formals, used in debugging.
3656 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3657 parameters in the same way.
3659 2011-08-02 Robert Dewar <dewar@adacore.com>
3661 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3662 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3663 code reorganization.
3665 2011-08-02 Robert Dewar <dewar@adacore.com>
3667 * debug.adb: Debug flag d.P to suppress length comparison optimization
3668 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3669 comparison of Length by comparing First/Last instead.
3671 2011-08-02 Matthew Heaney <heaney@adacore.com>
3673 * a-cobove.ads: Code clean up.
3675 2011-08-02 Vincent Celier <celier@adacore.com>
3677 * adaint.c (file_names_case_sensitive_cache): New static int.
3678 (__gnat_get_file_names_case_sensitive): Cache the return value in
3679 file_names_case_sensitive_cache at the first invocation, to avoid
3680 multiple calls to getenv.
3682 2011-08-02 Bob Duff <duff@adacore.com>
3684 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3686 2011-08-02 Yannick Moy <moy@adacore.com>
3688 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3689 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3690 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3691 indicate that we are in a precondition or postcondition. This is used in
3692 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3693 decide whether to flag the spec or body of the current subprogram as
3696 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3698 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3700 * a-extiin.ads: New file.
3702 2011-08-02 Bob Duff <duff@adacore.com>
3704 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3705 now raises Name_Error instead of Use_Error in certain cases. The other
3706 parts of this AI were already implemented properly.
3708 2011-08-02 Vincent Celier <celier@adacore.com>
3710 * link.c: Only import "auto-host.h" when building the gnattools.
3712 2011-08-02 Yannick Moy <moy@adacore.com>
3714 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3715 which calls a local subprogram, so extract subprogram
3716 from Mark_Non_ALFA_Subprogram_Body.
3718 2011-08-02 Javier Miranda <miranda@adacore.com>
3721 (Extract_Dispatching_Call): If the type of the dispatching object is an
3722 access type then return an explicit dereference in the Object out-mode
3725 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3727 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3728 compatibility checks for all indexes of an array subtype, not just the
3729 first. Reset Has_Dynamic_Range_Check on the subtype before each
3730 potential check to ensure that Insert_Range_Checks will not elide any
3731 of the dynamic checks.
3733 2011-08-02 Yannick Moy <moy@adacore.com>
3735 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3736 SPARK restriction at parsing time.
3737 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3738 directive only if the SPARK restriction is set for this unit.
3740 2011-08-02 Yannick Moy <moy@adacore.com>
3742 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3743 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3744 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3745 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3746 Mark_Non_ALFA_Subprogram_Body.
3747 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3750 2011-08-02 Yannick Moy <moy@adacore.com>
3752 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3755 2011-08-02 Robert Dewar <dewar@adacore.com>
3757 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3758 exp_ch3.adb: Minor reformatting.
3760 2011-08-02 Emmanuel Briot <briot@adacore.com>
3762 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3763 files, not any regular file.
3764 (__gnat_locate_file_with_predicate): new subprogram.
3766 2011-08-02 Yannick Moy <moy@adacore.com>
3768 * sinfo.adb, sinfo.ads: Restrict the use of flags
3769 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3770 nodes, plus N_Subtype_Declaration for the 2nd one.
3772 2011-08-02 Sergey Rybin <rybin@adacore.com>
3774 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3775 - fix bugs in the description of Source_Trace;
3776 - get rid of UNIT_NAME;
3778 2011-08-02 Javier Miranda <miranda@adacore.com>
3781 (Build_Dispatching_Requeue): Adding support for VM targets
3782 since we cannot directly reference the Tag entity.
3783 * exp_sel.adb (Build_K): Adding support for VM targets.
3784 (Build_S_Assignment): Adding support for VM targets.
3786 (Default_Prim_Op_Position): In VM targets do not restrict availability
3787 of predefined interface primitives to compiling in Ada 2005 mode.
3788 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3789 restricted to compiling in Ada 2005 mode.
3790 (Make_VM_TSD): Generate code that declares and initializes the OSD
3791 record. Needed to support dispatching calls through synchronized
3794 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3795 primitives associated with synchronized interfaces.
3796 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3797 primitives associated with synchronized interfaces.
3799 2011-08-02 Yannick Moy <moy@adacore.com>
3801 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3802 statements hidden in SPARK if preceded by the HIDE directive
3803 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3804 exception handlers as hidden in SPARK if preceded by the HIDE directive
3805 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3806 if starting with the HIDE directive
3807 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3808 starting with the HIDE directive; mark the declarations in a private
3809 part as hidden in SPARK if the private part starts with the HIDE
3811 * restrict.adb, restrict.ads
3812 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3813 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3814 argument node belongs to a part which is hidden in SPARK
3815 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3816 parts in SPARK; protect the possibly costly call to
3817 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3818 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3819 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3820 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3822 (Scan): recognize special comment starting with '#' and followed by
3823 SPARK keyword "hide" as a HIDE directive.
3825 2011-08-02 Yannick Moy <moy@adacore.com>
3827 * types.ads, erroutc.ads: Minor reformatting.
3829 2011-08-02 Vincent Celier <celier@adacore.com>
3831 * link.c: Add response file support for cross platforms.
3833 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3835 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3836 in an association, set parent field of copy before partial analysis.
3837 * sem_res.adb (Resolve_Slice): create reference to itype only when
3838 expansion is enabled.
3840 2011-08-02 Yannick Moy <moy@adacore.com>
3842 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3843 for new flag denoting which subprogram bodies are in ALFA
3844 * restrict.adb, sem_ch7.adb: Update comment
3845 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3846 sem_ch9.adb, sem_res.adb: Add calls to
3847 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3848 * sem_ch6.adb (Analyze_Function_Return): add calls to
3849 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3850 middle of the body, and extended return.
3851 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3852 False when missing return.
3853 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3854 to True for subprograms whose spec is in ALFA. Remove later on the flag
3855 on the entity used for a subprogram body when there exists a separate
3857 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3858 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3859 False, otherwise do nothing.
3861 2011-08-02 Robert Dewar <dewar@adacore.com>
3863 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3865 2011-08-02 Yannick Moy <moy@adacore.com>
3867 * sem_ch4.ads: minor formatting.
3869 2011-08-02 Yannick Moy <moy@adacore.com>
3871 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3872 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3873 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3874 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3875 opt.ads: cleanup of SPARK mode
3877 2011-08-02 Yannick Moy <moy@adacore.com>
3879 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3881 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3882 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3884 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3885 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3886 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3887 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3889 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3891 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3892 functions whose return type is not in ALFA.
3893 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3895 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3896 parameter's type is not in ALFA.
3897 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3902 * sem_ch6 (Analyze_Expression_Function): treat the function as
3903 Inline_Always, and introduce a subprogram declaration for it when it is
3905 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3906 expression functions, so that the back-end can determine whether they
3907 can in fact be inlined.
3908 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3909 a function body comes from an expression function.
3911 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3913 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3914 null exclusions to test Can_Never_Be_Null on the anonymous access types
3915 of the formals rather than testing the formals themselves. Exclude this
3916 check in cases where the Old_Formal is marked as a controlling formal,
3917 to avoid issuing spurious errors for bodies completing dispatching
3918 operations (due to the flag not getting set on controlling access
3919 formals in body specs).
3920 (Find_Corresponding_Spec): When checking full and subtype conformance of
3921 subprogram bodies in instances, pass Designated and E in that order, for
3922 consistency with the expected order of the formals (New_Id followed by
3925 2011-08-02 Robert Dewar <dewar@adacore.com>
3927 * sem_ch8.adb: Minor reformatting.
3929 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3931 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3932 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3933 primitive operations of class-wide actuals.
3935 2011-08-02 Javier Miranda <miranda@adacore.com>
3937 * exp_atag.ads, exp_atag.adb
3938 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3939 since its value is implicitly passed in argument Typ.
3940 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3941 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3942 Build_Common_Dispatching_Select_Statements.
3944 2011-08-02 Robert Dewar <dewar@adacore.com>
3946 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3947 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3950 2011-08-02 Robert Dewar <dewar@adacore.com>
3952 * sem_res.adb: Minor reformatting.
3953 * sem_prag.adb: Minor reformatting.
3955 2011-08-02 Javier Miranda <miranda@adacore.com>
3957 * exp_atag.adb, exp_atags.ads
3958 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3959 by the tagged type Entity. Required to use this routine in the VM
3960 targets since we do not have available the Tag entity in the VM
3963 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3964 Ada.Tags has not been previously loaded.
3966 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3967 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3969 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3970 view of enclosing scopes. Required to handle enclosing scopes that
3971 are synchronized types whose full view is a task type.
3973 (Build_VM_TSDs): Minor code improvement to avoid generating and
3974 analyzing lists with empty nodes.
3975 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3976 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3977 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3978 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3979 (Make_Select_Specific_Data_Table): Add support for VM targets.
3980 (Make_VM_TSD): Generate code to initialize the SSD structure of
3983 2011-08-02 Yannick Moy <moy@adacore.com>
3985 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3986 cross-references section in ALI.
3987 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3988 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3990 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3991 subprogram or package entity of a node
3992 (Is_Local_Reference_Type): new function returns True for references
3993 selected in local cross-references.
3994 (Lt): function extracted from Lt in Output_References
3995 (Write_Entity_Name): function extracted from Output_References
3996 (Generate_Definition): generate reference with type 'D' for definition
3997 of objects (object declaration and parameter specification), with
3998 appropriate locations and units, for use in local cross-references.
3999 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4000 references of type 'I' for initialization in object definition.
4001 (Output_References): move part of function Lt and procedure
4002 Write_Entity_Name outside of the body. Ignore references of types 'D'
4003 and 'I' introduced for local cross-references.
4004 (Output_Local_References): new procedure to output the local
4005 cross-references sections.
4006 (Lref_Entity_Status): new array defining whether an entity is a local
4007 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4008 with 'I' type when initialization expression is present.
4009 * get_scos.adb, get_scos.ads: Correct comments and typos
4011 2011-08-02 Javier Miranda <miranda@adacore.com>
4013 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4015 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4017 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4020 2011-08-02 Vincent Celier <celier@adacore.com>
4022 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4023 (No_Space_Img): New function
4024 (Find_Excluded_Sources): When reading from a file, record the file name
4025 and the line number for each excluded source.
4026 (Mark_Excluded_Sources): When reporting an error, if the excluded
4027 sources were read from a file, include file name and line number in
4030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4032 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4034 2011-08-02 Robert Dewar <dewar@adacore.com>
4036 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4038 2011-08-02 Javier Miranda <miranda@adacore.com>
4040 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4041 generation of TSDs to the DOTNET compiler.
4042 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4043 generation of TSDs to the DOTNET compiler.
4045 2011-08-02 Javier Miranda <miranda@adacore.com>
4047 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4048 record of all the tagged types declared inside library level package
4049 declarations, library level package bodies or library level subprograms.
4050 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4051 associated with a given tagged type.
4052 (Build_VM_TSDs): New subprogram.
4053 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4054 compilation units that are subprograms.
4055 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4056 compilation units that are package bodies.
4057 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4058 units that are a package declaration or a package instantiation.
4059 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4060 reorganization to improve the error generated by the frontend when the
4061 function Ada.Tags.Secondary_Tag is not available.
4062 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4063 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4065 2011-08-02 Javier Miranda <miranda@adacore.com>
4067 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4069 2011-08-02 Robert Dewar <dewar@adacore.com>
4071 * s-imenne.ads: Minor reformatting.
4073 2011-08-02 Robert Dewar <dewar@adacore.com>
4075 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4076 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4077 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4079 2011-08-02 Robert Dewar <dewar@adacore.com>
4081 * einfo.ads (Materialize_Entity): Document this is only for renamings
4082 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4083 required debug information in the case where we transform the object
4084 declaration into a renaming declaration.
4085 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4087 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4090 2011-08-02 Robert Dewar <dewar@adacore.com>
4092 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4093 Suppress_Init_Procs.
4094 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4095 Suppress_Initialization/Initialization_Suppressed.
4096 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4097 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4098 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4099 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4101 2011-08-02 Robert Dewar <dewar@adacore.com>
4103 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4106 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4108 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4109 only have inheritable classwide pre/postconditions.
4111 2011-08-02 Javier Miranda <miranda@adacore.com>
4113 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4114 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4115 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4116 checks if the external tag of a type is the same as the external tag
4117 of some other declaration.
4119 2011-08-02 Thomas Quinot <quinot@adacore.com>
4121 * s-taskin.ads: Minor reformatting.
4123 2011-08-02 Emmanuel Briot <briot@adacore.com>
4125 * g-comlin.adb (Display_Help): swap the order in which it prints the
4126 short help and the general usage.
4128 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4130 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4131 the aspect declarations and attach them to the generic copy for
4132 subsequent analysis.
4133 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4134 declarations of the generic tree to the new subprogram declarations.
4135 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4136 conditions that apply to a subprogram instance.
4138 2011-08-02 Robert Dewar <dewar@adacore.com>
4140 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4142 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4144 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4145 private type with a tagged full view is not derived in the immediate
4146 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4148 2011-08-02 Robert Dewar <dewar@adacore.com>
4150 * exp_ch4.adb: Minor reformatting.
4152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4154 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4155 Ada2012 iterator, the loop will be rewritten during expansion into a
4156 while loop with a cursor and an element declaration. Do not analyze the
4157 body in this case, because if the container is for indefinite types the
4158 actual subtype of the elements will only be determined when the cursor
4159 declaration is analyzed.
4161 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4163 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4164 size/alignment related attributes in CodePeer_Mode.
4166 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4168 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4169 Prepend_Element, since this can result in the operation getting the
4170 wrong slot in the full type's dispatch table if the full type has
4171 inherited operations. The incomplete type's operation will get added
4172 to the proper position in the full type's primitives
4173 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4174 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4175 dispatching operations, since there are cases where nonprimitive
4176 subprograms can get added to the list of incomplete dependents (such
4177 as subprograms in nested packages).
4178 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4179 private part when determining whether to add a primitive with a
4180 parameter of a tagged incomplete type to the Private_Dependents list.
4181 Such primitives can also occur in the visible part, and should not have
4182 been excluded from being private dependents.
4183 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4184 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4185 list of a Taft-amendment incomplete type is a primitive before issuing
4186 an error that the full type must appear in the same unit. There are
4187 cases where nonprimitives can be in the list (such as subprograms in
4189 * sem_disp.adb (Derives_From): Use correct condition for checking that
4190 a formal's type is derived from the type of the corresponding formal in
4191 the parent subprogram (the condition was completely wrong). Add
4192 checking that was missing for controlling result types being derived
4193 from the result type of the parent operation.
4195 2011-08-02 Yannick Moy <moy@adacore.com>
4197 * errout.adb (First_Node): minor renaming
4198 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4201 2011-08-02 Yannick Moy <moy@adacore.com>
4203 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4204 before accessing operands.
4205 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4206 decide whether an initialization expression respects SPARK rules, as
4207 the plain node is the expanded one. This allows for more valid warnings
4209 * gnat_rm.texi: Minor update.
4211 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4213 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4216 2011-08-02 Robert Dewar <dewar@adacore.com>
4218 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4220 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4222 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4223 loop statements and the element renaming declaration with a block when
4224 the element type is controlled.
4226 2011-08-02 Yannick Moy <moy@adacore.com>
4228 * sinfo.ads: Minor formatting.
4230 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4232 * sem_aggr.adb (Add_Association): if the association has a box and no
4233 expression, use the Sloc of the aggregate itself for the new
4235 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4238 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4240 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4241 When a container is provided via a function call, generate a renaming
4242 of the function result. This avoids the creation of a transient scope
4243 and the premature finalization of the container.
4244 * exp_ch7.adb (Is_Container_Cursor): Removed.
4245 (Wrap_Transient_Declaration): Remove the supression of the finalization
4246 of the list controller when the declaration denotes a container cursor,
4249 2011-08-02 Yannick Moy <moy@adacore.com>
4251 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4252 node is from source, instead of the original node being from source.
4254 (Resolve_Array_Aggregate): refine the check for a static expression, to
4255 recognize also static ranges
4256 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4257 Array_Type_Declaration): postpone the test for the type being a subtype
4258 mark after the type has been resolved, so that component-selection and
4259 expanded-name are discriminated.
4260 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4261 to distinguish the case of an iteration scheme, so that an error is
4262 issed on a non-static range in SPARK except in an iteration scheme.
4263 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4264 In_Iter_Schm = True.
4265 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4266 user-defined operators so that they are allowed in renaming
4268 (Find_Selected_Component): refine the check for prefixing of operators
4269 so that they are allowed in renaming. Move the checks for restrictions
4270 on selector name after analysis discriminated between
4271 component-selection and expanded-name.
4272 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4273 concatenation argument of string type if it is static.
4274 * sem_util.adb, sem_util.ads
4275 (Check_Later_Vs_Basic_Declarations): add a new function
4276 Is_Later_Declarative_Item to decice which declarations are allowed as
4277 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4278 mode, add that renamings are considered as later items.
4279 (Enclosing_Package): new function to return the enclosing package
4280 (Enter_Name): correct the rule for homonyms in SPARK
4281 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4282 from source (result of expansion) to avoid issuing wrong warnings.
4284 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4286 * errout.adb: On anything but an expression First_Node returns its
4289 2011-08-02 Pascal Obry <obry@adacore.com>
4291 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4293 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4295 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4296 Set the associated loop as the related expression of internally
4298 * exp_ch7.adb (Is_Container_Cursor): New routine.
4299 (Wrap_Transient_Declaration): Supress the finalization of the list
4300 controller when the declaration denotes a container cursor.
4302 2011-08-02 Yannick Moy <moy@adacore.com>
4304 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4306 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4307 expression is a simple expression. This check cannot be performed in
4308 the semantics, so just drop it.
4309 (P_Index_Or_Discriminant_Constraint): move check that the index or
4310 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4311 semantics. Other cases were previously checked in the semantics.
4312 * par-ch4.adb (P_Name): move checks that a selector name is not
4313 character literal or an operator symbol to Find_Selected_Component in
4315 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4316 declarations are not placed after later declarations in a separate
4317 procedure in Sem_Util (possibly not the best choice?), to be used both
4318 during parsing, for Ada 83 mode, and during semantic analysis, for
4320 * par-endh.adb (Check_End): move check that end label is not missing
4321 to Process_End_Label in the semantics
4322 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4323 the special case for SPARK restriction
4324 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4325 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4326 parameter Force to issue the error message even on internal node (used
4327 for generated end label). Call Check_Restriction to check when an error
4328 must be issued. In SPARK mode, issue an error message even if the
4329 restriction is not set.
4330 (Check_Restriction): new procedure with an additional out parameter to
4331 inform the caller that a message has been issued
4332 * sem_aggr.adb: Minor modification of message
4333 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4334 instead of issuing an error message directly
4335 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4336 declarations are not placed after later declarations, by calling
4337 Check_Later_Vs_Basic_Declarations
4338 (Analyze_Subtype_Declaration): move here the check that an index or
4339 discriminant constraint must be a subtype mark. Change the check that
4340 a subtype of String must start at one so that it works on subtype marks.
4341 * sem_ch4.adb (Analyze_Call): move here the check that a named
4342 association cannot follow a positional one in a call
4343 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4344 instead of issuing an error message directly
4345 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4346 selector name is not a character literal or an operator symbol. Move
4347 here the check that the prefix of an expanded name cannot be a
4348 subprogram or a loop statement.
4349 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4350 procedure called from parsing and semantics to check that basic
4351 declarations are not placed after later declarations
4352 (Process_End_Label): move here the check that end label is not missing
4354 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4356 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4357 representation clause in codepeer mode, since it confuses CodePeer and
4358 does not bring useful info.
4360 2011-08-02 Ed Falis <falis@adacore.com>
4362 * init.c: initialize fp hw on MILS.
4364 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4366 * errout.adb (First_Node): for bodies, return the node itself (small
4367 optimization). For other nodes, do not check source_unit if the node
4368 comes from Standard.
4370 2011-08-02 Robert Dewar <dewar@adacore.com>
4372 * exp_ch3.adb: Minor comment additions.
4373 * sem_ch13.adb: Minor reformatting.
4375 2011-08-02 Pascal Obry <obry@adacore.com>
4377 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4379 2011-08-02 Robert Dewar <dewar@adacore.com>
4381 * sem_attr.adb: Minor reformatting.
4383 2011-08-02 Robert Dewar <dewar@adacore.com>
4385 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4386 (Has_Default_Component_Value): Removed
4387 * einfo.ads Comment updates
4388 (Has_Default_Aspect): Replaces Has_Default_Value
4389 (Has_Default_Component_Value): Removed
4391 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4393 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4394 (Get_Simple_Init_Val): Handle Default_Value aspect
4395 (Needs_Simple_Initialization): Handle Default_Value aspect
4396 * exp_ch3.ads: Needs_Simple_Initialization
4397 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4398 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4400 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4401 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4402 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4404 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4406 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4407 package containing iteration primitives.
4408 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4410 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4412 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4413 "of", pre-analyze expression in case it is a function call with
4414 finalization actions that must be placed ahead of the loop.
4415 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4416 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4418 2011-08-02 Geert Bosch <bosch@adacore.com>
4420 * cstand.adb (Create_Float_Types): Only consider C's long double for
4421 Long_Long_Float, in addition to double.
4423 2011-08-02 Robert Dewar <dewar@adacore.com>
4425 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4426 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4427 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4432 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4435 2011-08-02 Javier Miranda <miranda@adacore.com>
4437 * einfo.ads, einfo.adb
4438 (Original_Access_Type): Move this attribute to Node26 since there was
4439 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4440 which causes conflicts and breaks the generation of the .NET compiler.
4441 (Interface_Name): Add missing documentation on JGNAT only uses of
4444 2011-08-02 Geert Bosch <bosch@adacore.com>
4446 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4447 (Find_Back_End_Float_Type): Likewise
4448 (Create_Back_End_Float_Types): Likewise
4449 (Create_Float_Types): Likewise
4450 (Register_Float_Type): Likewise
4451 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4452 Nlist and split out type selection in new local Find_Base_Type function.
4453 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4455 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4457 2011-08-02 Robert Dewar <dewar@adacore.com>
4459 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4461 * opt.ads: Minor comment change.
4462 * sem_ch12.adb: Minor code reorganization.
4464 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4466 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4467 subtype's list of rep items to the list on the full subtype in the case
4468 where the lists are the same.
4470 2011-08-02 Geert Bosch <bosch@adacore.com>
4472 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4473 using the one from System.Strings, which also deallocates all strings.
4475 2011-08-02 Geert Bosch <bosch@adacore.com>
4477 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4479 * gcc-interface/Make-lang.in: Update dependencies.
4481 2011-08-02 Olivier Hainque <hainque@adacore.com>
4483 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4486 2011-08-02 Javier Miranda <miranda@adacore.com>
4488 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4489 associated with anonymous access to subprograms.
4491 2011-08-02 Geert Bosch <bosch@adacore.com>
4494 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4495 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4496 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4497 (Add_Symbol_Definition): Move to switch-c.adb
4498 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4499 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4500 (Add_Symbol_Definition): Move to switch-c.adb.
4501 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4503 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4505 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4506 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4508 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4509 (Add_Symbol_Definition): Moved from Prepcomp.
4510 * switch-c.ads: Update copyright notice. Use String_List instead of
4511 Argument_List, removing dependency on System.OS_Lib.
4513 2011-08-02 Yannick Moy <moy@adacore.com>
4515 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4516 mode on initialization expression which does not respect SPARK
4518 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4519 if the tree referenced by its argument represents an initialization
4520 expression in SPARK, suitable for initializing an object in an object
4523 2011-08-02 Javier Miranda <miranda@adacore.com>
4525 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4526 internally generated access to subprogram with its associated protected
4528 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4530 2011-08-02 Geert Bosch <bosch@adacore.com>
4532 * cstand.adb (Register_Float_Type): Print information about type to
4533 register, if the Debug_Flag_Dot_B is set.
4534 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4535 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4536 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4537 with a requested precision of more than Max_Digits digits and no more
4538 than Max_Base_Digits digits, if a range specification is present and the
4539 Predefined_Float_Types list has a suitable type to derive from.
4540 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4541 case of type completion with pragma Import
4543 (Process_Import_Predefined_Type): Processing to complete a type
4544 with pragma Import. Currently supports floating point types only.
4545 (Set_Convention_From_Pragma): Do nothing without underlying type.
4546 (Process_Convention): Guard against absence of underlying type,
4547 which may happen when importing incomplete types.
4548 (Process_Import_Or_Interface): Handle case of importing predefined
4549 types. Tweak error message.
4551 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4553 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4554 functions to previous change. Reorganize code slightly.
4556 2011-08-02 Geert Bosch <bosch@adacore.com>
4558 * back_end.ads (Register_Type_Proc): New call back procedure type for
4559 allowing the back end to provide information about available types.
4560 (Register_Back_End_Types): New procedure to register back end types.
4561 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4563 * cstand.adb (Back_End_Float_Types): New list for floating point types
4564 supported by the back end.
4565 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4566 (Copy_Float_Type): New procedure to make new copies of predefined types.
4567 (Register_Float_Type): New call back procedure to populate the BEFT list
4568 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4569 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4570 (Create_Float_Types): New procedure to create entities for floating
4571 point types predefined in Standard, and put these and any remaining
4572 BEFTs on the Predefined_Float_Types list.
4573 * stand.ads (Predefined_Float_Types): New list for predefined floating
4574 point types that do not have declarations in package Standard.
4576 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4578 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4579 entity node for the unit containing the parameter.
4580 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4581 (Add_Inlined_Subprogram): Likewise.
4582 * gcc-interface/Make-lang.in: Update dependencies.
4584 2011-08-02 Thomas Quinot <quinot@adacore.com>
4586 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4589 2011-08-02 Geert Bosch <bosch@adacore.com>
4591 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4593 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4595 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4596 computed value of Base_Type.
4598 2011-08-02 Yannick Moy <moy@adacore.com>
4600 * restrict.adb (Check_Restriction): issue an error for any use of
4601 class-wide, even if the No_Dispatch restriction is not set.
4602 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4603 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4604 when completing a private extension, the type named in the private part
4605 is not the same as that named in the visible part.
4606 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4607 of an inherited primitive operations of a tagged type or type extension
4608 that returns the tagged type.
4609 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4610 function which returns True for an implicit operation inherited by the
4611 derived type declaration for the argument type.
4612 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4615 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4617 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4618 Process_Bounds, to perform analysis with expansion of a range or an
4619 expression that is the iteration scheme for a loop.
4620 (Analyze_Iterator_Specification): If domain of iteration is given by a
4621 function call with a controlled result, as is the case if call returns
4622 a predefined container, ensure that finalization actions are properly
4624 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4626 2011-08-02 Javier Miranda <miranda@adacore.com>
4628 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4629 * gcc-interface/Make-lang.in: Update dependencies.
4631 2011-08-02 Javier Miranda <miranda@adacore.com>
4633 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4634 determine if the analysis is performed using N or Original_Node (N).
4635 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4636 functionality of routine Is_Variable avoids code duplication.
4637 * checks.adb (Determine_Range): Handle temporaries generated by
4638 Remove_Side_Effects.
4640 2011-08-02 Javier Miranda <miranda@adacore.com>
4642 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4643 expansion of the condition. Required since the previous analysis was
4644 done with expansion disabled (see Resolve_Quantified_Expression) and
4645 hence checks were not inserted and record comparisons have not been
4648 2011-08-02 Ed Falis <falis@adacore.com>
4650 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4653 2011-08-02 Bob Duff <duff@adacore.com>
4655 * opt.ads: Minor comment fix.
4657 2011-08-02 Bob Duff <duff@adacore.com>
4659 * sem_ch12.adb (Analyze_Package_Instantiation,
4660 Analyze_Subprogram_Instantiation): Turn off style checking while
4661 analyzing an instance. Whatever style checks that apply to the generic
4662 unit should apply, so it makes no sense to apply them in an instance.
4663 This was causing trouble when compiling an instance of a runtime
4664 unit that violates the -gnatyO switch.
4665 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4666 one of the two case statements, causing spurious errors.
4668 2011-08-02 Robert Dewar <dewar@adacore.com>
4670 * uname.adb: Minor reformatting.
4671 * gnatcmd.adb: Minor reformatting.
4672 * exp_attr.adb: Minor reformatting.
4674 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4676 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4677 No_Dispatching_Calls, do not look for the Assign primitive, because
4678 predefined primitives are not created in this case.
4680 2011-08-02 Bob Duff <duff@adacore.com>
4682 * stylesw.ads: Minor comment fixes.
4684 2011-08-02 Robert Dewar <dewar@adacore.com>
4686 * freeze.adb (Add_To_Result): New procedure.
4688 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4690 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4691 time, if the specific run-time routines for handling streams of strings
4692 are not available, use the default mechanism.
4694 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4696 * s-regpat.ads: Fix typo.
4698 2011-08-02 Vincent Celier <celier@adacore.com>
4700 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4701 not null, call it to create the in memory config project file without
4702 parsing an existing default config project file.
4704 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4706 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4708 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4710 * sem_elim.adb: an abstract subprogram does not need an eliminate
4711 pragma for its descendant to be eliminable.
4713 2011-08-02 Ed Falis <falis@adacore.com>
4715 * init.c: revert to handling before previous checkin for VxWorks
4716 * s-intman-vxworks.adb: delete unnecessary declarations related to
4717 using Ada interrupt facilities for handling signals.
4718 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4719 * s-intman-vxworks.ads: Import __gnat_install_handler as
4720 Initialize_Interrupts.
4721 * s-taprop-vxworks.adb: Delete Signal_Mask.
4722 (Abort_Handler): change construction of mask to unblock exception
4725 2011-08-02 Jerome Guitton <guitton@adacore.com>
4727 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4728 Debug_Raise_Exception before propagation starts.
4730 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4732 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4733 to Restriction_Check_Required.
4734 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4735 * sem_res.adb (Resolve_Call): Likewise.
4736 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4738 2011-08-02 Bob Duff <duff@adacore.com>
4740 * stylesw.ads: Update comment.
4741 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4742 * errout.ads: Remove obsolete comment.
4744 2011-08-02 Javier Miranda <miranda@adacore.com>
4746 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4747 (Set_Is_Safe_To_Reevaluate): new procedure.
4748 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4749 assignment is allowed on safe-to-reevaluate variables.
4750 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4751 temporary created to remove side effects in expressions that use
4752 the secondary stack as safe-to-reevaluate.
4753 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4754 variables that are not true constants.
4756 2011-08-02 Robert Dewar <dewar@adacore.com>
4758 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4759 sem_res.adb, sem_ch6.adb: Minor reformatting.
4761 2011-08-02 Jerome Guitton <guitton@adacore.com>
4763 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4765 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4767 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4768 not set Overridden_Operation if subprogram is an initialization
4771 2011-08-02 Yannick Moy <moy@adacore.com>
4773 * par-ch6.adb: Correct obsolete name in comments
4774 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4775 which takes two message arguments (existing function takes one), with
4776 second message used for continuation.
4777 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4778 block statements that originate from a source block statement, not
4779 generated block statements
4780 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4781 symmetry with procedure case
4782 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4783 function to issue an error in formal mode if a package specification
4784 contains more than one tagged type or type extension.
4785 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4786 parameters matching formals of tagged types are objects (or ancestor
4787 type conversions of objects), not general expressions. Issue an error
4788 on view conversions that are not involving ancestor conversion of an
4790 (Resolve_Type_Conversion): in formal mode, issue an error on the
4791 operand of an ancestor type conversion which is not an object
4792 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4793 procedure so that it works also for actuals of function calls
4794 (Is_Actual_Tagged_Parameter): new function which determines if its
4795 argument is an actual parameter of a formal of tagged type in a
4797 (Is_SPARK_Object_Reference): new function which determines if the tree
4798 referenced by its argument represents an object in SPARK
4800 2011-08-02 Robert Dewar <dewar@adacore.com>
4802 * sem_ch3.adb: Minor reformatting
4803 Minor comment addition
4804 Minor error msg text change
4806 2011-08-02 Javier Miranda <miranda@adacore.com>
4808 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4809 function. Used to be more precise when we generate a variable plus one
4810 assignment to remove side effects in the evaluation of the Bound
4812 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4813 of the bound expression to force its re-analysis and thus expand the
4814 associated transient scope (if required). Code cleanup replacing the
4815 previous code that declared the constant entity by an invocation to
4816 routine Force_Evaluation which centralizes this work in the frontend.
4818 2011-08-02 Robert Dewar <dewar@adacore.com>
4820 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4821 (Base_Type): Now uses improved Is_Base_Type function
4822 * einfo.ads (Base_Type): Inline this function
4824 2011-08-02 Robert Dewar <dewar@adacore.com>
4826 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4827 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4829 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4831 * gcc-interface/Make-lang.in: Update dependencies.
4832 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4835 2011-08-02 Yannick Moy <moy@adacore.com>
4837 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4838 non-simple expression used in delta constraint
4839 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4840 index constraint which is not a subtype mark
4841 * par.adb: With and use Restrict
4842 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4843 mode on component type which is not a subtype mark and default
4844 expression on component
4845 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4846 of string which does not have a lower index bound equal to 1
4847 (Array_Type_Declaration): issue an error in formal mode on index or
4848 component type which is not a subtype mark, and on aliased keyword on
4850 (Derived_Type_Declaration): issue an error in formal mode on interface,
4851 limited or abstract type
4852 (Record_Type_Declaration): issue an error in formal mode on interface
4853 (Record_Type_Definition): issue an error in formal mode on tagged types
4854 and type extensions not declared in the specification of a library unit
4855 package; on null non-tagged record; on variant part
4857 2011-08-02 Vincent Celier <celier@adacore.com>
4859 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4860 not declared for qualified library project when Library_Name is not
4861 declared, but Library_Dir is.
4863 2011-08-02 Robert Dewar <dewar@adacore.com>
4865 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4866 pragmas (affects aspects [Component_]Default_Value
4867 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4868 component type for the resolution
4870 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4872 * einfo.adb (Base_Type): Tune implementation for speed.
4874 2011-08-02 Robert Dewar <dewar@adacore.com>
4876 * freeze.adb: Minor reformatting.
4878 2011-08-02 Thomas Quinot <quinot@adacore.com>
4880 * scos.ads: Update comments.
4882 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4884 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4885 base type, because the parent may be a subtype of a private type whose
4886 convention is established in a private part.
4888 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4890 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4891 statement in a block when the expansion of the return expression has
4892 created a finalization chain.
4893 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4894 with the parent node.
4895 Add N_Extended_Return_Statement to handle the case where a transient
4896 object declaration appears in the Return_Object_Declarations list of
4897 an extended return statement.
4899 2011-08-02 Matthew Gingell <gingell@adacore.com>
4901 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4902 unused parameter 'name'.
4904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4906 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4907 inherited operation, check whether its alias, which is the source
4908 operastion that it renames, has been marked eliminated.
4910 2011-08-02 Javier Miranda <miranda@adacore.com>
4912 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4913 in-mode parameter whose type is an access type since it can be used to
4914 modify its designated object. Enforce code that handles as safe an
4915 access type that is not access-to-constant but it is the result of a
4916 previous removal of side-effects.
4917 (Remove_Side_Effects): Minor code reorganization of cases which require
4918 no action. Done to incorporate documentation on new cases uncovered
4919 working in this ticket: no action needed if this routine was invoked
4920 too early and the nodes are not yet decorated.
4921 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4922 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4923 were issued with actuals that are implicitly provided by
4926 2011-08-02 Robert Dewar <dewar@adacore.com>
4928 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4930 2011-08-02 Yannick Moy <moy@adacore.com>
4932 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4933 to issue an error in formal mode on attribute not supported in this mode
4934 (Analyze_Attribute): issue errors on standard attributes not supported
4936 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4937 comment, and issue error in formal mode on modulus which is not a power
4939 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4941 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4943 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4944 operator on modular type (except 'not').
4946 2011-08-02 Robert Dewar <dewar@adacore.com>
4948 * gnat_rm.texi: Minor reformatting.
4950 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4952 * s-osinte-linux.ads: Minor comment update and reformatting.
4953 * i-cexten.ads: Make this unit pure, as for its parent.
4954 Will allow its usage in more contexts if needed.
4956 2011-08-02 Robert Dewar <dewar@adacore.com>
4958 * s-utf_32.ads: Minor comment fix.
4960 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4962 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4963 operation of a tagged synchronized type, handle the case where the
4964 controlling argument is overloaded.
4966 2011-08-02 Yannick Moy <moy@adacore.com>
4968 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4969 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4970 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4971 SPARK mode and formal verification mode on processing SPARK restriction
4972 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4973 requiring consistency checking.
4975 2011-08-02 Robert Dewar <dewar@adacore.com>
4977 * sem_res.adb: Minor reformatting.
4979 2011-08-02 Robert Dewar <dewar@adacore.com>
4981 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4982 a-cforse.ads: Remove unneeded with of Ada.Containers
4983 Remove commented out pragma Inline's
4984 Move specifications of new subprograms to the actual specs
4986 2011-08-02 Yannick Moy <moy@adacore.com>
4988 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4989 a-cforse.ads: Update comments.
4991 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4993 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4995 2011-08-02 Robert Dewar <dewar@adacore.com>
4997 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4998 a-cforse.ads, a-cofove.ads: Minor reformatting.
5000 2011-08-02 Claire Dross <dross@adacore.com>
5002 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5003 a-cofove.ads: Add comments.
5005 2011-08-02 Yannick Moy <moy@adacore.com>
5007 * gnat_rm.texi: Document formal containers.
5009 2011-08-02 Emmanuel Briot <briot@adacore.com>
5011 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5014 2011-08-02 Robert Dewar <dewar@adacore.com>
5016 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5019 2011-08-02 Robert Dewar <dewar@adacore.com>
5021 * aspects.adb: New aspects Default_Value and Default_Component_Value
5022 New format of Aspect_Names table checks for omitted entries
5023 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5024 handling of boolean aspects for derived types.
5025 New aspects Default_Value and Default_Component_Value
5026 New format of Aspect_Names table checks for omitted entries
5027 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5028 (Has_Default_Value): New flag
5029 (Has_Default_Component_Value): New flag
5030 (Has_Default_Value): New flag
5031 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5033 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5034 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5035 Default_Value and Default_Component_Value
5036 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5037 New aspects Default_Value and Default_Component_Value
5038 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5039 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5041 2011-08-02 Vincent Celier <celier@adacore.com>
5043 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5044 inherit library kind.
5046 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5048 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5051 2011-08-02 Robert Dewar <dewar@adacore.com>
5053 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5055 2011-08-02 Yannick Moy <moy@adacore.com>
5057 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5059 2011-08-02 Robert Dewar <dewar@adacore.com>
5061 * impunit.adb: Add comment.
5063 2011-08-02 Yannick Moy <moy@adacore.com>
5065 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5066 qualification of aggregates in formal mode
5067 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5069 (Resolve_Aggregate): complete the test that an aggregate is adequately
5070 qualified in formal mode
5072 2011-08-02 Pascal Obry <obry@adacore.com>
5074 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5075 * mlib-prj.adb: Supress warning when compiling binder generated file.
5076 (Build_Library): Supress all warnings when compiling the binder
5079 2011-08-02 Yannick Moy <moy@adacore.com>
5081 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5083 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5084 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5085 Add with/use clauses to make Check_Formal_Restriction visible
5087 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5089 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5090 in-parameters when type of the generic formal is private in the generic
5091 spec and non-private in the body.
5093 2011-08-02 Claire Dross <dross@adacore.com>
5095 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5096 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5097 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5098 * impunit.adb, Makefile.rtl: Take new files into account.
5100 2011-08-02 Robert Dewar <dewar@adacore.com>
5102 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5103 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5105 2011-08-02 Yannick Moy <moy@adacore.com>
5107 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5109 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5110 matching static array bounds, taking into account the special case of
5112 * sem_ch3.adb: Typo in comment.
5114 2011-08-02 Yannick Moy <moy@adacore.com>
5116 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5117 which issues an error in formal mode if its argument node is originally
5119 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5120 has a discriminant specification so that it does not include the case
5122 (Derived_Type_Declaration): move here the test that a derived type has a
5123 discriminant specification
5124 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5125 first element of a component association before accessing its choices
5126 (presence of component association is not enough)
5127 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5128 declaration is a library item before accessing the next element in a
5129 list, as library items are not member of lists
5130 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5131 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5132 Check_Formal_Restriction whenever possible.
5134 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5136 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5137 reference when needed.
5139 2011-08-02 Bob Duff <duff@adacore.com>
5141 * gnat_ugn.texi: Fix typo.
5143 2011-08-02 Vincent Celier <celier@adacore.com>
5145 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5146 archive file name. Do not use the full path name of archives for Open
5149 2011-08-02 Robert Dewar <dewar@adacore.com>
5151 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5152 Analyze_Aspect_Specifications
5154 (Analyze_Aspect_Specifications): New handling for boolean aspects
5155 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5156 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5157 sequence for Analyze_Aspect_Specifications
5158 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5159 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5161 2011-08-02 Robert Dewar <dewar@adacore.com>
5163 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5164 aspects, since these no longer exist.
5166 2011-08-02 Robert Dewar <dewar@adacore.com>
5168 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5169 semicolon, do not try to see if there are aspects following it.
5170 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5173 2011-08-02 Robert Dewar <dewar@adacore.com>
5175 * sem_ch8.adb, aspects.ads: Minor reformatting.
5177 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5179 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5180 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5182 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5184 2011-08-02 Yannick Moy <moy@adacore.com>
5186 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5187 mode on subprogram declaration outside of package specification, unless
5188 it is followed by a pragma Import
5189 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5190 Access_Type_Declaration): issue error in formal mode on access type
5191 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5193 (Analyze_Object_Declaration): issue error in formal mode on object
5194 declaration which does not respect SPARK restrictions
5195 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5196 declaration which does not respect SPARK restrictions
5197 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5198 error in formal mode on digits or delta constraint
5199 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5200 decimal fixed point type
5201 (Derived_Type_Declaration): issue error in formal mode on derived type
5202 other than type extensions of tagged record types
5203 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5204 with check on access definition
5205 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5206 mode on protected definition.
5207 (Analyze_Task_Definition): issue error in formal mode on task definition
5209 2011-08-02 Robert Dewar <dewar@adacore.com>
5211 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5213 2011-08-02 Javier Miranda <miranda@adacore.com>
5215 * sem_ch6.adb (Can_Override_Operator): New function.
5216 (Verify_Overriding_Indicator): Add missing code to check overriding
5217 indicator in operators. Fixes regression.
5218 (Check_Overriding_Indicator): Minor reformating after replacing the
5219 code that evaluates if the subprogram can override an operator by
5220 invocations to the above new function.
5222 (Write_Field26_Name): Add missing code to ensure that, following
5223 the documentation in einfo.ads, this field is not shown as attribute
5224 "Static_Initialization" on non-dispatching functions.
5226 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5228 * sem_res.adb (Resolve_Call): A call to
5229 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5230 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5231 i.e., when the second parameter is of type Time_Span.
5233 2011-08-02 Vincent Celier <celier@adacore.com>
5235 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5236 with an archive instead of -L<library dir> -l<library name>.
5238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5240 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5241 mark the base types In_Use in addition to making the operations
5244 2011-08-02 Ed Falis <falis@adacore.com>
5246 * init.c: add and setup __gnat_signal_mask for the exception signals
5247 * s-inmaop-vxworks.adb: new file.
5248 * s-intman-vxworks.adb: remove unnecessary initializations and
5250 * s-intman-vxworks.ads: remove unnecessary variable
5251 * s-taprop-vxworks.adb: simplify signal initialization
5253 2011-08-02 Robert Dewar <dewar@adacore.com>
5255 * sem_ch8.adb: Minor code reorganization, comment updates.
5257 2011-08-02 Robert Dewar <dewar@adacore.com>
5259 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5260 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5262 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5263 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5267 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5268 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5269 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5270 use_type_clauses, to handle more efficiently use_type and use_all_type
5272 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5273 Ada2012 Use_All_Type clause.
5274 (Use_Class_Wide_Operations): new procedure.
5276 2011-08-02 Robert Dewar <dewar@adacore.com>
5278 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5279 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5280 expression to expression function.
5282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5284 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5285 if types are compatible.
5287 2011-08-02 Yannick Moy <moy@adacore.com>
5289 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5290 returns True if its argument array types have same dimension and same
5291 static bounds at each index.
5292 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5293 OUT or IN OUT paramaters which are not view conversions in SPARK.
5294 (Resolve_Arithmetic_Op): issue an error in formal mode on
5295 multiplication or division with operands of fixed point types which are
5296 not qualified or explicitly converted.
5297 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5298 Boolean or array type (except String) operands.
5299 (Resolve_Equality_Op): issue an error in formal mode on equality
5300 operators for array types other than String with non-matching static
5302 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5303 for array types with non-matching static bounds. Factorize the code in
5304 Matching_Static_Array_Bounds.
5305 (Resolve_Qualified_Expression): issue an error in formal mode on
5306 qualified expressions for array types with non-matching static bounds.
5307 (Resolve_Type_Conversion): issue an error in formal mode on type
5308 conversion for array types with non-matching static bounds
5310 2011-08-02 Robert Dewar <dewar@adacore.com>
5312 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5316 * par-ch9.adb: save location of entry for proper error message.
5318 2011-08-02 Javier Miranda <miranda@adacore.com>
5320 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5321 (Use_Full_View) which permits this routine to climb through the
5322 ancestors using the full-view of private parents.
5323 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5324 Use_Full_View to true in calls to Is_Ancestor.
5325 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5326 true in call to Is_Ancestor.
5327 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5328 Use_Full_View to true in call to Is_Ancestor.
5329 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5330 call to Is_Ancestor.
5331 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5332 Use_Full_View to true in calls to Is_Ancestor.
5333 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5334 Make_Select_Specific_Data_Table, Register_Primitive,
5335 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5336 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5337 to true in call to Is_Ancestor.
5338 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5339 Use_Full_View to true in calls to Is_Ancestor.
5341 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5342 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5344 2011-08-02 Robert Dewar <dewar@adacore.com>
5346 * gnat_rm.texi: Minor reformatting.
5347 * sem_prag.adb: Minor reformatting.
5349 2011-08-02 Tristan Gingold <gingold@adacore.com>
5351 * vms_data.ads: Add VMS qualifier for -gnateP.
5353 2011-08-02 Robert Dewar <dewar@adacore.com>
5355 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5356 * par-ch7.adb (P_Package): Proper placement of aspects for package
5358 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5359 (End_Statements): Add Is_Sloc parameterr
5360 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5361 (Check_End): Ad Is_Sloc parameter
5362 (End_Statements): Add Is_Sloc parameterr
5364 2011-08-02 Vincent Celier <celier@adacore.com>
5366 * ug_words: Add VMS qualifier equivalent to -gnateP:
5367 /SYMBOL_PREPROCESSING.
5369 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5371 * gnat-style.texi: For hexadecimal numeric literals the typical
5372 grouping of digits is 4 to represent 2 bytes.
5373 A procedure spec which is split into several lines is indented two
5376 2011-08-02 Yannick Moy <moy@adacore.com>
5378 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5379 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5380 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5382 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5383 choice in array aggregate
5384 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5386 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5387 positional and named aggregate for record, or others in record
5388 aggregate, or multiple choice in record aggregate
5389 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5390 array operands to logical operations AND, OR and XOR do not have the
5391 same static lower and higher bounds
5392 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5394 2011-08-01 Robert Dewar <dewar@adacore.com>
5396 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5397 Replaces Last_Source_Node_In_Sequence.
5398 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5399 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5400 parens and blank in string (this was inconsistently implemented).
5402 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5403 blank in string (this was inconsistently implemented).
5405 (Set_Global_Switches): Set formal mode switches appropriately
5406 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5408 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5409 call Set_Error_Msg_Lang to set "spark" as language name.
5410 * par.adb: Remove unnecessary call to set formal language for errout
5411 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5412 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5414 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5415 calls to it, moved after resolution so that types are known
5416 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5417 result of concatenation is not of type String
5418 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5419 concatenation is not properly restricted
5420 * gnat_rm.texi: Add doc on pragma Spark_95.
5421 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5422 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5423 * gcc-interface/Make-lang.in: Update dependencies.
5425 2011-08-01 Javier Miranda <miranda@adacore.com>
5427 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5428 condition that detects if the overridden operation must replace an
5431 2011-08-01 Javier Miranda <miranda@adacore.com>
5433 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5434 code declarations inserted by Insert_Actions in each alternative of the
5435 N_Case_Expression node.
5437 2011-08-01 Robert Dewar <dewar@adacore.com>
5439 * sem_ch6.adb: Minor code reorganization.
5440 * sem_util.adb: Minor reformatting.
5442 2011-08-01 Pascal Obry <obry@adacore.com>
5444 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5445 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5447 2011-08-01 Yannick Moy <moy@adacore.com>
5449 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5450 literal or operator symbol which is prefixed
5451 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5452 mode on access attributes.
5453 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5454 that concatenation operands are properly restricted in formal mode
5455 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5456 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5457 result of the concatenation has a type different from String.
5458 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5459 Analyze_Quantified_Expression, Analyze_Slice,
5460 Analyze_Null): issue an error in formal mode on unsupported constructs
5462 (Analyze_Block_Statement): only issue error on source block statement
5463 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5464 function which returns the last node in a list of nodes for which
5465 Comes_From_Source returns True, if any
5466 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5467 Last_Source_Node_In_Sequence
5468 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5469 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5470 mode on unsupported constructs
5471 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5472 rest of the actions may be needed later on since the error is marked as
5474 * sinfo.ads: Typos in comments.
5476 2011-08-01 Pascal Obry <obry@adacore.com>
5478 * projects.texi: Minor editing.
5480 2011-08-01 Yannick Moy <moy@adacore.com>
5482 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5483 insertion character ~~
5484 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5485 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5486 with insertion character ~~
5487 (Set_Msg_Text): treat insertion character ~~
5488 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5489 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5490 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5491 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5492 errors related to the formal language restriction not serious
5493 (insertion character |).
5494 * par.adb (Par): set formal language for error messages if needed
5495 * sem_ch6.adb (Check_Missing_Return): take into account possible
5496 generated statements at the end of the function
5497 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5498 enumeration value to define a new pragma SPARK_95
5499 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5500 SPARK_Version): new type and variables to store the SPARK version
5502 (SPARK_Mode): return True when SPARK_Version is set
5503 * par-prag.adb: Correct indentation
5504 (Prag): take Pragma_SPARK_95 into account
5505 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5508 2011-08-01 Robert Dewar <dewar@adacore.com>
5510 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5511 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5512 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5514 2011-08-01 Pascal Obry <obry@adacore.com>
5516 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5517 Target_Name to Get_Path call.
5518 (Parse_Single_Project): Likewise.
5519 (Post_Parse_Context_Clause): Likewise.
5520 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5521 Call Initialise_Project_Path with the proper Target_Name.
5522 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5524 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5525 with the proper Target_Name.
5526 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5528 (Parse_Project_And_Apply_Config): Likewise.
5529 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5530 This is fine as this part of the code is supporting only native
5532 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5533 is fine as this part of the code is supporting only native compilation.
5535 2011-08-01 Yannick Moy <moy@adacore.com>
5537 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5538 of homonym, unless the homonym is one of the cases allowed in SPARK
5539 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5540 package declaration occurring after a body.
5542 2011-08-01 Robert Dewar <dewar@adacore.com>
5544 * checks.adb, exp_ch4.adb: Minor reformatting.
5546 2011-08-01 Javier Miranda <miranda@adacore.com>
5548 * einfo.ads (Access_Disp_Table): Fix documentation.
5549 (Dispatch_Table_Wrappers): Fix documentation.
5551 2011-08-01 Pascal Obry <obry@adacore.com>
5553 * prj-env.adb, prj-env.ads: Minor reformatting.
5555 2011-08-01 Yannick Moy <moy@adacore.com>
5557 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5558 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5559 procedures out of these packages.
5560 * errout.ads, errout.adb
5561 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5562 procedures in of this package
5563 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5564 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5565 on misplaced later vs initial declarations, like in Ada 83
5566 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5567 formal mode on attribute of private type whose full type declaration
5569 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5570 package declaration inside a package specification
5571 (Analyze_Full_Type_Declaration): issue error in formal mode on
5572 controlled type or discriminant type
5573 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5574 user-defined operator means that it should come from the source
5575 (New_Overloaded_Entity): issue error in formal mode on overloaded
5577 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5579 2011-08-01 Thomas Quinot <quinot@adacore.com>
5581 * atree.adb: Minor reformatting.
5582 * checks.adb: Minor reformatting.
5584 2011-08-01 Vincent Celier <celier@adacore.com>
5586 * s-parame-vms-ia64.ads: Fix typo in comment
5588 * s-parame-vms-restrict.ads: Removed, unused.
5590 2011-08-01 Javier Miranda <miranda@adacore.com>
5593 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5595 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5596 * sem_ch3.ads, sem_ch3.adb
5597 (Is_Constant_Bound): New extended version of the subprogram that was
5598 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5599 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5600 * sem_aux.ads (Constant_Value): Fix typo in comment.
5601 * checks.adb (Generate_Index_Checks): New implementation which, for
5602 array objects with constant bounds, generates the runtime check
5603 referencing the bounds of the array type. For other cases this routine
5604 provides its previous behavior obtaining such values from the array
5606 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5608 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5609 we cannot have semantic interpretations of the new node.
5611 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5613 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5616 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5618 * sem_ch8.adb: Minor code editing.
5619 * s-vxwext.adb: Remove trailing space.
5620 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5621 consistency with other files.
5623 2011-08-01 Thomas Quinot <quinot@adacore.com>
5625 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5627 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5629 * par-ch10.adb: reject parameterized expressions as compilation unit.
5630 * sem_ch4.adb: handle properly conditional expression with overloaded
5631 then_clause and no else_clause.
5633 2011-08-01 Tristan Gingold <gingold@adacore.com>
5635 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5636 like done by System.Aux_DEC.
5637 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5639 2011-08-01 Yannick Moy <moy@adacore.com>
5641 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5642 missing label at end of declaration (subprogram or package)
5643 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5644 of positional and named parameter association
5645 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5646 Error_Msg_SP which adds a prefix to the error message giving the name
5647 of the formal language analyzed
5648 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5649 access result type in subprogram, unconstrained array as result type,.
5650 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5652 * sem_ch8.adb: Code clean up.
5654 2011-08-01 Javier Miranda <miranda@adacore.com>
5656 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5657 * einfo.ads (Access_Disp_Table): Fix documentation.
5658 (Dispatch_Table_Wrappers): Fix documentation.
5659 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5660 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5661 to enforce the documentation of this attribute.
5662 (Set_Is_Interface): Cleanup the assertion.
5663 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5664 the Underlying_Type entity before reading attribute Access_Disp_Table.
5665 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5666 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5667 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5668 the Underlying_Type entity before reading attribute Access_Disp_Table.
5669 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5670 Locate the Underlying_Type entity before reading attribute
5673 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5675 * s-poosiz.ads: Additional overriding indicators.
5677 2011-08-01 Yannick Moy <moy@adacore.com>
5679 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5681 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5682 parameter specification does not include a subtype mark.
5683 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5684 formal mode on abstract subprogram.
5685 (Analyze_Subprogram_Specification): issue error in formal mode on
5686 user-defined operator.
5687 (Process_Formals): issue error in formal mode on access parameter and
5689 * sem_ch9.adb (Analyze_Abort_Statement,
5690 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5691 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5692 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5693 Analyze_Requeue, Analyze_Selective_Accept,
5694 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5695 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5696 issue error in formal mode on user-defined raise statement.
5698 2011-08-01 Thomas Quinot <quinot@adacore.com>
5700 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5701 declaration being hidden when overriding an implicit inherited
5703 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5704 (-gnats), do not complain about a source file that contains only a
5707 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5709 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5710 variable if already set.
5712 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5714 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5715 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5716 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5717 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5718 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5719 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5720 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5721 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5722 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5723 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5724 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5725 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5726 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5727 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5728 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5729 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5730 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5731 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5732 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5733 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5734 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5735 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5736 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5737 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5738 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5739 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5740 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5741 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5742 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5743 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5744 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5745 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5746 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5747 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5748 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5749 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5750 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5751 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5752 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5753 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5754 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5755 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5756 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5757 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5758 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5759 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5760 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5761 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5762 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5763 Use GNAT instead of GNARL.
5765 2011-08-01 Bob Duff <duff@adacore.com>
5767 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5768 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5769 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5772 2011-08-01 Yannick Moy <moy@adacore.com>
5774 * debug.adb (d.D) reverve flag for the SPARK mode
5775 (d.E) reverve flag for SPARK generation mode
5776 (d.F) reverve flag for Why generation mode
5777 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5778 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5779 functions which return True when the corresponding modes are set
5780 (Formal_Language): return "spark" or "alfa" when in formal verification
5782 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5783 Error_Msg to prefix the error message with a tag giving the formal
5785 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5786 message with a tag giving the formal language
5787 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5789 (Analyze_Case_Statement): issue error in formal mode on case statement
5790 with a single "others" case alternative
5791 (Analyze_Exit_Statement): issue errors in formal mode on exit
5792 statements which do not respect SPARK restrictions
5793 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5794 (Check_Unreachable_Code): always issue an error (not a warning) in
5795 formal mode on unreachable code (concerns both code after an infinite
5796 loop and after an unconditional jump, both not allowed in SPARK)
5797 * sem_ch6.adb (Analyze_Return_Statement): add call to
5798 Set_Return_Present for a procedure containing a return statement
5799 (already done for functions in Analyze_Function_Return)
5800 (Analyze_Function_Return): issue error in formal mode on extended
5801 return or if return is not last statement in function
5802 (Check_Missing_Return): issue error in formal mode if function does
5803 not end with return or if procedure contains a return
5804 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5805 function to detect if there is an inner scope of its parameter S which
5808 2011-08-01 Thomas Quinot <quinot@adacore.com>
5810 * sem_ch6.ads: Minor reformatting.
5812 2011-08-01 Javier Miranda <miranda@adacore.com>
5814 * sem_util.adb (Abstract_Interface_List): Complete condition when
5815 processing private type declarations to avoid reading unavailable
5817 (Is_Synchronized_Tagged_Type): Complete condition when processing
5818 private extension declaration nodes to avoid reading unavailable
5821 2011-08-01 Thomas Quinot <quinot@adacore.com>
5823 * sem_ch3.adb: Minor reformatting.
5825 2011-08-01 Thomas Quinot <quinot@adacore.com>
5827 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5828 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5829 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5830 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5831 for VMS, instead parametrize the common implementation with
5832 System.Parameters declarations.
5834 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5836 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5838 2011-08-01 Tristan Gingold <gingold@adacore.com>
5840 * seh_init.c: Fix SEH handler installation on win64.
5842 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5844 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5845 double analysis of an anonymous access to subprogram, because it can
5846 lead to improper sharing of profiles and a back-end crash.
5848 2011-08-01 Robert Dewar <dewar@adacore.com>
5850 * make.adb, sem_ch4.adb: Minor reformatting.
5851 * gcc-interface/Make-lang.in: Update dependencies.
5852 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5854 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5856 * gnat_rm.texi: Fix definition of Long_Integer.
5858 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5860 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5861 to prevent storage exhaustion.
5862 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5863 finalized is a function body, insert the cleanup code before the final
5864 return statement, to prevent spurious warnings.
5865 * s-pooglo.ads: add overriding indicator.
5867 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5869 * sem_ch4.adb (Operator_Check): improve error message when both a
5870 with_clause and a use_clause are needed to make operator usage legal.
5871 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5872 determine whether a compilation unit is visible within an other,
5873 either through a with_clause in the current unit, or a with_clause in
5874 its library unit or one one of its parents.
5876 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5878 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5879 over an arbitrary expression of an array or container type.
5880 * lib-xref.adb: clarify comment.
5882 2011-08-01 Bob Duff <duff@adacore.com>
5884 * einfo.ads: Minor reformatting.
5885 * debug.adb: Minor comment improvement.
5887 2011-08-01 Javier Miranda <miranda@adacore.com>
5889 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5890 consider hidden subprograms as valid candidates.
5892 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5894 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5896 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5898 * gnat_ugn.texi: Fix typo.
5900 2011-08-01 Robert Dewar <dewar@adacore.com>
5902 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5903 lib-xref.adb: Minor reformatting
5905 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5907 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5908 when to generate a call to Move_Final_List.
5909 (Has_Controlled_Parts): Remove this function.
5911 2011-08-01 Geert Bosch <bosch@adacore.com>
5913 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5916 2011-08-01 Thomas Quinot <quinot@adacore.com>
5918 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5919 explicit raise of a predefined exception as Comes_From_Source if the
5920 original N_Raise_Statement comes from source.
5922 2011-08-01 Robert Dewar <dewar@adacore.com>
5924 * sinfo.ads: Add comment.
5925 * sem_ch6.adb: Minor reformatting.
5927 2011-08-01 Robert Dewar <dewar@adacore.com>
5929 * freeze.adb (Freeze_Entity): Refine check for bad component size
5930 clause to avoid rejecting confirming clause when atomic/aliased present.
5932 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5934 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5935 better determine whether an entity reference is a write.
5936 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5938 * lib-xref.adb (Output_References): Do no suppress a read reference at
5939 the same location as an immediately preceeding modify-reference, to
5940 handle properly in-out actuals.
5942 2011-08-01 Tristan Gingold <gingold@adacore.com>
5944 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5946 2011-08-01 Quentin Ochem <ochem@adacore.com>
5948 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5949 heap to compute the result.
5951 2011-08-01 Robert Dewar <dewar@adacore.com>
5953 * atree.ads: Minor reformatting.
5955 2011-08-01 Emmanuel Briot <briot@adacore.com>
5957 * g-expect.adb (Get_Command_Output): Fix memory leak.
5959 2011-08-01 Geert Bosch <bosch@adacore.com>
5961 * cstand.adb (P_Float_Type): New procedure to print the definition of
5962 predefined fpt types.
5963 (P_Mixed_Name): New procedure to print a name using mixed case
5964 (Print_Standard): Use P_Float_Type for printing floating point types
5965 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5966 precision IEEE float.
5968 2011-08-01 Thomas Quinot <quinot@adacore.com>
5970 * sem_ch3.adb: Minor reformatting.
5972 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5974 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5975 the completion of a generic function, insert the new body rather than
5976 rewriting the original.
5978 2011-08-01 Yannick Moy <moy@adacore.com>
5980 * sinfo.ads, errout.ads: Typos in comments.
5982 2011-08-01 Robert Dewar <dewar@adacore.com>
5984 * par-endh.adb: Minor reformatting.
5986 2011-08-01 Robert Dewar <dewar@adacore.com>
5988 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5989 (Pre_Post_Aspects): New subtype.
5990 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5991 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5992 * par-ch7.adb (P_Package): Remove Decl parameter
5993 (P_Package): Handle new syntax for aspects (before IS)
5994 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5996 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5997 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5998 (P_Package): Remove Decl parameter
5999 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6001 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6003 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6004 * sinfo.ads: Document new syntax for aspects in packages etc.
6005 * sprint.adb: Handle new syntax of aspects before IS in package
6007 2011-08-01 Thomas Quinot <quinot@adacore.com>
6009 * atree.ads: Minor reformatting.
6010 * sem_prag.adb: Minor reformatting.
6012 2011-08-01 Robert Dewar <dewar@adacore.com>
6014 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6015 case expr alternative.
6017 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6019 * sem_ch12.adb: Fix typo.
6021 2011-08-01 Geert Bosch <bosch@adacore.com>
6023 * sem_prag.adb (Check_No_Link_Name): New procedure.
6024 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6025 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6026 instead of Standard_Long_Long_Float_Size global. Preparation for
6027 eventual removal of per type constants.
6028 * exp_util.ads (Get_Stream_Size): New function returning the stream
6029 size value of subtype E.
6030 * exp_util.adb (Get_Stream_Size): Implement new function.
6031 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6033 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6035 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6037 2011-08-01 Geert Bosch <bosch@adacore.com>
6039 * cstand.adb: Fix comments.
6040 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6043 2011-08-01 Robert Dewar <dewar@adacore.com>
6045 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6047 2011-08-01 Geert Bosch <bosch@adacore.com>
6049 * atree.ads: Fix comment.
6051 2011-08-01 Robert Dewar <dewar@adacore.com>
6053 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6054 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6055 * par.adb: Add with for Namet.Sp.
6056 * par-tchk.adb: Minor reformatting.
6058 2011-08-01 Vincent Celier <celier@adacore.com>
6060 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6061 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6062 of the init procedure of a SAL.
6063 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6066 2011-08-01 Thomas Quinot <quinot@adacore.com>
6068 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6071 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6073 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6075 2011-08-01 Thomas Quinot <quinot@adacore.com>
6077 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6078 conformant with its spec (return True only for types that have
6079 an overriding Initialize primitive operation that prevents them from
6080 having preelaborable initialization).
6081 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6082 initialization for controlled types in Ada 2005 or later mode.
6084 2011-08-01 Robert Dewar <dewar@adacore.com>
6086 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6088 (Same_Aspect): New function.
6089 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6090 Type_Invariant, Precondition, Postcondition.
6091 * snames.ads-tmpl: Add Name_Type_Invariant.
6093 2011-08-01 Robert Dewar <dewar@adacore.com>
6095 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6097 (Freeze_All_Ent): Fix error in handling inherited aspects.
6098 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6099 already analyzed, but don't skip entire processing of a declaration,
6100 that's wrong in some cases of declarations being rewritten.
6101 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6102 Don't delay for integer, string literals
6103 Treat predicates in usual manner for delay, remove special case code,
6105 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6106 (Build_Predicate_Function): Update saved expression in aspect
6107 (Build_Invariant_Procedure): Update saved expression in aspect
6108 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6109 of replacement of discriminant references if the reference is simple.
6111 2011-08-01 Robert Dewar <dewar@adacore.com>
6113 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6114 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6115 Static_Predicate and Dynamic_Predicate.
6116 (Build_Predicate_Function): Add processing for Static_Predicate
6117 and Dynamic_Predicate.
6118 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6119 (From_Static_Predicate): New flag
6120 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6122 2011-08-01 Robert Dewar <dewar@adacore.com>
6124 * usage.adb: Documentation cleanup for Ada version modes in usage.
6125 * expander.adb: Minor reformatting.
6127 2011-08-01 Robert Dewar <dewar@adacore.com>
6129 * atree.ads: Minor comment fix.
6130 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6131 a-witeio.ads, sem_prag.adb: Minor reformatting.
6133 2011-08-01 Doug Rupp <rupp@adacore.com>
6135 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6136 pointers. Use descrip.h header file for convenience. Add some
6139 2011-08-01 Robert Dewar <dewar@adacore.com>
6141 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6142 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6143 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6145 (Check_Aspect_At_End_Of_Declarations): New procedure
6146 (Analye_Aspect_Specification): Minor changes for above procedures
6147 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6148 specification node as well.
6150 2011-08-01 Pascal Obry <obry@adacore.com>
6152 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6153 Windows files. Use GetFilesAttributes() in this case to check for file
6154 existence instead of returning with an error code.
6156 2011-08-01 Vincent Celier <celier@adacore.com>
6158 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6159 High is above Source length.
6161 2011-08-01 Robert Dewar <dewar@adacore.com>
6163 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6165 2011-08-01 Robert Dewar <dewar@adacore.com>
6167 * aspects.ads (Boolean_Aspects): New subtype.
6168 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6169 for derived types in cases where the parent type and derived type have
6171 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6172 with aspects when parent type also has aspects.
6173 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6174 boolean expression at this point).
6175 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6176 accordance with final decision on the Ada 2012 feature.
6177 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6179 2011-08-01 Matthew Heaney <heaney@adacore.com>
6181 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6183 2011-08-01 Pascal Obry <obry@adacore.com>
6185 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6186 Fix Replace_Slice when High is above current string size.
6187 (Replace_Slice): Fix DL computation when High is above current
6190 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6192 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6194 2011-08-01 Matthew Heaney <heaney@adacore.com>
6196 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6199 2011-08-01 Pascal Obry <obry@adacore.com>
6201 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6204 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6206 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6207 access to protected subprograms in generic bodies.
6208 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6209 protected type, indicate that the convention of the subprogram is
6210 Convention_Protected, because it may be used in subsequent declarations
6211 within the protected declaration.
6213 2011-08-01 Vincent Celier <celier@adacore.com>
6215 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6216 and "final" procedures when the name of the library is "ada", to avoid
6217 duplicate symbols "adainit" and "adafinal" in executables.
6219 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6221 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6222 quantified expression that appears within a postcondition and uses the
6223 Ada2012 'Result attribute.
6225 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6227 * init.c (__gnat_error_handler): Cast reason to int.
6228 (__gnat_install_handler): Explain sa_sigaction use.
6230 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6232 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6233 subprogram has copy-in copy-out parameters, try to promote the mode of
6234 the return type if it is passed in registers.
6236 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6238 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6239 left operand as addressable.
6241 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6243 * gcc-interface/gigi.h (build_function_stub): Remove.
6244 (build_return_expr): Likewise.
6245 (convert_vms_descriptor): Declare.
6246 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6247 (build_function_stub): Move to...
6248 * gcc-interface/utils2.c (build_return_expr): Move to...
6249 * gcc-interface/trans.c (build_function_stub): ...here.
6250 (build_return_expr): ...here.
6251 (Subprogram_Body_to_gnu): Add local variable for language_function.
6252 Disconnect the parameter attributes cache, if any, once done with it.
6253 Call end_subprog_body only after setting the end_locus.
6254 Build the stub associated with the function, if any, at the very end.
6255 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6256 variables and streamline control flow.
6258 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6261 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6264 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6267 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6268 Assign to act.sa_sigaction.
6269 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6270 current->return_address to char * before arithmetic.
6272 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6274 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6275 Correct argument types.
6276 Extract code from reason.
6277 (__gnat_install_handler): Assign to act.sa_sigaction.
6279 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6281 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6282 (GNAT1_OBJS): ...here.
6284 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6287 * g-socthi-mingw.adb (Fill): Fix formatting.
6289 * gcc-interface/gigi.h: Move around comment.
6291 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6294 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6296 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6299 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6301 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6303 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6304 range comparison if Pmode is SImode.
6306 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6307 Eric Botcazou <ebotcazou@adacore.com>
6309 * adadecode.c: Wrap up in extern "C" block.
6310 * adadecode.h: Likewise.
6311 * adaint.c: Likewise. Remove 'const' keyword.
6312 * adaint.h: Likewise.
6314 * atree.h: Likewise.
6316 * cstreams.c: Likewise.
6320 * final.c: Likewise.
6322 * initialize.c: Likewise.
6324 * namet.h: Likewise.
6325 * nlists.h: Likewise.
6326 * raise.c: Likewise.
6327 * raise.h: Likewise.
6328 * repinfo.h: Likewise.
6329 * seh_init.c: Likewise.
6330 * targext.c: Likewise.
6331 * tracebak.c: Likewise.
6332 * uintp.h: Likewise.
6333 * urealp.h: Likewise.
6334 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6335 * xsinfo.adb: Likewise.
6336 * xsnamest.adb: Likewise.
6337 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6338 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6339 * gcc-interface/misc.c: Likewise.
6340 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6341 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6342 ada/targext.o here...
6343 (GNAT_ADA_OBJS): ...and not here.
6344 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6345 (GNATBIND_OBJS): Reorder.
6347 2011-07-07 Richard Henderson <rth@redhat.com>
6349 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6350 dwarf2out_frame_init.
6352 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6354 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6356 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6359 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6361 2011-07-06 Richard Guenther <rguenther@suse.de>
6363 * gcc-interface/misc.c (gnat_init): Merge calls to
6364 build_common_tree_nodes and build_common_tree_nodes_2.
6365 Re-initialize boolean_false_node.
6367 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6368 Olivier Hainque <hainque@adacore.com>
6369 Nicolas Setton <setton@adacore.com>
6371 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6372 the type according to the ARTIFICIAL_P parameter.
6373 (create_type_decl): Likewise.
6374 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6376 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6378 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6379 (gnatbind): Likewise.
6381 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6383 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6385 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6387 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6388 local variable throughout. Remove useless call to Base_Type.
6389 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6390 Take it also into account for the volatileness of the field. Set the
6391 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6393 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6395 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6396 on a dereference built for a by-ref object if it has an address clause.
6398 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6400 * einfo.ads (Address_Taken): Document use for the second argument of
6401 Asm_Input and Asm_Output attributes.
6402 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6403 argument is an entity name, then set Address_Taken on it.
6404 <Attribute_Asm_Output>: Likewise.
6405 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6406 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6407 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6408 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6410 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6413 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6415 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6417 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6418 (ada/utils.o): Update dependencies.
6419 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6420 ../../../libcpp/libcpp.a.
6421 * gcc-interface/utils.c: Include common/common-target.h.
6422 (process_attributes): Use targetm_common.have_named_sections.
6424 2011-06-07 Richard Guenther <rguenther@suse.de>
6426 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6429 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6431 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6432 TREE_THIS_NOTRAP flag.
6434 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6436 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6439 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6441 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6442 constants whose full view has discriminants specially.
6444 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6446 * gcc-interface/utils.c: Include diagnostic.h.
6447 (gnat_write_global_declarations): Output debug information for all
6448 global type declarations before finalizing the compilation unit.
6449 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6451 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6453 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6455 2011-05-25 Kai Tietz <ktietz@redhat.com>
6457 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6458 initialization instead of const/none-const pointer assignment.
6460 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6462 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6463 $(EXTRA_GNAT1_OBJS).
6464 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6465 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6466 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6467 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6468 libcommon-target.a instead of prefix.o.
6470 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6473 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6475 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6477 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6478 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6479 instead of version.o.
6481 2011-05-18 Kai Tietz <ktietz@redhat.com>
6483 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6484 boolean_false_node instead of integer_zero_node.
6485 (convert_with_check): Likewise.
6486 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6488 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6490 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6491 type of the parameter is an unconstrained array, convert the actual to
6492 the type of the formal in the In Out and Out cases as well.
6494 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6496 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6497 call build_function_type_array or build_varargs_function_type_array
6499 (create_subprog_type): Don't call build_function_type; call
6500 build_function_type_vec instead.
6502 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6504 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6505 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6506 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6508 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6510 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6512 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6513 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6515 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6517 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6519 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6521 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6522 instead of accessing TYPE_ARG_TYPES directly.
6523 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6525 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6528 * gcc-interface/gigi.h (get_variant_part): Declare.
6529 * gcc-interface/decl.c (get_variant_part): Make global.
6530 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6531 types have the same constant size, are record types and T1 has a
6532 variant part while T2 doesn't.
6534 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6536 * gcc-interface/utils.c (begin_subprog_body): Do not call
6538 (end_subprog_body): Likewise.
6540 2011-05-04 Richard Guenther <rguenther@suse.de>
6542 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6544 (pos_to_constructor): Likewise.
6546 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6547 Eric Botcazou <ebotcazou@adacore.com>
6549 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6550 of build_function_type. Adjust calls to...
6551 (build_raise_check): ...this. Do not take a void_tree parameter.
6552 Call build_function_type_list instead of build_function_type.
6553 Fix head comment and swap couple of conditional blocks.
6555 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6557 * gnatvsn.ads (Library_Version): Bump to 4.7.
6558 (Current_Year): Bump to 2011.
6560 2011-04-29 Michael Matz <matz@suse.de>
6562 * gcc-interface/misc.c (gnat_handle_option): Set
6563 warn_maybe_uninitialized.
6565 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6567 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6568 the Watson/McCabe paper.
6570 2011-04-23 Jim Meyering <meyering@redhat.com>
6572 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6574 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6576 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6579 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6581 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6583 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6584 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6585 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6586 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6587 <all>: Do not set flags on the reused DECL node coming from an alias.
6588 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6589 don't need debug info here...
6590 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6591 (gigi): Adjust calls to create_subprog_decl.
6592 (build_raise_check): Likewise.
6593 (establish_gnat_vms_condition_handler): Likewise.
6594 (Compilation_Unit_to_gnu): Likewise.
6595 (gnat_to_gnu): Likewise.
6597 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6599 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6600 (NO_REORDER_ADAFLAGS): New variable.
6601 (EXTRA_GNATTOOLS): Always define.
6602 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6603 Clean up and adjust list of files compiled with special options.
6604 * gcc-interface/Make-lang.in: Likewise.
6605 (ada/decl.o): Cosmetical change.
6606 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6608 2011-04-20 Jim Meyering <meyering@redhat.com>
6610 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6612 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6614 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6615 $(CFLAGS) on the link line.
6617 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6619 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6620 padded type built for the return type if it is unconstrained.
6622 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6624 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6626 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6628 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6629 before calling TREE_CHAIN.
6630 * gcc-interface/misc.c (gnat_init_ts): New function.
6631 (LANG_HOOKS_INIT_TS): Define.
6633 2011-04-12 Martin Jambor <mjambor@suse.cz>
6635 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6636 instead of cgraph_node.
6638 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6640 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6641 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6644 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6646 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6647 of aggregate types that contain a placeholder.
6649 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6651 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6653 (handle_type_generic_attribute): Likewise.
6655 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6658 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6660 2011-04-04 Kai Tietz <ktietz@redhat.com>
6663 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6666 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6668 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6669 type case, do not strip a padding type around the array type.
6671 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6673 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6676 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6678 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6679 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6680 code for -feliminate-unused-debug-types.
6681 (gnat_post_options): Likewise.
6683 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6685 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6686 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6689 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6691 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6692 DECL_ARTIFICIAL flag on enumeration types.
6694 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6696 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6697 fat pointer types artificial unconditionally.
6698 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6701 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6703 * gcc-interface/gigi.h (get_dummy_type): Declare.
6704 (build_dummy_unc_pointer_types): Likewise.
6705 (finish_fat_pointer_type): Likewise.
6706 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6707 fat pointer type has been built, complete it in place.
6708 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6709 and thin pointers. Remove useless variable.
6710 (finish_fat_pointer_type): Make global and move to...
6711 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6712 (get_dummy_type): New function.
6713 (build_dummy_unc_pointer_types): Likewise.
6714 (gnat_pushdecl): Propage the name to the anonymous variants only.
6715 (update_pointer_to): Only adjust the pointer types in the unconstrained
6718 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6720 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6721 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6722 if this is a Taft amendment type and the full declaration is available.
6723 * gcc-interface/trans.c (process_type): Likewise.
6724 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6725 (process_freeze_entity): Likewise.
6726 * gcc-interface/utils.c (dummy_global): New static variable.
6727 (gnat_write_global_declarations): If there are types declared as used
6728 at the global level, insert them in the global hash table.
6730 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6732 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6733 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6734 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6736 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6737 flag of the type accordingly.
6738 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6740 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6742 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6743 finalizing types when updating the pointers to the designated type.
6744 <all>: Finalize the deferred types even if we didn't defer processing
6745 of incomplete types in this invocation.
6747 2011-04-01 Olivier Hainque <hainque@adacore.com>
6748 Nicolas Setton <setton@adacore.com>
6749 Eric Botcazou <ebotcazou@adacore.com>
6751 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6752 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6754 2011-03-28 Kai Tietz <ktietz@redhat.com>
6756 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6758 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6759 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6761 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6763 2011-03-28 Tristan Gingold <gingold@adacore.com>
6766 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6767 Use ada output of gnatbind.
6768 (ada/b_gnatb.adb): Ditto.
6769 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6770 (ada.mostlyclean, ada.stage1)
6771 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6772 (ada.stagefeedback): Adjust.
6773 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6774 Use ada output of gnatbind.
6775 (b_gnatm.adb): Ditto.
6776 (b_gnatl.o, b_gnatm.o): New rules.
6778 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6780 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6781 for the padded type built to support a specified size or alignment.
6783 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6785 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6786 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6787 unconditionally to the end of the unit when the designated type is
6789 <all>: Rename local variable. Attempt to un-defer types only and do it
6790 for limited_with'ed types as well.
6791 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6792 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6793 consistently and remove redundant call to finalize_from_with_types.
6795 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6797 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6798 subprograms without a previous spec declared in the same unit.
6799 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6800 subprograms at the end of the unit instead of at the beginning.
6801 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6802 isn't public for the special handling of non-inline functions nested
6803 inside inline external functions.
6805 2011-03-25 Jeff Law <law@redhat.com>
6807 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6809 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6811 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6812 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6813 to compute Set_Size_Depends_On_Discriminant.
6814 (Layout_Type): Call it on array types in back-end layout mode.
6815 * sem_util.adb (Requires_Transient_Scope): Return true for array
6816 types only if the size depends on the value of discriminants.
6817 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6818 type if the RHS is a call to a function that returns an unconstrained
6819 type with default discriminant.
6821 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6823 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6824 non-conversion to the nominal result type at the end.
6826 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6828 * gcc-interface/trans.c (create_temporary): New function taken from...
6829 (create_init_temporary): ...here. Call it.
6830 (call_to_gnu): Create the temporary for the return value early, if any.
6831 Create it for a function with copy-in/copy-out parameters if there is
6832 no target; in other cases of copy-in/copy-out, use another temporary.
6833 Push the new binding level lazily. Add and rename local variables.
6835 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6837 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6839 (set_rm_size): Likewise.
6841 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6843 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6844 for the padded type built in order to support a specified alignment.
6845 Fix incorrect formatting.
6847 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6850 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6852 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6854 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6855 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6856 to the end of the list. Adjust recursive call. Rename local variable.
6857 If REORDER is true, reorder components of the record type.
6858 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6859 components_to_record and adjust the parameter list.
6861 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6863 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6864 disabled, use the variable for bounds of loop iteration scheme.
6866 2011-03-21 Kai Tietz <ktietz@redhat.com>
6869 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6871 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6873 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6874 out whether the expression is read-only. Short-circuit placeholder
6875 case and rename a couple of local variables.
6877 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6879 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6880 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6881 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6882 (convert): Deal with conversions from a smaller form type specially.
6884 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6886 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6887 its argument, except for the special -I- switch.
6889 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6891 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6894 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6896 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6898 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6900 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6902 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6903 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6904 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6905 Do not generate the check directly, instead instantiate the template
6906 check present in the descriptor.
6907 (make_descriptor_field): Move around.
6908 (build_vms_descriptor32): Build a template check in the POINTER field.
6909 (build_vms_descriptor): Remove useless suffixes.
6910 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6912 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6915 * targext.c: Include target files if IN_RTS is defined.
6917 2011-01-26 Richard Guenther <rguenther@suse.de>
6920 * targext.c: Include config.h.
6921 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6924 2011-01-04 Pascal Obry <obry@adacore.com>
6925 Eric Botcazou <ebotcazou@adacore.com>
6927 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6929 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6931 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6932 end-of-case on the end label and its associated gotos, if any.
6934 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6936 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6937 expressions of the parameter cache within the statement group of
6940 2011-01-04 Olivier Hainque <hainque@adacore.com>
6941 Eric Botcazou <ebotcazou@adacore.com>
6943 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6944 (set_end_locus_from_node): New function.
6945 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6946 make and the function end_locus.
6947 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6948 for the elaboration subprogram.
6949 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6950 set the end_locus of the expression as well.
6952 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6955 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6956 variables that are referenced in exception handlers volatile.
6960 Copyright (C) 2011 Free Software Foundation, Inc.
6962 Copying and distribution of this file, with or without modification,
6963 are permitted in any medium without royalty provided the copyright
6964 notice and this notice are preserved.
6966 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6967 - fix bugs in the description of Source_Trace;
6968 - get rid of UNIT_NAME;
6970 2011-08-02 Javier Miranda <miranda@adacore.com>
6973 (Build_Dispatching_Requeue): Adding support for VM targets
6974 since we cannot directly reference the Tag entity.
6975 * exp_sel.adb (Build_K): Adding support for VM targets.
6976 (Build_S_Assignment): Adding support for VM targets.
6978 (Default_Prim_Op_Position): In VM targets do not restrict availability
6979 of predefined interface primitives to compiling in Ada 2005 mode.
6980 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6981 restricted to compiling in Ada 2005 mode.
6982 (Make_VM_TSD): Generate code that declares and initializes the OSD
6983 record. Needed to support dispatching calls through synchronized
6986 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6987 primitives associated with synchronized interfaces.
6988 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6989 primitives associated with synchronized interfaces.
6991 2011-08-02 Yannick Moy <moy@adacore.com>
6993 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6994 statements hidden in SPARK if preceded by the HIDE directive
6995 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6996 exception handlers as hidden in SPARK if preceded by the HIDE directive
6997 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6998 if starting with the HIDE directive
6999 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7000 starting with the HIDE directive; mark the declarations in a private
7001 part as hidden in SPARK if the private part starts with the HIDE
7003 * restrict.adb, restrict.ads
7004 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7005 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7006 argument node belongs to a part which is hidden in SPARK
7007 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7008 parts in SPARK; protect the possibly costly call to
7009 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7010 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7011 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7012 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7014 (Scan): recognize special comment starting with '#' and followed by
7015 SPARK keyword "hide" as a HIDE directive.
7017 2011-08-02 Yannick Moy <moy@adacore.com>
7019 * types.ads, erroutc.ads: Minor reformatting.
7021 2011-08-02 Vincent Celier <celier@adacore.com>
7023 * link.c: Add response file support for cross platforms.
7025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7027 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7028 in an association, set parent field of copy before partial analysis.
7029 * sem_res.adb (Resolve_Slice): create reference to itype only when
7030 expansion is enabled.
7032 2011-08-02 Yannick Moy <moy@adacore.com>
7034 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7035 for new flag denoting which subprogram bodies are in ALFA
7036 * restrict.adb, sem_ch7.adb: Update comment
7037 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7038 sem_ch9.adb, sem_res.adb: Add calls to
7039 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7040 * sem_ch6.adb (Analyze_Function_Return): add calls to
7041 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7042 middle of the body, and extended return.
7043 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7044 False when missing return.
7045 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7046 to True for subprograms whose spec is in ALFA. Remove later on the flag
7047 on the entity used for a subprogram body when there exists a separate
7049 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7050 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7051 False, otherwise do nothing.
7053 2011-08-02 Robert Dewar <dewar@adacore.com>
7055 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7057 2011-08-02 Yannick Moy <moy@adacore.com>
7059 * sem_ch4.ads: minor formatting.
7061 2011-08-02 Yannick Moy <moy@adacore.com>
7063 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7064 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7065 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7066 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7067 opt.ads: cleanup of SPARK mode
7069 2011-08-02 Yannick Moy <moy@adacore.com>
7071 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7073 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7074 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7076 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7077 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7078 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7079 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7081 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7083 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7084 functions whose return type is not in ALFA.
7085 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7087 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7088 parameter's type is not in ALFA.
7089 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7092 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7094 * sem_ch6 (Analyze_Expression_Function): treat the function as
7095 Inline_Always, and introduce a subprogram declaration for it when it is
7097 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7098 expression functions, so that the back-end can determine whether they
7099 can in fact be inlined.
7100 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7101 a function body comes from an expression function.
7103 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7105 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7106 null exclusions to test Can_Never_Be_Null on the anonymous access types
7107 of the formals rather than testing the formals themselves. Exclude this
7108 check in cases where the Old_Formal is marked as a controlling formal,
7109 to avoid issuing spurious errors for bodies completing dispatching
7110 operations (due to the flag not getting set on controlling access
7111 formals in body specs).
7112 (Find_Corresponding_Spec): When checking full and subtype conformance of
7113 subprogram bodies in instances, pass Designated and E in that order, for
7114 consistency with the expected order of the formals (New_Id followed by
7117 2011-08-02 Robert Dewar <dewar@adacore.com>
7119 * sem_ch8.adb: Minor reformatting.
7121 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7123 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7124 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7125 primitive operations of class-wide actuals.
7127 2011-08-02 Javier Miranda <miranda@adacore.com>
7129 * exp_atag.ads, exp_atag.adb
7130 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7131 since its value is implicitly passed in argument Typ.
7132 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7133 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7134 Build_Common_Dispatching_Select_Statements.
7136 2011-08-02 Robert Dewar <dewar@adacore.com>
7138 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7139 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7142 2011-08-02 Robert Dewar <dewar@adacore.com>
7144 * sem_res.adb: Minor reformatting.
7145 * sem_prag.adb: Minor reformatting.
7147 2011-08-02 Javier Miranda <miranda@adacore.com>
7149 * exp_atag.adb, exp_atags.ads
7150 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7151 by the tagged type Entity. Required to use this routine in the VM
7152 targets since we do not have available the Tag entity in the VM
7155 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7156 Ada.Tags has not been previously loaded.
7158 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7159 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7161 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7162 view of enclosing scopes. Required to handle enclosing scopes that
7163 are synchronized types whose full view is a task type.
7165 (Build_VM_TSDs): Minor code improvement to avoid generating and
7166 analyzing lists with empty nodes.
7167 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7168 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7169 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7170 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7171 (Make_Select_Specific_Data_Table): Add support for VM targets.
7172 (Make_VM_TSD): Generate code to initialize the SSD structure of
7175 2011-08-02 Yannick Moy <moy@adacore.com>
7177 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7178 cross-references section in ALI.
7179 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7180 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7182 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7183 subprogram or package entity of a node
7184 (Is_Local_Reference_Type): new function returns True for references
7185 selected in local cross-references.
7186 (Lt): function extracted from Lt in Output_References
7187 (Write_Entity_Name): function extracted from Output_References
7188 (Generate_Definition): generate reference with type 'D' for definition
7189 of objects (object declaration and parameter specification), with
7190 appropriate locations and units, for use in local cross-references.
7191 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7192 references of type 'I' for initialization in object definition.
7193 (Output_References): move part of function Lt and procedure
7194 Write_Entity_Name outside of the body. Ignore references of types 'D'
7195 and 'I' introduced for local cross-references.
7196 (Output_Local_References): new procedure to output the local
7197 cross-references sections.
7198 (Lref_Entity_Status): new array defining whether an entity is a local
7199 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7200 with 'I' type when initialization expression is present.
7201 * get_scos.adb, get_scos.ads: Correct comments and typos
7203 2011-08-02 Javier Miranda <miranda@adacore.com>
7205 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7207 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7209 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7212 2011-08-02 Vincent Celier <celier@adacore.com>
7214 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7215 (No_Space_Img): New function
7216 (Find_Excluded_Sources): When reading from a file, record the file name
7217 and the line number for each excluded source.
7218 (Mark_Excluded_Sources): When reporting an error, if the excluded
7219 sources were read from a file, include file name and line number in
7222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7224 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7226 2011-08-02 Robert Dewar <dewar@adacore.com>
7228 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7230 2011-08-02 Javier Miranda <miranda@adacore.com>
7232 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7233 generation of TSDs to the DOTNET compiler.
7234 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7235 generation of TSDs to the DOTNET compiler.
7237 2011-08-02 Javier Miranda <miranda@adacore.com>
7239 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7240 record of all the tagged types declared inside library level package
7241 declarations, library level package bodies or library level subprograms.
7242 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7243 associated with a given tagged type.
7244 (Build_VM_TSDs): New subprogram.
7245 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7246 compilation units that are subprograms.
7247 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7248 compilation units that are package bodies.
7249 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7250 units that are a package declaration or a package instantiation.
7251 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7252 reorganization to improve the error generated by the frontend when the
7253 function Ada.Tags.Secondary_Tag is not available.
7254 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7255 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7257 2011-08-02 Javier Miranda <miranda@adacore.com>
7259 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7261 2011-08-02 Robert Dewar <dewar@adacore.com>
7263 * s-imenne.ads: Minor reformatting.
7265 2011-08-02 Robert Dewar <dewar@adacore.com>
7267 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7268 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7269 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7271 2011-08-02 Robert Dewar <dewar@adacore.com>
7273 * einfo.ads (Materialize_Entity): Document this is only for renamings
7274 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7275 required debug information in the case where we transform the object
7276 declaration into a renaming declaration.
7277 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7279 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7282 2011-08-02 Robert Dewar <dewar@adacore.com>
7284 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7285 Suppress_Init_Procs.
7286 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7287 Suppress_Initialization/Initialization_Suppressed.
7288 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7289 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7290 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7291 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7293 2011-08-02 Robert Dewar <dewar@adacore.com>
7295 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7300 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7301 only have inheritable classwide pre/postconditions.
7303 2011-08-02 Javier Miranda <miranda@adacore.com>
7305 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7306 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7307 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7308 checks if the external tag of a type is the same as the external tag
7309 of some other declaration.
7311 2011-08-02 Thomas Quinot <quinot@adacore.com>
7313 * s-taskin.ads: Minor reformatting.
7315 2011-08-02 Emmanuel Briot <briot@adacore.com>
7317 * g-comlin.adb (Display_Help): swap the order in which it prints the
7318 short help and the general usage.
7320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7322 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7323 the aspect declarations and attach them to the generic copy for
7324 subsequent analysis.
7325 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7326 declarations of the generic tree to the new subprogram declarations.
7327 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7328 conditions that apply to a subprogram instance.
7330 2011-08-02 Robert Dewar <dewar@adacore.com>
7332 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7334 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7336 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7337 private type with a tagged full view is not derived in the immediate
7338 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7340 2011-08-02 Robert Dewar <dewar@adacore.com>
7342 * exp_ch4.adb: Minor reformatting.
7344 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7346 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7347 Ada2012 iterator, the loop will be rewritten during expansion into a
7348 while loop with a cursor and an element declaration. Do not analyze the
7349 body in this case, because if the container is for indefinite types the
7350 actual subtype of the elements will only be determined when the cursor
7351 declaration is analyzed.
7353 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7355 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7356 size/alignment related attributes in CodePeer_Mode.
7358 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7360 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7361 Prepend_Element, since this can result in the operation getting the
7362 wrong slot in the full type's dispatch table if the full type has
7363 inherited operations. The incomplete type's operation will get added
7364 to the proper position in the full type's primitives
7365 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7366 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7367 dispatching operations, since there are cases where nonprimitive
7368 subprograms can get added to the list of incomplete dependents (such
7369 as subprograms in nested packages).
7370 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7371 private part when determining whether to add a primitive with a
7372 parameter of a tagged incomplete type to the Private_Dependents list.
7373 Such primitives can also occur in the visible part, and should not have
7374 been excluded from being private dependents.
7375 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7376 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7377 list of a Taft-amendment incomplete type is a primitive before issuing
7378 an error that the full type must appear in the same unit. There are
7379 cases where nonprimitives can be in the list (such as subprograms in
7381 * sem_disp.adb (Derives_From): Use correct condition for checking that
7382 a formal's type is derived from the type of the corresponding formal in
7383 the parent subprogram (the condition was completely wrong). Add
7384 checking that was missing for controlling result types being derived
7385 from the result type of the parent operation.
7387 2011-08-02 Yannick Moy <moy@adacore.com>
7389 * errout.adb (First_Node): minor renaming
7390 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7393 2011-08-02 Yannick Moy <moy@adacore.com>
7395 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7396 before accessing operands.
7397 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7398 decide whether an initialization expression respects SPARK rules, as
7399 the plain node is the expanded one. This allows for more valid warnings
7401 * gnat_rm.texi: Minor update.
7403 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7405 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7408 2011-08-02 Robert Dewar <dewar@adacore.com>
7410 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7412 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7414 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7415 loop statements and the element renaming declaration with a block when
7416 the element type is controlled.
7418 2011-08-02 Yannick Moy <moy@adacore.com>
7420 * sinfo.ads: Minor formatting.
7422 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7424 * sem_aggr.adb (Add_Association): if the association has a box and no
7425 expression, use the Sloc of the aggregate itself for the new
7427 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7430 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7432 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7433 When a container is provided via a function call, generate a renaming
7434 of the function result. This avoids the creation of a transient scope
7435 and the premature finalization of the container.
7436 * exp_ch7.adb (Is_Container_Cursor): Removed.
7437 (Wrap_Transient_Declaration): Remove the supression of the finalization
7438 of the list controller when the declaration denotes a container cursor,
7441 2011-08-02 Yannick Moy <moy@adacore.com>
7443 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7444 node is from source, instead of the original node being from source.
7446 (Resolve_Array_Aggregate): refine the check for a static expression, to
7447 recognize also static ranges
7448 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7449 Array_Type_Declaration): postpone the test for the type being a subtype
7450 mark after the type has been resolved, so that component-selection and
7451 expanded-name are discriminated.
7452 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7453 to distinguish the case of an iteration scheme, so that an error is
7454 issed on a non-static range in SPARK except in an iteration scheme.
7455 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7456 In_Iter_Schm = True.
7457 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7458 user-defined operators so that they are allowed in renaming
7460 (Find_Selected_Component): refine the check for prefixing of operators
7461 so that they are allowed in renaming. Move the checks for restrictions
7462 on selector name after analysis discriminated between
7463 component-selection and expanded-name.
7464 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7465 concatenation argument of string type if it is static.
7466 * sem_util.adb, sem_util.ads
7467 (Check_Later_Vs_Basic_Declarations): add a new function
7468 Is_Later_Declarative_Item to decice which declarations are allowed as
7469 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7470 mode, add that renamings are considered as later items.
7471 (Enclosing_Package): new function to return the enclosing package
7472 (Enter_Name): correct the rule for homonyms in SPARK
7473 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7474 from source (result of expansion) to avoid issuing wrong warnings.
7476 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7478 * errout.adb: On anything but an expression First_Node returns its
7481 2011-08-02 Pascal Obry <obry@adacore.com>
7483 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7485 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7487 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7488 Set the associated loop as the related expression of internally
7490 * exp_ch7.adb (Is_Container_Cursor): New routine.
7491 (Wrap_Transient_Declaration): Supress the finalization of the list
7492 controller when the declaration denotes a container cursor.
7494 2011-08-02 Yannick Moy <moy@adacore.com>
7496 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7498 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7499 expression is a simple expression. This check cannot be performed in
7500 the semantics, so just drop it.
7501 (P_Index_Or_Discriminant_Constraint): move check that the index or
7502 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7503 semantics. Other cases were previously checked in the semantics.
7504 * par-ch4.adb (P_Name): move checks that a selector name is not
7505 character literal or an operator symbol to Find_Selected_Component in
7507 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7508 declarations are not placed after later declarations in a separate
7509 procedure in Sem_Util (possibly not the best choice?), to be used both
7510 during parsing, for Ada 83 mode, and during semantic analysis, for
7512 * par-endh.adb (Check_End): move check that end label is not missing
7513 to Process_End_Label in the semantics
7514 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7515 the special case for SPARK restriction
7516 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7517 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7518 parameter Force to issue the error message even on internal node (used
7519 for generated end label). Call Check_Restriction to check when an error
7520 must be issued. In SPARK mode, issue an error message even if the
7521 restriction is not set.
7522 (Check_Restriction): new procedure with an additional out parameter to
7523 inform the caller that a message has been issued
7524 * sem_aggr.adb: Minor modification of message
7525 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7526 instead of issuing an error message directly
7527 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7528 declarations are not placed after later declarations, by calling
7529 Check_Later_Vs_Basic_Declarations
7530 (Analyze_Subtype_Declaration): move here the check that an index or
7531 discriminant constraint must be a subtype mark. Change the check that
7532 a subtype of String must start at one so that it works on subtype marks.
7533 * sem_ch4.adb (Analyze_Call): move here the check that a named
7534 association cannot follow a positional one in a call
7535 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7536 instead of issuing an error message directly
7537 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7538 selector name is not a character literal or an operator symbol. Move
7539 here the check that the prefix of an expanded name cannot be a
7540 subprogram or a loop statement.
7541 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7542 procedure called from parsing and semantics to check that basic
7543 declarations are not placed after later declarations
7544 (Process_End_Label): move here the check that end label is not missing
7546 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7548 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7549 representation clause in codepeer mode, since it confuses CodePeer and
7550 does not bring useful info.
7552 2011-08-02 Ed Falis <falis@adacore.com>
7554 * init.c: initialize fp hw on MILS.
7556 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7558 * errout.adb (First_Node): for bodies, return the node itself (small
7559 optimization). For other nodes, do not check source_unit if the node
7560 comes from Standard.
7562 2011-08-02 Robert Dewar <dewar@adacore.com>
7564 * exp_ch3.adb: Minor comment additions.
7565 * sem_ch13.adb: Minor reformatting.
7567 2011-08-02 Pascal Obry <obry@adacore.com>
7569 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7571 2011-08-02 Robert Dewar <dewar@adacore.com>
7573 * sem_attr.adb: Minor reformatting.
7575 2011-08-02 Robert Dewar <dewar@adacore.com>
7577 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7578 (Has_Default_Component_Value): Removed
7579 * einfo.ads Comment updates
7580 (Has_Default_Aspect): Replaces Has_Default_Value
7581 (Has_Default_Component_Value): Removed
7583 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7585 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7586 (Get_Simple_Init_Val): Handle Default_Value aspect
7587 (Needs_Simple_Initialization): Handle Default_Value aspect
7588 * exp_ch3.ads: Needs_Simple_Initialization
7589 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7590 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7592 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7593 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7594 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7596 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7598 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7599 package containing iteration primitives.
7600 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7602 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7604 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7605 "of", pre-analyze expression in case it is a function call with
7606 finalization actions that must be placed ahead of the loop.
7607 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7608 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7610 2011-08-02 Geert Bosch <bosch@adacore.com>
7612 * cstand.adb (Create_Float_Types): Only consider C's long double for
7613 Long_Long_Float, in addition to double.
7615 2011-08-02 Robert Dewar <dewar@adacore.com>
7617 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7618 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7619 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7622 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7624 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7627 2011-08-02 Javier Miranda <miranda@adacore.com>
7629 * einfo.ads, einfo.adb
7630 (Original_Access_Type): Move this attribute to Node26 since there was
7631 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7632 which causes conflicts and breaks the generation of the .NET compiler.
7633 (Interface_Name): Add missing documentation on JGNAT only uses of
7636 2011-08-02 Geert Bosch <bosch@adacore.com>
7638 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7639 (Find_Back_End_Float_Type): Likewise
7640 (Create_Back_End_Float_Types): Likewise
7641 (Create_Float_Types): Likewise
7642 (Register_Float_Type): Likewise
7643 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7644 Nlist and split out type selection in new local Find_Base_Type function.
7645 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7647 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7649 2011-08-02 Robert Dewar <dewar@adacore.com>
7651 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7653 * opt.ads: Minor comment change.
7654 * sem_ch12.adb: Minor code reorganization.
7656 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7658 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7659 subtype's list of rep items to the list on the full subtype in the case
7660 where the lists are the same.
7662 2011-08-02 Geert Bosch <bosch@adacore.com>
7664 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7665 using the one from System.Strings, which also deallocates all strings.
7667 2011-08-02 Geert Bosch <bosch@adacore.com>
7669 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7671 * gcc-interface/Make-lang.in: Update dependencies.
7673 2011-08-02 Olivier Hainque <hainque@adacore.com>
7675 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7678 2011-08-02 Javier Miranda <miranda@adacore.com>
7680 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7681 associated with anonymous access to subprograms.
7683 2011-08-02 Geert Bosch <bosch@adacore.com>
7686 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7687 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7688 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7689 (Add_Symbol_Definition): Move to switch-c.adb
7690 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7691 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7692 (Add_Symbol_Definition): Move to switch-c.adb.
7693 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7695 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7697 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7698 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7700 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7701 (Add_Symbol_Definition): Moved from Prepcomp.
7702 * switch-c.ads: Update copyright notice. Use String_List instead of
7703 Argument_List, removing dependency on System.OS_Lib.
7705 2011-08-02 Yannick Moy <moy@adacore.com>
7707 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7708 mode on initialization expression which does not respect SPARK
7710 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7711 if the tree referenced by its argument represents an initialization
7712 expression in SPARK, suitable for initializing an object in an object
7715 2011-08-02 Javier Miranda <miranda@adacore.com>
7717 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7718 internally generated access to subprogram with its associated protected
7720 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7722 2011-08-02 Geert Bosch <bosch@adacore.com>
7724 * cstand.adb (Register_Float_Type): Print information about type to
7725 register, if the Debug_Flag_Dot_B is set.
7726 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7727 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7728 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7729 with a requested precision of more than Max_Digits digits and no more
7730 than Max_Base_Digits digits, if a range specification is present and the
7731 Predefined_Float_Types list has a suitable type to derive from.
7732 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7733 case of type completion with pragma Import
7735 (Process_Import_Predefined_Type): Processing to complete a type
7736 with pragma Import. Currently supports floating point types only.
7737 (Set_Convention_From_Pragma): Do nothing without underlying type.
7738 (Process_Convention): Guard against absence of underlying type,
7739 which may happen when importing incomplete types.
7740 (Process_Import_Or_Interface): Handle case of importing predefined
7741 types. Tweak error message.
7743 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7745 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7746 functions to previous change. Reorganize code slightly.
7748 2011-08-02 Geert Bosch <bosch@adacore.com>
7750 * back_end.ads (Register_Type_Proc): New call back procedure type for
7751 allowing the back end to provide information about available types.
7752 (Register_Back_End_Types): New procedure to register back end types.
7753 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7755 * cstand.adb (Back_End_Float_Types): New list for floating point types
7756 supported by the back end.
7757 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7758 (Copy_Float_Type): New procedure to make new copies of predefined types.
7759 (Register_Float_Type): New call back procedure to populate the BEFT list
7760 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7761 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7762 (Create_Float_Types): New procedure to create entities for floating
7763 point types predefined in Standard, and put these and any remaining
7764 BEFTs on the Predefined_Float_Types list.
7765 * stand.ads (Predefined_Float_Types): New list for predefined floating
7766 point types that do not have declarations in package Standard.
7768 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7770 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7771 entity node for the unit containing the parameter.
7772 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7773 (Add_Inlined_Subprogram): Likewise.
7774 * gcc-interface/Make-lang.in: Update dependencies.
7776 2011-08-02 Thomas Quinot <quinot@adacore.com>
7778 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7781 2011-08-02 Geert Bosch <bosch@adacore.com>
7783 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7785 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7787 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7788 computed value of Base_Type.
7790 2011-08-02 Yannick Moy <moy@adacore.com>
7792 * restrict.adb (Check_Restriction): issue an error for any use of
7793 class-wide, even if the No_Dispatch restriction is not set.
7794 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7795 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7796 when completing a private extension, the type named in the private part
7797 is not the same as that named in the visible part.
7798 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7799 of an inherited primitive operations of a tagged type or type extension
7800 that returns the tagged type.
7801 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7802 function which returns True for an implicit operation inherited by the
7803 derived type declaration for the argument type.
7804 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7807 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7809 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7810 Process_Bounds, to perform analysis with expansion of a range or an
7811 expression that is the iteration scheme for a loop.
7812 (Analyze_Iterator_Specification): If domain of iteration is given by a
7813 function call with a controlled result, as is the case if call returns
7814 a predefined container, ensure that finalization actions are properly
7816 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7818 2011-08-02 Javier Miranda <miranda@adacore.com>
7820 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7821 * gcc-interface/Make-lang.in: Update dependencies.
7823 2011-08-02 Javier Miranda <miranda@adacore.com>
7825 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7826 determine if the analysis is performed using N or Original_Node (N).
7827 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7828 functionality of routine Is_Variable avoids code duplication.
7829 * checks.adb (Determine_Range): Handle temporaries generated by
7830 Remove_Side_Effects.
7832 2011-08-02 Javier Miranda <miranda@adacore.com>
7834 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7835 expansion of the condition. Required since the previous analysis was
7836 done with expansion disabled (see Resolve_Quantified_Expression) and
7837 hence checks were not inserted and record comparisons have not been
7840 2011-08-02 Ed Falis <falis@adacore.com>
7842 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7845 2011-08-02 Bob Duff <duff@adacore.com>
7847 * opt.ads: Minor comment fix.
7849 2011-08-02 Bob Duff <duff@adacore.com>
7851 * sem_ch12.adb (Analyze_Package_Instantiation,
7852 Analyze_Subprogram_Instantiation): Turn off style checking while
7853 analyzing an instance. Whatever style checks that apply to the generic
7854 unit should apply, so it makes no sense to apply them in an instance.
7855 This was causing trouble when compiling an instance of a runtime
7856 unit that violates the -gnatyO switch.
7857 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7858 one of the two case statements, causing spurious errors.
7860 2011-08-02 Robert Dewar <dewar@adacore.com>
7862 * uname.adb: Minor reformatting.
7863 * gnatcmd.adb: Minor reformatting.
7864 * exp_attr.adb: Minor reformatting.
7866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7868 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7869 No_Dispatching_Calls, do not look for the Assign primitive, because
7870 predefined primitives are not created in this case.
7872 2011-08-02 Bob Duff <duff@adacore.com>
7874 * stylesw.ads: Minor comment fixes.
7876 2011-08-02 Robert Dewar <dewar@adacore.com>
7878 * freeze.adb (Add_To_Result): New procedure.
7880 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7882 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7883 time, if the specific run-time routines for handling streams of strings
7884 are not available, use the default mechanism.
7886 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7888 * s-regpat.ads: Fix typo.
7890 2011-08-02 Vincent Celier <celier@adacore.com>
7892 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7893 not null, call it to create the in memory config project file without
7894 parsing an existing default config project file.
7896 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7898 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7900 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7902 * sem_elim.adb: an abstract subprogram does not need an eliminate
7903 pragma for its descendant to be eliminable.
7905 2011-08-02 Ed Falis <falis@adacore.com>
7907 * init.c: revert to handling before previous checkin for VxWorks
7908 * s-intman-vxworks.adb: delete unnecessary declarations related to
7909 using Ada interrupt facilities for handling signals.
7910 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7911 * s-intman-vxworks.ads: Import __gnat_install_handler as
7912 Initialize_Interrupts.
7913 * s-taprop-vxworks.adb: Delete Signal_Mask.
7914 (Abort_Handler): change construction of mask to unblock exception
7917 2011-08-02 Jerome Guitton <guitton@adacore.com>
7919 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7920 Debug_Raise_Exception before propagation starts.
7922 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7924 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7925 to Restriction_Check_Required.
7926 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7927 * sem_res.adb (Resolve_Call): Likewise.
7928 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7930 2011-08-02 Bob Duff <duff@adacore.com>
7932 * stylesw.ads: Update comment.
7933 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7934 * errout.ads: Remove obsolete comment.
7936 2011-08-02 Javier Miranda <miranda@adacore.com>
7938 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7939 (Set_Is_Safe_To_Reevaluate): new procedure.
7940 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7941 assignment is allowed on safe-to-reevaluate variables.
7942 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7943 temporary created to remove side effects in expressions that use
7944 the secondary stack as safe-to-reevaluate.
7945 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7946 variables that are not true constants.
7948 2011-08-02 Robert Dewar <dewar@adacore.com>
7950 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7951 sem_res.adb, sem_ch6.adb: Minor reformatting.
7953 2011-08-02 Jerome Guitton <guitton@adacore.com>
7955 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7957 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7959 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7960 not set Overridden_Operation if subprogram is an initialization
7963 2011-08-02 Yannick Moy <moy@adacore.com>
7965 * par-ch6.adb: Correct obsolete name in comments
7966 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7967 which takes two message arguments (existing function takes one), with
7968 second message used for continuation.
7969 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7970 block statements that originate from a source block statement, not
7971 generated block statements
7972 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7973 symmetry with procedure case
7974 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7975 function to issue an error in formal mode if a package specification
7976 contains more than one tagged type or type extension.
7977 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7978 parameters matching formals of tagged types are objects (or ancestor
7979 type conversions of objects), not general expressions. Issue an error
7980 on view conversions that are not involving ancestor conversion of an
7982 (Resolve_Type_Conversion): in formal mode, issue an error on the
7983 operand of an ancestor type conversion which is not an object
7984 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7985 procedure so that it works also for actuals of function calls
7986 (Is_Actual_Tagged_Parameter): new function which determines if its
7987 argument is an actual parameter of a formal of tagged type in a
7989 (Is_SPARK_Object_Reference): new function which determines if the tree
7990 referenced by its argument represents an object in SPARK
7992 2011-08-02 Robert Dewar <dewar@adacore.com>
7994 * sem_ch3.adb: Minor reformatting
7995 Minor comment addition
7996 Minor error msg text change
7998 2011-08-02 Javier Miranda <miranda@adacore.com>
8000 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8001 function. Used to be more precise when we generate a variable plus one
8002 assignment to remove side effects in the evaluation of the Bound
8004 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8005 of the bound expression to force its re-analysis and thus expand the
8006 associated transient scope (if required). Code cleanup replacing the
8007 previous code that declared the constant entity by an invocation to
8008 routine Force_Evaluation which centralizes this work in the frontend.
8010 2011-08-02 Robert Dewar <dewar@adacore.com>
8012 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8013 (Base_Type): Now uses improved Is_Base_Type function
8014 * einfo.ads (Base_Type): Inline this function
8016 2011-08-02 Robert Dewar <dewar@adacore.com>
8018 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8019 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8021 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8023 * gcc-interface/Make-lang.in: Update dependencies.
8024 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8027 2011-08-02 Yannick Moy <moy@adacore.com>
8029 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8030 non-simple expression used in delta constraint
8031 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8032 index constraint which is not a subtype mark
8033 * par.adb: With and use Restrict
8034 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8035 mode on component type which is not a subtype mark and default
8036 expression on component
8037 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8038 of string which does not have a lower index bound equal to 1
8039 (Array_Type_Declaration): issue an error in formal mode on index or
8040 component type which is not a subtype mark, and on aliased keyword on
8042 (Derived_Type_Declaration): issue an error in formal mode on interface,
8043 limited or abstract type
8044 (Record_Type_Declaration): issue an error in formal mode on interface
8045 (Record_Type_Definition): issue an error in formal mode on tagged types
8046 and type extensions not declared in the specification of a library unit
8047 package; on null non-tagged record; on variant part
8049 2011-08-02 Vincent Celier <celier@adacore.com>
8051 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8052 not declared for qualified library project when Library_Name is not
8053 declared, but Library_Dir is.
8055 2011-08-02 Robert Dewar <dewar@adacore.com>
8057 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8058 pragmas (affects aspects [Component_]Default_Value
8059 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8060 component type for the resolution
8062 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8064 * einfo.adb (Base_Type): Tune implementation for speed.
8066 2011-08-02 Robert Dewar <dewar@adacore.com>
8068 * freeze.adb: Minor reformatting.
8070 2011-08-02 Thomas Quinot <quinot@adacore.com>
8072 * scos.ads: Update comments.
8074 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8076 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8077 base type, because the parent may be a subtype of a private type whose
8078 convention is established in a private part.
8080 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8082 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8083 statement in a block when the expansion of the return expression has
8084 created a finalization chain.
8085 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8086 with the parent node.
8087 Add N_Extended_Return_Statement to handle the case where a transient
8088 object declaration appears in the Return_Object_Declarations list of
8089 an extended return statement.
8091 2011-08-02 Matthew Gingell <gingell@adacore.com>
8093 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8094 unused parameter 'name'.
8096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8098 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8099 inherited operation, check whether its alias, which is the source
8100 operastion that it renames, has been marked eliminated.
8102 2011-08-02 Javier Miranda <miranda@adacore.com>
8104 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8105 in-mode parameter whose type is an access type since it can be used to
8106 modify its designated object. Enforce code that handles as safe an
8107 access type that is not access-to-constant but it is the result of a
8108 previous removal of side-effects.
8109 (Remove_Side_Effects): Minor code reorganization of cases which require
8110 no action. Done to incorporate documentation on new cases uncovered
8111 working in this ticket: no action needed if this routine was invoked
8112 too early and the nodes are not yet decorated.
8113 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8114 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8115 were issued with actuals that are implicitly provided by
8118 2011-08-02 Robert Dewar <dewar@adacore.com>
8120 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8122 2011-08-02 Yannick Moy <moy@adacore.com>
8124 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8125 to issue an error in formal mode on attribute not supported in this mode
8126 (Analyze_Attribute): issue errors on standard attributes not supported
8128 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8129 comment, and issue error in formal mode on modulus which is not a power
8131 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8133 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8135 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8136 operator on modular type (except 'not').
8138 2011-08-02 Robert Dewar <dewar@adacore.com>
8140 * gnat_rm.texi: Minor reformatting.
8142 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8144 * s-osinte-linux.ads: Minor comment update and reformatting.
8145 * i-cexten.ads: Make this unit pure, as for its parent.
8146 Will allow its usage in more contexts if needed.
8148 2011-08-02 Robert Dewar <dewar@adacore.com>
8150 * s-utf_32.ads: Minor comment fix.
8152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8154 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8155 operation of a tagged synchronized type, handle the case where the
8156 controlling argument is overloaded.
8158 2011-08-02 Yannick Moy <moy@adacore.com>
8160 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8161 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8162 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8163 SPARK mode and formal verification mode on processing SPARK restriction
8164 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8165 requiring consistency checking.
8167 2011-08-02 Robert Dewar <dewar@adacore.com>
8169 * sem_res.adb: Minor reformatting.
8171 2011-08-02 Robert Dewar <dewar@adacore.com>
8173 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8174 a-cforse.ads: Remove unneeded with of Ada.Containers
8175 Remove commented out pragma Inline's
8176 Move specifications of new subprograms to the actual specs
8178 2011-08-02 Yannick Moy <moy@adacore.com>
8180 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8181 a-cforse.ads: Update comments.
8183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8185 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8187 2011-08-02 Robert Dewar <dewar@adacore.com>
8189 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8190 a-cforse.ads, a-cofove.ads: Minor reformatting.
8192 2011-08-02 Claire Dross <dross@adacore.com>
8194 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8195 a-cofove.ads: Add comments.
8197 2011-08-02 Yannick Moy <moy@adacore.com>
8199 * gnat_rm.texi: Document formal containers.
8201 2011-08-02 Emmanuel Briot <briot@adacore.com>
8203 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8206 2011-08-02 Robert Dewar <dewar@adacore.com>
8208 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8211 2011-08-02 Robert Dewar <dewar@adacore.com>
8213 * aspects.adb: New aspects Default_Value and Default_Component_Value
8214 New format of Aspect_Names table checks for omitted entries
8215 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8216 handling of boolean aspects for derived types.
8217 New aspects Default_Value and Default_Component_Value
8218 New format of Aspect_Names table checks for omitted entries
8219 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8220 (Has_Default_Value): New flag
8221 (Has_Default_Component_Value): New flag
8222 (Has_Default_Value): New flag
8223 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8225 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8226 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8227 Default_Value and Default_Component_Value
8228 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8229 New aspects Default_Value and Default_Component_Value
8230 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8231 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8233 2011-08-02 Vincent Celier <celier@adacore.com>
8235 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8236 inherit library kind.
8238 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8240 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8243 2011-08-02 Robert Dewar <dewar@adacore.com>
8245 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8247 2011-08-02 Yannick Moy <moy@adacore.com>
8249 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8251 2011-08-02 Robert Dewar <dewar@adacore.com>
8253 * impunit.adb: Add comment.
8255 2011-08-02 Yannick Moy <moy@adacore.com>
8257 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8258 qualification of aggregates in formal mode
8259 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8261 (Resolve_Aggregate): complete the test that an aggregate is adequately
8262 qualified in formal mode
8264 2011-08-02 Pascal Obry <obry@adacore.com>
8266 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8267 * mlib-prj.adb: Supress warning when compiling binder generated file.
8268 (Build_Library): Supress all warnings when compiling the binder
8271 2011-08-02 Yannick Moy <moy@adacore.com>
8273 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8275 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8276 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8277 Add with/use clauses to make Check_Formal_Restriction visible
8279 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8281 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8282 in-parameters when type of the generic formal is private in the generic
8283 spec and non-private in the body.
8285 2011-08-02 Claire Dross <dross@adacore.com>
8287 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8288 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8289 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8290 * impunit.adb, Makefile.rtl: Take new files into account.
8292 2011-08-02 Robert Dewar <dewar@adacore.com>
8294 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8295 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8297 2011-08-02 Yannick Moy <moy@adacore.com>
8299 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8301 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8302 matching static array bounds, taking into account the special case of
8304 * sem_ch3.adb: Typo in comment.
8306 2011-08-02 Yannick Moy <moy@adacore.com>
8308 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8309 which issues an error in formal mode if its argument node is originally
8311 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8312 has a discriminant specification so that it does not include the case
8314 (Derived_Type_Declaration): move here the test that a derived type has a
8315 discriminant specification
8316 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8317 first element of a component association before accessing its choices
8318 (presence of component association is not enough)
8319 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8320 declaration is a library item before accessing the next element in a
8321 list, as library items are not member of lists
8322 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8323 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8324 Check_Formal_Restriction whenever possible.
8326 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8328 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8329 reference when needed.
8331 2011-08-02 Bob Duff <duff@adacore.com>
8333 * gnat_ugn.texi: Fix typo.
8335 2011-08-02 Vincent Celier <celier@adacore.com>
8337 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8338 archive file name. Do not use the full path name of archives for Open
8341 2011-08-02 Robert Dewar <dewar@adacore.com>
8343 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8344 Analyze_Aspect_Specifications
8346 (Analyze_Aspect_Specifications): New handling for boolean aspects
8347 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8348 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8349 sequence for Analyze_Aspect_Specifications
8350 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8351 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8353 2011-08-02 Robert Dewar <dewar@adacore.com>
8355 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8356 aspects, since these no longer exist.
8358 2011-08-02 Robert Dewar <dewar@adacore.com>
8360 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8361 semicolon, do not try to see if there are aspects following it.
8362 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8365 2011-08-02 Robert Dewar <dewar@adacore.com>
8367 * sem_ch8.adb, aspects.ads: Minor reformatting.
8369 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8371 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8372 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8374 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8376 2011-08-02 Yannick Moy <moy@adacore.com>
8378 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8379 mode on subprogram declaration outside of package specification, unless
8380 it is followed by a pragma Import
8381 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8382 Access_Type_Declaration): issue error in formal mode on access type
8383 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8385 (Analyze_Object_Declaration): issue error in formal mode on object
8386 declaration which does not respect SPARK restrictions
8387 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8388 declaration which does not respect SPARK restrictions
8389 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8390 error in formal mode on digits or delta constraint
8391 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8392 decimal fixed point type
8393 (Derived_Type_Declaration): issue error in formal mode on derived type
8394 other than type extensions of tagged record types
8395 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8396 with check on access definition
8397 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8398 mode on protected definition.
8399 (Analyze_Task_Definition): issue error in formal mode on task definition
8401 2011-08-02 Robert Dewar <dewar@adacore.com>
8403 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8405 2011-08-02 Javier Miranda <miranda@adacore.com>
8407 * sem_ch6.adb (Can_Override_Operator): New function.
8408 (Verify_Overriding_Indicator): Add missing code to check overriding
8409 indicator in operators. Fixes regression.
8410 (Check_Overriding_Indicator): Minor reformating after replacing the
8411 code that evaluates if the subprogram can override an operator by
8412 invocations to the above new function.
8414 (Write_Field26_Name): Add missing code to ensure that, following
8415 the documentation in einfo.ads, this field is not shown as attribute
8416 "Static_Initialization" on non-dispatching functions.
8418 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8420 * sem_res.adb (Resolve_Call): A call to
8421 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8422 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8423 i.e., when the second parameter is of type Time_Span.
8425 2011-08-02 Vincent Celier <celier@adacore.com>
8427 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8428 with an archive instead of -L<library dir> -l<library name>.
8430 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8432 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8433 mark the base types In_Use in addition to making the operations
8436 2011-08-02 Ed Falis <falis@adacore.com>
8438 * init.c: add and setup __gnat_signal_mask for the exception signals
8439 * s-inmaop-vxworks.adb: new file.
8440 * s-intman-vxworks.adb: remove unnecessary initializations and
8442 * s-intman-vxworks.ads: remove unnecessary variable
8443 * s-taprop-vxworks.adb: simplify signal initialization
8445 2011-08-02 Robert Dewar <dewar@adacore.com>
8447 * sem_ch8.adb: Minor code reorganization, comment updates.
8449 2011-08-02 Robert Dewar <dewar@adacore.com>
8451 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8452 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8454 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8455 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8459 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8460 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8461 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8462 use_type_clauses, to handle more efficiently use_type and use_all_type
8464 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8465 Ada2012 Use_All_Type clause.
8466 (Use_Class_Wide_Operations): new procedure.
8468 2011-08-02 Robert Dewar <dewar@adacore.com>
8470 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8471 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8472 expression to expression function.
8474 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8476 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8477 if types are compatible.
8479 2011-08-02 Yannick Moy <moy@adacore.com>
8481 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8482 returns True if its argument array types have same dimension and same
8483 static bounds at each index.
8484 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8485 OUT or IN OUT paramaters which are not view conversions in SPARK.
8486 (Resolve_Arithmetic_Op): issue an error in formal mode on
8487 multiplication or division with operands of fixed point types which are
8488 not qualified or explicitly converted.
8489 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8490 Boolean or array type (except String) operands.
8491 (Resolve_Equality_Op): issue an error in formal mode on equality
8492 operators for array types other than String with non-matching static
8494 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8495 for array types with non-matching static bounds. Factorize the code in
8496 Matching_Static_Array_Bounds.
8497 (Resolve_Qualified_Expression): issue an error in formal mode on
8498 qualified expressions for array types with non-matching static bounds.
8499 (Resolve_Type_Conversion): issue an error in formal mode on type
8500 conversion for array types with non-matching static bounds
8502 2011-08-02 Robert Dewar <dewar@adacore.com>
8504 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8506 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8508 * par-ch9.adb: save location of entry for proper error message.
8510 2011-08-02 Javier Miranda <miranda@adacore.com>
8512 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8513 (Use_Full_View) which permits this routine to climb through the
8514 ancestors using the full-view of private parents.
8515 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8516 Use_Full_View to true in calls to Is_Ancestor.
8517 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8518 true in call to Is_Ancestor.
8519 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8520 Use_Full_View to true in call to Is_Ancestor.
8521 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8522 call to Is_Ancestor.
8523 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8524 Use_Full_View to true in calls to Is_Ancestor.
8525 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8526 Make_Select_Specific_Data_Table, Register_Primitive,
8527 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8528 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8529 to true in call to Is_Ancestor.
8530 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8531 Use_Full_View to true in calls to Is_Ancestor.
8533 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8534 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8536 2011-08-02 Robert Dewar <dewar@adacore.com>
8538 * gnat_rm.texi: Minor reformatting.
8539 * sem_prag.adb: Minor reformatting.
8541 2011-08-02 Tristan Gingold <gingold@adacore.com>
8543 * vms_data.ads: Add VMS qualifier for -gnateP.
8545 2011-08-02 Robert Dewar <dewar@adacore.com>
8547 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8548 * par-ch7.adb (P_Package): Proper placement of aspects for package
8550 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8551 (End_Statements): Add Is_Sloc parameterr
8552 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8553 (Check_End): Ad Is_Sloc parameter
8554 (End_Statements): Add Is_Sloc parameterr
8556 2011-08-02 Vincent Celier <celier@adacore.com>
8558 * ug_words: Add VMS qualifier equivalent to -gnateP:
8559 /SYMBOL_PREPROCESSING.
8561 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8563 * gnat-style.texi: For hexadecimal numeric literals the typical
8564 grouping of digits is 4 to represent 2 bytes.
8565 A procedure spec which is split into several lines is indented two
8568 2011-08-02 Yannick Moy <moy@adacore.com>
8570 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8571 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8572 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8574 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8575 choice in array aggregate
8576 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8578 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8579 positional and named aggregate for record, or others in record
8580 aggregate, or multiple choice in record aggregate
8581 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8582 array operands to logical operations AND, OR and XOR do not have the
8583 same static lower and higher bounds
8584 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8586 2011-08-01 Robert Dewar <dewar@adacore.com>
8588 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8589 Replaces Last_Source_Node_In_Sequence.
8590 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8591 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8592 parens and blank in string (this was inconsistently implemented).
8594 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8595 blank in string (this was inconsistently implemented).
8597 (Set_Global_Switches): Set formal mode switches appropriately
8598 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8600 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8601 call Set_Error_Msg_Lang to set "spark" as language name.
8602 * par.adb: Remove unnecessary call to set formal language for errout
8603 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8604 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8606 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8607 calls to it, moved after resolution so that types are known
8608 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8609 result of concatenation is not of type String
8610 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8611 concatenation is not properly restricted
8612 * gnat_rm.texi: Add doc on pragma Spark_95.
8613 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8614 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8615 * gcc-interface/Make-lang.in: Update dependencies.
8617 2011-08-01 Javier Miranda <miranda@adacore.com>
8619 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8620 condition that detects if the overridden operation must replace an
8623 2011-08-01 Javier Miranda <miranda@adacore.com>
8625 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8626 code declarations inserted by Insert_Actions in each alternative of the
8627 N_Case_Expression node.
8629 2011-08-01 Robert Dewar <dewar@adacore.com>
8631 * sem_ch6.adb: Minor code reorganization.
8632 * sem_util.adb: Minor reformatting.
8634 2011-08-01 Pascal Obry <obry@adacore.com>
8636 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8637 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8639 2011-08-01 Yannick Moy <moy@adacore.com>
8641 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8642 literal or operator symbol which is prefixed
8643 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8644 mode on access attributes.
8645 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8646 that concatenation operands are properly restricted in formal mode
8647 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8648 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8649 result of the concatenation has a type different from String.
8650 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8651 Analyze_Quantified_Expression, Analyze_Slice,
8652 Analyze_Null): issue an error in formal mode on unsupported constructs
8654 (Analyze_Block_Statement): only issue error on source block statement
8655 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8656 function which returns the last node in a list of nodes for which
8657 Comes_From_Source returns True, if any
8658 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8659 Last_Source_Node_In_Sequence
8660 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8661 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8662 mode on unsupported constructs
8663 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8664 rest of the actions may be needed later on since the error is marked as
8666 * sinfo.ads: Typos in comments.
8668 2011-08-01 Pascal Obry <obry@adacore.com>
8670 * projects.texi: Minor editing.
8672 2011-08-01 Yannick Moy <moy@adacore.com>
8674 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8675 insertion character ~~
8676 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8677 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8678 with insertion character ~~
8679 (Set_Msg_Text): treat insertion character ~~
8680 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8681 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8682 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8683 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8684 errors related to the formal language restriction not serious
8685 (insertion character |).
8686 * par.adb (Par): set formal language for error messages if needed
8687 * sem_ch6.adb (Check_Missing_Return): take into account possible
8688 generated statements at the end of the function
8689 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8690 enumeration value to define a new pragma SPARK_95
8691 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8692 SPARK_Version): new type and variables to store the SPARK version
8694 (SPARK_Mode): return True when SPARK_Version is set
8695 * par-prag.adb: Correct indentation
8696 (Prag): take Pragma_SPARK_95 into account
8697 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8700 2011-08-01 Robert Dewar <dewar@adacore.com>
8702 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8703 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8704 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8706 2011-08-01 Pascal Obry <obry@adacore.com>
8708 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8709 Target_Name to Get_Path call.
8710 (Parse_Single_Project): Likewise.
8711 (Post_Parse_Context_Clause): Likewise.
8712 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8713 Call Initialise_Project_Path with the proper Target_Name.
8714 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8716 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8717 with the proper Target_Name.
8718 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8720 (Parse_Project_And_Apply_Config): Likewise.
8721 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8722 This is fine as this part of the code is supporting only native
8724 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8725 is fine as this part of the code is supporting only native compilation.
8727 2011-08-01 Yannick Moy <moy@adacore.com>
8729 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8730 of homonym, unless the homonym is one of the cases allowed in SPARK
8731 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8732 package declaration occurring after a body.
8734 2011-08-01 Robert Dewar <dewar@adacore.com>
8736 * checks.adb, exp_ch4.adb: Minor reformatting.
8738 2011-08-01 Javier Miranda <miranda@adacore.com>
8740 * einfo.ads (Access_Disp_Table): Fix documentation.
8741 (Dispatch_Table_Wrappers): Fix documentation.
8743 2011-08-01 Pascal Obry <obry@adacore.com>
8745 * prj-env.adb, prj-env.ads: Minor reformatting.
8747 2011-08-01 Yannick Moy <moy@adacore.com>
8749 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8750 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8751 procedures out of these packages.
8752 * errout.ads, errout.adb
8753 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8754 procedures in of this package
8755 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8756 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8757 on misplaced later vs initial declarations, like in Ada 83
8758 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8759 formal mode on attribute of private type whose full type declaration
8761 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8762 package declaration inside a package specification
8763 (Analyze_Full_Type_Declaration): issue error in formal mode on
8764 controlled type or discriminant type
8765 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8766 user-defined operator means that it should come from the source
8767 (New_Overloaded_Entity): issue error in formal mode on overloaded
8769 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8771 2011-08-01 Thomas Quinot <quinot@adacore.com>
8773 * atree.adb: Minor reformatting.
8774 * checks.adb: Minor reformatting.
8776 2011-08-01 Vincent Celier <celier@adacore.com>
8778 * s-parame-vms-ia64.ads: Fix typo in comment
8780 * s-parame-vms-restrict.ads: Removed, unused.
8782 2011-08-01 Javier Miranda <miranda@adacore.com>
8785 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8787 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8788 * sem_ch3.ads, sem_ch3.adb
8789 (Is_Constant_Bound): New extended version of the subprogram that was
8790 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8791 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8792 * sem_aux.ads (Constant_Value): Fix typo in comment.
8793 * checks.adb (Generate_Index_Checks): New implementation which, for
8794 array objects with constant bounds, generates the runtime check
8795 referencing the bounds of the array type. For other cases this routine
8796 provides its previous behavior obtaining such values from the array
8798 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8800 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8801 we cannot have semantic interpretations of the new node.
8803 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8805 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8808 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8810 * sem_ch8.adb: Minor code editing.
8811 * s-vxwext.adb: Remove trailing space.
8812 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8813 consistency with other files.
8815 2011-08-01 Thomas Quinot <quinot@adacore.com>
8817 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8819 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8821 * par-ch10.adb: reject parameterized expressions as compilation unit.
8822 * sem_ch4.adb: handle properly conditional expression with overloaded
8823 then_clause and no else_clause.
8825 2011-08-01 Tristan Gingold <gingold@adacore.com>
8827 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8828 like done by System.Aux_DEC.
8829 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8831 2011-08-01 Yannick Moy <moy@adacore.com>
8833 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8834 missing label at end of declaration (subprogram or package)
8835 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8836 of positional and named parameter association
8837 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8838 Error_Msg_SP which adds a prefix to the error message giving the name
8839 of the formal language analyzed
8840 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8841 access result type in subprogram, unconstrained array as result type,.
8842 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8844 * sem_ch8.adb: Code clean up.
8846 2011-08-01 Javier Miranda <miranda@adacore.com>
8848 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8849 * einfo.ads (Access_Disp_Table): Fix documentation.
8850 (Dispatch_Table_Wrappers): Fix documentation.
8851 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8852 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8853 to enforce the documentation of this attribute.
8854 (Set_Is_Interface): Cleanup the assertion.
8855 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8856 the Underlying_Type entity before reading attribute Access_Disp_Table.
8857 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8858 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8859 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8860 the Underlying_Type entity before reading attribute Access_Disp_Table.
8861 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8862 Locate the Underlying_Type entity before reading attribute
8865 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8867 * s-poosiz.ads: Additional overriding indicators.
8869 2011-08-01 Yannick Moy <moy@adacore.com>
8871 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8873 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8874 parameter specification does not include a subtype mark.
8875 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8876 formal mode on abstract subprogram.
8877 (Analyze_Subprogram_Specification): issue error in formal mode on
8878 user-defined operator.
8879 (Process_Formals): issue error in formal mode on access parameter and
8881 * sem_ch9.adb (Analyze_Abort_Statement,
8882 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8883 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8884 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8885 Analyze_Requeue, Analyze_Selective_Accept,
8886 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8887 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8888 issue error in formal mode on user-defined raise statement.
8890 2011-08-01 Thomas Quinot <quinot@adacore.com>
8892 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8893 declaration being hidden when overriding an implicit inherited
8895 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8896 (-gnats), do not complain about a source file that contains only a
8899 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8901 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8902 variable if already set.
8904 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8906 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8907 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8908 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8909 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8910 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8911 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8912 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8913 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8914 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8915 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8916 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8917 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8918 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8919 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8920 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8921 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8922 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8923 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8924 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8925 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8926 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8927 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8928 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8929 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8930 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8931 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8932 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8933 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8934 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8935 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8936 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8937 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8938 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8939 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8940 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8941 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8942 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8943 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8944 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8945 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8946 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8947 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8948 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8949 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8950 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8951 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8952 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8953 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8954 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8955 Use GNAT instead of GNARL.
8957 2011-08-01 Bob Duff <duff@adacore.com>
8959 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8960 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8961 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8964 2011-08-01 Yannick Moy <moy@adacore.com>
8966 * debug.adb (d.D) reverve flag for the SPARK mode
8967 (d.E) reverve flag for SPARK generation mode
8968 (d.F) reverve flag for Why generation mode
8969 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8970 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8971 functions which return True when the corresponding modes are set
8972 (Formal_Language): return "spark" or "alfa" when in formal verification
8974 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8975 Error_Msg to prefix the error message with a tag giving the formal
8977 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8978 message with a tag giving the formal language
8979 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8981 (Analyze_Case_Statement): issue error in formal mode on case statement
8982 with a single "others" case alternative
8983 (Analyze_Exit_Statement): issue errors in formal mode on exit
8984 statements which do not respect SPARK restrictions
8985 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8986 (Check_Unreachable_Code): always issue an error (not a warning) in
8987 formal mode on unreachable code (concerns both code after an infinite
8988 loop and after an unconditional jump, both not allowed in SPARK)
8989 * sem_ch6.adb (Analyze_Return_Statement): add call to
8990 Set_Return_Present for a procedure containing a return statement
8991 (already done for functions in Analyze_Function_Return)
8992 (Analyze_Function_Return): issue error in formal mode on extended
8993 return or if return is not last statement in function
8994 (Check_Missing_Return): issue error in formal mode if function does
8995 not end with return or if procedure contains a return
8996 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8997 function to detect if there is an inner scope of its parameter S which
9000 2011-08-01 Thomas Quinot <quinot@adacore.com>
9002 * sem_ch6.ads: Minor reformatting.
9004 2011-08-01 Javier Miranda <miranda@adacore.com>
9006 * sem_util.adb (Abstract_Interface_List): Complete condition when
9007 processing private type declarations to avoid reading unavailable
9009 (Is_Synchronized_Tagged_Type): Complete condition when processing
9010 private extension declaration nodes to avoid reading unavailable
9013 2011-08-01 Thomas Quinot <quinot@adacore.com>
9015 * sem_ch3.adb: Minor reformatting.
9017 2011-08-01 Thomas Quinot <quinot@adacore.com>
9019 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9020 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9021 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9022 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9023 for VMS, instead parametrize the common implementation with
9024 System.Parameters declarations.
9026 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9028 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9030 2011-08-01 Tristan Gingold <gingold@adacore.com>
9032 * seh_init.c: Fix SEH handler installation on win64.
9034 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9036 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9037 double analysis of an anonymous access to subprogram, because it can
9038 lead to improper sharing of profiles and a back-end crash.
9040 2011-08-01 Robert Dewar <dewar@adacore.com>
9042 * make.adb, sem_ch4.adb: Minor reformatting.
9043 * gcc-interface/Make-lang.in: Update dependencies.
9044 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9046 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9048 * gnat_rm.texi: Fix definition of Long_Integer.
9050 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9052 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9053 to prevent storage exhaustion.
9054 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9055 finalized is a function body, insert the cleanup code before the final
9056 return statement, to prevent spurious warnings.
9057 * s-pooglo.ads: add overriding indicator.
9059 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9061 * sem_ch4.adb (Operator_Check): improve error message when both a
9062 with_clause and a use_clause are needed to make operator usage legal.
9063 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9064 determine whether a compilation unit is visible within an other,
9065 either through a with_clause in the current unit, or a with_clause in
9066 its library unit or one one of its parents.
9068 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9070 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9071 over an arbitrary expression of an array or container type.
9072 * lib-xref.adb: clarify comment.
9074 2011-08-01 Bob Duff <duff@adacore.com>
9076 * einfo.ads: Minor reformatting.
9077 * debug.adb: Minor comment improvement.
9079 2011-08-01 Javier Miranda <miranda@adacore.com>
9081 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9082 consider hidden subprograms as valid candidates.
9084 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9086 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9088 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9090 * gnat_ugn.texi: Fix typo.
9092 2011-08-01 Robert Dewar <dewar@adacore.com>
9094 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9095 lib-xref.adb: Minor reformatting
9097 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9099 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9100 when to generate a call to Move_Final_List.
9101 (Has_Controlled_Parts): Remove this function.
9103 2011-08-01 Geert Bosch <bosch@adacore.com>
9105 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9108 2011-08-01 Thomas Quinot <quinot@adacore.com>
9110 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9111 explicit raise of a predefined exception as Comes_From_Source if the
9112 original N_Raise_Statement comes from source.
9114 2011-08-01 Robert Dewar <dewar@adacore.com>
9116 * sinfo.ads: Add comment.
9117 * sem_ch6.adb: Minor reformatting.
9119 2011-08-01 Robert Dewar <dewar@adacore.com>
9121 * freeze.adb (Freeze_Entity): Refine check for bad component size
9122 clause to avoid rejecting confirming clause when atomic/aliased present.
9124 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9126 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9127 better determine whether an entity reference is a write.
9128 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9130 * lib-xref.adb (Output_References): Do no suppress a read reference at
9131 the same location as an immediately preceeding modify-reference, to
9132 handle properly in-out actuals.
9134 2011-08-01 Tristan Gingold <gingold@adacore.com>
9136 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9138 2011-08-01 Quentin Ochem <ochem@adacore.com>
9140 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9141 heap to compute the result.
9143 2011-08-01 Robert Dewar <dewar@adacore.com>
9145 * atree.ads: Minor reformatting.
9147 2011-08-01 Emmanuel Briot <briot@adacore.com>
9149 * g-expect.adb (Get_Command_Output): Fix memory leak.
9151 2011-08-01 Geert Bosch <bosch@adacore.com>
9153 * cstand.adb (P_Float_Type): New procedure to print the definition of
9154 predefined fpt types.
9155 (P_Mixed_Name): New procedure to print a name using mixed case
9156 (Print_Standard): Use P_Float_Type for printing floating point types
9157 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9158 precision IEEE float.
9160 2011-08-01 Thomas Quinot <quinot@adacore.com>
9162 * sem_ch3.adb: Minor reformatting.
9164 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9166 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9167 the completion of a generic function, insert the new body rather than
9168 rewriting the original.
9170 2011-08-01 Yannick Moy <moy@adacore.com>
9172 * sinfo.ads, errout.ads: Typos in comments.
9174 2011-08-01 Robert Dewar <dewar@adacore.com>
9176 * par-endh.adb: Minor reformatting.
9178 2011-08-01 Robert Dewar <dewar@adacore.com>
9180 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9181 (Pre_Post_Aspects): New subtype.
9182 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9183 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9184 * par-ch7.adb (P_Package): Remove Decl parameter
9185 (P_Package): Handle new syntax for aspects (before IS)
9186 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9188 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9189 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9190 (P_Package): Remove Decl parameter
9191 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9193 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9195 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9196 * sinfo.ads: Document new syntax for aspects in packages etc.
9197 * sprint.adb: Handle new syntax of aspects before IS in package
9199 2011-08-01 Thomas Quinot <quinot@adacore.com>
9201 * atree.ads: Minor reformatting.
9202 * sem_prag.adb: Minor reformatting.
9204 2011-08-01 Robert Dewar <dewar@adacore.com>
9206 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9207 case expr alternative.
9209 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9211 * sem_ch12.adb: Fix typo.
9213 2011-08-01 Geert Bosch <bosch@adacore.com>
9215 * sem_prag.adb (Check_No_Link_Name): New procedure.
9216 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9217 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9218 instead of Standard_Long_Long_Float_Size global. Preparation for
9219 eventual removal of per type constants.
9220 * exp_util.ads (Get_Stream_Size): New function returning the stream
9221 size value of subtype E.
9222 * exp_util.adb (Get_Stream_Size): Implement new function.
9223 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9225 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9227 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9229 2011-08-01 Geert Bosch <bosch@adacore.com>
9231 * cstand.adb: Fix comments.
9232 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9235 2011-08-01 Robert Dewar <dewar@adacore.com>
9237 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9239 2011-08-01 Geert Bosch <bosch@adacore.com>
9241 * atree.ads: Fix comment.
9243 2011-08-01 Robert Dewar <dewar@adacore.com>
9245 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9246 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9247 * par.adb: Add with for Namet.Sp.
9248 * par-tchk.adb: Minor reformatting.
9250 2011-08-01 Vincent Celier <celier@adacore.com>
9252 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9253 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9254 of the init procedure of a SAL.
9255 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9258 2011-08-01 Thomas Quinot <quinot@adacore.com>
9260 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9263 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9265 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9267 2011-08-01 Thomas Quinot <quinot@adacore.com>
9269 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9270 conformant with its spec (return True only for types that have
9271 an overriding Initialize primitive operation that prevents them from
9272 having preelaborable initialization).
9273 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9274 initialization for controlled types in Ada 2005 or later mode.
9276 2011-08-01 Robert Dewar <dewar@adacore.com>
9278 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9280 (Same_Aspect): New function.
9281 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9282 Type_Invariant, Precondition, Postcondition.
9283 * snames.ads-tmpl: Add Name_Type_Invariant.
9285 2011-08-01 Robert Dewar <dewar@adacore.com>
9287 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9289 (Freeze_All_Ent): Fix error in handling inherited aspects.
9290 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9291 already analyzed, but don't skip entire processing of a declaration,
9292 that's wrong in some cases of declarations being rewritten.
9293 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9294 Don't delay for integer, string literals
9295 Treat predicates in usual manner for delay, remove special case code,
9297 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9298 (Build_Predicate_Function): Update saved expression in aspect
9299 (Build_Invariant_Procedure): Update saved expression in aspect
9300 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9301 of replacement of discriminant references if the reference is simple.
9303 2011-08-01 Robert Dewar <dewar@adacore.com>
9305 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9306 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9307 Static_Predicate and Dynamic_Predicate.
9308 (Build_Predicate_Function): Add processing for Static_Predicate
9309 and Dynamic_Predicate.
9310 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9311 (From_Static_Predicate): New flag
9312 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9314 2011-08-01 Robert Dewar <dewar@adacore.com>
9316 * usage.adb: Documentation cleanup for Ada version modes in usage.
9317 * expander.adb: Minor reformatting.
9319 2011-08-01 Robert Dewar <dewar@adacore.com>
9321 * atree.ads: Minor comment fix.
9322 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9323 a-witeio.ads, sem_prag.adb: Minor reformatting.
9325 2011-08-01 Doug Rupp <rupp@adacore.com>
9327 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9328 pointers. Use descrip.h header file for convenience. Add some
9331 2011-08-01 Robert Dewar <dewar@adacore.com>
9333 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9334 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9335 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9337 (Check_Aspect_At_End_Of_Declarations): New procedure
9338 (Analye_Aspect_Specification): Minor changes for above procedures
9339 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9340 specification node as well.
9342 2011-08-01 Pascal Obry <obry@adacore.com>
9344 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9345 Windows files. Use GetFilesAttributes() in this case to check for file
9346 existence instead of returning with an error code.
9348 2011-08-01 Vincent Celier <celier@adacore.com>
9350 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9351 High is above Source length.
9353 2011-08-01 Robert Dewar <dewar@adacore.com>
9355 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9357 2011-08-01 Robert Dewar <dewar@adacore.com>
9359 * aspects.ads (Boolean_Aspects): New subtype.
9360 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9361 for derived types in cases where the parent type and derived type have
9363 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9364 with aspects when parent type also has aspects.
9365 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9366 boolean expression at this point).
9367 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9368 accordance with final decision on the Ada 2012 feature.
9369 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9371 2011-08-01 Matthew Heaney <heaney@adacore.com>
9373 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9375 2011-08-01 Pascal Obry <obry@adacore.com>
9377 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9378 Fix Replace_Slice when High is above current string size.
9379 (Replace_Slice): Fix DL computation when High is above current
9382 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9384 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9386 2011-08-01 Matthew Heaney <heaney@adacore.com>
9388 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9391 2011-08-01 Pascal Obry <obry@adacore.com>
9393 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9396 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9398 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9399 access to protected subprograms in generic bodies.
9400 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9401 protected type, indicate that the convention of the subprogram is
9402 Convention_Protected, because it may be used in subsequent declarations
9403 within the protected declaration.
9405 2011-08-01 Vincent Celier <celier@adacore.com>
9407 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9408 and "final" procedures when the name of the library is "ada", to avoid
9409 duplicate symbols "adainit" and "adafinal" in executables.
9411 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9413 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9414 quantified expression that appears within a postcondition and uses the
9415 Ada2012 'Result attribute.
9417 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9419 * init.c (__gnat_error_handler): Cast reason to int.
9420 (__gnat_install_handler): Explain sa_sigaction use.
9422 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9424 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9425 subprogram has copy-in copy-out parameters, try to promote the mode of
9426 the return type if it is passed in registers.
9428 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9430 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9431 left operand as addressable.
9433 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9435 * gcc-interface/gigi.h (build_function_stub): Remove.
9436 (build_return_expr): Likewise.
9437 (convert_vms_descriptor): Declare.
9438 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9439 (build_function_stub): Move to...
9440 * gcc-interface/utils2.c (build_return_expr): Move to...
9441 * gcc-interface/trans.c (build_function_stub): ...here.
9442 (build_return_expr): ...here.
9443 (Subprogram_Body_to_gnu): Add local variable for language_function.
9444 Disconnect the parameter attributes cache, if any, once done with it.
9445 Call end_subprog_body only after setting the end_locus.
9446 Build the stub associated with the function, if any, at the very end.
9447 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9448 variables and streamline control flow.
9450 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9453 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9456 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9459 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9460 Assign to act.sa_sigaction.
9461 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9462 current->return_address to char * before arithmetic.
9464 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9466 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9467 Correct argument types.
9468 Extract code from reason.
9469 (__gnat_install_handler): Assign to act.sa_sigaction.
9471 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9473 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9474 (GNAT1_OBJS): ...here.
9476 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9479 * g-socthi-mingw.adb (Fill): Fix formatting.
9481 * gcc-interface/gigi.h: Move around comment.
9483 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9486 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9488 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9491 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9493 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9495 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9496 range comparison if Pmode is SImode.
9498 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9499 Eric Botcazou <ebotcazou@adacore.com>
9501 * adadecode.c: Wrap up in extern "C" block.
9502 * adadecode.h: Likewise.
9503 * adaint.c: Likewise. Remove 'const' keyword.
9504 * adaint.h: Likewise.
9506 * atree.h: Likewise.
9508 * cstreams.c: Likewise.
9512 * final.c: Likewise.
9514 * initialize.c: Likewise.
9516 * namet.h: Likewise.
9517 * nlists.h: Likewise.
9518 * raise.c: Likewise.
9519 * raise.h: Likewise.
9520 * repinfo.h: Likewise.
9521 * seh_init.c: Likewise.
9522 * targext.c: Likewise.
9523 * tracebak.c: Likewise.
9524 * uintp.h: Likewise.
9525 * urealp.h: Likewise.
9526 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9527 * xsinfo.adb: Likewise.
9528 * xsnamest.adb: Likewise.
9529 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9530 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9531 * gcc-interface/misc.c: Likewise.
9532 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9533 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9534 ada/targext.o here...
9535 (GNAT_ADA_OBJS): ...and not here.
9536 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9537 (GNATBIND_OBJS): Reorder.
9539 2011-07-07 Richard Henderson <rth@redhat.com>
9541 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9542 dwarf2out_frame_init.
9544 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9546 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9548 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9551 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9553 2011-07-06 Richard Guenther <rguenther@suse.de>
9555 * gcc-interface/misc.c (gnat_init): Merge calls to
9556 build_common_tree_nodes and build_common_tree_nodes_2.
9557 Re-initialize boolean_false_node.
9559 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9560 Olivier Hainque <hainque@adacore.com>
9561 Nicolas Setton <setton@adacore.com>
9563 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9564 the type according to the ARTIFICIAL_P parameter.
9565 (create_type_decl): Likewise.
9566 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9568 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9570 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9571 (gnatbind): Likewise.
9573 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9575 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9577 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9579 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9580 local variable throughout. Remove useless call to Base_Type.
9581 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9582 Take it also into account for the volatileness of the field. Set the
9583 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9585 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9587 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9588 on a dereference built for a by-ref object if it has an address clause.
9590 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9592 * einfo.ads (Address_Taken): Document use for the second argument of
9593 Asm_Input and Asm_Output attributes.
9594 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9595 argument is an entity name, then set Address_Taken on it.
9596 <Attribute_Asm_Output>: Likewise.
9597 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9598 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9599 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9600 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9602 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9605 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9607 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9609 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9610 (ada/utils.o): Update dependencies.
9611 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9612 ../../../libcpp/libcpp.a.
9613 * gcc-interface/utils.c: Include common/common-target.h.
9614 (process_attributes): Use targetm_common.have_named_sections.
9616 2011-06-07 Richard Guenther <rguenther@suse.de>
9618 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9621 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9623 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9624 TREE_THIS_NOTRAP flag.
9626 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9628 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9631 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9633 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9634 constants whose full view has discriminants specially.
9636 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9638 * gcc-interface/utils.c: Include diagnostic.h.
9639 (gnat_write_global_declarations): Output debug information for all
9640 global type declarations before finalizing the compilation unit.
9641 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9643 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9645 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9647 2011-05-25 Kai Tietz <ktietz@redhat.com>
9649 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9650 initialization instead of const/none-const pointer assignment.
9652 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9654 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9655 $(EXTRA_GNAT1_OBJS).
9656 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9657 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9658 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9659 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9660 libcommon-target.a instead of prefix.o.
9662 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9665 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9667 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9669 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9670 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9671 instead of version.o.
9673 2011-05-18 Kai Tietz <ktietz@redhat.com>
9675 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9676 boolean_false_node instead of integer_zero_node.
9677 (convert_with_check): Likewise.
9678 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9680 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9682 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9683 type of the parameter is an unconstrained array, convert the actual to
9684 the type of the formal in the In Out and Out cases as well.
9686 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9688 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9689 call build_function_type_array or build_varargs_function_type_array
9691 (create_subprog_type): Don't call build_function_type; call
9692 build_function_type_vec instead.
9694 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9696 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9697 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9698 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9700 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9702 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9704 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9705 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9707 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9709 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9711 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9713 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9714 instead of accessing TYPE_ARG_TYPES directly.
9715 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9717 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9720 * gcc-interface/gigi.h (get_variant_part): Declare.
9721 * gcc-interface/decl.c (get_variant_part): Make global.
9722 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9723 types have the same constant size, are record types and T1 has a
9724 variant part while T2 doesn't.
9726 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9728 * gcc-interface/utils.c (begin_subprog_body): Do not call
9730 (end_subprog_body): Likewise.
9732 2011-05-04 Richard Guenther <rguenther@suse.de>
9734 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9736 (pos_to_constructor): Likewise.
9738 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9739 Eric Botcazou <ebotcazou@adacore.com>
9741 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9742 of build_function_type. Adjust calls to...
9743 (build_raise_check): ...this. Do not take a void_tree parameter.
9744 Call build_function_type_list instead of build_function_type.
9745 Fix head comment and swap couple of conditional blocks.
9747 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9749 * gnatvsn.ads (Library_Version): Bump to 4.7.
9750 (Current_Year): Bump to 2011.
9752 2011-04-29 Michael Matz <matz@suse.de>
9754 * gcc-interface/misc.c (gnat_handle_option): Set
9755 warn_maybe_uninitialized.
9757 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9759 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9760 the Watson/McCabe paper.
9762 2011-04-23 Jim Meyering <meyering@redhat.com>
9764 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9766 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9768 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9771 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9773 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9775 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9776 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9777 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9778 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9779 <all>: Do not set flags on the reused DECL node coming from an alias.
9780 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9781 don't need debug info here...
9782 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9783 (gigi): Adjust calls to create_subprog_decl.
9784 (build_raise_check): Likewise.
9785 (establish_gnat_vms_condition_handler): Likewise.
9786 (Compilation_Unit_to_gnu): Likewise.
9787 (gnat_to_gnu): Likewise.
9789 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9791 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9792 (NO_REORDER_ADAFLAGS): New variable.
9793 (EXTRA_GNATTOOLS): Always define.
9794 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9795 Clean up and adjust list of files compiled with special options.
9796 * gcc-interface/Make-lang.in: Likewise.
9797 (ada/decl.o): Cosmetical change.
9798 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9800 2011-04-20 Jim Meyering <meyering@redhat.com>
9802 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9804 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9806 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9807 $(CFLAGS) on the link line.
9809 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9811 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9812 padded type built for the return type if it is unconstrained.
9814 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9816 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9818 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9820 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9821 before calling TREE_CHAIN.
9822 * gcc-interface/misc.c (gnat_init_ts): New function.
9823 (LANG_HOOKS_INIT_TS): Define.
9825 2011-04-12 Martin Jambor <mjambor@suse.cz>
9827 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9828 instead of cgraph_node.
9830 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9832 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9833 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9836 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9838 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9839 of aggregate types that contain a placeholder.
9841 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9843 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9845 (handle_type_generic_attribute): Likewise.
9847 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9850 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9852 2011-04-04 Kai Tietz <ktietz@redhat.com>
9855 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9858 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9860 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9861 type case, do not strip a padding type around the array type.
9863 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9865 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9868 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9870 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9871 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9872 code for -feliminate-unused-debug-types.
9873 (gnat_post_options): Likewise.
9875 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9877 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9878 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9881 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9883 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9884 DECL_ARTIFICIAL flag on enumeration types.
9886 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9888 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9889 fat pointer types artificial unconditionally.
9890 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9893 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9895 * gcc-interface/gigi.h (get_dummy_type): Declare.
9896 (build_dummy_unc_pointer_types): Likewise.
9897 (finish_fat_pointer_type): Likewise.
9898 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9899 fat pointer type has been built, complete it in place.
9900 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9901 and thin pointers. Remove useless variable.
9902 (finish_fat_pointer_type): Make global and move to...
9903 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9904 (get_dummy_type): New function.
9905 (build_dummy_unc_pointer_types): Likewise.
9906 (gnat_pushdecl): Propage the name to the anonymous variants only.
9907 (update_pointer_to): Only adjust the pointer types in the unconstrained
9910 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9912 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9913 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9914 if this is a Taft amendment type and the full declaration is available.
9915 * gcc-interface/trans.c (process_type): Likewise.
9916 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9917 (process_freeze_entity): Likewise.
9918 * gcc-interface/utils.c (dummy_global): New static variable.
9919 (gnat_write_global_declarations): If there are types declared as used
9920 at the global level, insert them in the global hash table.
9922 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9924 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9925 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9926 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9928 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9929 flag of the type accordingly.
9930 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9932 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9934 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9935 finalizing types when updating the pointers to the designated type.
9936 <all>: Finalize the deferred types even if we didn't defer processing
9937 of incomplete types in this invocation.
9939 2011-04-01 Olivier Hainque <hainque@adacore.com>
9940 Nicolas Setton <setton@adacore.com>
9941 Eric Botcazou <ebotcazou@adacore.com>
9943 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9944 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9946 2011-03-28 Kai Tietz <ktietz@redhat.com>
9948 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9950 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9951 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9953 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9955 2011-03-28 Tristan Gingold <gingold@adacore.com>
9958 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9959 Use ada output of gnatbind.
9960 (ada/b_gnatb.adb): Ditto.
9961 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9962 (ada.mostlyclean, ada.stage1)
9963 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9964 (ada.stagefeedback): Adjust.
9965 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9966 Use ada output of gnatbind.
9967 (b_gnatm.adb): Ditto.
9968 (b_gnatl.o, b_gnatm.o): New rules.
9970 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9972 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9973 for the padded type built to support a specified size or alignment.
9975 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9977 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9978 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9979 unconditionally to the end of the unit when the designated type is
9981 <all>: Rename local variable. Attempt to un-defer types only and do it
9982 for limited_with'ed types as well.
9983 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9984 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9985 consistently and remove redundant call to finalize_from_with_types.
9987 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9989 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9990 subprograms without a previous spec declared in the same unit.
9991 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9992 subprograms at the end of the unit instead of at the beginning.
9993 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9994 isn't public for the special handling of non-inline functions nested
9995 inside inline external functions.
9997 2011-03-25 Jeff Law <law@redhat.com>
9999 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10001 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10003 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10004 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10005 to compute Set_Size_Depends_On_Discriminant.
10006 (Layout_Type): Call it on array types in back-end layout mode.
10007 * sem_util.adb (Requires_Transient_Scope): Return true for array
10008 types only if the size depends on the value of discriminants.
10009 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10010 type if the RHS is a call to a function that returns an unconstrained
10011 type with default discriminant.
10013 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10015 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10016 non-conversion to the nominal result type at the end.
10018 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10020 * gcc-interface/trans.c (create_temporary): New function taken from...
10021 (create_init_temporary): ...here. Call it.
10022 (call_to_gnu): Create the temporary for the return value early, if any.
10023 Create it for a function with copy-in/copy-out parameters if there is
10024 no target; in other cases of copy-in/copy-out, use another temporary.
10025 Push the new binding level lazily. Add and rename local variables.
10027 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10029 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10031 (set_rm_size): Likewise.
10033 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10035 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10036 for the padded type built in order to support a specified alignment.
10037 Fix incorrect formatting.
10039 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10042 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10044 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10046 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10047 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10048 to the end of the list. Adjust recursive call. Rename local variable.
10049 If REORDER is true, reorder components of the record type.
10050 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10051 components_to_record and adjust the parameter list.
10053 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10055 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10056 disabled, use the variable for bounds of loop iteration scheme.
10058 2011-03-21 Kai Tietz <ktietz@redhat.com>
10061 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10063 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10065 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10066 out whether the expression is read-only. Short-circuit placeholder
10067 case and rename a couple of local variables.
10069 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10071 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10072 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10073 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10074 (convert): Deal with conversions from a smaller form type specially.
10076 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10078 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10079 its argument, except for the special -I- switch.
10081 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10083 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10086 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10088 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10090 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10092 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10094 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10095 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10096 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10097 Do not generate the check directly, instead instantiate the template
10098 check present in the descriptor.
10099 (make_descriptor_field): Move around.
10100 (build_vms_descriptor32): Build a template check in the POINTER field.
10101 (build_vms_descriptor): Remove useless suffixes.
10102 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10104 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10107 * targext.c: Include target files if IN_RTS is defined.
10109 2011-01-26 Richard Guenther <rguenther@suse.de>
10112 * targext.c: Include config.h.
10113 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10116 2011-01-04 Pascal Obry <obry@adacore.com>
10117 Eric Botcazou <ebotcazou@adacore.com>
10119 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10121 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10123 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10124 end-of-case on the end label and its associated gotos, if any.
10126 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10128 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10129 expressions of the parameter cache within the statement group of
10130 the CICO mechanism.
10132 2011-01-04 Olivier Hainque <hainque@adacore.com>
10133 Eric Botcazou <ebotcazou@adacore.com>
10135 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10136 (set_end_locus_from_node): New function.
10137 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10138 make and the function end_locus.
10139 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10140 for the elaboration subprogram.
10141 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10142 set the end_locus of the expression as well.
10144 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10147 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10148 variables that are referenced in exception handlers volatile.
10152 Copyright (C) 2011 Free Software Foundation, Inc.
10154 Copying and distribution of this file, with or without modification,
10155 are permitted in any medium without royalty provided the copyright
10156 notice and this notice are preserved.