1 2011-08-05 Sergey Rybin <rybin@adacore.com>
3 * tree_io.ads: Update ASIS_Version_Number because of the change of the
4 order of calling Tree_Write/Tree_Read routines made for aspects.
6 2011-08-05 Bob Duff <duff@adacore.com>
8 * a-fihema.adb (Finalize): Fix race condition.
10 2011-08-05 Yannick Moy <moy@adacore.com>
12 * sem_ch12.adb (Analyze_Package_Instantiation,
13 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
16 2011-08-05 Ed Schonberg <schonberg@adacore.com>
18 * sem_type.adb (Specific_Type): in an instance, the type-specific
19 operand of an equality check that involves null may have a private
20 type. Use full view to determine legality of construct.
22 2011-08-05 Vincent Celier <celier@adacore.com>
24 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
25 delete or close the file when the call to gnatmake was successful.
27 2011-08-05 Yannick Moy <moy@adacore.com>
29 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
32 2011-08-05 Ed Schonberg <schonberg@adacore.com>
34 * sinfo.ads: comments on use of entity field for aspect specifications.
36 2011-08-05 Ed Schonberg <schonberg@adacore.com>
38 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
39 node is not itself an entity but a selected component, it is a
40 rewritten parameterless call to an en enclosing synchronized operation,
41 and this expansion will be performed again in the instance, so there is
42 no global information to preserve.
44 2011-08-05 Javier Miranda <miranda@adacore.com>
46 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
47 for renamings of predefined primitives.
48 (In_Predef_Prims_DT): New subprogram.
50 2011-08-05 Ed Schonberg <schonberg@adacore.com>
52 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
53 possible interpretation of name is a reference type, add an
54 interpretation that is the designated type of the reference
55 discriminant of that type.
56 * sem_res.adb (resolve): If the interpretation imposed by context is an
57 implicit dereference, rewrite the node as the deference of the
58 reference discriminant.
59 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
60 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
61 parent type or base type.
62 * sem_ch4.adb (Process_Indexed_Component,
63 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
64 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
65 Check for implicit dereference.
66 (List_Operand_Interps): Indicate when an implicit dereference is
68 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
70 2011-08-05 Thomas Quinot <quinot@adacore.com>
72 * scos.ads: Update documentation of SCO table. Pragma statements can now
73 be marked as disabled (using 'p' instead of 'P' as the statement kind).
74 * par_sco.ads, par_sco.adb: Implement the above change.
75 (Process_Decisions_Defer): Generate a P decision for the first parameter
76 of a dyadic pragma Debug.
77 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
79 * put_scos.adb: Code simplification based on above change.
81 2011-08-05 Robert Dewar <dewar@adacore.com>
83 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
84 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
85 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
86 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
88 2011-08-05 Bob Duff <duff@adacore.com>
90 * a-stunau.ads, g-spipat.adb: Update comments.
92 2011-08-05 Bob Duff <duff@adacore.com>
94 * a-fihema.ads: Minor comment fix.
95 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
97 (Attach, Detach): Remove some unnecessary code.
98 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
100 2011-08-05 Bob Duff <duff@adacore.com>
102 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
103 allocation for Objects component. This simplifies the code somewhat. It
104 is also a little more efficient in the not-so-unusual case where there
105 are no controlled objects allocated.
106 Make Finalization_Started flag atomic.
107 (Finalize): Avoid unnecessary detachment of items from the list.
108 (pcol): Minor cleanup.
110 2011-08-05 Ed Schonberg <schonberg@adacore.com>
112 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
113 package whose name is the same as that of the generic unit, or its
116 2011-08-05 Bob Duff <duff@adacore.com>
118 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
119 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
122 2011-08-05 Arnaud Charlet <charlet@adacore.com>
124 * make.adb (Linking_Phase): No longer need to set source search path
125 before calling gnatlink in CodePeer mode.
126 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
127 gcc in CodePeer mode, since the binder generated file no longer has a
129 * switch.ads, switch.adb (Is_Language_Switch): Removed.
130 * switch-c.adb: Update comment.
132 2011-08-05 Thomas Quinot <quinot@adacore.com>
134 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
136 2011-08-05 Nicolas Roche <roche@adacore.com>
138 * gnat_ugn.texi: Fix minor syntax error issue.
140 2011-08-05 Vincent Celier <celier@adacore.com>
142 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
143 delete or close the file when the call to gnatmake returns a non
144 successful return code.
146 2011-08-05 Ed Schonberg <schonberg@adacore.com>
148 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
149 check, indicate that the copy of the original node does not come from
150 source, to prevent an infinite recursion of the expansion.
152 2011-08-05 Johannes Kanig <kanig@adacore.com>
154 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
155 VC generation for subprogram bodies.
157 2011-08-05 Yannick Moy <moy@adacore.com>
160 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
161 the base type with the smallest allowed base type.
163 2011-08-05 Sergey Rybin <rybin@adacore.com>
165 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
168 2011-08-05 Ed Schonberg <schonberg@adacore.com>
170 * sem_ch12.ads: minor comment updates.
172 2011-08-05 Ed Schonberg <schonberg@adacore.com>
174 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
175 instantiation and a formal package the compiler generates a package
176 renaming declaration so that the generic name within the declaration
177 is interpreted as a renaming of the instance. At the end of a formal
178 package declaration, this renaming must become invisible.
180 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
182 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
183 comparison and rely on concrete entities instead.
185 2011-08-05 Ed Schonberg <schonberg@adacore.com>
187 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
188 and discriminants, to indicate that the type has an access discriminant
189 that supports implicit dereference.
190 * snames.ads-tmpl: Add names of aspects and attributes related to
191 Ada2012 iterators: constant_indexing, default_iterator,
192 iterator_element, implicit_dereference, variable_indexing.
193 * aspects.ads, aspects.adb: entries for iterator-related aspects.
194 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
195 iterator-related aspects.
196 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
198 2011-08-05 Sergey Rybin <rybin@adacore.com>
200 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
201 metrics in gnatmetric to cover new kinds of coupling mentrics.
203 2011-08-05 Steve Baird <baird@adacore.com>
205 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
206 of calling the user-defined main subprogram.
207 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
208 is set) Call_Main_Subprogram ahead of, as opposed to
210 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
211 generation of a "with" of the user-defined main subprogram.
212 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
213 (which is now called from Gen_Main instead).
215 2011-08-05 Emmanuel Briot <briot@adacore.com>
217 * projects.texi: Added reference to the Makefile package.
219 2011-08-05 Thomas Quinot <quinot@adacore.com>
221 * exp_ch7.adb: Minor comment rewording.
223 2011-08-05 Ed Falis <falis@adacore.com>
225 * env.c: Fix comment.
227 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
229 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
230 character comparison and rely on concrete entities instead.
232 2011-08-05 Ed Schonberg <schonberg@adacore.com>
234 * sem_ch3.adb: (Check_Private_Overriding): better error message,
235 suggested by AI95-0068.
237 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
239 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
240 the two potential initialization calls. This accounts for any
241 access-before-elaboration checks which may precede the initialization
243 (Next_Suitable_Statement): New routine. Returns the next real statement
244 after the input node while skipping generated checks.
245 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
246 with comment on usage.
247 Do not generate Elaborate_All when the trigger is a finalization call
248 coming from a type init proc.
249 (Check_Elab_Call): Propagate the initialization procedure context to
250 subsequent calls to Check_A_Call.
251 (Check_Internal_Call_Continue): Propagate the initialization procedure
252 context to subsequent calls to Check_Elab_Call.
253 (Is_Finalization_Procedure): New routine. Returns True if the input
254 entity denotes a [Deep_]Finalize routine.
255 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
256 along with comment on usage.
258 2011-08-05 Vadim Godunko <godunko@adacore.com>
260 * s-atocou.ads: Add list of supported platforms.
262 2011-08-05 Yannick Moy <moy@adacore.com>
264 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
266 * opt.ads (Disable_ALI_File): new Boolean flag
267 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
269 2011-08-05 Ed Falis <falis@adacore.com>
271 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
272 environ is properly defined.
274 2011-08-05 Vincent Celier <celier@adacore.com>
276 * make.adb (Compilation_Phase): Exit immediately when all objects have
277 been found up to date, to avoid multiple exit messages.
278 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
279 same project for languages with no compiler.
280 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
282 2011-08-05 Robert Dewar <dewar@adacore.com>
284 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
285 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
286 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
287 s-atocou-builtin.adb: Minor reformatting.
289 2011-08-05 Yannick Moy <moy@adacore.com>
291 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
292 if the node to wrap is a pragma check, this node and enclosed
293 expression are not expanded, so do not apply any transformations here.
294 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
295 introducing transient scopes.
297 2011-08-05 Jose Ruiz <ruiz@adacore.com>
299 * adaint.c (__gnat_set_writable, __gnat_set_readable,
300 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
301 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
302 routine is available, so we use the default implementation of these
304 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
305 support for copying attributes on VxWorks 6.
307 2011-08-05 Yannick Moy <moy@adacore.com>
309 * debug.adb: Remove use of -gnatd.D.
310 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
311 * opt.ads: Simplify variables for ALFA mode, to keep one only
312 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
315 2011-08-05 Vincent Celier <celier@adacore.com>
317 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
318 Builder'Default_Switches.
320 2011-08-05 Vincent Celier <celier@adacore.com>
322 * makeusg.adb: Add lines for --create-map-file switches.
324 2011-08-05 Ed Schonberg <schonberg@adacore.com>
326 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
327 profile is incomplete and the full view is available, replace it with
329 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
330 incomplete, freezing the subprogram is delayed until the full view is
332 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
333 fixed-point multiplication operator and the predefined operator is
334 resolved in favor of the user-defined one.
336 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
338 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
341 2011-08-04 Ed Schonberg <schonberg@adacore.com>
343 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
344 whether a type lacks user-defined Read or Write operations, or has a
345 component that lacks them.
346 * sem_attr.adb (Check_Stream_Attribute): if restriction
347 No_Default_Stream_Attributes is active, verify that all subcomponent
348 types of the target have user-defined stream operations, and report
350 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
351 * exp_strm.adb: Build_Elementary_Input_Call,
352 Build_Elementary_Write_Call): remove checks for restriction
353 No_Default_Stream_Attributes, now checked in semantics.
355 2011-08-04 Vincent Celier <celier@adacore.com>
357 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
358 switches on the command line, look for all valid --RTS switches in the
359 Builder switches and for each language use the first runtime name found
361 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
362 command line and there is no auto-configuration.
363 (Runtime_Name_Set_For): New function.
365 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
367 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
368 elaborate initialization expression for variable Abort when processing
369 a package body or a declaration.
370 (Create_Finalizer): Propagate the package context when creating the
371 exception-related variables.
372 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
373 For_Package along with usage comment.
375 2011-08-04 Arnaud Charlet <charlet@adacore.com>
377 * gcc-interface/Makefile.in: Clean up targets.
378 Enable new package for atomic counters and copy-on-write implementation
379 of unbounded strings on x86 platforms.
380 * gcc-interface/Make-lang.in: Update dependencies.
382 2011-08-04 Robert Dewar <dewar@adacore.com>
384 * exp_ch7.adb: Minor reformatting.
386 2011-08-04 Robert Dewar <dewar@adacore.com>
388 * exp_strm.adb: Minor reformatting.
390 2011-08-04 Vadim Godunko <godunko@adacore.com>
392 * s-atocou.adb: Replace by dummy version and use on targets where atomic
393 operations are not supported.
394 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
395 * s-atocou-x86.adb: New file.
396 * Makefile.rtl: Add s-atocou.o file
398 2011-08-04 Arnaud Charlet <charlet@adacore.com>
400 * make.adb (Compile): Move setting of CodePeer_Mode to ...
401 (Compilation_Phase): ... here.
402 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
404 2011-08-04 Thomas Quinot <quinot@adacore.com>
406 * Make-generated.in: Fix minor typo in comment.
408 2011-08-04 Thomas Quinot <quinot@adacore.com>
410 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
413 2011-08-04 Robert Dewar <dewar@adacore.com>
415 * a-coinho.adb: Minor reformatting.
417 2011-08-04 Robert Dewar <dewar@adacore.com>
419 * a-coinho.ads: Minor reformatting.
421 2011-08-04 Vadim Godunko <godunko@adacore.com>
423 * s-atocou.ads, s-atocou.adb: New files.
424 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
425 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
426 direct use of GCC's atomic builtins and replace them by use of new
427 atomic counter package.
429 2011-08-04 Ed Schonberg <schonberg@adacore.com>
431 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
433 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
435 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
436 with a call to Get_External_Tag.
437 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
438 subprogram usage. Remove the guard against package declarations and
439 bodies since Build_Cleanup_Statements is no longer invoked in that
441 (Build_Components): Initialize Tagged_Type_Stmts when the context
442 contains at least one library-level tagged type.
443 (Build_Finalizer): New local variables Has_Tagged_Types and
444 Tagged_Type_Stmts along with associated comments on usage. Update the
445 logic to include tagged type processing.
446 (Create_Finalizer): Insert all library-level tagged type unregistration
447 code before the jump block circuitry.
448 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
449 (Expand_N_Package_Declaration): Remove the call to
450 Build_Cleanup_Statements.
451 (Process_Tagged_Type_Declaration): New routine. Generate a call to
452 unregister the external tag of a tagged type.
453 (Processing_Actions): Reimplemented to handle tagged types.
454 (Process_Declarations): Detect the declaration of a library-level
455 tagged type and carry out the appropriate actions.
456 (Unregister_Tagged_Types): Removed. The machinery has been directly
457 merged with Build_Finalizer.
459 2011-08-04 Robert Dewar <dewar@adacore.com>
461 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
462 gnatls.adb, exp_ch3.adb: Minor reformatting.
464 2011-08-04 Marc Sango <sango@adacore.com>
466 * sem_attr.adb (Analyze_Attribute): Replace the message
467 "invisible attribute of}" of the spark restriction violation in
468 attribute reference by the simple message "invisible attribute of type".
469 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
470 two insertion characters: '&' and '}'.
472 2011-08-04 Vadim Godunko <godunko@adacore.com>
474 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
475 * a-coinho.ads, a-coinho.adb: New file.
476 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
478 2011-08-04 Nicolas Roche <roche@adacore.com>
480 * alfa_test.adb: Not all ali files are containing alfa information even
481 if compiled with -gnatd.F. So suppress warning about missing ALFA
484 2011-08-04 Yannick Moy <moy@adacore.com>
486 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
488 * put_alfa.adb: Check that scope name is not empty.
490 2011-08-04 Ed Schonberg <schonberg@adacore.com>
492 * exp_ch3.adb (Stream_Operation_Ok): new predicate
493 Needs_Elementary_Stream_Operation, to determine whether user-defined
494 Read and Write attributes are available for the elementary components
495 of the given type. If only the predefined attributes are available,
496 then when restriction No_Default_Stream_Attributes is active the
497 predefined stream attributes for the composite type cannot be created.
499 2011-08-04 Robert Dewar <dewar@adacore.com>
501 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
502 Put routines in alpha order
504 2011-08-04 Jose Ruiz <ruiz@adacore.com>
506 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
507 * gcc-interface/Make-lang.in: Update dependencies.
509 2011-08-04 Arnaud Charlet <charlet@adacore.com>
511 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
512 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
515 2011-08-04 Robert Dewar <dewar@adacore.com>
517 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
518 lib-xref-alfa.adb: Minor reformatting.
520 2011-08-04 Marc Sango <sango@adacore.com>
522 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
523 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
524 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
527 2011-08-04 Tristan Gingold <gingold@adacore.com>
529 * bindgen.adb (Gen_Adainit_C): Remove.
530 (Gen_Adafinal_C): Ditto.
531 (Gen_Elab_Externals_C): Ditto.
532 (Gen_Elab_Calls_C): Ditto.
533 (Gen_Elab_Order_C): Ditto.
534 (Gen_Elab_Defs_C): Ditto.
535 (Gen_Finalize_Library_C): Ditto.
536 (Gen_Finalize_Library_Defs_C): Ditto.
538 (Gen_Output_File_C): Ditto.
539 (Gen_Restrictions_C): Ditto.
540 (Gen_Versions_C): Ditto.
541 (Write_Info_Ada_C): Ditto.
542 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
543 (Gen_Output_File): Do not force Ada_Bind_File anymore.
544 Always call Gen_Output_File_Ada.
545 * gnatlink.adb (Begin_Info): Now a constant.
547 (Ada_Bind_File): Remove
548 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
549 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
550 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
551 * opt.ads (Ada_Bind_File): Remove.
553 2011-08-04 Thomas Quinot <quinot@adacore.com>
555 * projects.texi: Document target-specific directory in default project
558 2011-08-04 Thomas Quinot <quinot@adacore.com>
560 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
563 2011-08-04 Yannick Moy <moy@adacore.com>
565 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
566 opt.ads, lib-xref.ads: Code clean up.
568 2011-08-04 Yannick Moy <moy@adacore.com>
570 * gnat_rm.texi: Update description of Test_Case
571 * gnat_ugn.texi: Typo.
573 2011-08-04 Ed Falis <falis@adacore.com>
575 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
577 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
579 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
580 it is of type Root_Controlled. This action eliminates fields Prev and
581 Next from type equality.
583 2011-08-04 Yannick Moy <moy@adacore.com>
585 * lib-xref-alfa.adb: Correct typo.
587 2011-08-04 Matthew Heaney <heaney@adacore.com>
589 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
592 2011-08-04 Yannick Moy <moy@adacore.com>
594 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
595 (Analyze_Pragma): allow static string expression for name of Test_Case,
596 instead of simply string literals.
597 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
600 2011-08-04 Vincent Celier <celier@adacore.com>
602 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
603 case suffixes to find truncated main sources.
605 2011-08-04 Tristan Gingold <gingold@adacore.com>
607 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
608 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
609 (Compute_Current_Task): Ditto.
611 2011-08-04 Tristan Gingold <gingold@adacore.com>
613 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
615 2011-08-04 Yannick Moy <moy@adacore.com>
617 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
618 library-level constant.
619 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
620 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
621 used as selector of parameter association, in ALFA mode.
623 2011-08-04 Robert Dewar <dewar@adacore.com>
625 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
626 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
629 2011-08-04 Arnaud Charlet <charlet@adacore.com>
631 * make.adb (Linking_Phase): Set source search path before calling
632 gnatlink in CodePeer mode.
634 2011-08-04 Javier Miranda <miranda@adacore.com>
636 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
637 Remove code which takes care of building TSDs.
638 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
639 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
640 the accessibility check in VM targets.
641 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
642 (Building_Static_DT): Now returns false for VM targets.
643 (Build_VM_TSDs): Removed.
644 (Expand_Interface_Conversion): Generate missing runtime check for
645 conversions to interface types whose target type is unknown at compile
647 (Make_VM_TSD): Add missing code to disable the generation of calls to
648 Check_TSD if the tagged type is not defined at library level, or not
649 has a representation clause specifying its external tag, or -gnatdQ is
651 * exp_disp.ads (Build_VM_TSDs): Removed.
652 (Make_VM_TSDs): Spec relocated from exp_disp.adb
653 * sem_disp.adb (Check_Dispatching_Operation): No code required to
654 register primitives in the dispatch tables in VM targets.
655 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
656 initialization of class-wide interface objects in VM targets.
657 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
660 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
662 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
663 when dotnet-ld cannot be found.
665 2011-08-04 Arnaud Charlet <charlet@adacore.com>
667 * bindgen.adb: Simplify significantly generation of binder body file in
669 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
670 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
673 2011-08-04 Yannick Moy <moy@adacore.com>
675 * sem_prag.adb, sem.ads: Code cleanup.
677 2011-08-04 Tristan Gingold <gingold@adacore.com>
679 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
680 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
682 * s-stusta.adb (Print): Adjust after changes in s-stausa.
683 * gnat_ugn.texi: Update dynamic stack usage section.
685 2011-08-04 Steve Baird <baird@adacore.com>
687 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
688 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
689 contains only a call to the user-defined main subprogram.
690 (Gen_Main_Ada) - If CodePeer_Mode is set, then
691 call the "wrapper" subprogram instead of directly
692 calling the user-defined main subprogram.
694 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
696 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
697 alternatives of a case statement for controlled objects. Rename local
698 variable A to Dead_Alt.
699 (Expand_N_If_Statement): Check the then and else statements of an if
700 statement for controlled objects. Check the then statements of all
701 elsif parts of an if statement for controlled objects.
702 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
704 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
705 detects a loop associated with the expansion of an array object.
706 Augment the processing of the loop statements to account for a possible
707 wrap done by Process_Statements_For_Controlled_Objects.
708 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
709 statements and abortable part of an asynchronous select for controlled
711 (Expand_N_Conditional_Entry_Call): Check the else statements of a
712 conditional entry call for controlled objects.
713 (Expand_N_Selective_Accept): Check the alternatives of a selective
714 accept for controlled objects.
715 (Expand_N_Timed_Entry_Call): Check the entry call and delay
716 alternatives of a timed entry call for controlled objects.
717 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
718 exception handler for controlled objects.
719 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
720 Add formal parameter Nested_Constructs along with its associated
722 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
723 Requires_Cleanup_Actions.
724 (Process_Statements_For_Controlled_Objects): New routine.
725 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
726 routine. Inspect a node which contains a non-handled sequence of
727 statements for controlled objects. If such an object is found, the
728 statements are wrapped in a block.
730 2011-08-04 Bob Duff <duff@adacore.com>
732 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
733 need to compare with Class_Wide_Type (T2), in order to get at the
734 original class-wide type node.
735 * sem_type.ads (Covers): Improve the comment.
736 * einfo.ads (Class_Wide_Type): Improve the comment.
737 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
738 the type of the Deref.
740 2011-08-04 Yannick Moy <moy@adacore.com>
742 * gnat_rm.texi: Document that Test_Case pragma can only appear on
743 separate declarations.
744 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
745 check identifier of pragma argument.
746 (Chain_TC): check that no other test case associated to the same entity
748 (Check_Test_Case): disallow test case inside subprogram body
749 (Analyze_Pragma): correct call to check identifier and not argument
750 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
751 function gets name from test case pragma.
753 2011-08-04 Yannick Moy <moy@adacore.com>
755 * gnat_rm.texi: Document new pragma and aspect.
756 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
757 (No_Duplicates_Allowed): new constant array defining whether duplicates
758 aspects of each kind can appear on the same declaration.
759 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
760 field, which points to a node holding the previous Spec_PPC_List.
761 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
762 through the indirection with Contract.
763 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
764 * par-prag.adb (Prag): do nothing on Test_Case pragma
765 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
767 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
768 component Ensures of Test_Case.
769 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
770 (Analyze_Generic_Subprogram_Declaration,
771 Analyze_Subprogram_Instantiation,
772 Analyze_Abstract_Subprogram_Declaration,
773 Analyze_Subprogram_Body_Helper,
774 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
775 insert contract in subprogram node at point of definition
777 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
778 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
780 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
781 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
782 similar to the analysis of pre/post
783 (Derive_Subprogram): insert contract in subprogram node at point of
785 * sem_prag.adb, sem_prag.ads
786 (Check_Arg_Is_String_Literal, Check_Identifier):
787 new checking procedures to be called in treatment of pragmas
788 (Check_Test_Case): new procedure to check that a Test_Case aspect or
789 pragma is well-formed. This does not check currently that 'Result is
790 used only in the Ensures component of a Test_Case.
791 (Analyze_Pragma): add case for Test_Case
792 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
793 components of a Test_Case.
794 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
795 expressions in the 3rd (and 4th if present) arguments of a Test_Case
796 pragma, treated as spec expressions.
797 (Sig_Flags): add value -1 for Test_Case.
798 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
799 Get_Requires_From_Test_Case_Pragma): getters for both expression
800 components of a Test_Case.
801 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
802 indirection between an entry or [generic] subprogram entity and its
803 pre/post + test-cases.
804 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
805 get/set for fields of an N_Contract node.
806 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
807 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
808 names and pragma for Test_Case.
809 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
811 2011-08-04 Vincent Celier <celier@adacore.com>
813 * gnat_ugn.texi: Improve documentation of gnatmake switch
816 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
818 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
819 type). Initialize Atyp to the appropriate type which is later checked
820 for completion. Rewrite the assertion associated with private type
823 2011-08-04 Ed Falis <falis@adacore.com>
825 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
826 initialize the number of CPUs.
828 2011-08-04 Ed Schonberg <schonberg@adacore.com>
830 * sem_type.adb (Disambiguate): New subsidiary routine
831 In_Same_Declaration_List, to implement AI05-0020: a user-defined
832 equality on an anonymous access type whose designated type is private
833 does not lead to an ambiguity with the universal access equality
834 operator in the body or child units of the defining package. The same
835 is true for a multiplication operator on a private type completed with
838 2011-08-04 Javier Miranda <miranda@adacore.com>
840 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
841 (Normalize_Scalars_Config): Removed.
843 (Register_Opt_Config_Switches): Remove registering config values of
844 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
845 (Restore_Opt_Config_Switches): Remove code which restores the values of
846 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
847 Init_Or_Norm_Scalars.
848 (Save_Opt_Config_Switches): Remove code which saves values of
849 Init_Or_Norm_Scalars and Normalize_Scalars.
850 (Set_Opt_Config_Switches): Remove code which restores config values of
851 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
852 Init_Or_Norm_Scalars.
854 2011-08-04 Yannick Moy <moy@adacore.com>
856 * frontend.adb (Frontend): remove previous patch to avoid full
857 qualification in ALFA mode.
858 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
859 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
860 unique name for an entity, which could be used to identify the entity
861 across compilation units.
863 2011-08-04 Thomas Quinot <quinot@adacore.com>
866 (Initialize_Default_Project_Path): Add target specific directory
867 ($prefix/$target/lib/gnat) in front of project path in all cases
868 (making gnatmake's behaviour consistent with gprbuild).
869 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
870 Pass target name from Sdefault to project subsystem.
871 * gnatls.adb: Show new target specific default project directory.
873 2011-08-04 Johannes Kanig <kanig@adacore.com>
875 * cstand.adb: Add Information to Identifier in Standard
876 (Identifer_For): Set Entity to the corresponding entity
878 2011-08-04 Sergey Rybin <rybin@adacore.com>
880 * gnat_ugn.texi: Update doc on gnatcheck.
882 2011-08-04 Yannick Moy <moy@adacore.com>
884 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
887 2011-08-04 Yannick Moy <moy@adacore.com>
889 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
890 performing expansion.
891 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
892 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
893 it is not called in ALFA mode.
895 2011-08-04 Emmanuel Briot <briot@adacore.com>
897 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
898 after all, so removed.
900 2011-08-04 Sergey Rybin <rybin@adacore.com>
902 * vms_data.ads: Add missing VMS qualifiers.
904 2011-08-04 Emmanuel Briot <briot@adacore.com>
906 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
907 the list of files on the command line after processing it through
910 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
912 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
913 processing for .NET/JVM. These targets can now benefit from
914 Raise_From_Controlled_Operation and they share the same processing with
916 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
917 These targets need transient scopes in order to properly finalize short
918 lived controlled objects.
919 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
920 NET/JVM. These targets can now benefit from
921 Raise_From_Controlled_Operation and they share the same processing with
924 2011-08-04 Geert Bosch <bosch@adacore.com>
926 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
928 2011-08-04 Ed Schonberg <schonberg@adacore.com>
930 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
931 Expand_Record_Aggregate, to determine whether aggregate must be
932 expanded into assignments. This is the case if the ancestor part is
933 private, regarless of the setting of the flag Has_Private_Ancestor.
935 2011-08-04 Ed Falis <falis@adacore.com>
937 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
939 2011-08-04 Bob Duff <duff@adacore.com>
941 * sinfo.ads: Fix comment.
943 2011-08-04 Steve Baird <baird@adacore.com>
945 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
946 choose a package name in much the same way as is
947 done for JGNAT when VM_Target /= No_VM, except that
948 a slightly more distinctive prefix string is used.
950 2011-08-04 Emmanuel Briot <briot@adacore.com>
952 * makeutl.adb (Complete_Mains): no longer accept unit names on the
953 gnatmake command line.
954 This behavior was never documented (and was supported only because of
955 an early bug in the code). This case might lead to ambiguous cases
956 (between unit names and truncated base names without suffixes).
958 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
960 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
961 Remove the external tag of a tagged type from the internal hash table.
962 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
963 expanded usage of the routine. Strenghten the check for Is_Master. Add
964 processing for tagged types.
965 (Build_Finalizer): Create all the necessary lists used in finalizer
966 creation when the processed context is a package that may contain
968 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
969 Requires_Cleanup_Actions.
970 (Expand_N_Package_Body): Package bodies may need clean up code
971 depending on whether they contain tagged types.
972 (Expand_N_Package_Declaration): Package declarations may need clean up
973 code depending on whether they contain tagged types.
974 (Unregister_Tagged_Types): New routine. Search through a list of
975 declarations or statements, looking for non-abstract Ada tagged types.
976 For each such type, generate code to unregister the external tag.
977 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
978 Requires_Cleanup_Actions.
979 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
980 through a list of declarations or statements looking for non-abstract
981 Ada tagged types or controlled objects.
982 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
983 Requires_Cleanup_Actions.
984 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
985 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
988 2011-08-04 Vincent Celier <celier@adacore.com>
990 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
991 has Ada sources, not project Project, because if the root project
992 Project has no sources of its own, all projects will be deemed without
995 2011-08-04 Gary Dismukes <dismukes@adacore.com>
997 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
998 of the No_Param_Proc acc-to-subp type used for initialization of
999 __gnat_finalize_library_objects so that it's declared at library level
1000 rather than nested inside of the adainit routine.
1002 2011-08-04 Javier Miranda <miranda@adacore.com>
1004 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1005 if the tagged type has a representation clause which specifies its
1008 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1010 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1011 Remove previous procedure with that name.
1012 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1014 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1015 subtype mark, the ancestor cannot have unknown discriminants.
1016 (Resolve_Record_Aggregate): if the type has invisible components
1017 because of a private ancestor, the aggregate is illegal.
1019 2011-08-04 Vincent Celier <celier@adacore.com>
1021 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1022 account switches -gnat2005, -gnat12 and -gnat2012.
1024 2011-08-04 Bob Duff <duff@adacore.com>
1026 * s-tasdeb.ads: Minor comment fix.
1028 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1030 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1032 * switch.ads, switch.adb (Is_Language_Switch): New function.
1034 2011-08-04 Vincent Celier <celier@adacore.com>
1036 * switch-c.adb: Minor comment addition.
1038 2011-08-04 Vincent Celier <celier@adacore.com>
1040 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1041 ending with '=' is followed by a space (missing file name).
1043 2011-08-04 Pascal Obry <obry@adacore.com>
1045 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1047 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1049 * sem_ch12.adb (Analyze_Associations): New routine
1050 Check_Overloaded_Formal_Subprogram to reject a formal package when
1051 there is a named association or a box initialisation for an overloaded
1052 formal subprogram of the corresponding generic.
1054 2011-08-04 Yannick Moy <moy@adacore.com>
1056 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1057 * get_alfa.adb, put_alfa.adb: Read and write new component of
1059 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1061 2011-08-04 Pascal Obry <obry@adacore.com>
1063 * urealp.adb: Minor reformatting.
1065 2011-08-04 Tristan Gingold <gingold@adacore.com>
1067 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1068 Handle the case when Cleanup_Protected_Object returns Empty.
1070 2011-08-04 Yannick Moy <moy@adacore.com>
1072 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1074 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1076 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1077 call, ignore functions.
1079 2011-08-04 Geert Bosch <bosch@adacore.com>
1081 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1084 2011-08-04 Emmanuel Briot <briot@adacore.com>
1086 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1087 as an index for Builder'Switches. This conforms to the documentation.
1088 * make.adb (Insert_Project_Sources): avoid duplicate code
1090 2011-08-04 Emmanuel Briot <briot@adacore.com>
1092 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1093 name on the command line (for instance "../dummy"), never assume it can
1096 2011-08-04 Tristan Gingold <gingold@adacore.com>
1098 * bindgen.adb: Remove code the reference or create the
1099 Break_Start/__gnat_break_start procedure.
1100 * s-stalib.adb (Break_Start): Removed.
1102 2011-08-04 Emmanuel Briot <briot@adacore.com>
1104 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1105 shared with gprbuild.
1107 2011-08-04 Yannick Moy <moy@adacore.com>
1109 * par-ch4.adb (P_Primary): preferentially issue an error message about
1110 a missing parenthesis arount a conditional or case expression in Ada
1111 2012 mode, if we detect that the alignment is not correct for a
1114 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1116 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1117 tag-to-class-wide conversion as needing finalization actions.
1118 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1119 a tag-to-class-wide conversion as needing finalization actions.
1120 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1121 conversion does not need finalization actions.
1122 (Is_Tag_To_CW_Conversion): New routine.
1123 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1124 whether an object is the result of a tag-to-class-wide conversion.
1126 2011-08-04 Yannick Moy <moy@adacore.com>
1128 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1129 the left-hand-side and right-hand-side of a conjunct are inserted when
1130 translating a pre- or postcondition
1131 * sem_ch6.adb: Correct typo in comment
1133 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1135 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1136 Unchecked_Conversion and Unchecked_Deallocation.
1138 2011-08-04 Thomas Quinot <quinot@adacore.com>
1140 * make.adb: Minor reformatting.
1142 2011-08-04 Emmanuel Briot <briot@adacore.com>
1144 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1145 sources in the project and its imported projects, but not in the whole
1148 2011-08-04 Emmanuel Briot <briot@adacore.com>
1150 * make.adb: Remove debug trace.
1152 2011-08-04 Vincent Celier <celier@adacore.com>
1154 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1155 path in canonical form, to be able to compare path names on platforms
1156 such as Windows or Darwin.
1158 2011-08-04 Thomas Quinot <quinot@adacore.com>
1160 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1161 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1162 * scos.ads: Update documentation accordingly.
1163 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1166 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1168 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1169 attribute only if prefix type is scalar.
1171 2011-08-04 Emmanuel Briot <briot@adacore.com>
1173 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1174 in gnatmake for specifying mains on the command line that do not belong
1175 to the main project. These mains must currently all belong to the same
1177 (Ultimate_Extension_Of): removed, since duplicated
1178 Ultimate_Extending_Project.
1180 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1182 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1184 (CodePeer_Mode_String): New.
1185 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1187 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1188 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1189 mode, since no useful elaboration subprogram is needed by CodePeer.
1190 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1191 In this mode, compile binder file with -gnatC and do stop after this
1194 2011-08-04 Vincent Celier <celier@adacore.com>
1196 * exp_ch7.adb: Minor comment fix.
1198 2011-08-04 Robert Dewar <dewar@adacore.com>
1200 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1201 exp_ch4.adb, makeutl.adb: Minor reformatting.
1203 2011-08-04 Emmanuel Briot <briot@adacore.com>
1205 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1206 Create several new subprograms to move code out of Make. This makes the
1207 code more readable, removes code duplication, and is a preparation work
1208 for adding support for aggregate projects.
1210 2011-08-04 Tristan Gingold <gingold@adacore.com>
1212 * s-po32gl.ads, s-po32gl.adb: New files.
1213 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1214 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1215 (Build_Finalization_Collection): Use it.
1216 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1217 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1219 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1220 * gcc-interface/Make-lang.in: Update dependencies.
1222 2011-08-04 Emmanuel Briot <briot@adacore.com>
1224 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1227 2011-08-04 Emmanuel Briot <briot@adacore.com>
1229 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1230 command line is not a file name, also check whether it could be a unit
1233 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1235 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1236 the header of the finalization routine.
1237 If the unit has no finalizer but is a body whose spec has one, then
1238 generate the decrement of the elaboration entity only.
1239 If the unit has a finalizer and is a spec, then do not generate the
1240 decrement of the elaboration entity.
1241 (Gen_Finalize_Library_C): Likewise.
1243 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1245 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1246 (Bounds_Size_Expression): Removed.
1247 (Double_Alignment_Of): New subsidiary routine.
1248 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1249 for a hole in the dope vector of unconstrained arrays due to different
1250 index and element alignments.
1252 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1254 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1255 raise program_error because body has not been seen yet.
1257 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1259 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1262 2011-08-04 Vincent Celier <celier@adacore.com>
1264 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1266 2011-08-04 Yannick Moy <moy@adacore.com>
1268 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1269 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1271 2011-08-04 Thomas Quinot <quinot@adacore.com>
1273 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1274 instantiation in RCI.
1276 2011-08-04 Emmanuel Briot <briot@adacore.com>
1278 * make.adb: Share more code with gprbuild
1280 2011-08-04 Emmanuel Briot <briot@adacore.com>
1282 * projects.texi: Added documentation for the IDE'Gnat project file
1285 2011-08-04 Nicolas Roche <roche@adacore.com>
1287 * gnat_rm.texi: Minor editing.
1289 2011-08-04 Javier Miranda <miranda@adacore.com>
1291 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1292 and the library case for VM targets.
1293 (Gen_Adainit_Ada): Likewise.
1295 2011-08-04 Robert Dewar <dewar@adacore.com>
1297 * g-altive.ads: Minor comment updates.
1298 * prj-nmsc.adb: Minor reformatting.
1300 2011-08-04 Javier Miranda <miranda@adacore.com>
1303 (Normalize_Scalars_Config): Value of the configuration switch set by
1304 pragma Normalize_Scalars when it appears in the gnat.adc file.
1305 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1306 to save and restore settings of this pragma.
1308 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1309 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1311 2011-08-04 Vincent Celier <celier@adacore.com>
1313 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1315 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1317 * makeutl.adb: Minor reformatting.
1319 2011-08-04 Olivier Hainque <hainque@adacore.com>
1321 * g-altive.ads: Update comments to reflect that only the soft
1322 binding is available today.
1324 2011-08-04 Robert Dewar <dewar@adacore.com>
1326 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1327 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1328 * gcc-interface/Make-lang.in: Update dependencies.
1330 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1332 * prj-env.adb: Remove local debug traces.
1334 2011-08-04 Yannick Moy <moy@adacore.com>
1336 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1337 was used instead of Hi_OK, which could cause a read of an uninitialized
1338 value later on. Detected while working on the new warning.
1339 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1341 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1342 in more cases, in order to detect more unreferenced values.
1343 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1344 object for expression, if any.
1346 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1348 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1349 the operand types instead of the Esize.
1351 2011-08-04 Steve Baird <baird@adacore.com>
1353 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1354 enable CodePeer_Mode.
1355 * bindusg.adb (Display): Add help message describing -P binder switch.
1356 * gnat_ugn.texi: Document -P binder switch.
1357 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1358 user-defined main program directly.
1359 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1360 user-defined main program in the context clause of the package body.
1362 2011-08-04 Yannick Moy <moy@adacore.com>
1364 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1365 duplicate of Defining_Entity
1366 (Get_Unique_Entity_For_Decl): rename function into
1367 Unique_Defining_Entity
1368 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1369 (Formal_Proof_On): remove synthesized flag
1370 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1371 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1372 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1373 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1374 Annotate (Formal_Proof)
1376 2011-08-04 Emmanuel Briot <briot@adacore.com>
1378 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1379 source files with non-standard naming schemes, in imported projects
1381 2011-08-04 Emmanuel Briot <briot@adacore.com>
1383 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1384 specified on the gprbuild command line, we need to compile all units
1385 within that file, not just the first one we find
1386 Fix error message for mains that are not found.
1388 2011-08-04 Thomas Quinot <quinot@adacore.com>
1390 * sem_ch6.adb: Update comment.
1391 * sem_ch12.adb: Minor reformatting.
1393 2011-08-04 Bob Duff <duff@adacore.com>
1395 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1396 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1397 race condition whose symptom is to fail to lock Parent. That, in turn,
1398 causes Parent.Awake_Count to be accessed without locking Parent, which
1399 causes another race condition whose symptom is that Parent.Awake_Count
1400 can be off by 1 (either too high or too low). The solution is to lock
1401 Parent unconditionally, and then lock Acceptor, before reading
1402 Acceptor.Terminate_Alternative.
1404 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1406 * debug.adb: Update comment.
1408 2011-08-04 Robert Dewar <dewar@adacore.com>
1410 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1411 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1412 exp_ch6.adb: Minor reformatting.
1414 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1416 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1419 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1421 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1423 2011-08-04 Thomas Quinot <quinot@adacore.com>
1425 * sinfo.ads: Minor reformatting.
1427 2011-08-04 Emmanuel Briot <briot@adacore.com>
1429 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1430 even if there is no location.
1432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1434 * sem_res.adb, sem_ch4.adb: move check for restriction
1435 No_Task_Hierarchy to resolve_allocator.
1437 2011-08-04 Thomas Quinot <quinot@adacore.com>
1439 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1440 This flag of N_Pragma nodes is not used, remove it as well as all of
1441 the associated circuitry.
1443 2011-08-04 Javier Miranda <miranda@adacore.com>
1445 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1446 runtime check on duplicated externa tags
1447 * debug.adb Document switch -gnatdQ.
1449 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1451 * a-fihema.ads: Minor typo fix.
1453 2011-08-04 Yannick Moy <moy@adacore.com>
1455 * sem_ch10.adb: Minor comment update.
1457 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1459 * einfo.adb: Update the node field usage to reflect the renaming of
1460 Return_Flag to Return_ Flag_Or_Transient_Decl.
1461 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1462 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1463 (Write_Field15_Name): Change Return_Flag to
1464 Return_Flag_Or_Transient_Decl.
1465 * einfo.ads: Rename node field Return_Flag to
1466 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1467 occurrences in entities.
1468 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1469 associated Inline pragma.
1470 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1471 associated Inline pragma.
1472 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1474 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1475 Return_Flag and Set_Return_Flag.
1476 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1477 objects generated for controlled transients declared inside an
1478 Exception_With_Actions. Update the calls to Return_Flag.
1479 (Process_Object_Declaration): Add code to add a null guard for hook
1480 objects generated for controlled transients declared inside an
1481 Exception_With_Actions. Update related comment.
1482 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1483 objects generated for controlled transients declared inside an
1484 Exception_With_Actions. Update the calls to Return_Flag.
1485 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1487 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1489 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1490 positional aggregate.
1492 2011-08-04 Vincent Celier <celier@adacore.com>
1494 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1495 SLOC only for pragmas.
1497 2011-08-04 Emmanuel Briot <briot@adacore.com>
1499 * projects.texi: Minor typo fix.
1501 2011-08-04 Emmanuel Briot <briot@adacore.com>
1503 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1504 on case-sensitive file systems.
1506 2011-08-04 Thomas Quinot <quinot@adacore.com>
1508 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1509 nested in a disabled pragma.
1510 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1511 enclosing pragma, if any, for X decisions.
1513 2011-08-04 Thomas Quinot <quinot@adacore.com>
1515 * sem_prag.adb: Minor reformatting.
1517 2011-08-04 Vincent Celier <celier@adacore.com>
1519 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1520 allowed in no run time mode.
1522 2011-08-04 Vincent Celier <celier@adacore.com>
1524 * make.adb (Check): When -gnatc is used, check for the source file
1525 inside the ALI file with a canonical case file name.
1527 2011-08-04 Emmanuel Briot <briot@adacore.com>
1529 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1530 overriding the separator.
1532 2011-08-04 Robert Dewar <dewar@adacore.com>
1534 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1535 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1537 2011-08-04 Robert Dewar <dewar@adacore.com>
1539 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1541 2011-08-04 Yannick Moy <moy@adacore.com>
1543 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1544 'Result only appears in postcondition of function.
1546 2011-08-04 Thomas Quinot <quinot@adacore.com>
1548 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1549 external tag, include the value of the external tag in the exception
1552 2011-08-04 Yannick Moy <moy@adacore.com>
1554 * sem_attr.adb (Result): modify error message for misplaced 'Result
1556 2011-08-04 Sergey Rybin <rybin@adacore.com>
1558 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1559 clear that the second argument must be an identifier.
1561 2011-08-04 Thomas Quinot <quinot@adacore.com>
1563 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1564 -fpreserve-control-flow, insert an IF statement on the barrier
1565 condition to ensure that a conditional branch instruction is generated.
1567 2011-08-04 Emmanuel Briot <briot@adacore.com>
1569 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1570 (Processing_Flags.Ignore_Missing_With): new flag.
1572 2011-08-04 Emmanuel Briot <briot@adacore.com>
1574 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1575 Source_List_File on case-insensitive systems where the file is actually
1576 on a case-sensitive file system (NFS,...).
1578 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1580 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1581 function return contains a controlled [extension] aggregate and the
1582 return statement is not part of a handled sequence of statements, wrap
1583 the return in a block. This ensures that all controlled temporaries
1584 generated during aggregate resolution will be picked up by the
1585 finalization machinery.
1587 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1589 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1590 components, freeze type before resolution, to ensure that default
1591 initializations are present for all components.
1592 * sem_res.adb (Resolve_Actuals): the designated object of an
1593 accces-to-constant type is a legal actual in a call to an
1594 initialization procedure.
1596 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1598 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1599 N_Unchecked_Type_Conversion to the possible containers of a renamed
1602 2011-08-04 Yannick Moy <moy@adacore.com>
1604 * par-ch13.adb (Aspect_Specifications_Present): recognize
1605 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1606 is issued in Strict mode.
1607 * par.adb: Fix typos in comments.
1609 2011-08-04 Yannick Moy <moy@adacore.com>
1611 * sem_attr.adb (Result): modify error message to take into account Post
1612 aspect when compiling Ada 2012 (or newer) code.
1614 2011-08-04 Nicolas Roche <roche@adacore.com>
1616 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1617 remove need for GCC exceptions.
1619 2011-08-04 Vincent Celier <celier@adacore.com>
1621 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1622 project, not the source file name.
1623 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1624 excluded, continue looking. This excluded source will only be returned
1625 if there is no other source with the same base name that is not locally
1628 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1630 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1631 private and one of the operands is a real literal, use a qualified
1632 expression rather than a conversion which is not meaningful to the
1635 2011-08-04 Yannick Moy <moy@adacore.com>
1637 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1638 corresponding aspect X'Class are allowed, proceed with analysis of the
1639 aspect instead of skipping it.
1641 2011-08-04 Tristan Gingold <gingold@adacore.com>
1643 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1644 This will allow to have an Ada implementation for the subprogram.
1646 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1648 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1649 completion and aspects are present, apply them to the entity for the
1650 type which is currently the partial view, but which is the one that
1652 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1653 applies to a partial view, indicate that the full view has predicates
1654 and delayed aspects.
1655 (Replace_Type_Reference): Handle properly predicates that apply to the
1656 full view of a private completion.
1658 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1660 * layout.adb (Layout_Type): For composite types, do not set Esize.
1661 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1663 (Size_Known): Look at the RM size of components instead of the Esize.
1664 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1665 issue warning and activate Implicit_Packing.
1666 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1667 if the Esize is not known.
1668 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1669 for elementary types only.
1670 (Analyze_Record_Representation_Clause): Look at the RM size instead
1671 of the Esize to issue errors.
1672 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1674 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1676 Look at the RM size instead of the Esize for types if the latter is
1678 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1680 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1682 * sem_type.adb: proper handling of equality not involving anonymous
1685 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1687 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1688 Vis_Decls. When creating a library-level finalizer for a package spec,
1689 both the declaration and body of the finalizer are inserted either in
1690 the visible or private declarations of the package spec.
1692 2011-08-04 Javier Miranda <miranda@adacore.com>
1694 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1695 use of the full-view of a type when invoking Is_Ancestor.
1696 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1697 the full-view of private parents is requested, then use also the
1698 full-view of the parent of the first derivation.
1700 2011-08-04 Tristan Gingold <gingold@adacore.com>
1702 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1703 instead of the locally imported procedure.
1704 * s-taprop-mingw.adb (Enter_Task): Ditto.
1705 * s-valrea.adb (Scan_Real): Ditto.
1706 * s-imgrea.adb (Set_Image_Real): Ditto.
1707 * s-flocon.ads: Make the package pure.
1709 2011-08-04 Thomas Quinot <quinot@adacore.com>
1711 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1712 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1713 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1714 New subprogram, moved here from...
1715 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1716 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1717 rewriting of the last argument into a procedure call statement here...
1718 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1721 2011-08-04 Thomas Quinot <quinot@adacore.com>
1723 * par_sco.adb: Minor reformatting.
1725 2011-08-04 Robert Dewar <dewar@adacore.com>
1727 * erroutc.adb: Minor reformatting.
1729 2011-08-04 Thomas Quinot <quinot@adacore.com>
1731 * par_sco.adb: Comment update.
1733 2011-08-04 Tristan Gingold <gingold@adacore.com>
1735 * s-flocon.ads: New file.
1736 * g-flocon.ads: Now a renaming of s-flocon.
1737 * Makefile.rtl: Add s-flocon.o
1739 2011-08-04 Javier Miranda <miranda@adacore.com>
1741 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1742 constrained, do not attempt to build a subtype of it.
1744 2011-08-04 Yannick Moy <moy@adacore.com>
1746 * errout.ads Change comments: remove 'R'M as an example where quotes
1747 are needed; add ALFA as another case where quotes are not needed
1748 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1749 case where quotes are not needed.
1750 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1751 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1752 Remove all occurrences of 'A'L'F'A
1754 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1756 * sem_ch13.adb: check legality of invariant pragma.
1758 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1760 * bindgen.adb: Add comments.
1762 2011-08-04 Yannick Moy <moy@adacore.com>
1764 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1766 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1767 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1769 2011-08-04 Robert Dewar <dewar@adacore.com>
1771 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1772 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1773 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1775 2011-08-04 Thomas Quinot <quinot@adacore.com>
1777 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1779 2011-08-04 Thomas Quinot <quinot@adacore.com>
1782 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1785 2011-08-04 Robert Dewar <dewar@adacore.com>
1787 * einfo.ads, exp_ch4.adb: Minor reformatting.
1789 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1791 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1793 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1795 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1796 type in all cases to compute list of primitive operations, because full
1797 view may be an itype that is not attached to the list of declarations.
1799 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1801 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1802 library has already been finalized.
1803 (Gen_Adafinal_C): Likewise.
1804 (Gen_Adainit_Ada): Generate an early return if the library has
1805 already been elaborated.
1806 (Gen_Adainit_C): Likewise.
1807 (Gen_Output_File_Ada): Generate an elaboration flag.
1808 (Gen_Output_File_C): Likewise.
1810 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1812 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1813 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1814 built in the first place.
1815 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1816 for CodePeer because Finalize_Address was not built to begin with.
1817 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1819 2011-08-04 Pascal Obry <obry@adacore.com>
1821 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1822 filenames, this ensures unicity of filenames across processes.
1824 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1826 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1827 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1828 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1829 Add False as the actual to From_Abort in the generated call to
1830 Raise_From_Controlled_Operation.
1832 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1834 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1835 so that the ali file name can be retrieved from outside of this package.
1836 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1837 doing nothing in the general case, but used to update the object file
1838 timestamp if directly generated by the backend.
1839 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1840 to a later time than the ali file one.
1842 2011-08-04 Yannick Moy <moy@adacore.com>
1844 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1845 entities whose body contains an Annotate pragma which forces formal
1847 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1848 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1849 Mark_Non_ALFA_Subprogram to pass in a message and node.
1850 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1851 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1852 surrounding subprogram.
1853 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1854 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1855 as not in ALFA is annotated with Formal_Proof being On, then an error
1856 is issued based on the additional parameters for message and node.
1857 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1858 * gcc-interface/Make-lang.in: Update dependencies.
1860 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1862 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1863 Finalize_Address when CodePeer is enabled.
1865 2011-08-04 Pascal Obry <obry@adacore.com>
1867 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1868 the latter returns a pointer to a static buffer which is deallocated
1869 at the end of the routine.
1871 2011-08-04 Yannick Moy <moy@adacore.com>
1873 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1874 after index creation; mark unconstrained base array type generated as
1875 being in/not in ALFA as well
1876 (Make_Index): mark subtype created as in/not in ALFA
1877 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1878 over a loop as in/not in ALFA, depending on its type and form of loop
1881 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1883 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1884 directly to False on .NET and JVM.
1886 2011-08-04 Yannick Moy <moy@adacore.com>
1888 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1889 constraint that subtype must come from source code to be in ALFA, so
1890 that anonymous subtypes can be in ALFA too.
1892 2011-08-04 Yannick Moy <moy@adacore.com>
1894 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1895 reference for ALFA mode.
1896 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1897 procedure public so as to use it from formal verification back-end.
1899 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1901 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1902 invalid checks of the Parameter, making Remove_Switch not working
1905 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1907 * targparm.ads: Update header: no run-time exception is needed on this
1910 2011-08-04 Vincent Celier <celier@adacore.com>
1912 * a-fihema.adb: Use System.IO instead of GNAT.IO
1914 2011-08-04 Thomas Quinot <quinot@adacore.com>
1916 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1917 are forbidden in Compiler_Unit mode.
1919 2011-08-04 Robert Dewar <dewar@adacore.com>
1921 * sem_util.adb: Minor reformatting.
1923 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1925 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
1926 library-level finalizers.
1927 (Gen_Finalize_Library_C): Update the import string for library-level
1929 (Gen_Finalize_Library_Defs_C): Update the definition name of a
1930 library-level finalizer.
1931 * exp_ch7.adb: Remove with and use clauses for Stringt.
1932 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
1933 Spec_Decl. Add local variable Body_Id. The names of library-level
1934 finalizers are now manually fully qualified and are no longer external.
1935 A single name is now capable of servicing .NET, JVM and non-VM targets.
1936 Pragma Export is no longer required to provide visibility for the name.
1937 (Create_Finalizer_String): Removed.
1938 (New_Finalizer_Name): New routine which mimics New_..._Name.
1940 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1942 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
1943 elaboration counter to Standard_Short_Integer.
1944 * sem_util.adb (Build_Elaboration_Entity): Likewise.
1945 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
1946 (Gen_Elab_Externals_C): Likewise.
1948 2011-08-04 Ed Falis <falis@adacore.com>
1950 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1951 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1952 system-vxworks-mips.ads, system-vxworks-x86.ads
1953 (Always_Compatible_Rep): set to False for all VxWorks targets.
1955 2011-08-04 Robert Dewar <dewar@adacore.com>
1957 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
1958 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
1959 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
1960 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
1961 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
1962 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
1963 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
1964 Minor reformatting and code reorganization.
1966 2011-08-04 Emmanuel Briot <briot@adacore.com>
1968 * projects.texi: Added doc for aggregate projects.
1970 2011-08-04 Emmanuel Briot <briot@adacore.com>
1972 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
1973 Add support for overriding the Project_Path in aggregate projects.
1975 2011-08-04 Robert Dewar <dewar@adacore.com>
1977 * a-cofove.ads: Minor reformatting.
1979 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1981 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
1982 on the generated code.
1983 (Build_Finalize_Statements): Update the comment on the generated code.
1984 (Build_Initialize_Statements): Update the comment on the generated code.
1985 (Build_Object_Declarations): Add local variable Result. The object
1986 declarations are now built in sequence.
1987 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
1990 2011-08-04 Robert Dewar <dewar@adacore.com>
1992 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
1994 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1996 * einfo.ads (Elaboration_Entity): Document new definition and use.
1997 (Elaboration_Entity_Required): Adjust to above change.
1998 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
1999 * exp_ch12.adb: And with and use for Snames.
2000 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2001 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2002 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2003 <Check_Unit_Name>: Deal with N_Expanded_Name.
2004 <Attribute_Elaborated>: Extend to all unit names.
2005 * sem_elab.adb: And with and use for Uintp.
2006 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2007 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2008 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2009 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2010 from Gen_Adainit_Ada.
2011 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2012 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2013 case, do not call System.Standard_Library.Adafinal; instead call
2014 finalize_library if needed.
2015 (Gen_Adafinal_C): Likewise.
2016 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2017 non-main program case.
2018 (Gen_Adainit_C): Generate a couple of external declarations here.
2019 In the main program case, set SSL.Finalize_Library_Objects.
2020 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2021 (Gen_Elab_Calls_C): Likewise.
2022 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2023 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2024 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2026 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2027 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2029 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2030 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2031 of external declarations. Â Call Gen_Finalize_Library_C.
2033 2011-08-04 Emmanuel Briot <briot@adacore.com>
2035 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2036 Compute_Compilation_Phases): new subprogram.
2037 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2038 The number of mains as well as the various compilation phases that
2039 need to be run are now project tree specific, since various
2040 aggregated trees might have different requirements. In particular,
2041 they do not all require bind or link phases.
2043 2011-08-04 Emmanuel Briot <briot@adacore.com>
2045 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2046 (Project_Tree_Appdata): New type.
2047 It is now possible to associate application-specific data to a project
2048 tree. In particular, this is used in the gprbuild builder to avoid a
2049 number of global tables and htables, especially now that there can be
2050 several project trees loaded at once because of aggregate projects.
2051 (Debug_Name): new procedure.
2052 * projects.texi: Clarify syntax of "**" for Source_Dirs
2054 2011-08-03 Emmanuel Briot <briot@adacore.com>
2056 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2057 the "roots" for a main.
2058 (Fill_From_Project): add support for aggregate projects. Main units
2059 in aggregated projects are now automatically added in the list of
2060 files to build (although this fails later on in gprbuild, because
2061 these files are not using the root proejct tree, so this needs
2063 * gcc-interface/Make-lang.in: Update dependencies.
2065 2011-08-03 Yannick Moy <moy@adacore.com>
2067 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2068 conditional expression in ALFA.
2069 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2070 expressions as not in ALFA.
2072 2011-08-03 Robert Dewar <dewar@adacore.com>
2074 * a-cofove.adb: Minor reformatting.
2076 2011-08-03 Emmanuel Briot <briot@adacore.com>
2078 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2079 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2081 These packages are more logically placed in the Queue package, since
2082 they manipulate the queue. It is also likely that they can be adapted
2083 for gnatmake, thus sharing more code.
2084 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2085 that we could move the above.
2087 2011-08-03 Emmanuel Briot <briot@adacore.com>
2089 * errutil.adb (Finalize): clean up the list of error messages on exit.
2090 Calling this subprogram multiple times will no longer show duplicate
2091 error messages on stderr.
2093 2011-08-03 Emmanuel Briot <briot@adacore.com>
2095 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2096 Getopt_Switches when we have already define a command line
2099 2011-08-03 Yannick Moy <moy@adacore.com>
2101 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2102 in ALFA. Instead, they are considered as assertions to prove.
2103 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2104 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2105 if they have no ELSE part, or if they occur in pre- and postconditions,
2106 where the Condition cannot have side-effects in ALFA
2107 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2108 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2109 Instead, include type conversion between scalar types in ALFA.
2110 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2111 if-and-only-if its type is in ALFA.
2113 2011-08-03 Thomas Quinot <quinot@adacore.com>
2115 * scos.adb, get_scos.adb, put_scos.adb
2116 New code letter for decisions: G (entry guard)
2118 (Traverse_Subprogram_Body): Rename to...
2119 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2120 (Traverse_Protected_Body): New subprogram
2121 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2122 protected bodies and entry bodies.
2124 2011-08-03 Yannick Moy <moy@adacore.com>
2126 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2127 entities with get/set subprograms, which is set on procedure entities
2128 generated by the compiler for a postcondition.
2129 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2130 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2131 entity for a declaration
2132 (Get_Unique_Entity_For_Decl): new function returning an entity which
2133 represents a declaration, so that matching spec and body have the same
2136 2011-08-03 Robert Dewar <dewar@adacore.com>
2138 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2139 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2141 2011-08-03 Yannick Moy <moy@adacore.com>
2143 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2144 library-level because retriction No_Implicit_Dynamic_Code in the
2145 front-end prevents its definition as a local subprogram
2146 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2147 for reuse in other contexts
2148 (Traverse_Declarations_Or_Statements,
2149 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2150 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2151 procedures take a callback parameter to be called on all declarations
2153 (Traverse_All_Compilation_Units): new generic function to traverse a
2154 compilation unit and call a callback parameter on all declarations
2156 2011-08-03 Javier Miranda <miranda@adacore.com>
2158 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2159 in Java since they are always enclosed in a namespace that
2160 differentiates them, and overloaded entities are supported by the VM.
2162 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2164 * checks.adb (Determine_Range): If a computed bound of an operation is
2165 outside the range of the base type of the expression, and overflow
2166 checks are enabled, the result is unknown and cannot be used for any
2167 subsequent constant folding.
2168 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2169 unknown, so is the result of the comparison.
2171 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2173 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2174 From_Abort. When finalization was triggered by an abort, propagate
2175 Standard'Abort_Signal rather than Program_Error.
2176 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2178 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2179 From_Abort. When finalization was triggered by an abort, propagate
2180 Standard'Abort_Signal rather than Program_Error.
2181 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2183 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2184 Abort_Id. Update the calls to Build_Object_Declarations and
2185 Build_Raise_Statement to include Abort_Id.
2186 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2187 calls to Build_Object_Declarations and Build_Raise_Statement to include
2189 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2190 calls to Build_Object_Declarations and Build_Raise_Statement to include
2192 (Build_Components): Create an entity for Abort_Id when exceptions are
2193 allowed on the target.
2194 (Build_Finalizer): New local variable Abort_Id.
2195 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2196 calls to Build_Object_Declarations and Build_Raise_Statement to include
2198 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2199 declaration of flag Abort_Id to preserve the original abort status
2200 before finalization code is executed.
2201 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2202 runtime routine Raise_From_Controlled_Operation.
2203 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2204 Abort_Id. Update the call to Build_Object_Declarations to include
2205 Abort_Id. Update the layout of the finalizer body.
2206 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2207 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2208 clunky code to create all flags and objects related to
2209 exception propagation and replace it with a call to
2210 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2212 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2213 Add new formal Abort_Id and associated comment on its use.
2214 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2216 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2217 Remove the clunky code to create all flags and objects related to
2218 exception propagation and replace it with a call to
2219 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2221 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2223 * s-tassta.adb: Fix minor typos.
2225 2011-08-03 Robert Dewar <dewar@adacore.com>
2227 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2228 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2230 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2232 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2233 to packages. This ensures that the finalizer body will not end up
2234 inside the freeze node.
2235 (Process_Declarations): Add code to detect whether a freeze node has a
2236 nested finalization collection.
2238 2011-08-03 Pascal Obry <obry@adacore.com>
2240 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2241 (Current_Session): Return a not null access to Session_Type.
2242 (Default_Session): Likewise.
2244 2011-08-03 Robert Dewar <dewar@adacore.com>
2246 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2247 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2249 2011-08-03 Pascal Obry <obry@adacore.com>
2251 * g-awk.ads: Minor comment fix.
2253 2011-08-03 Sergey Rybin <rybin@adacore.com>
2255 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2256 the tree structure related to discriminant constraints.
2257 Original_Discriminant cannot be used any more for computing the
2258 defining name for the reference to a discriminant.
2260 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2262 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2263 function is not visibly tagged, this is not a dispatching call and
2264 therfore is not Tag_Indeterminate, even if the function is marked as
2265 dispatching on result.
2267 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2269 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2270 (Expand_N_Free_Statement): Add a guard to protect against run-times
2271 which do not support controlled types.
2272 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2273 against run-times which do not support controlled types.
2274 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2275 against run-times which do not support controlled types.
2276 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2277 against run-times which do not support controlled types.
2278 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2279 protect against run-times which do not support controlled types.
2281 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2283 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2284 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2286 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2288 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2289 modified in the source, to prevent spurious warnings when compiling
2292 2011-08-03 Thomas Quinot <quinot@adacore.com>
2294 * a-except-2005.adb: Minor reformatting.
2296 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2298 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2299 is a renaming declaration in the private part of a package, do not emit
2300 a warning that the with_clause could be moved because the renaming may
2301 be used in the body or in a child unit.
2303 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2305 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2306 Propagate the Comes_From_Source attribute from the original return
2307 object to the renaming.
2309 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2311 * exp_ch7.adb (Build_Raise_Statement): Do not call
2312 Raise_From_Controlled_Operation when this routine is not present in
2313 the run-time library.
2314 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2315 libraries (Ravenscar), tasks are non-terminating, and protected objects
2316 and tasks can only appear at library level, so we do not want
2317 finalization of protected objects nor tasks.
2318 * exp_intr.adb: Minor clarification in comment.
2319 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2320 Gen_Output_File_C): Remove references to finalization of library-level
2321 objects when using restricted run-time libraries.
2323 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2325 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2326 Original_Discriminant only if the parent type is a generic formal.
2328 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2330 * exp_ch13.adb: Add with and use clause for Targparm;
2331 (Expand_N_Free_Statement): Prevent the generation of a custom
2332 Deallocate on .NET/JVM targets since this requires pools and address
2334 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2335 .NET/JVM targets, attach the newly allocated object to the access
2336 type's finalization collection. Do not generate a call to
2337 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2338 exist in the runtime.
2339 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2340 create a custom Allocate for object that do not require initialization.
2341 Attach a newly allocated object to the access type's finalization
2342 collection on .NET/JVM.
2343 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2344 assignment of controlled types on .NET/JVM. The two hidden pointers
2345 Prev and Next and stored and later restored after the assignment takes
2347 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2348 kludge for .NET/JVM to recognize a particular piece of code coming from
2349 Heap_Management and change the call to Finalize into Deep_Finalize.
2350 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2351 finalization collections on .NET/JVM only for types derived from
2352 Controlled. Separate the association of storage pools with a collection
2353 and only allow it on non-.NET/JVM targets.
2354 (Make_Attach_Call): New routine.
2355 (Make_Detach_Call): New routine.
2356 (Process_Object_Declarations): Suppress the generation of
2357 build-in-place return object clean up code on .NET/JVM since it uses
2359 * exp_ch7.ads (Make_Attach_Call): New routine.
2360 (Make_Detach_Call): New routine.
2361 * exp_intr.adb Add with and use clause for Targparm.
2362 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2363 on .NET/JVM targets.
2364 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2365 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2366 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2367 names used in finalization.
2369 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2371 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2372 (Attach, Detach): Lock the current task when chaining an object onto a
2375 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2377 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2378 Rewritten to create the message strings when the exception is not
2379 raised by an abort during finalization.
2380 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2381 Raise_From_Controlled_Operation and update its associated comment.
2382 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2383 Ada.Finalization.Heap_Management provides key functionality
2384 associated with controlled objects on the heap, their creation,
2385 finalization and reclamation. Type Finalization_Collection is
2386 effectively a wrapper which sits ontop of a storage pool and performs
2387 all necessary bookkeeping for all the objects it contains. Each
2388 access-to-controlled or access-to-class-wide type receives a collection
2389 as part of its expansion. The compiler generates buffer code and
2390 invokes Allocate / Deallocate to create and destroy allocated
2392 * a-finali.adb ("="): Removed.
2393 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2394 fields Prev and Next.
2395 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2396 A library unit with at least one controlled object on the library level
2397 has a special finalizer which is invoked by the binder. To signal this,
2398 ali files carry field PF.
2399 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2400 associated comment on field usage.
2401 * a-tags.adb (Get_RC_Offset): Removed.
2402 (Needs_Finalization): New routine.
2403 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2404 Dispatch tables now carry field Needs_Finalization which provides
2405 runtime indication whether a type is controlled or has controlled
2406 components or both. Remove field RC_Offset.
2407 (Get_RC_Offset): Removed along with its associated pragma Export.
2408 Since tagged types with controlled components no longer carry hidden
2409 field _controller, the special mechanism to retrieve its location is no
2411 (Needs_Finalization): New routine.
2412 * atree.ads, atree.adb (Elist24): New routine.
2413 (Set_Elist24): New routine.
2414 * atree.h: Add a define clause for Elist24.
2415 * bindgen.adb New library-level variable Lib_Final_Built.
2416 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2417 presence of a VM target, the routine generates calls to the proper
2418 library finalization routine.
2419 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2420 targets. Set the correct library finalization routine depending on
2421 whether the library has controlled objects or this is a VM compilation.
2422 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2423 to library-level finalizers of compiled units in reverse order of
2424 elaboration. It also produces exception management code and reraises a
2425 potential exception after all units have been finalized.
2426 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2427 library-level finalizers of compiled units in reverse order of
2429 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2430 definitions of all library-level finalizers available to the compilation
2431 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2433 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2434 System.Standard_Library.Adafinal directly. If the library needs
2435 finalization actions, create the sequence of finalization calls.
2436 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2437 Generate a with clause for System.Soft_Links when compiling for a VM.
2438 Remove the code which imports System.Standard_Library.Adafinal as
2439 Do_Finalize. Generate the library finalization routine.
2440 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2441 If the library needs finalization actions, create all the definitions
2442 of library- level finalizers.
2443 (Has_Finalizer): New routine. Determines whether at least one compiled
2444 unit has a library-level finalizer.
2445 Add type Qualification_Mode.
2446 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2447 * einfo.adb: New usage of field 15 as Return_Flag.
2448 Remove Finalization_Chain_Entity from the usages of field 19.
2449 Remove Associated_Final_Chain from the usages of field 23.
2450 New usage of field 23 as Associated_Collection.
2451 New usage of field 24 as Finalizer.
2452 New usage of flag 252 as Is_Processed_Transient.
2453 (Associated_Final_Chain): Removed.
2454 (Associated_Collection): New routine.
2455 (Finalization_Chain_Entity): Removed.
2456 (Finalizer): New routine.
2457 (Is_Finalizer): New routine.
2458 (Is_Processed_Transient): New routine.
2459 (Return_Flag): New routine.
2460 (Set_Associated_Final_Chain): Removed.
2461 (Set_Associated_Collection): New routine.
2462 (Set_Finalization_Chain_Entity): Removed.
2463 (Set_Finalizer): New routine.
2464 (Set_Is_Processed_Transient): New routine.
2465 (Set_Return_Flag): New routine.
2466 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2468 (Write_Field8_Name): Alphabetize the output.
2469 (Write_Field11_Name): Alphabetize the output.
2470 (Write_Field12_Name): Alphabetize the output.
2471 (Write_Field13_Name): Alphabetize the output.
2472 (Write_Field14_Name): Alphabetize the output.
2473 (Write_Field15_Name): Alphabetize the output.
2474 (Write_Field16_Name): Alphabetize the output.
2475 (Write_Field17_Name): Alphabetize the output.
2476 (Write_Field18_Name): Alphabetize the output.
2477 (Write_Field19_Name): Alphabetize the output. Remove the output of
2478 Finalization_Chain_Entity.
2479 (Write_Field20_Name): Alphabetize the output.
2480 (Write_Field21_Name): Alphabetize the output.
2481 (Write_Field22_Name): Alphabetize the output.
2482 (Write_Field23_Name): Alphabetize the output. Remove the output of
2483 Associated_Final_Chain. Add output for Associated_Collection.
2484 (Write_Field24_Name): Alphabetize the output.
2485 (Write_Field25_Name): Add output for Finalizer.
2486 (Write_Field26_Name): Alphabetize the output.
2487 (Write_Field27_Name): Alphabetize the output.
2488 (Write_Field28_Name): Alphabetize the output.
2489 * einfo.ads: Add new field description for Associated_Collection and
2491 Remove Associated_Final_Chain and its uses in nodes.
2492 Remove Finalization_Chain_Entity and its uses in nodes.
2493 Add new field description for Finalizer and its uses in nodes.
2494 Add new synthesized attribute Is_Finalizer.
2495 Add new flag description for Is_Processed_Transient and its uses in
2497 Add new field description for Return_Flag and its uses in nodes.
2498 (Associated_Final_Chain): Removed along with its pragma Inline.
2499 (Associated_Collection): New routine and pragma Inline.
2500 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2501 (Finalizer): New routine and pragma Inline.
2502 (Is_Finalizer): New routine and pragma Inline.
2503 (Is_Processed_Transient): New routine and pragma Inline.
2504 (Return_Flag): New routine and pragma Inline.
2505 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2506 (Set_Associated_Collection): New routine and pragma Inline.
2507 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2508 (Set_Finalizer): New routine and pragma Inline.
2509 (Set_Is_Processed_Transient): New routine and pragma Inline.
2510 (Set_Return_Flag): New routine and pragma Inline.
2511 * exp_aggr.adb: Alphabetize subprograms.
2512 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2513 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2514 associated comments. Remove local variables External_Final_List and
2516 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2517 Ancestor. Remove the retrieval of finalization lists. Update the call to
2519 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2520 lists. Update the call to Late_Expansion.
2521 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2522 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2523 (Gen_Assign): Remove the retrieval of the finalization list used to
2524 build the assignment. Update the calls to Make_Init_Call and
2526 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2527 Remove the mechanism to determine attachment levels and finalization
2528 list retrieval. Remove the processing for coextensions.
2529 (Init_Controller): Removed. Controllers no longer exist.
2530 (Late_Expansion): Remove formals Flist and Obj along with their
2531 associated comments. Update the calls to Build_Record_Aggr_Code and
2532 Build_Array_Aggr_Code.
2533 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2534 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2535 appear in entry bodies, protected subprograms and task bodies.
2536 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2537 * exp_ch3.adb (Add_Final_Chain): Removed.
2538 (Build_Array_Init_Proc): Alphabetize local variables.
2539 (Build_Assignment): Alphabetize local variables. Update the call to
2541 (Build_Class_Wide_Master): Rename local variables to better reflect
2543 (Build_Discriminant_Assignments): Code reformatting.
2544 (Build_Init_Call_Thru): Code reformatting.
2545 (Build_Init_Procedure): Code reformatting. Generate a special version
2546 of Deep_Finalize which is capable of finalizing all initialized
2547 components and ignore the rest.
2548 (Build_Init_Statements): Rename local variables to better reflect their
2550 Reimplement the mechanism to include the creation and update of an index
2551 variable called a "counter". It is used as a bookmark for tracing
2552 initialized and non-initialized components.
2553 (Build_Initialization_Call): Remove local variable Controller_Typ.
2554 Alphabetize all local variables. Remove the initialization of the
2555 record controller and update the call to Make_Init_Call.
2556 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2557 New local variable Counter.
2558 (Constrain_Array): Alphabetize.
2559 (Expand_Freeze_Array_Type): Create a collection instead of a
2561 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2562 Finalize_Address which is used in conjunction with allocated controlled
2564 (Expand_N_Object_Declaration): Remove the creation of a finalization
2565 list for anonymous access types. Update the calls to Make_Init_Call and
2567 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2568 retrieval of finalization lists. Remove the expansion of the record
2569 controller. Create TSS primitive Finalize_Address used in conjunction
2570 with controlled objects on the heap. Create finalization collections
2571 for access-to-controlled record components.
2572 (Expand_Record_Controller): Removed.
2573 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2574 class-wide types now requires additional processing. Create
2575 finalization collections for access-to-controlled types.
2576 (Increment_Counter): New routine.
2577 (Make_Counter): New routine.
2578 (Make_Eq_If): Remove the mention of Name_uController.
2579 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2580 types coming from System.Finalization_Root.
2581 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2582 (Predefined_Primitive_Bodies): There is no longer need to skip types
2583 coming from System.Finalization_Root.
2584 (Stream_Operation_OK): Do not generate stream routines for
2585 type Ada.Finalization.Heap_Management.Finalization_Collection.
2586 * exp_ch3.ads: Alphabetize subprograms.
2587 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2588 Add with and use clause for Lib.
2589 (Complete_Coextension_Finalization): Removed.
2590 (Complete_Controlled_Allocation): New routine. Create a finalization
2591 collection for anonymous access-to-controlled types. Create a custom
2592 Allocate which interfaces with the back end and the machinery in
2594 (Expand_Allocator_Expression): Add necessary calls to
2595 Complete_Controlled_Allocation. Remove the retrieval of finalization
2596 lists. Update the calls to Make_Adjust_Call. Generate a call to
2597 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2598 the associated collection.
2599 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2600 Code clean up. Remove the retrieval of finalization lists and
2602 Update the call to Make_Init_Call. Generate a call to
2603 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2604 the associated collection.
2605 (Get_Allocator_Final_List): Removed. Finalization lists are not
2607 (Suitable_Element): Remove the mention of Name_uController.
2608 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2609 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2610 the left hand side, carry out the assignment and adjust the left hand
2612 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2613 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2614 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2615 BIP_Collection and BIPcollection.
2616 (Build_Heap_Allocator): New routine used to allocate the return object
2617 of a build-in-place function onto a collection.
2618 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2619 (Expand_Call): Do not replace direct calls to Deep routines with their
2621 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2622 and update their occurrences. Add a special return flag to monitor the
2623 [ab]normal execution of the function. The flag is set right before the
2625 Rewrite the mechanism used to allocate a build-in-place return object
2626 on the heap or on a storage pool.
2627 (Is_Direct_Deep_Call): New routine.
2628 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2629 build-in-place function call instead of a final list. Build a call to
2630 Set_Finalize_Address_Ptr to decorate the associated collection.
2631 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2632 order to name the build-in-place function call's result for later
2633 finalization. Add a collection to a build-in-place function call
2634 instead of a final list.
2635 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2636 build-in-place function call instead of a final list. Remove the code
2637 which moves one final list and transforms it into the actual in a
2638 nested build-in-place call.
2639 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2640 build-in-place function call instead of a final list.
2641 (Move_Final_List): Removed.
2642 (Needs_BIP_Collection): New routine.
2643 (Needs_BIP_Final_List): Removed.
2644 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2645 enumeration type BIP_Formal_Kind.
2646 Update the related comment.
2647 (Needs_BIP_Collection): New routine.
2648 (Needs_BIP_Final_List): Removed.
2649 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2650 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2651 majority of subprograms in this unit. Add Name_Finalize_Address to
2652 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2653 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2654 statements for an array type.
2655 (Build_Adjust_Statements): Create the adjust statements for a record
2657 (Build_Cleanup_Statements): New routine. A procedure which given any
2658 construct containing asynchronous calls, references to _master, or is a
2659 task body, a task allocation or a protected body produces the necessary
2660 runtime calls to clean up these constructs.
2661 (Build_Exception_Handler): New routine.
2662 (Build_Final_List): Removed.
2663 (Build_Finalization_Collection): New routine. A core procedure which
2664 creates a collection to service heap allocated controlled objects
2665 associated with an access-to-controlled type.
2666 (Build_Finalize_Statements): Create the finalization statements for a
2668 (Build_Finalizer): New routine. A core procedure which given any
2669 construct with declarations and/or statements detects all objects which
2670 need any type of clean up (controlled objects, protected objects) and
2671 generates all necessary code to clean up the said objects in the proper
2673 (Build_Finalizer_Call): New routine.
2674 (Build_Initialize_Statements): Create the initialization statements for
2675 an array type. The generated routine contains code to finalize partially
2677 (Build_Object_Declarations): New routine.
2678 (Build_Raise_Statement): New routine.
2679 (Clean_Simple_Protected_Objects): Removed.
2680 (Controller_Component): Removed.
2681 (Enclosing_Function): New routine.
2682 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2683 either declarations or statements or both.
2684 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2685 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2687 (Find_Final_List): Removed.
2688 (Global_Flist_Ref): Removed.
2689 (In_Finalization_Root): Removed.
2690 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2691 scope in terms of tree nodes. Process all transient variables within
2693 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2694 generated after the adjust.
2695 (Make_Attach_Call): Removed.
2696 (Make_Call): New routine.
2697 (Make_Clean): Removed.
2698 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2700 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2702 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2704 (Make_Final_Call): Modified to simply create a call to either
2705 Deep_Finalize or Finalize.
2706 (Make_Finalize_Address_Body): New routine.
2707 (Make_Finalize_Address_Stmts): New routine. A function which produces
2708 TSS primitive Finalize_Address used in conjunction with heap allocated
2710 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2711 (Make_Init_Call): Rewritten. There is no longer an attach call
2712 generated after initialization.
2713 (Make_Local_Deep_Finalize): New routine.
2714 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2715 (Make_Transient_Block): Remove the finalization list retrieval and
2717 (Needs_Finalization): Moved to Exp_Util.
2718 (Parent_Field_Type): New routine.
2719 (Preprocess_Components): New routine.
2720 (Process_Transient_Objects): New routine.
2721 (Wrap_HSS_In_Block): New routine.
2722 (Wrap_Transient_Declaration): Remove finalization list management and
2723 controller insertion.
2724 (Wrap_Transient_Expression): Code reformatting.
2725 (Wrap_Transient_Statement): Code reformatting.
2726 * exp_ch7.ads (Build_Final_List): Removed.
2727 (Build_Finalization_Collection): New routine.
2728 (Build_Raise_Statement): New routine.
2729 (Controller_Component): Removed.
2730 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2731 (Find_Final_List): Removed.
2732 (In_Finalization_Root): Removed.
2733 (Is_Simple_Protected_Type): Update related comment.
2734 (Make_Adjust_Call): New parameter profile and associated comments.
2735 (Make_Attach_Call): Removed.
2736 (Make_Final_Call): New parameter profile and associated comments.
2737 (Make_Finalize_Address_Body): New routine.
2738 (Make_Init_Call): New parameter profile and associated comments.
2739 (Make_Local_Deep_Finalize): New routine.
2740 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2741 (Needs_Finalization): Moved to Exp_Util.
2742 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2743 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2744 (Find_Protection_Type): Moved to Exp_Util.
2745 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2746 (Make_DT): Update sequence of dispatch table initialization. Remove the
2747 initialization of field RC_Offset. Add initialization of field Needs_
2749 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2750 Reimplement how an object is first finalized, then deallocated.
2751 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2753 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2754 Register TSS_Finalize_Address with type TSS_Names.
2755 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2756 procedure provides the interface between an allocation / deallocation
2757 and the support machinery in Ada.Finalization.Heap_Management.
2758 (Find_Init_Call): Code reformatting.
2759 (Find_Init_Call_In_List): Code reformatting.
2760 (Find_Protection_Type): Moved from Exp_Ch9.
2761 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2762 (Has_Controlled_Coextensions): Removed.
2763 (Has_Controlled_Objects): New routine.
2764 (In_Library_Level_Package_Body): New routine.
2765 (Insert_Action_After): New routine.
2766 (Is_Finalizable_Transient): New routine. This predicate determines
2767 whether an object declaration is one of the many variants of controlled
2769 (Is_Null_Access_BIP_Func_Call): New routine.
2770 (Is_Non_BIP_Func_Call): New routine.
2771 (Is_Related_To_Func_Return): New routine.
2772 (Needs_Finalization): Moved from Exp_Ch7.
2773 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2774 (Find_Protection_Type): Moved from Exp_Ch9.
2775 (Has_Controlled_Coextensions): Removed.
2776 (Has_Controlled_Objects): New routine.
2777 (In_Library_Level_Package_Body): New routine.
2778 (Insert_Action_After): New routine.
2779 (Is_Finalizable_Transient): New routine.
2780 (Is_Null_Access_BIP_Func_Call): New routine.
2781 (Is_Non_BIP_Func_Call): New routine.
2782 (Is_Related_To_Func_Return): New routine.
2783 (Needs_Finalization): Moved from Exp_ch7.
2784 * expander.adb (Expand): Add a case for N_Free_Statement.
2785 * freeze.adb (Freeze_All): Replace the generation of a finalization
2786 list with a collection for access-to-controlled types.
2787 (Freeze_Entity): Code reformatting.
2788 (Freeze_Record_Type): Remove the freezing of a record controller
2790 (Freeze_Subprogram): Code reformatting.
2791 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2793 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2794 has a library-level finalizer.
2795 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2796 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2797 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2798 files. Add a-fihema to the list of object files.
2800 Alphabetize the associations in type Is_Parameterless_Attribute.
2801 * rtsfind.ads: Ada.Finalization_List.Controller and
2802 System.Finalization_Implementation are no longer a GNAT unit.
2803 Update the range of type Ada_Finalization_Child. Remove the following
2804 recoverable entities:
2806 RE_Attach_To_Final_List
2810 RE_Finalizable_Ptr_Ptr
2811 RE_Global_Final_List
2812 RE_Limited_Record_Controller
2815 RE_Record_Controller
2816 RE_Simple_List_Controller
2818 Add the following recoverable entities:
2820 RE_Add_Offset_To_Address
2824 RE_Exception_Identity
2825 RE_Finalization_Collection
2826 RE_Finalization_Collection_Ptr
2827 RE_Needs_Finalization
2828 RE_Save_Library_Occurrence
2829 RE_Set_Finalize_Address_Ptr
2830 RE_Set_Storage_Pool_Ptr
2832 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2834 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2835 (First_Stored_Discriminant): Remove the mention of Name_uController.
2836 * sem_aux.ads: Comment reformatting.
2837 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2838 to redecorate an already existing class-wide type.
2839 (Decorate_Tagged_Type): New parameter profile and associated comment.
2840 Create a "shadow class-wide type" for a shadow entity.
2841 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2842 of the final chain along with the associated comment.
2843 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2844 Full_Desig and set it to the full view of the designated type.
2845 Initialize the finalization collection to empty.
2846 (Build_Derived_Record_Type): Alphabetize local variables. Code
2848 (Collect_Fixed_Components): Remove the mention of Name_uController.
2849 (Create_Constrained_Components): Remove the mention of Name_uController.
2850 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2851 class-wide type of a shadow entity.
2852 (Process_Full_View): Update the machinery which marks type
2853 Limited_Controlled's entity as limited.
2854 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2855 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2856 list, instead make a collection build-in-place formal.
2857 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2858 a designated type in order to establish a match between the renaming
2859 and the renamed entity.
2860 (Find_Selected_Component): Add guard to prevent spurious exceptions
2861 from being raised on .NET/JVM.
2862 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2863 to the list of primitive that need special processing. Update arrays
2864 C_Names and D_Names.
2865 (Replace_Types): Handle class-wide types.
2866 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2867 different parameter profile, look at the first formal.
2868 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2869 use clauses for Exp_Util.
2870 * sem_res.adb: Remove with and use clauses for Elists.
2871 (Propagate_Coextensions): Removed.
2872 (Resolve_Allocator): Do not propagate the list of coextensions from one
2873 allocator to another.
2874 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2875 Deaccessed_T to Desig_Typ.
2876 (Enter_Name): Remove the mention of Name_uController.
2877 (Gather_Components): Remove the mention of Name_uController.
2878 (Incomplete_Or_Private_View): New routine.
2879 (Is_Coextension_Root): Removed.
2880 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2881 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2882 (Is_Coextension_Root): Removed.
2883 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2884 Controlled types are now derived from a null tagged record. Remove
2885 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2886 * sinfo.adb (Coextensions): Removed.
2887 (Set_Coextensions): Removed.
2888 * sinfo.ads: Remove Coextensions from the explanation of node fields
2889 and its uses in nodes.
2890 Update the field usage of N_Allocator.
2891 (Coextensions): Removed along with its pragma Inline.
2892 (Set_Coextensions): Removed along with its pragma Inline.
2893 * snames.ads-tmpl: Remove names
2898 Name_uLocal_Final_List
2899 Name_Finalization_Root
2906 Name_Finalize_Address
2907 * s-pooglo.adb (Allocate): Add overriding indicator.
2908 (Deallocate): Add overriding indicator.
2909 (Storage_Size): Add overriding indicator.
2910 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2911 than Finalize_Global_List.
2912 (Null_Finalize_Global_List): Removed.
2913 (Save_Library_Occurrence): New routine.
2914 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2915 initialization. Add variable Finalize_Library_Objects along with its
2916 pragma Export. Add variables Library_Exception and
2917 Library_Exception_Set along with their pragma Export.
2918 (Null_Finalize_Global_List): Removed.
2919 (Save_Library_Occurrence): New routine.
2920 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2921 rather than Finalize_Global_List.
2922 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2923 of the constructed node.
2925 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2927 * link.c: Include "auto-host.h" before system headers.
2929 2011-08-03 Vincent Celier <celier@adacore.com>
2931 * make.adb (Gnatmake): Add to table Library_Projs only library projects
2932 that are not extended. Do not check if a library project that is
2933 extended should be regenerated. Do not add to table Library_Paths the
2934 libraries that are in extended projects. Link only with libraries that
2935 are in libray projects that are not extended.
2936 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
2937 for a library project that is extended.
2939 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2941 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
2942 conforming subprogram renamings that appear to be completions if they
2943 are not fully conformant.
2944 Such renamings are homographs but not completions.
2945 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
2946 names in a subprogram renaming that appears in an instance.
2948 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2950 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
2951 not immutably limited, build actual subtype from expression to provide
2952 proper bounds to caller.
2954 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2956 * sem_ch8.adb: Minor comment correction.
2958 2011-08-03 Thomas Quinot <quinot@adacore.com>
2960 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
2961 returning a limited array, use an extended return statement.
2963 2011-08-03 Vincent Celier <celier@adacore.com>
2965 * make.adb (Initialize): If --subdirs= is used, but no project file is
2966 specified, attempt to create the specify subdir if it does not already
2967 exist and use it as the object directory as if -D had been specified.
2969 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2971 * s-tpopsp-vms.adb: New file.
2972 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
2973 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
2975 2011-08-03 Emmanuel Briot <briot@adacore.com>
2977 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
2980 2011-08-03 Yannick Moy <moy@adacore.com>
2982 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
2983 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
2984 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
2985 detect that an array has static bounds.
2987 2011-08-03 Thomas Quinot <quinot@adacore.com>
2989 * exp_dist.adb: Minor reformatting.
2991 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2993 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
2994 (ATCB_Key): Removed, not always used.
2996 2011-08-03 Emmanuel Briot <briot@adacore.com>
2998 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
2999 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3000 most remaining global variables.
3002 2011-08-03 Robert Dewar <dewar@adacore.com>
3004 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3005 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3008 2011-08-03 Javier Miranda <miranda@adacore.com>
3010 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3011 that must be passed by copy in VM targets.
3013 2011-08-03 Emmanuel Briot <briot@adacore.com>
3015 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3016 duplicates a similar htable now in the project tree.
3018 2011-08-03 Claire Dross <dross@adacore.com>
3020 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3021 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3022 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3023 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3024 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3025 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3026 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3029 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3031 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3032 (ATCB_Key): Removed, not always used.
3033 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3035 * s-tpopsp-tls.adb: New file.
3036 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3037 x86/x64/ia64/powerpc/sparc Linux.
3039 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3041 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3042 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3044 2011-08-03 Thomas Quinot <quinot@adacore.com>
3046 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3047 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3048 Fix type selection for mapping integer types to PolyORB types.
3050 2011-08-03 Bob Duff <duff@adacore.com>
3052 * sem_ch7.adb: Minor comment clarification.
3054 2011-08-03 Bob Duff <duff@adacore.com>
3056 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3057 an error analyzing a choice, skip further processing. Further
3058 processing could cause a crash or cascade errors.
3060 2011-08-03 Emmanuel Briot <briot@adacore.com>
3062 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3063 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3064 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3065 prj-env.ads (Shared_Project_Tree_Data): new type
3066 An aggregate project and its aggregated trees need to share the common
3067 data structures used for lists of strings, packages,... This makes the
3068 code simpler since otherwise we have to pass the root tree (also used
3069 for the configuration file data) in addition to the current project
3070 tree. This also avoids ambiguities as to which tree should be used.
3071 And finally this saves a bit of memory.
3072 (For_Every_Project_Imported): new parameter Tree.
3073 Since aggregated projects are using a different tree, we need to let
3074 the caller know which tree to use to manipulate the returned project.
3076 2011-08-03 Robert Dewar <dewar@adacore.com>
3078 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3079 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3080 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3081 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3083 2011-08-03 Javier Miranda <miranda@adacore.com>
3085 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3086 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3088 2011-08-03 Bob Duff <duff@adacore.com>
3090 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3093 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3095 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3096 g-sehash.ads: Fix typo. Update header.
3098 2011-08-03 Thomas Quinot <quinot@adacore.com>
3100 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3103 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3105 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3106 prefixes of private types along with records, since the selector may be
3108 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3109 private types along with records, since the selector may be a
3112 2011-08-03 Emmanuel Briot <briot@adacore.com>
3114 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3116 2011-08-03 Javier Miranda <miranda@adacore.com>
3118 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3119 Tagged_Type_Expansion.
3121 2011-08-03 Yannick Moy <moy@adacore.com>
3124 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3125 concatenation is the name of a constant
3127 2011-08-03 Emmanuel Briot <briot@adacore.com>
3129 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3130 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3131 (Process_Declarative_Items): new parameter Child_Env.
3133 2011-08-03 Yannick Moy <moy@adacore.com>
3135 * alfa.ads Update format of ALFA section in ALI file in order to add a
3136 mapping from bodies to specs when both are present
3137 (ALFA_Scope_Record): add components for spec file/scope
3138 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3140 (Collect_ALFA): after all scopes have been collected, fill in the spec
3141 information when relevant
3142 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3145 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3147 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3148 code unit to decide whether to add internally generated subprograms.
3150 2011-08-03 Javier Miranda <miranda@adacore.com>
3152 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3154 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3157 2011-08-03 Emmanuel Briot <briot@adacore.com>
3159 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3160 code with Makeutl.Get_Switches.
3161 * prj-tree.adb: Update comment.
3163 2011-08-03 Thomas Quinot <quinot@adacore.com>
3165 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3166 subprogram with a limited formal that does not support external
3169 2011-08-03 Yannick Moy <moy@adacore.com>
3171 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3173 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3174 not from current unit in two phases, because it is not possible to
3175 change the table while iterating over its content.
3176 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3178 2011-08-03 Sergey Rybin <rybin@adacore.com>
3180 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3181 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3183 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3185 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3186 and the component type is composite, this is ambiguous for predefined
3187 concatenation, but if the node is not overloaded and the entity is a use
3188 -defined function its profile can be used to resolve that aggregate.
3190 2011-08-03 Robert Dewar <dewar@adacore.com>
3192 * exp_ch4.adb: Minor code cleanup.
3194 2011-08-03 Thomas Quinot <quinot@adacore.com>
3196 * exp_dist.adb: Do not generate distribution stubs if serious errors
3197 have been diagnosed.
3199 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3201 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3202 the first formal of a primitive operation, go to the base type to
3203 handle properly an access to a derived type with constrained
3205 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3206 user-defined function that is only use-visible.
3208 2011-08-03 Robert Dewar <dewar@adacore.com>
3210 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3211 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3212 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3213 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3214 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3215 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3216 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3217 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3219 2011-08-03 Robert Dewar <dewar@adacore.com>
3221 * repinfo.adb (List_Mechanism): Add handling of
3222 Convention_Ada_Pass_By_XXX.
3223 * sem_mech.adb (Set_Mechanism): Ditto.
3224 * sem_prag.adb (Process_Convention): Add entries for
3225 Convention_Ada_Pass_By_XXX.
3226 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3228 2011-08-03 Pascal Obry <obry@adacore.com>
3230 * makeutl.adb: Minor reformatting.
3232 2011-08-03 Vincent Celier <celier@adacore.com>
3235 (Get_File_Name) If the file cannot be found when there are no config
3236 pragmas file and May_Fail is True, return No_File instead of the file
3237 name, to be consistent.
3239 2011-08-03 Pascal Obry <obry@adacore.com>
3241 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3244 2011-08-03 Javier Miranda <miranda@adacore.com>
3247 (Same_Representation): In VM targets the representation of arrays with
3248 aliased components differs from arrays with non-aliased components.
3250 2011-08-03 Emmanuel Briot <briot@adacore.com>
3252 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3253 not systematically lower case attribute indexes that contain no "."
3254 Fix definition of several Naming attributes, which take
3255 a unit name as index and therefore should be case insensitive.
3256 Minor refactoring (reduce length of variable names).
3258 2011-08-03 Emmanuel Briot <briot@adacore.com>
3260 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3262 2011-08-03 Emmanuel Briot <briot@adacore.com>
3264 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3265 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3266 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3267 prj-tree.ads (Prj.Tree.Environment): new type.
3269 2011-08-03 Emmanuel Briot <briot@adacore.com>
3271 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3272 prj-tree.adb, prj-tree.ads (Environment): new type.
3274 2011-08-03 Emmanuel Briot <briot@adacore.com>
3276 * prj-tree.ads: Remove unused variable.
3278 2011-08-03 Yannick Moy <moy@adacore.com>
3280 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3281 issuing messages related to SPARK restriction violation.
3283 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3285 * sem_ch6.adb: guard against error nodes in return statements.
3287 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3289 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3290 a warning can only appear on a configuration file, so emit warning
3291 without further checks.
3293 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3295 * s-interr.ads: add overriding keyword.
3297 2011-08-03 Geert Bosch <bosch@adacore.com>
3299 * exp_attr.adb: Fix minor typo.
3301 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3303 * par-ch4.adb: improve error recovery.
3305 2011-08-03 Emmanuel Briot <briot@adacore.com>
3307 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3308 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3311 2011-08-03 Emmanuel Briot <briot@adacore.com>
3313 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3314 "external" as an attribute name in aggregate projects.
3316 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3318 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3319 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3320 from 0, so we need to adjust.
3322 2011-08-03 Emmanuel Briot <briot@adacore.com>
3324 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3325 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3327 2011-08-03 Yannick Moy <moy@adacore.com>
3329 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3330 restriction on overloaded entity if the entity is not an operator.
3332 2011-08-03 Yannick Moy <moy@adacore.com>
3334 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3335 restrict.ads: Rename remaining Check_Formal_Restriction* into
3336 Check_SPARK_Restriction*.
3338 2011-08-03 Emmanuel Briot <briot@adacore.com>
3340 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3341 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3343 (Project_Empty): removed
3344 (Empty_Project): new parameter Qualifier
3345 This is used to have fields specific to aggregate projects, cleaner
3346 New field to store the list of aggregated projects.
3347 (Check_Aggregate_Project): removed
3348 (Process_Aggregated_Projects, Free): new subprograms.
3350 2011-08-03 Olivier Hainque <hainque@adacore.com>
3352 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3354 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3356 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3357 explicit dereference of an unconstrained type, create a constrained
3358 subtype for it, as is done for function calls that return an
3361 2011-08-03 Thomas Quinot <quinot@adacore.com>
3363 * g-pehage.adb (Finalize): Avoid possible double-free.
3365 2011-08-03 Steve Baird <baird@adacore.com>
3367 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3368 Elab_Spec/Body attrs in CodePeer_Mode.
3370 2011-08-03 Javier Miranda <miranda@adacore.com>
3372 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3373 low bound is not known at compile time but they have no others choice.
3374 Done because in this case the bounds can be obtained directly from the
3377 2011-08-03 Ed Falis <falis@adacore.com>
3379 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3380 on VxWorks SMP. Remove unusable constant ANY_CPU.
3382 2011-08-03 Emmanuel Briot <briot@adacore.com>
3384 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3385 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3386 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3387 Prj.Env.Initialize_Empty): new subprograms
3388 (Get_Env, Find_Project): remove parameter Target_Name.
3390 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3392 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3393 as a condition for the delayed call to Derived_Subprograms done for the
3394 case of the rewriting of a derived type that constrains the
3395 discriminants of its parent type.
3396 Avoids redundant subprogram derivations for private subtype derivations.
3398 2011-08-03 Javier Miranda <miranda@adacore.com>
3400 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3401 Build_Record_Aggr_Code.
3402 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3403 discriminants in extension aggregates.
3405 2011-08-03 Emmanuel Briot <briot@adacore.com>
3407 * prj-pp.adb (Print): also output project qualifiers, since in
3408 particular "aggregate" is mandatory in an aggregate project.
3410 2011-08-03 Emmanuel Briot <briot@adacore.com>
3412 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3413 (Debug_Output): new function.
3415 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3417 * gnat_ugn.texi: Document -Wstack-usage.
3418 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3420 2011-08-03 Thomas Quinot <quinot@adacore.com>
3422 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3423 have keyword LIMITED.
3425 2011-08-03 Yannick Moy <moy@adacore.com>
3427 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3428 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3429 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3430 section (does not happen in compiler, only if code directly calls
3432 * get_alfa.adb, get_alfa.ads: New files.
3433 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3435 * lib-xref-alfa.adb: New file.
3436 * lib-xref.adb, lib-xref.ads
3437 (Xref_Entry): redefine information needed in cross-references for ALFA.
3438 Push ALFA treatments in separated local package.
3439 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3440 identifiers. Return entity of package body instead of spec. Return
3441 Empty for a scope with no location.
3442 (Generate_Reference): adapt to new components for ALFA information.
3443 Remove the need for D references on definitions.
3444 (Is_Local_Reference): moved to ALFA local package
3445 (Output_References): extract subfunction as Extract_Source_Name
3446 (Output_Local_References): remove procedure, replaced by filtering of
3447 cross-references in package ALFA and printing in Put_ALFA.
3448 (Write_Entity_Name): remove procedure
3449 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3450 print exact name of entity as it appears in source file
3451 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3452 * put_alfa.adb, put_alfa.ads: New files.
3453 * xref_lib.adb (Search_Xref): protect read of cross-references against
3454 reading other sections of the ALI file, in gnatxref
3455 (Search): protect read of cross-references against reading other
3456 sections of the ALI file, in gnatfind.
3457 * gcc-interface/Make-lang.in: Update dependencies.
3459 2011-08-03 Thomas Quinot <quinot@adacore.com>
3461 * sem_ch3.adb: Minor reformatting.
3463 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3465 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3466 raising an exception.
3468 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3470 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3471 type, always use 1 as the lower bound or string, even if lower bound of
3472 context is not static, to handle properly null strings in a non-static
3475 2011-08-03 Bob Duff <duff@adacore.com>
3477 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3478 always legal on the right-hand side of an assignment statement; there
3479 is always an applicable index constraint in this case. Therefore, the
3480 check for Pkind = N_Assignment_Statement is now unconditional -- it
3481 doesn't depend on whether Is_Constrained (Typ).
3483 2011-08-03 Robert Dewar <dewar@adacore.com>
3485 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3487 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3489 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3490 for an itype created within a generic unit.
3492 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3494 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3495 suppresses all inlining.
3497 2011-08-03 Robert Dewar <dewar@adacore.com>
3499 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3500 exp_aggr.adb: Minor reformatting.
3502 2011-08-03 Thomas Quinot <quinot@adacore.com>
3504 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3505 tagged assignment when discriminant checks are suppressed. This is
3506 useless and extremely costly in terms of static stack usage.
3508 2011-08-03 Bob Duff <duff@adacore.com>
3510 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3511 of generics, because this leads to the wrong entity in the wrong scope,
3512 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3514 (Process_Interface_Name): Follow Alias for instances of generics, to
3515 correct for the above change.
3517 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3519 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3520 is an integer literal it is always safe to replace the reference. In
3521 addition, if the reference appears in the generated code for an object
3522 declaration it is necessary to copy because otherwise the reference
3523 might be to the uninitilized value of the discriminant of the object
3526 2011-08-03 Pascal Obry <obry@adacore.com>
3528 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3529 ACL used, in this case we want to check for ending .exe, not .exe
3530 anywhere in the path.
3532 2011-08-03 Sergey Rybin <rybin@adacore.com>
3534 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3535 the tree structure (semantic decoration of references to record
3538 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3540 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3541 choices of a named array aggregate, bail out when any choices are
3542 marked as Errors_Posted.
3544 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3546 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3547 in which entity is frozen, to handle properly loop variables in
3550 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3552 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3553 subtype is not static, compute the upper bound using attributes, to
3554 handle properly index types that are not integer types.
3556 2011-08-03 Bob Duff <duff@adacore.com>
3558 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3559 Update copyright notice.
3561 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3563 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3564 Original_Discriminant if within an instance.
3565 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3567 2011-08-03 Thomas Quinot <quinot@adacore.com>
3569 * einfo.ads: Minor reformatting.
3571 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3573 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3574 composite type with an unfrozen subcomponent, in the profile of a
3575 primitive operation.
3577 2011-08-03 Robert Dewar <dewar@adacore.com>
3579 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3581 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3583 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3584 unconstrained type with discriminants is initialized with an aggregate,
3585 use the constrained subtype of the aggregate as the type of the object,
3586 because it is immutable, and this allows the back-end to generate no
3587 code for the object declaration.
3589 2011-08-03 Robert Dewar <dewar@adacore.com>
3591 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3592 comparison operand is variable, and turns out to be zero or negative.
3594 2011-08-03 Javier Miranda <miranda@adacore.com>
3597 (Expand_Dispatching_Constructor_Call): Disable expansion of
3598 code required for native targets. Done to avoid generating
3599 references to unavailable runtime entities in VM targets.
3601 (Expand_N_Object_Declaration): Add missing support to handle
3602 the explicit initialization of class-wide interface objects.
3605 2011-08-03 Matthew Heaney <heaney@adacore.com>
3607 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3609 2011-08-03 Matthew Heaney <heaney@adacore.com>
3611 * a-cbdlli.adb (Splice): move source items from first to last
3613 2011-08-03 Yannick Moy <moy@adacore.com>
3615 * sem_util.ads: comment added.
3617 2011-08-03 Javier Miranda <miranda@adacore.com>
3620 (Expand_Record_Aggregate): In VM targets disable the expansion into
3621 assignments of aggregates whose type is not known at compile time.
3623 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3625 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3626 protected entries and task entries, to build the proper renaming
3627 declaration for entry formals, used in debugging.
3628 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3629 parameters in the same way.
3631 2011-08-02 Robert Dewar <dewar@adacore.com>
3633 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3634 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3635 code reorganization.
3637 2011-08-02 Robert Dewar <dewar@adacore.com>
3639 * debug.adb: Debug flag d.P to suppress length comparison optimization
3640 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3641 comparison of Length by comparing First/Last instead.
3643 2011-08-02 Matthew Heaney <heaney@adacore.com>
3645 * a-cobove.ads: Code clean up.
3647 2011-08-02 Vincent Celier <celier@adacore.com>
3649 * adaint.c (file_names_case_sensitive_cache): New static int.
3650 (__gnat_get_file_names_case_sensitive): Cache the return value in
3651 file_names_case_sensitive_cache at the first invocation, to avoid
3652 multiple calls to getenv.
3654 2011-08-02 Bob Duff <duff@adacore.com>
3656 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3658 2011-08-02 Yannick Moy <moy@adacore.com>
3660 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3661 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3662 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3663 indicate that we are in a precondition or postcondition. This is used in
3664 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3665 decide whether to flag the spec or body of the current subprogram as
3668 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3670 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3672 * a-extiin.ads: New file.
3674 2011-08-02 Bob Duff <duff@adacore.com>
3676 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3677 now raises Name_Error instead of Use_Error in certain cases. The other
3678 parts of this AI were already implemented properly.
3680 2011-08-02 Vincent Celier <celier@adacore.com>
3682 * link.c: Only import "auto-host.h" when building the gnattools.
3684 2011-08-02 Yannick Moy <moy@adacore.com>
3686 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3687 which calls a local subprogram, so extract subprogram
3688 from Mark_Non_ALFA_Subprogram_Body.
3690 2011-08-02 Javier Miranda <miranda@adacore.com>
3693 (Extract_Dispatching_Call): If the type of the dispatching object is an
3694 access type then return an explicit dereference in the Object out-mode
3697 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3699 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3700 compatibility checks for all indexes of an array subtype, not just the
3701 first. Reset Has_Dynamic_Range_Check on the subtype before each
3702 potential check to ensure that Insert_Range_Checks will not elide any
3703 of the dynamic checks.
3705 2011-08-02 Yannick Moy <moy@adacore.com>
3707 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3708 SPARK restriction at parsing time.
3709 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3710 directive only if the SPARK restriction is set for this unit.
3712 2011-08-02 Yannick Moy <moy@adacore.com>
3714 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3715 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3716 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3717 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3718 Mark_Non_ALFA_Subprogram_Body.
3719 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3722 2011-08-02 Yannick Moy <moy@adacore.com>
3724 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3727 2011-08-02 Robert Dewar <dewar@adacore.com>
3729 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3730 exp_ch3.adb: Minor reformatting.
3732 2011-08-02 Emmanuel Briot <briot@adacore.com>
3734 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3735 files, not any regular file.
3736 (__gnat_locate_file_with_predicate): new subprogram.
3738 2011-08-02 Yannick Moy <moy@adacore.com>
3740 * sinfo.adb, sinfo.ads: Restrict the use of flags
3741 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3742 nodes, plus N_Subtype_Declaration for the 2nd one.
3744 2011-08-02 Sergey Rybin <rybin@adacore.com>
3746 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3747 - fix bugs in the description of Source_Trace;
3748 - get rid of UNIT_NAME;
3750 2011-08-02 Javier Miranda <miranda@adacore.com>
3753 (Build_Dispatching_Requeue): Adding support for VM targets
3754 since we cannot directly reference the Tag entity.
3755 * exp_sel.adb (Build_K): Adding support for VM targets.
3756 (Build_S_Assignment): Adding support for VM targets.
3758 (Default_Prim_Op_Position): In VM targets do not restrict availability
3759 of predefined interface primitives to compiling in Ada 2005 mode.
3760 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3761 restricted to compiling in Ada 2005 mode.
3762 (Make_VM_TSD): Generate code that declares and initializes the OSD
3763 record. Needed to support dispatching calls through synchronized
3766 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3767 primitives associated with synchronized interfaces.
3768 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3769 primitives associated with synchronized interfaces.
3771 2011-08-02 Yannick Moy <moy@adacore.com>
3773 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3774 statements hidden in SPARK if preceded by the HIDE directive
3775 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3776 exception handlers as hidden in SPARK if preceded by the HIDE directive
3777 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3778 if starting with the HIDE directive
3779 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3780 starting with the HIDE directive; mark the declarations in a private
3781 part as hidden in SPARK if the private part starts with the HIDE
3783 * restrict.adb, restrict.ads
3784 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3785 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3786 argument node belongs to a part which is hidden in SPARK
3787 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3788 parts in SPARK; protect the possibly costly call to
3789 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3790 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3791 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3792 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3794 (Scan): recognize special comment starting with '#' and followed by
3795 SPARK keyword "hide" as a HIDE directive.
3797 2011-08-02 Yannick Moy <moy@adacore.com>
3799 * types.ads, erroutc.ads: Minor reformatting.
3801 2011-08-02 Vincent Celier <celier@adacore.com>
3803 * link.c: Add response file support for cross platforms.
3805 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3807 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3808 in an association, set parent field of copy before partial analysis.
3809 * sem_res.adb (Resolve_Slice): create reference to itype only when
3810 expansion is enabled.
3812 2011-08-02 Yannick Moy <moy@adacore.com>
3814 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3815 for new flag denoting which subprogram bodies are in ALFA
3816 * restrict.adb, sem_ch7.adb: Update comment
3817 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3818 sem_ch9.adb, sem_res.adb: Add calls to
3819 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3820 * sem_ch6.adb (Analyze_Function_Return): add calls to
3821 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3822 middle of the body, and extended return.
3823 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3824 False when missing return.
3825 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3826 to True for subprograms whose spec is in ALFA. Remove later on the flag
3827 on the entity used for a subprogram body when there exists a separate
3829 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3830 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3831 False, otherwise do nothing.
3833 2011-08-02 Robert Dewar <dewar@adacore.com>
3835 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3837 2011-08-02 Yannick Moy <moy@adacore.com>
3839 * sem_ch4.ads: minor formatting.
3841 2011-08-02 Yannick Moy <moy@adacore.com>
3843 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3844 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3845 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3846 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3847 opt.ads: cleanup of SPARK mode
3849 2011-08-02 Yannick Moy <moy@adacore.com>
3851 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3853 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3854 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3856 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3857 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3858 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3859 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3861 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3863 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3864 functions whose return type is not in ALFA.
3865 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3867 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3868 parameter's type is not in ALFA.
3869 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3872 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3874 * sem_ch6 (Analyze_Expression_Function): treat the function as
3875 Inline_Always, and introduce a subprogram declaration for it when it is
3877 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3878 expression functions, so that the back-end can determine whether they
3879 can in fact be inlined.
3880 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3881 a function body comes from an expression function.
3883 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3885 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3886 null exclusions to test Can_Never_Be_Null on the anonymous access types
3887 of the formals rather than testing the formals themselves. Exclude this
3888 check in cases where the Old_Formal is marked as a controlling formal,
3889 to avoid issuing spurious errors for bodies completing dispatching
3890 operations (due to the flag not getting set on controlling access
3891 formals in body specs).
3892 (Find_Corresponding_Spec): When checking full and subtype conformance of
3893 subprogram bodies in instances, pass Designated and E in that order, for
3894 consistency with the expected order of the formals (New_Id followed by
3897 2011-08-02 Robert Dewar <dewar@adacore.com>
3899 * sem_ch8.adb: Minor reformatting.
3901 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3903 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3904 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3905 primitive operations of class-wide actuals.
3907 2011-08-02 Javier Miranda <miranda@adacore.com>
3909 * exp_atag.ads, exp_atag.adb
3910 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3911 since its value is implicitly passed in argument Typ.
3912 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3913 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3914 Build_Common_Dispatching_Select_Statements.
3916 2011-08-02 Robert Dewar <dewar@adacore.com>
3918 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3919 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3922 2011-08-02 Robert Dewar <dewar@adacore.com>
3924 * sem_res.adb: Minor reformatting.
3925 * sem_prag.adb: Minor reformatting.
3927 2011-08-02 Javier Miranda <miranda@adacore.com>
3929 * exp_atag.adb, exp_atags.ads
3930 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3931 by the tagged type Entity. Required to use this routine in the VM
3932 targets since we do not have available the Tag entity in the VM
3935 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3936 Ada.Tags has not been previously loaded.
3938 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3939 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3941 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3942 view of enclosing scopes. Required to handle enclosing scopes that
3943 are synchronized types whose full view is a task type.
3945 (Build_VM_TSDs): Minor code improvement to avoid generating and
3946 analyzing lists with empty nodes.
3947 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3948 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3949 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3950 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3951 (Make_Select_Specific_Data_Table): Add support for VM targets.
3952 (Make_VM_TSD): Generate code to initialize the SSD structure of
3955 2011-08-02 Yannick Moy <moy@adacore.com>
3957 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3958 cross-references section in ALI.
3959 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3960 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3962 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3963 subprogram or package entity of a node
3964 (Is_Local_Reference_Type): new function returns True for references
3965 selected in local cross-references.
3966 (Lt): function extracted from Lt in Output_References
3967 (Write_Entity_Name): function extracted from Output_References
3968 (Generate_Definition): generate reference with type 'D' for definition
3969 of objects (object declaration and parameter specification), with
3970 appropriate locations and units, for use in local cross-references.
3971 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3972 references of type 'I' for initialization in object definition.
3973 (Output_References): move part of function Lt and procedure
3974 Write_Entity_Name outside of the body. Ignore references of types 'D'
3975 and 'I' introduced for local cross-references.
3976 (Output_Local_References): new procedure to output the local
3977 cross-references sections.
3978 (Lref_Entity_Status): new array defining whether an entity is a local
3979 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3980 with 'I' type when initialization expression is present.
3981 * get_scos.adb, get_scos.ads: Correct comments and typos
3983 2011-08-02 Javier Miranda <miranda@adacore.com>
3985 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3987 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3989 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3992 2011-08-02 Vincent Celier <celier@adacore.com>
3994 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3995 (No_Space_Img): New function
3996 (Find_Excluded_Sources): When reading from a file, record the file name
3997 and the line number for each excluded source.
3998 (Mark_Excluded_Sources): When reporting an error, if the excluded
3999 sources were read from a file, include file name and line number in
4002 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4004 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4006 2011-08-02 Robert Dewar <dewar@adacore.com>
4008 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4010 2011-08-02 Javier Miranda <miranda@adacore.com>
4012 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4013 generation of TSDs to the DOTNET compiler.
4014 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4015 generation of TSDs to the DOTNET compiler.
4017 2011-08-02 Javier Miranda <miranda@adacore.com>
4019 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4020 record of all the tagged types declared inside library level package
4021 declarations, library level package bodies or library level subprograms.
4022 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4023 associated with a given tagged type.
4024 (Build_VM_TSDs): New subprogram.
4025 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4026 compilation units that are subprograms.
4027 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4028 compilation units that are package bodies.
4029 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4030 units that are a package declaration or a package instantiation.
4031 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4032 reorganization to improve the error generated by the frontend when the
4033 function Ada.Tags.Secondary_Tag is not available.
4034 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4035 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4037 2011-08-02 Javier Miranda <miranda@adacore.com>
4039 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4041 2011-08-02 Robert Dewar <dewar@adacore.com>
4043 * s-imenne.ads: Minor reformatting.
4045 2011-08-02 Robert Dewar <dewar@adacore.com>
4047 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4048 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4049 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4051 2011-08-02 Robert Dewar <dewar@adacore.com>
4053 * einfo.ads (Materialize_Entity): Document this is only for renamings
4054 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4055 required debug information in the case where we transform the object
4056 declaration into a renaming declaration.
4057 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4059 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4062 2011-08-02 Robert Dewar <dewar@adacore.com>
4064 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4065 Suppress_Init_Procs.
4066 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4067 Suppress_Initialization/Initialization_Suppressed.
4068 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4069 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4070 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4071 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4073 2011-08-02 Robert Dewar <dewar@adacore.com>
4075 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4078 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4080 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4081 only have inheritable classwide pre/postconditions.
4083 2011-08-02 Javier Miranda <miranda@adacore.com>
4085 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4086 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4087 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4088 checks if the external tag of a type is the same as the external tag
4089 of some other declaration.
4091 2011-08-02 Thomas Quinot <quinot@adacore.com>
4093 * s-taskin.ads: Minor reformatting.
4095 2011-08-02 Emmanuel Briot <briot@adacore.com>
4097 * g-comlin.adb (Display_Help): swap the order in which it prints the
4098 short help and the general usage.
4100 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4102 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4103 the aspect declarations and attach them to the generic copy for
4104 subsequent analysis.
4105 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4106 declarations of the generic tree to the new subprogram declarations.
4107 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4108 conditions that apply to a subprogram instance.
4110 2011-08-02 Robert Dewar <dewar@adacore.com>
4112 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4114 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4116 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4117 private type with a tagged full view is not derived in the immediate
4118 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4120 2011-08-02 Robert Dewar <dewar@adacore.com>
4122 * exp_ch4.adb: Minor reformatting.
4124 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4126 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4127 Ada2012 iterator, the loop will be rewritten during expansion into a
4128 while loop with a cursor and an element declaration. Do not analyze the
4129 body in this case, because if the container is for indefinite types the
4130 actual subtype of the elements will only be determined when the cursor
4131 declaration is analyzed.
4133 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4135 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4136 size/alignment related attributes in CodePeer_Mode.
4138 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4140 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4141 Prepend_Element, since this can result in the operation getting the
4142 wrong slot in the full type's dispatch table if the full type has
4143 inherited operations. The incomplete type's operation will get added
4144 to the proper position in the full type's primitives
4145 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4146 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4147 dispatching operations, since there are cases where nonprimitive
4148 subprograms can get added to the list of incomplete dependents (such
4149 as subprograms in nested packages).
4150 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4151 private part when determining whether to add a primitive with a
4152 parameter of a tagged incomplete type to the Private_Dependents list.
4153 Such primitives can also occur in the visible part, and should not have
4154 been excluded from being private dependents.
4155 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4156 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4157 list of a Taft-amendment incomplete type is a primitive before issuing
4158 an error that the full type must appear in the same unit. There are
4159 cases where nonprimitives can be in the list (such as subprograms in
4161 * sem_disp.adb (Derives_From): Use correct condition for checking that
4162 a formal's type is derived from the type of the corresponding formal in
4163 the parent subprogram (the condition was completely wrong). Add
4164 checking that was missing for controlling result types being derived
4165 from the result type of the parent operation.
4167 2011-08-02 Yannick Moy <moy@adacore.com>
4169 * errout.adb (First_Node): minor renaming
4170 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4173 2011-08-02 Yannick Moy <moy@adacore.com>
4175 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4176 before accessing operands.
4177 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4178 decide whether an initialization expression respects SPARK rules, as
4179 the plain node is the expanded one. This allows for more valid warnings
4181 * gnat_rm.texi: Minor update.
4183 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4185 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4188 2011-08-02 Robert Dewar <dewar@adacore.com>
4190 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4192 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4194 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4195 loop statements and the element renaming declaration with a block when
4196 the element type is controlled.
4198 2011-08-02 Yannick Moy <moy@adacore.com>
4200 * sinfo.ads: Minor formatting.
4202 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4204 * sem_aggr.adb (Add_Association): if the association has a box and no
4205 expression, use the Sloc of the aggregate itself for the new
4207 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4210 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4212 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4213 When a container is provided via a function call, generate a renaming
4214 of the function result. This avoids the creation of a transient scope
4215 and the premature finalization of the container.
4216 * exp_ch7.adb (Is_Container_Cursor): Removed.
4217 (Wrap_Transient_Declaration): Remove the supression of the finalization
4218 of the list controller when the declaration denotes a container cursor,
4221 2011-08-02 Yannick Moy <moy@adacore.com>
4223 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4224 node is from source, instead of the original node being from source.
4226 (Resolve_Array_Aggregate): refine the check for a static expression, to
4227 recognize also static ranges
4228 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4229 Array_Type_Declaration): postpone the test for the type being a subtype
4230 mark after the type has been resolved, so that component-selection and
4231 expanded-name are discriminated.
4232 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4233 to distinguish the case of an iteration scheme, so that an error is
4234 issed on a non-static range in SPARK except in an iteration scheme.
4235 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4236 In_Iter_Schm = True.
4237 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4238 user-defined operators so that they are allowed in renaming
4240 (Find_Selected_Component): refine the check for prefixing of operators
4241 so that they are allowed in renaming. Move the checks for restrictions
4242 on selector name after analysis discriminated between
4243 component-selection and expanded-name.
4244 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4245 concatenation argument of string type if it is static.
4246 * sem_util.adb, sem_util.ads
4247 (Check_Later_Vs_Basic_Declarations): add a new function
4248 Is_Later_Declarative_Item to decice which declarations are allowed as
4249 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4250 mode, add that renamings are considered as later items.
4251 (Enclosing_Package): new function to return the enclosing package
4252 (Enter_Name): correct the rule for homonyms in SPARK
4253 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4254 from source (result of expansion) to avoid issuing wrong warnings.
4256 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4258 * errout.adb: On anything but an expression First_Node returns its
4261 2011-08-02 Pascal Obry <obry@adacore.com>
4263 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4265 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4267 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4268 Set the associated loop as the related expression of internally
4270 * exp_ch7.adb (Is_Container_Cursor): New routine.
4271 (Wrap_Transient_Declaration): Supress the finalization of the list
4272 controller when the declaration denotes a container cursor.
4274 2011-08-02 Yannick Moy <moy@adacore.com>
4276 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4278 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4279 expression is a simple expression. This check cannot be performed in
4280 the semantics, so just drop it.
4281 (P_Index_Or_Discriminant_Constraint): move check that the index or
4282 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4283 semantics. Other cases were previously checked in the semantics.
4284 * par-ch4.adb (P_Name): move checks that a selector name is not
4285 character literal or an operator symbol to Find_Selected_Component in
4287 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4288 declarations are not placed after later declarations in a separate
4289 procedure in Sem_Util (possibly not the best choice?), to be used both
4290 during parsing, for Ada 83 mode, and during semantic analysis, for
4292 * par-endh.adb (Check_End): move check that end label is not missing
4293 to Process_End_Label in the semantics
4294 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4295 the special case for SPARK restriction
4296 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4297 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4298 parameter Force to issue the error message even on internal node (used
4299 for generated end label). Call Check_Restriction to check when an error
4300 must be issued. In SPARK mode, issue an error message even if the
4301 restriction is not set.
4302 (Check_Restriction): new procedure with an additional out parameter to
4303 inform the caller that a message has been issued
4304 * sem_aggr.adb: Minor modification of message
4305 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4306 instead of issuing an error message directly
4307 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4308 declarations are not placed after later declarations, by calling
4309 Check_Later_Vs_Basic_Declarations
4310 (Analyze_Subtype_Declaration): move here the check that an index or
4311 discriminant constraint must be a subtype mark. Change the check that
4312 a subtype of String must start at one so that it works on subtype marks.
4313 * sem_ch4.adb (Analyze_Call): move here the check that a named
4314 association cannot follow a positional one in a call
4315 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4316 instead of issuing an error message directly
4317 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4318 selector name is not a character literal or an operator symbol. Move
4319 here the check that the prefix of an expanded name cannot be a
4320 subprogram or a loop statement.
4321 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4322 procedure called from parsing and semantics to check that basic
4323 declarations are not placed after later declarations
4324 (Process_End_Label): move here the check that end label is not missing
4326 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4328 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4329 representation clause in codepeer mode, since it confuses CodePeer and
4330 does not bring useful info.
4332 2011-08-02 Ed Falis <falis@adacore.com>
4334 * init.c: initialize fp hw on MILS.
4336 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4338 * errout.adb (First_Node): for bodies, return the node itself (small
4339 optimization). For other nodes, do not check source_unit if the node
4340 comes from Standard.
4342 2011-08-02 Robert Dewar <dewar@adacore.com>
4344 * exp_ch3.adb: Minor comment additions.
4345 * sem_ch13.adb: Minor reformatting.
4347 2011-08-02 Pascal Obry <obry@adacore.com>
4349 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4351 2011-08-02 Robert Dewar <dewar@adacore.com>
4353 * sem_attr.adb: Minor reformatting.
4355 2011-08-02 Robert Dewar <dewar@adacore.com>
4357 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4358 (Has_Default_Component_Value): Removed
4359 * einfo.ads Comment updates
4360 (Has_Default_Aspect): Replaces Has_Default_Value
4361 (Has_Default_Component_Value): Removed
4363 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4365 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4366 (Get_Simple_Init_Val): Handle Default_Value aspect
4367 (Needs_Simple_Initialization): Handle Default_Value aspect
4368 * exp_ch3.ads: Needs_Simple_Initialization
4369 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4370 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4372 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4373 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4374 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4376 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4378 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4379 package containing iteration primitives.
4380 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4382 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4384 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4385 "of", pre-analyze expression in case it is a function call with
4386 finalization actions that must be placed ahead of the loop.
4387 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4388 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4390 2011-08-02 Geert Bosch <bosch@adacore.com>
4392 * cstand.adb (Create_Float_Types): Only consider C's long double for
4393 Long_Long_Float, in addition to double.
4395 2011-08-02 Robert Dewar <dewar@adacore.com>
4397 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4398 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4399 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4402 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4404 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4407 2011-08-02 Javier Miranda <miranda@adacore.com>
4409 * einfo.ads, einfo.adb
4410 (Original_Access_Type): Move this attribute to Node26 since there was
4411 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4412 which causes conflicts and breaks the generation of the .NET compiler.
4413 (Interface_Name): Add missing documentation on JGNAT only uses of
4416 2011-08-02 Geert Bosch <bosch@adacore.com>
4418 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4419 (Find_Back_End_Float_Type): Likewise
4420 (Create_Back_End_Float_Types): Likewise
4421 (Create_Float_Types): Likewise
4422 (Register_Float_Type): Likewise
4423 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4424 Nlist and split out type selection in new local Find_Base_Type function.
4425 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4427 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4429 2011-08-02 Robert Dewar <dewar@adacore.com>
4431 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4433 * opt.ads: Minor comment change.
4434 * sem_ch12.adb: Minor code reorganization.
4436 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4438 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4439 subtype's list of rep items to the list on the full subtype in the case
4440 where the lists are the same.
4442 2011-08-02 Geert Bosch <bosch@adacore.com>
4444 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4445 using the one from System.Strings, which also deallocates all strings.
4447 2011-08-02 Geert Bosch <bosch@adacore.com>
4449 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4451 * gcc-interface/Make-lang.in: Update dependencies.
4453 2011-08-02 Olivier Hainque <hainque@adacore.com>
4455 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4458 2011-08-02 Javier Miranda <miranda@adacore.com>
4460 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4461 associated with anonymous access to subprograms.
4463 2011-08-02 Geert Bosch <bosch@adacore.com>
4466 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4467 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4468 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4469 (Add_Symbol_Definition): Move to switch-c.adb
4470 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4471 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4472 (Add_Symbol_Definition): Move to switch-c.adb.
4473 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4475 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4477 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4478 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4480 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4481 (Add_Symbol_Definition): Moved from Prepcomp.
4482 * switch-c.ads: Update copyright notice. Use String_List instead of
4483 Argument_List, removing dependency on System.OS_Lib.
4485 2011-08-02 Yannick Moy <moy@adacore.com>
4487 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4488 mode on initialization expression which does not respect SPARK
4490 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4491 if the tree referenced by its argument represents an initialization
4492 expression in SPARK, suitable for initializing an object in an object
4495 2011-08-02 Javier Miranda <miranda@adacore.com>
4497 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4498 internally generated access to subprogram with its associated protected
4500 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4502 2011-08-02 Geert Bosch <bosch@adacore.com>
4504 * cstand.adb (Register_Float_Type): Print information about type to
4505 register, if the Debug_Flag_Dot_B is set.
4506 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4507 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4508 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4509 with a requested precision of more than Max_Digits digits and no more
4510 than Max_Base_Digits digits, if a range specification is present and the
4511 Predefined_Float_Types list has a suitable type to derive from.
4512 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4513 case of type completion with pragma Import
4515 (Process_Import_Predefined_Type): Processing to complete a type
4516 with pragma Import. Currently supports floating point types only.
4517 (Set_Convention_From_Pragma): Do nothing without underlying type.
4518 (Process_Convention): Guard against absence of underlying type,
4519 which may happen when importing incomplete types.
4520 (Process_Import_Or_Interface): Handle case of importing predefined
4521 types. Tweak error message.
4523 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4525 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4526 functions to previous change. Reorganize code slightly.
4528 2011-08-02 Geert Bosch <bosch@adacore.com>
4530 * back_end.ads (Register_Type_Proc): New call back procedure type for
4531 allowing the back end to provide information about available types.
4532 (Register_Back_End_Types): New procedure to register back end types.
4533 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4535 * cstand.adb (Back_End_Float_Types): New list for floating point types
4536 supported by the back end.
4537 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4538 (Copy_Float_Type): New procedure to make new copies of predefined types.
4539 (Register_Float_Type): New call back procedure to populate the BEFT list
4540 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4541 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4542 (Create_Float_Types): New procedure to create entities for floating
4543 point types predefined in Standard, and put these and any remaining
4544 BEFTs on the Predefined_Float_Types list.
4545 * stand.ads (Predefined_Float_Types): New list for predefined floating
4546 point types that do not have declarations in package Standard.
4548 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4550 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4551 entity node for the unit containing the parameter.
4552 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4553 (Add_Inlined_Subprogram): Likewise.
4554 * gcc-interface/Make-lang.in: Update dependencies.
4556 2011-08-02 Thomas Quinot <quinot@adacore.com>
4558 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4561 2011-08-02 Geert Bosch <bosch@adacore.com>
4563 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4565 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4567 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4568 computed value of Base_Type.
4570 2011-08-02 Yannick Moy <moy@adacore.com>
4572 * restrict.adb (Check_Restriction): issue an error for any use of
4573 class-wide, even if the No_Dispatch restriction is not set.
4574 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4575 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4576 when completing a private extension, the type named in the private part
4577 is not the same as that named in the visible part.
4578 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4579 of an inherited primitive operations of a tagged type or type extension
4580 that returns the tagged type.
4581 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4582 function which returns True for an implicit operation inherited by the
4583 derived type declaration for the argument type.
4584 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4589 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4590 Process_Bounds, to perform analysis with expansion of a range or an
4591 expression that is the iteration scheme for a loop.
4592 (Analyze_Iterator_Specification): If domain of iteration is given by a
4593 function call with a controlled result, as is the case if call returns
4594 a predefined container, ensure that finalization actions are properly
4596 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4598 2011-08-02 Javier Miranda <miranda@adacore.com>
4600 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4601 * gcc-interface/Make-lang.in: Update dependencies.
4603 2011-08-02 Javier Miranda <miranda@adacore.com>
4605 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4606 determine if the analysis is performed using N or Original_Node (N).
4607 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4608 functionality of routine Is_Variable avoids code duplication.
4609 * checks.adb (Determine_Range): Handle temporaries generated by
4610 Remove_Side_Effects.
4612 2011-08-02 Javier Miranda <miranda@adacore.com>
4614 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4615 expansion of the condition. Required since the previous analysis was
4616 done with expansion disabled (see Resolve_Quantified_Expression) and
4617 hence checks were not inserted and record comparisons have not been
4620 2011-08-02 Ed Falis <falis@adacore.com>
4622 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4625 2011-08-02 Bob Duff <duff@adacore.com>
4627 * opt.ads: Minor comment fix.
4629 2011-08-02 Bob Duff <duff@adacore.com>
4631 * sem_ch12.adb (Analyze_Package_Instantiation,
4632 Analyze_Subprogram_Instantiation): Turn off style checking while
4633 analyzing an instance. Whatever style checks that apply to the generic
4634 unit should apply, so it makes no sense to apply them in an instance.
4635 This was causing trouble when compiling an instance of a runtime
4636 unit that violates the -gnatyO switch.
4637 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4638 one of the two case statements, causing spurious errors.
4640 2011-08-02 Robert Dewar <dewar@adacore.com>
4642 * uname.adb: Minor reformatting.
4643 * gnatcmd.adb: Minor reformatting.
4644 * exp_attr.adb: Minor reformatting.
4646 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4648 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4649 No_Dispatching_Calls, do not look for the Assign primitive, because
4650 predefined primitives are not created in this case.
4652 2011-08-02 Bob Duff <duff@adacore.com>
4654 * stylesw.ads: Minor comment fixes.
4656 2011-08-02 Robert Dewar <dewar@adacore.com>
4658 * freeze.adb (Add_To_Result): New procedure.
4660 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4662 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4663 time, if the specific run-time routines for handling streams of strings
4664 are not available, use the default mechanism.
4666 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4668 * s-regpat.ads: Fix typo.
4670 2011-08-02 Vincent Celier <celier@adacore.com>
4672 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4673 not null, call it to create the in memory config project file without
4674 parsing an existing default config project file.
4676 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4678 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4680 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4682 * sem_elim.adb: an abstract subprogram does not need an eliminate
4683 pragma for its descendant to be eliminable.
4685 2011-08-02 Ed Falis <falis@adacore.com>
4687 * init.c: revert to handling before previous checkin for VxWorks
4688 * s-intman-vxworks.adb: delete unnecessary declarations related to
4689 using Ada interrupt facilities for handling signals.
4690 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4691 * s-intman-vxworks.ads: Import __gnat_install_handler as
4692 Initialize_Interrupts.
4693 * s-taprop-vxworks.adb: Delete Signal_Mask.
4694 (Abort_Handler): change construction of mask to unblock exception
4697 2011-08-02 Jerome Guitton <guitton@adacore.com>
4699 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4700 Debug_Raise_Exception before propagation starts.
4702 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4704 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4705 to Restriction_Check_Required.
4706 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4707 * sem_res.adb (Resolve_Call): Likewise.
4708 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4710 2011-08-02 Bob Duff <duff@adacore.com>
4712 * stylesw.ads: Update comment.
4713 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4714 * errout.ads: Remove obsolete comment.
4716 2011-08-02 Javier Miranda <miranda@adacore.com>
4718 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4719 (Set_Is_Safe_To_Reevaluate): new procedure.
4720 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4721 assignment is allowed on safe-to-reevaluate variables.
4722 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4723 temporary created to remove side effects in expressions that use
4724 the secondary stack as safe-to-reevaluate.
4725 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4726 variables that are not true constants.
4728 2011-08-02 Robert Dewar <dewar@adacore.com>
4730 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4731 sem_res.adb, sem_ch6.adb: Minor reformatting.
4733 2011-08-02 Jerome Guitton <guitton@adacore.com>
4735 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4737 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4739 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4740 not set Overridden_Operation if subprogram is an initialization
4743 2011-08-02 Yannick Moy <moy@adacore.com>
4745 * par-ch6.adb: Correct obsolete name in comments
4746 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4747 which takes two message arguments (existing function takes one), with
4748 second message used for continuation.
4749 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4750 block statements that originate from a source block statement, not
4751 generated block statements
4752 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4753 symmetry with procedure case
4754 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4755 function to issue an error in formal mode if a package specification
4756 contains more than one tagged type or type extension.
4757 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4758 parameters matching formals of tagged types are objects (or ancestor
4759 type conversions of objects), not general expressions. Issue an error
4760 on view conversions that are not involving ancestor conversion of an
4762 (Resolve_Type_Conversion): in formal mode, issue an error on the
4763 operand of an ancestor type conversion which is not an object
4764 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4765 procedure so that it works also for actuals of function calls
4766 (Is_Actual_Tagged_Parameter): new function which determines if its
4767 argument is an actual parameter of a formal of tagged type in a
4769 (Is_SPARK_Object_Reference): new function which determines if the tree
4770 referenced by its argument represents an object in SPARK
4772 2011-08-02 Robert Dewar <dewar@adacore.com>
4774 * sem_ch3.adb: Minor reformatting
4775 Minor comment addition
4776 Minor error msg text change
4778 2011-08-02 Javier Miranda <miranda@adacore.com>
4780 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4781 function. Used to be more precise when we generate a variable plus one
4782 assignment to remove side effects in the evaluation of the Bound
4784 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4785 of the bound expression to force its re-analysis and thus expand the
4786 associated transient scope (if required). Code cleanup replacing the
4787 previous code that declared the constant entity by an invocation to
4788 routine Force_Evaluation which centralizes this work in the frontend.
4790 2011-08-02 Robert Dewar <dewar@adacore.com>
4792 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4793 (Base_Type): Now uses improved Is_Base_Type function
4794 * einfo.ads (Base_Type): Inline this function
4796 2011-08-02 Robert Dewar <dewar@adacore.com>
4798 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4799 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4801 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4803 * gcc-interface/Make-lang.in: Update dependencies.
4804 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4807 2011-08-02 Yannick Moy <moy@adacore.com>
4809 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4810 non-simple expression used in delta constraint
4811 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4812 index constraint which is not a subtype mark
4813 * par.adb: With and use Restrict
4814 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4815 mode on component type which is not a subtype mark and default
4816 expression on component
4817 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4818 of string which does not have a lower index bound equal to 1
4819 (Array_Type_Declaration): issue an error in formal mode on index or
4820 component type which is not a subtype mark, and on aliased keyword on
4822 (Derived_Type_Declaration): issue an error in formal mode on interface,
4823 limited or abstract type
4824 (Record_Type_Declaration): issue an error in formal mode on interface
4825 (Record_Type_Definition): issue an error in formal mode on tagged types
4826 and type extensions not declared in the specification of a library unit
4827 package; on null non-tagged record; on variant part
4829 2011-08-02 Vincent Celier <celier@adacore.com>
4831 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4832 not declared for qualified library project when Library_Name is not
4833 declared, but Library_Dir is.
4835 2011-08-02 Robert Dewar <dewar@adacore.com>
4837 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4838 pragmas (affects aspects [Component_]Default_Value
4839 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4840 component type for the resolution
4842 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4844 * einfo.adb (Base_Type): Tune implementation for speed.
4846 2011-08-02 Robert Dewar <dewar@adacore.com>
4848 * freeze.adb: Minor reformatting.
4850 2011-08-02 Thomas Quinot <quinot@adacore.com>
4852 * scos.ads: Update comments.
4854 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4856 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4857 base type, because the parent may be a subtype of a private type whose
4858 convention is established in a private part.
4860 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4862 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4863 statement in a block when the expansion of the return expression has
4864 created a finalization chain.
4865 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4866 with the parent node.
4867 Add N_Extended_Return_Statement to handle the case where a transient
4868 object declaration appears in the Return_Object_Declarations list of
4869 an extended return statement.
4871 2011-08-02 Matthew Gingell <gingell@adacore.com>
4873 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4874 unused parameter 'name'.
4876 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4878 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4879 inherited operation, check whether its alias, which is the source
4880 operastion that it renames, has been marked eliminated.
4882 2011-08-02 Javier Miranda <miranda@adacore.com>
4884 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4885 in-mode parameter whose type is an access type since it can be used to
4886 modify its designated object. Enforce code that handles as safe an
4887 access type that is not access-to-constant but it is the result of a
4888 previous removal of side-effects.
4889 (Remove_Side_Effects): Minor code reorganization of cases which require
4890 no action. Done to incorporate documentation on new cases uncovered
4891 working in this ticket: no action needed if this routine was invoked
4892 too early and the nodes are not yet decorated.
4893 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4894 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4895 were issued with actuals that are implicitly provided by
4898 2011-08-02 Robert Dewar <dewar@adacore.com>
4900 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4902 2011-08-02 Yannick Moy <moy@adacore.com>
4904 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4905 to issue an error in formal mode on attribute not supported in this mode
4906 (Analyze_Attribute): issue errors on standard attributes not supported
4908 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4909 comment, and issue error in formal mode on modulus which is not a power
4911 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4913 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4915 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4916 operator on modular type (except 'not').
4918 2011-08-02 Robert Dewar <dewar@adacore.com>
4920 * gnat_rm.texi: Minor reformatting.
4922 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4924 * s-osinte-linux.ads: Minor comment update and reformatting.
4925 * i-cexten.ads: Make this unit pure, as for its parent.
4926 Will allow its usage in more contexts if needed.
4928 2011-08-02 Robert Dewar <dewar@adacore.com>
4930 * s-utf_32.ads: Minor comment fix.
4932 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4934 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4935 operation of a tagged synchronized type, handle the case where the
4936 controlling argument is overloaded.
4938 2011-08-02 Yannick Moy <moy@adacore.com>
4940 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4941 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4942 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4943 SPARK mode and formal verification mode on processing SPARK restriction
4944 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4945 requiring consistency checking.
4947 2011-08-02 Robert Dewar <dewar@adacore.com>
4949 * sem_res.adb: Minor reformatting.
4951 2011-08-02 Robert Dewar <dewar@adacore.com>
4953 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4954 a-cforse.ads: Remove unneeded with of Ada.Containers
4955 Remove commented out pragma Inline's
4956 Move specifications of new subprograms to the actual specs
4958 2011-08-02 Yannick Moy <moy@adacore.com>
4960 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4961 a-cforse.ads: Update comments.
4963 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4965 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4967 2011-08-02 Robert Dewar <dewar@adacore.com>
4969 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4970 a-cforse.ads, a-cofove.ads: Minor reformatting.
4972 2011-08-02 Claire Dross <dross@adacore.com>
4974 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4975 a-cofove.ads: Add comments.
4977 2011-08-02 Yannick Moy <moy@adacore.com>
4979 * gnat_rm.texi: Document formal containers.
4981 2011-08-02 Emmanuel Briot <briot@adacore.com>
4983 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4986 2011-08-02 Robert Dewar <dewar@adacore.com>
4988 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4991 2011-08-02 Robert Dewar <dewar@adacore.com>
4993 * aspects.adb: New aspects Default_Value and Default_Component_Value
4994 New format of Aspect_Names table checks for omitted entries
4995 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4996 handling of boolean aspects for derived types.
4997 New aspects Default_Value and Default_Component_Value
4998 New format of Aspect_Names table checks for omitted entries
4999 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5000 (Has_Default_Value): New flag
5001 (Has_Default_Component_Value): New flag
5002 (Has_Default_Value): New flag
5003 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5005 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5006 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5007 Default_Value and Default_Component_Value
5008 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5009 New aspects Default_Value and Default_Component_Value
5010 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5011 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5013 2011-08-02 Vincent Celier <celier@adacore.com>
5015 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5016 inherit library kind.
5018 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5020 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5023 2011-08-02 Robert Dewar <dewar@adacore.com>
5025 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5027 2011-08-02 Yannick Moy <moy@adacore.com>
5029 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5031 2011-08-02 Robert Dewar <dewar@adacore.com>
5033 * impunit.adb: Add comment.
5035 2011-08-02 Yannick Moy <moy@adacore.com>
5037 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5038 qualification of aggregates in formal mode
5039 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5041 (Resolve_Aggregate): complete the test that an aggregate is adequately
5042 qualified in formal mode
5044 2011-08-02 Pascal Obry <obry@adacore.com>
5046 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5047 * mlib-prj.adb: Supress warning when compiling binder generated file.
5048 (Build_Library): Supress all warnings when compiling the binder
5051 2011-08-02 Yannick Moy <moy@adacore.com>
5053 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5055 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5056 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5057 Add with/use clauses to make Check_Formal_Restriction visible
5059 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5061 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5062 in-parameters when type of the generic formal is private in the generic
5063 spec and non-private in the body.
5065 2011-08-02 Claire Dross <dross@adacore.com>
5067 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5068 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5069 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5070 * impunit.adb, Makefile.rtl: Take new files into account.
5072 2011-08-02 Robert Dewar <dewar@adacore.com>
5074 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5075 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5077 2011-08-02 Yannick Moy <moy@adacore.com>
5079 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5081 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5082 matching static array bounds, taking into account the special case of
5084 * sem_ch3.adb: Typo in comment.
5086 2011-08-02 Yannick Moy <moy@adacore.com>
5088 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5089 which issues an error in formal mode if its argument node is originally
5091 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5092 has a discriminant specification so that it does not include the case
5094 (Derived_Type_Declaration): move here the test that a derived type has a
5095 discriminant specification
5096 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5097 first element of a component association before accessing its choices
5098 (presence of component association is not enough)
5099 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5100 declaration is a library item before accessing the next element in a
5101 list, as library items are not member of lists
5102 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5103 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5104 Check_Formal_Restriction whenever possible.
5106 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5108 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5109 reference when needed.
5111 2011-08-02 Bob Duff <duff@adacore.com>
5113 * gnat_ugn.texi: Fix typo.
5115 2011-08-02 Vincent Celier <celier@adacore.com>
5117 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5118 archive file name. Do not use the full path name of archives for Open
5121 2011-08-02 Robert Dewar <dewar@adacore.com>
5123 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5124 Analyze_Aspect_Specifications
5126 (Analyze_Aspect_Specifications): New handling for boolean aspects
5127 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5128 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5129 sequence for Analyze_Aspect_Specifications
5130 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5131 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5133 2011-08-02 Robert Dewar <dewar@adacore.com>
5135 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5136 aspects, since these no longer exist.
5138 2011-08-02 Robert Dewar <dewar@adacore.com>
5140 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5141 semicolon, do not try to see if there are aspects following it.
5142 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5145 2011-08-02 Robert Dewar <dewar@adacore.com>
5147 * sem_ch8.adb, aspects.ads: Minor reformatting.
5149 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5151 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5152 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5154 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5156 2011-08-02 Yannick Moy <moy@adacore.com>
5158 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5159 mode on subprogram declaration outside of package specification, unless
5160 it is followed by a pragma Import
5161 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5162 Access_Type_Declaration): issue error in formal mode on access type
5163 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5165 (Analyze_Object_Declaration): issue error in formal mode on object
5166 declaration which does not respect SPARK restrictions
5167 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5168 declaration which does not respect SPARK restrictions
5169 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5170 error in formal mode on digits or delta constraint
5171 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5172 decimal fixed point type
5173 (Derived_Type_Declaration): issue error in formal mode on derived type
5174 other than type extensions of tagged record types
5175 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5176 with check on access definition
5177 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5178 mode on protected definition.
5179 (Analyze_Task_Definition): issue error in formal mode on task definition
5181 2011-08-02 Robert Dewar <dewar@adacore.com>
5183 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5185 2011-08-02 Javier Miranda <miranda@adacore.com>
5187 * sem_ch6.adb (Can_Override_Operator): New function.
5188 (Verify_Overriding_Indicator): Add missing code to check overriding
5189 indicator in operators. Fixes regression.
5190 (Check_Overriding_Indicator): Minor reformating after replacing the
5191 code that evaluates if the subprogram can override an operator by
5192 invocations to the above new function.
5194 (Write_Field26_Name): Add missing code to ensure that, following
5195 the documentation in einfo.ads, this field is not shown as attribute
5196 "Static_Initialization" on non-dispatching functions.
5198 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5200 * sem_res.adb (Resolve_Call): A call to
5201 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5202 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5203 i.e., when the second parameter is of type Time_Span.
5205 2011-08-02 Vincent Celier <celier@adacore.com>
5207 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5208 with an archive instead of -L<library dir> -l<library name>.
5210 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5212 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5213 mark the base types In_Use in addition to making the operations
5216 2011-08-02 Ed Falis <falis@adacore.com>
5218 * init.c: add and setup __gnat_signal_mask for the exception signals
5219 * s-inmaop-vxworks.adb: new file.
5220 * s-intman-vxworks.adb: remove unnecessary initializations and
5222 * s-intman-vxworks.ads: remove unnecessary variable
5223 * s-taprop-vxworks.adb: simplify signal initialization
5225 2011-08-02 Robert Dewar <dewar@adacore.com>
5227 * sem_ch8.adb: Minor code reorganization, comment updates.
5229 2011-08-02 Robert Dewar <dewar@adacore.com>
5231 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5232 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5234 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5235 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5237 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5239 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5240 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5241 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5242 use_type_clauses, to handle more efficiently use_type and use_all_type
5244 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5245 Ada2012 Use_All_Type clause.
5246 (Use_Class_Wide_Operations): new procedure.
5248 2011-08-02 Robert Dewar <dewar@adacore.com>
5250 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5251 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5252 expression to expression function.
5254 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5256 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5257 if types are compatible.
5259 2011-08-02 Yannick Moy <moy@adacore.com>
5261 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5262 returns True if its argument array types have same dimension and same
5263 static bounds at each index.
5264 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5265 OUT or IN OUT paramaters which are not view conversions in SPARK.
5266 (Resolve_Arithmetic_Op): issue an error in formal mode on
5267 multiplication or division with operands of fixed point types which are
5268 not qualified or explicitly converted.
5269 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5270 Boolean or array type (except String) operands.
5271 (Resolve_Equality_Op): issue an error in formal mode on equality
5272 operators for array types other than String with non-matching static
5274 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5275 for array types with non-matching static bounds. Factorize the code in
5276 Matching_Static_Array_Bounds.
5277 (Resolve_Qualified_Expression): issue an error in formal mode on
5278 qualified expressions for array types with non-matching static bounds.
5279 (Resolve_Type_Conversion): issue an error in formal mode on type
5280 conversion for array types with non-matching static bounds
5282 2011-08-02 Robert Dewar <dewar@adacore.com>
5284 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5288 * par-ch9.adb: save location of entry for proper error message.
5290 2011-08-02 Javier Miranda <miranda@adacore.com>
5292 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5293 (Use_Full_View) which permits this routine to climb through the
5294 ancestors using the full-view of private parents.
5295 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5296 Use_Full_View to true in calls to Is_Ancestor.
5297 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5298 true in call to Is_Ancestor.
5299 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5300 Use_Full_View to true in call to Is_Ancestor.
5301 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5302 call to Is_Ancestor.
5303 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5304 Use_Full_View to true in calls to Is_Ancestor.
5305 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5306 Make_Select_Specific_Data_Table, Register_Primitive,
5307 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5308 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5309 to true in call to Is_Ancestor.
5310 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5311 Use_Full_View to true in calls to Is_Ancestor.
5313 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5314 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5316 2011-08-02 Robert Dewar <dewar@adacore.com>
5318 * gnat_rm.texi: Minor reformatting.
5319 * sem_prag.adb: Minor reformatting.
5321 2011-08-02 Tristan Gingold <gingold@adacore.com>
5323 * vms_data.ads: Add VMS qualifier for -gnateP.
5325 2011-08-02 Robert Dewar <dewar@adacore.com>
5327 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5328 * par-ch7.adb (P_Package): Proper placement of aspects for package
5330 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5331 (End_Statements): Add Is_Sloc parameterr
5332 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5333 (Check_End): Ad Is_Sloc parameter
5334 (End_Statements): Add Is_Sloc parameterr
5336 2011-08-02 Vincent Celier <celier@adacore.com>
5338 * ug_words: Add VMS qualifier equivalent to -gnateP:
5339 /SYMBOL_PREPROCESSING.
5341 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5343 * gnat-style.texi: For hexadecimal numeric literals the typical
5344 grouping of digits is 4 to represent 2 bytes.
5345 A procedure spec which is split into several lines is indented two
5348 2011-08-02 Yannick Moy <moy@adacore.com>
5350 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5351 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5352 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5354 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5355 choice in array aggregate
5356 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5358 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5359 positional and named aggregate for record, or others in record
5360 aggregate, or multiple choice in record aggregate
5361 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5362 array operands to logical operations AND, OR and XOR do not have the
5363 same static lower and higher bounds
5364 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5366 2011-08-01 Robert Dewar <dewar@adacore.com>
5368 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5369 Replaces Last_Source_Node_In_Sequence.
5370 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5371 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5372 parens and blank in string (this was inconsistently implemented).
5374 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5375 blank in string (this was inconsistently implemented).
5377 (Set_Global_Switches): Set formal mode switches appropriately
5378 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5380 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5381 call Set_Error_Msg_Lang to set "spark" as language name.
5382 * par.adb: Remove unnecessary call to set formal language for errout
5383 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5384 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5386 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5387 calls to it, moved after resolution so that types are known
5388 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5389 result of concatenation is not of type String
5390 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5391 concatenation is not properly restricted
5392 * gnat_rm.texi: Add doc on pragma Spark_95.
5393 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5394 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5395 * gcc-interface/Make-lang.in: Update dependencies.
5397 2011-08-01 Javier Miranda <miranda@adacore.com>
5399 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5400 condition that detects if the overridden operation must replace an
5403 2011-08-01 Javier Miranda <miranda@adacore.com>
5405 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5406 code declarations inserted by Insert_Actions in each alternative of the
5407 N_Case_Expression node.
5409 2011-08-01 Robert Dewar <dewar@adacore.com>
5411 * sem_ch6.adb: Minor code reorganization.
5412 * sem_util.adb: Minor reformatting.
5414 2011-08-01 Pascal Obry <obry@adacore.com>
5416 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5417 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5419 2011-08-01 Yannick Moy <moy@adacore.com>
5421 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5422 literal or operator symbol which is prefixed
5423 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5424 mode on access attributes.
5425 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5426 that concatenation operands are properly restricted in formal mode
5427 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5428 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5429 result of the concatenation has a type different from String.
5430 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5431 Analyze_Quantified_Expression, Analyze_Slice,
5432 Analyze_Null): issue an error in formal mode on unsupported constructs
5434 (Analyze_Block_Statement): only issue error on source block statement
5435 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5436 function which returns the last node in a list of nodes for which
5437 Comes_From_Source returns True, if any
5438 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5439 Last_Source_Node_In_Sequence
5440 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5441 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5442 mode on unsupported constructs
5443 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5444 rest of the actions may be needed later on since the error is marked as
5446 * sinfo.ads: Typos in comments.
5448 2011-08-01 Pascal Obry <obry@adacore.com>
5450 * projects.texi: Minor editing.
5452 2011-08-01 Yannick Moy <moy@adacore.com>
5454 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5455 insertion character ~~
5456 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5457 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5458 with insertion character ~~
5459 (Set_Msg_Text): treat insertion character ~~
5460 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5461 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5462 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5463 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5464 errors related to the formal language restriction not serious
5465 (insertion character |).
5466 * par.adb (Par): set formal language for error messages if needed
5467 * sem_ch6.adb (Check_Missing_Return): take into account possible
5468 generated statements at the end of the function
5469 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5470 enumeration value to define a new pragma SPARK_95
5471 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5472 SPARK_Version): new type and variables to store the SPARK version
5474 (SPARK_Mode): return True when SPARK_Version is set
5475 * par-prag.adb: Correct indentation
5476 (Prag): take Pragma_SPARK_95 into account
5477 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5480 2011-08-01 Robert Dewar <dewar@adacore.com>
5482 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5483 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5484 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5486 2011-08-01 Pascal Obry <obry@adacore.com>
5488 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5489 Target_Name to Get_Path call.
5490 (Parse_Single_Project): Likewise.
5491 (Post_Parse_Context_Clause): Likewise.
5492 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5493 Call Initialise_Project_Path with the proper Target_Name.
5494 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5496 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5497 with the proper Target_Name.
5498 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5500 (Parse_Project_And_Apply_Config): Likewise.
5501 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5502 This is fine as this part of the code is supporting only native
5504 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5505 is fine as this part of the code is supporting only native compilation.
5507 2011-08-01 Yannick Moy <moy@adacore.com>
5509 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5510 of homonym, unless the homonym is one of the cases allowed in SPARK
5511 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5512 package declaration occurring after a body.
5514 2011-08-01 Robert Dewar <dewar@adacore.com>
5516 * checks.adb, exp_ch4.adb: Minor reformatting.
5518 2011-08-01 Javier Miranda <miranda@adacore.com>
5520 * einfo.ads (Access_Disp_Table): Fix documentation.
5521 (Dispatch_Table_Wrappers): Fix documentation.
5523 2011-08-01 Pascal Obry <obry@adacore.com>
5525 * prj-env.adb, prj-env.ads: Minor reformatting.
5527 2011-08-01 Yannick Moy <moy@adacore.com>
5529 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5530 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5531 procedures out of these packages.
5532 * errout.ads, errout.adb
5533 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5534 procedures in of this package
5535 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5536 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5537 on misplaced later vs initial declarations, like in Ada 83
5538 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5539 formal mode on attribute of private type whose full type declaration
5541 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5542 package declaration inside a package specification
5543 (Analyze_Full_Type_Declaration): issue error in formal mode on
5544 controlled type or discriminant type
5545 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5546 user-defined operator means that it should come from the source
5547 (New_Overloaded_Entity): issue error in formal mode on overloaded
5549 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5551 2011-08-01 Thomas Quinot <quinot@adacore.com>
5553 * atree.adb: Minor reformatting.
5554 * checks.adb: Minor reformatting.
5556 2011-08-01 Vincent Celier <celier@adacore.com>
5558 * s-parame-vms-ia64.ads: Fix typo in comment
5560 * s-parame-vms-restrict.ads: Removed, unused.
5562 2011-08-01 Javier Miranda <miranda@adacore.com>
5565 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5567 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5568 * sem_ch3.ads, sem_ch3.adb
5569 (Is_Constant_Bound): New extended version of the subprogram that was
5570 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5571 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5572 * sem_aux.ads (Constant_Value): Fix typo in comment.
5573 * checks.adb (Generate_Index_Checks): New implementation which, for
5574 array objects with constant bounds, generates the runtime check
5575 referencing the bounds of the array type. For other cases this routine
5576 provides its previous behavior obtaining such values from the array
5578 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5580 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5581 we cannot have semantic interpretations of the new node.
5583 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5585 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5588 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5590 * sem_ch8.adb: Minor code editing.
5591 * s-vxwext.adb: Remove trailing space.
5592 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5593 consistency with other files.
5595 2011-08-01 Thomas Quinot <quinot@adacore.com>
5597 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5599 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5601 * par-ch10.adb: reject parameterized expressions as compilation unit.
5602 * sem_ch4.adb: handle properly conditional expression with overloaded
5603 then_clause and no else_clause.
5605 2011-08-01 Tristan Gingold <gingold@adacore.com>
5607 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5608 like done by System.Aux_DEC.
5609 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5611 2011-08-01 Yannick Moy <moy@adacore.com>
5613 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5614 missing label at end of declaration (subprogram or package)
5615 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5616 of positional and named parameter association
5617 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5618 Error_Msg_SP which adds a prefix to the error message giving the name
5619 of the formal language analyzed
5620 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5621 access result type in subprogram, unconstrained array as result type,.
5622 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5624 * sem_ch8.adb: Code clean up.
5626 2011-08-01 Javier Miranda <miranda@adacore.com>
5628 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5629 * einfo.ads (Access_Disp_Table): Fix documentation.
5630 (Dispatch_Table_Wrappers): Fix documentation.
5631 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5632 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5633 to enforce the documentation of this attribute.
5634 (Set_Is_Interface): Cleanup the assertion.
5635 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5636 the Underlying_Type entity before reading attribute Access_Disp_Table.
5637 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5638 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5639 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5640 the Underlying_Type entity before reading attribute Access_Disp_Table.
5641 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5642 Locate the Underlying_Type entity before reading attribute
5645 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5647 * s-poosiz.ads: Additional overriding indicators.
5649 2011-08-01 Yannick Moy <moy@adacore.com>
5651 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5653 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5654 parameter specification does not include a subtype mark.
5655 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5656 formal mode on abstract subprogram.
5657 (Analyze_Subprogram_Specification): issue error in formal mode on
5658 user-defined operator.
5659 (Process_Formals): issue error in formal mode on access parameter and
5661 * sem_ch9.adb (Analyze_Abort_Statement,
5662 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5663 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5664 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5665 Analyze_Requeue, Analyze_Selective_Accept,
5666 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5667 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5668 issue error in formal mode on user-defined raise statement.
5670 2011-08-01 Thomas Quinot <quinot@adacore.com>
5672 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5673 declaration being hidden when overriding an implicit inherited
5675 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5676 (-gnats), do not complain about a source file that contains only a
5679 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5681 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5682 variable if already set.
5684 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5686 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5687 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5688 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5689 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5690 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5691 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5692 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5693 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5694 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5695 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5696 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5697 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5698 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5699 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5700 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5701 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5702 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5703 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5704 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5705 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5706 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5707 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5708 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5709 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5710 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5711 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5712 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5713 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5714 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5715 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5716 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5717 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5718 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5719 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5720 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5721 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5722 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5723 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5724 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5725 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5726 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5727 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5728 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5729 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5730 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5731 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5732 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5733 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5734 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5735 Use GNAT instead of GNARL.
5737 2011-08-01 Bob Duff <duff@adacore.com>
5739 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5740 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5741 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5744 2011-08-01 Yannick Moy <moy@adacore.com>
5746 * debug.adb (d.D) reverve flag for the SPARK mode
5747 (d.E) reverve flag for SPARK generation mode
5748 (d.F) reverve flag for Why generation mode
5749 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5750 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5751 functions which return True when the corresponding modes are set
5752 (Formal_Language): return "spark" or "alfa" when in formal verification
5754 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5755 Error_Msg to prefix the error message with a tag giving the formal
5757 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5758 message with a tag giving the formal language
5759 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5761 (Analyze_Case_Statement): issue error in formal mode on case statement
5762 with a single "others" case alternative
5763 (Analyze_Exit_Statement): issue errors in formal mode on exit
5764 statements which do not respect SPARK restrictions
5765 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5766 (Check_Unreachable_Code): always issue an error (not a warning) in
5767 formal mode on unreachable code (concerns both code after an infinite
5768 loop and after an unconditional jump, both not allowed in SPARK)
5769 * sem_ch6.adb (Analyze_Return_Statement): add call to
5770 Set_Return_Present for a procedure containing a return statement
5771 (already done for functions in Analyze_Function_Return)
5772 (Analyze_Function_Return): issue error in formal mode on extended
5773 return or if return is not last statement in function
5774 (Check_Missing_Return): issue error in formal mode if function does
5775 not end with return or if procedure contains a return
5776 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5777 function to detect if there is an inner scope of its parameter S which
5780 2011-08-01 Thomas Quinot <quinot@adacore.com>
5782 * sem_ch6.ads: Minor reformatting.
5784 2011-08-01 Javier Miranda <miranda@adacore.com>
5786 * sem_util.adb (Abstract_Interface_List): Complete condition when
5787 processing private type declarations to avoid reading unavailable
5789 (Is_Synchronized_Tagged_Type): Complete condition when processing
5790 private extension declaration nodes to avoid reading unavailable
5793 2011-08-01 Thomas Quinot <quinot@adacore.com>
5795 * sem_ch3.adb: Minor reformatting.
5797 2011-08-01 Thomas Quinot <quinot@adacore.com>
5799 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5800 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5801 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5802 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5803 for VMS, instead parametrize the common implementation with
5804 System.Parameters declarations.
5806 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5808 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5810 2011-08-01 Tristan Gingold <gingold@adacore.com>
5812 * seh_init.c: Fix SEH handler installation on win64.
5814 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5816 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5817 double analysis of an anonymous access to subprogram, because it can
5818 lead to improper sharing of profiles and a back-end crash.
5820 2011-08-01 Robert Dewar <dewar@adacore.com>
5822 * make.adb, sem_ch4.adb: Minor reformatting.
5823 * gcc-interface/Make-lang.in: Update dependencies.
5824 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5826 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5828 * gnat_rm.texi: Fix definition of Long_Integer.
5830 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5832 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5833 to prevent storage exhaustion.
5834 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5835 finalized is a function body, insert the cleanup code before the final
5836 return statement, to prevent spurious warnings.
5837 * s-pooglo.ads: add overriding indicator.
5839 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5841 * sem_ch4.adb (Operator_Check): improve error message when both a
5842 with_clause and a use_clause are needed to make operator usage legal.
5843 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5844 determine whether a compilation unit is visible within an other,
5845 either through a with_clause in the current unit, or a with_clause in
5846 its library unit or one one of its parents.
5848 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5850 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5851 over an arbitrary expression of an array or container type.
5852 * lib-xref.adb: clarify comment.
5854 2011-08-01 Bob Duff <duff@adacore.com>
5856 * einfo.ads: Minor reformatting.
5857 * debug.adb: Minor comment improvement.
5859 2011-08-01 Javier Miranda <miranda@adacore.com>
5861 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5862 consider hidden subprograms as valid candidates.
5864 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5866 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5868 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5870 * gnat_ugn.texi: Fix typo.
5872 2011-08-01 Robert Dewar <dewar@adacore.com>
5874 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5875 lib-xref.adb: Minor reformatting
5877 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5879 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5880 when to generate a call to Move_Final_List.
5881 (Has_Controlled_Parts): Remove this function.
5883 2011-08-01 Geert Bosch <bosch@adacore.com>
5885 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5888 2011-08-01 Thomas Quinot <quinot@adacore.com>
5890 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5891 explicit raise of a predefined exception as Comes_From_Source if the
5892 original N_Raise_Statement comes from source.
5894 2011-08-01 Robert Dewar <dewar@adacore.com>
5896 * sinfo.ads: Add comment.
5897 * sem_ch6.adb: Minor reformatting.
5899 2011-08-01 Robert Dewar <dewar@adacore.com>
5901 * freeze.adb (Freeze_Entity): Refine check for bad component size
5902 clause to avoid rejecting confirming clause when atomic/aliased present.
5904 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5906 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5907 better determine whether an entity reference is a write.
5908 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5910 * lib-xref.adb (Output_References): Do no suppress a read reference at
5911 the same location as an immediately preceeding modify-reference, to
5912 handle properly in-out actuals.
5914 2011-08-01 Tristan Gingold <gingold@adacore.com>
5916 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5918 2011-08-01 Quentin Ochem <ochem@adacore.com>
5920 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5921 heap to compute the result.
5923 2011-08-01 Robert Dewar <dewar@adacore.com>
5925 * atree.ads: Minor reformatting.
5927 2011-08-01 Emmanuel Briot <briot@adacore.com>
5929 * g-expect.adb (Get_Command_Output): Fix memory leak.
5931 2011-08-01 Geert Bosch <bosch@adacore.com>
5933 * cstand.adb (P_Float_Type): New procedure to print the definition of
5934 predefined fpt types.
5935 (P_Mixed_Name): New procedure to print a name using mixed case
5936 (Print_Standard): Use P_Float_Type for printing floating point types
5937 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5938 precision IEEE float.
5940 2011-08-01 Thomas Quinot <quinot@adacore.com>
5942 * sem_ch3.adb: Minor reformatting.
5944 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5946 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5947 the completion of a generic function, insert the new body rather than
5948 rewriting the original.
5950 2011-08-01 Yannick Moy <moy@adacore.com>
5952 * sinfo.ads, errout.ads: Typos in comments.
5954 2011-08-01 Robert Dewar <dewar@adacore.com>
5956 * par-endh.adb: Minor reformatting.
5958 2011-08-01 Robert Dewar <dewar@adacore.com>
5960 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5961 (Pre_Post_Aspects): New subtype.
5962 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5963 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5964 * par-ch7.adb (P_Package): Remove Decl parameter
5965 (P_Package): Handle new syntax for aspects (before IS)
5966 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5968 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5969 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5970 (P_Package): Remove Decl parameter
5971 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5973 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5975 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5976 * sinfo.ads: Document new syntax for aspects in packages etc.
5977 * sprint.adb: Handle new syntax of aspects before IS in package
5979 2011-08-01 Thomas Quinot <quinot@adacore.com>
5981 * atree.ads: Minor reformatting.
5982 * sem_prag.adb: Minor reformatting.
5984 2011-08-01 Robert Dewar <dewar@adacore.com>
5986 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5987 case expr alternative.
5989 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5991 * sem_ch12.adb: Fix typo.
5993 2011-08-01 Geert Bosch <bosch@adacore.com>
5995 * sem_prag.adb (Check_No_Link_Name): New procedure.
5996 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5997 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5998 instead of Standard_Long_Long_Float_Size global. Preparation for
5999 eventual removal of per type constants.
6000 * exp_util.ads (Get_Stream_Size): New function returning the stream
6001 size value of subtype E.
6002 * exp_util.adb (Get_Stream_Size): Implement new function.
6003 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6005 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6007 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6009 2011-08-01 Geert Bosch <bosch@adacore.com>
6011 * cstand.adb: Fix comments.
6012 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6015 2011-08-01 Robert Dewar <dewar@adacore.com>
6017 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6019 2011-08-01 Geert Bosch <bosch@adacore.com>
6021 * atree.ads: Fix comment.
6023 2011-08-01 Robert Dewar <dewar@adacore.com>
6025 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6026 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6027 * par.adb: Add with for Namet.Sp.
6028 * par-tchk.adb: Minor reformatting.
6030 2011-08-01 Vincent Celier <celier@adacore.com>
6032 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6033 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6034 of the init procedure of a SAL.
6035 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6038 2011-08-01 Thomas Quinot <quinot@adacore.com>
6040 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6043 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6045 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6047 2011-08-01 Thomas Quinot <quinot@adacore.com>
6049 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6050 conformant with its spec (return True only for types that have
6051 an overriding Initialize primitive operation that prevents them from
6052 having preelaborable initialization).
6053 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6054 initialization for controlled types in Ada 2005 or later mode.
6056 2011-08-01 Robert Dewar <dewar@adacore.com>
6058 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6060 (Same_Aspect): New function.
6061 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6062 Type_Invariant, Precondition, Postcondition.
6063 * snames.ads-tmpl: Add Name_Type_Invariant.
6065 2011-08-01 Robert Dewar <dewar@adacore.com>
6067 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6069 (Freeze_All_Ent): Fix error in handling inherited aspects.
6070 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6071 already analyzed, but don't skip entire processing of a declaration,
6072 that's wrong in some cases of declarations being rewritten.
6073 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6074 Don't delay for integer, string literals
6075 Treat predicates in usual manner for delay, remove special case code,
6077 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6078 (Build_Predicate_Function): Update saved expression in aspect
6079 (Build_Invariant_Procedure): Update saved expression in aspect
6080 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6081 of replacement of discriminant references if the reference is simple.
6083 2011-08-01 Robert Dewar <dewar@adacore.com>
6085 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6086 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6087 Static_Predicate and Dynamic_Predicate.
6088 (Build_Predicate_Function): Add processing for Static_Predicate
6089 and Dynamic_Predicate.
6090 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6091 (From_Static_Predicate): New flag
6092 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6094 2011-08-01 Robert Dewar <dewar@adacore.com>
6096 * usage.adb: Documentation cleanup for Ada version modes in usage.
6097 * expander.adb: Minor reformatting.
6099 2011-08-01 Robert Dewar <dewar@adacore.com>
6101 * atree.ads: Minor comment fix.
6102 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6103 a-witeio.ads, sem_prag.adb: Minor reformatting.
6105 2011-08-01 Doug Rupp <rupp@adacore.com>
6107 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6108 pointers. Use descrip.h header file for convenience. Add some
6111 2011-08-01 Robert Dewar <dewar@adacore.com>
6113 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6114 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6115 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6117 (Check_Aspect_At_End_Of_Declarations): New procedure
6118 (Analye_Aspect_Specification): Minor changes for above procedures
6119 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6120 specification node as well.
6122 2011-08-01 Pascal Obry <obry@adacore.com>
6124 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6125 Windows files. Use GetFilesAttributes() in this case to check for file
6126 existence instead of returning with an error code.
6128 2011-08-01 Vincent Celier <celier@adacore.com>
6130 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6131 High is above Source length.
6133 2011-08-01 Robert Dewar <dewar@adacore.com>
6135 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6137 2011-08-01 Robert Dewar <dewar@adacore.com>
6139 * aspects.ads (Boolean_Aspects): New subtype.
6140 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6141 for derived types in cases where the parent type and derived type have
6143 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6144 with aspects when parent type also has aspects.
6145 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6146 boolean expression at this point).
6147 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6148 accordance with final decision on the Ada 2012 feature.
6149 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6151 2011-08-01 Matthew Heaney <heaney@adacore.com>
6153 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6155 2011-08-01 Pascal Obry <obry@adacore.com>
6157 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6158 Fix Replace_Slice when High is above current string size.
6159 (Replace_Slice): Fix DL computation when High is above current
6162 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6164 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6166 2011-08-01 Matthew Heaney <heaney@adacore.com>
6168 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6171 2011-08-01 Pascal Obry <obry@adacore.com>
6173 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6176 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6178 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6179 access to protected subprograms in generic bodies.
6180 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6181 protected type, indicate that the convention of the subprogram is
6182 Convention_Protected, because it may be used in subsequent declarations
6183 within the protected declaration.
6185 2011-08-01 Vincent Celier <celier@adacore.com>
6187 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6188 and "final" procedures when the name of the library is "ada", to avoid
6189 duplicate symbols "adainit" and "adafinal" in executables.
6191 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6193 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6194 quantified expression that appears within a postcondition and uses the
6195 Ada2012 'Result attribute.
6197 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6199 * init.c (__gnat_error_handler): Cast reason to int.
6200 (__gnat_install_handler): Explain sa_sigaction use.
6202 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6204 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6205 subprogram has copy-in copy-out parameters, try to promote the mode of
6206 the return type if it is passed in registers.
6208 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6210 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6211 left operand as addressable.
6213 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6215 * gcc-interface/gigi.h (build_function_stub): Remove.
6216 (build_return_expr): Likewise.
6217 (convert_vms_descriptor): Declare.
6218 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6219 (build_function_stub): Move to...
6220 * gcc-interface/utils2.c (build_return_expr): Move to...
6221 * gcc-interface/trans.c (build_function_stub): ...here.
6222 (build_return_expr): ...here.
6223 (Subprogram_Body_to_gnu): Add local variable for language_function.
6224 Disconnect the parameter attributes cache, if any, once done with it.
6225 Call end_subprog_body only after setting the end_locus.
6226 Build the stub associated with the function, if any, at the very end.
6227 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6228 variables and streamline control flow.
6230 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6233 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6236 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6239 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6240 Assign to act.sa_sigaction.
6241 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6242 current->return_address to char * before arithmetic.
6244 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6246 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6247 Correct argument types.
6248 Extract code from reason.
6249 (__gnat_install_handler): Assign to act.sa_sigaction.
6251 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6253 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6254 (GNAT1_OBJS): ...here.
6256 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6259 * g-socthi-mingw.adb (Fill): Fix formatting.
6261 * gcc-interface/gigi.h: Move around comment.
6263 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6266 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6268 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6271 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6273 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6275 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6276 range comparison if Pmode is SImode.
6278 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6279 Eric Botcazou <ebotcazou@adacore.com>
6281 * adadecode.c: Wrap up in extern "C" block.
6282 * adadecode.h: Likewise.
6283 * adaint.c: Likewise. Remove 'const' keyword.
6284 * adaint.h: Likewise.
6286 * atree.h: Likewise.
6288 * cstreams.c: Likewise.
6292 * final.c: Likewise.
6294 * initialize.c: Likewise.
6296 * namet.h: Likewise.
6297 * nlists.h: Likewise.
6298 * raise.c: Likewise.
6299 * raise.h: Likewise.
6300 * repinfo.h: Likewise.
6301 * seh_init.c: Likewise.
6302 * targext.c: Likewise.
6303 * tracebak.c: Likewise.
6304 * uintp.h: Likewise.
6305 * urealp.h: Likewise.
6306 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6307 * xsinfo.adb: Likewise.
6308 * xsnamest.adb: Likewise.
6309 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6310 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6311 * gcc-interface/misc.c: Likewise.
6312 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6313 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6314 ada/targext.o here...
6315 (GNAT_ADA_OBJS): ...and not here.
6316 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6317 (GNATBIND_OBJS): Reorder.
6319 2011-07-07 Richard Henderson <rth@redhat.com>
6321 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6322 dwarf2out_frame_init.
6324 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6326 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6328 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6331 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6333 2011-07-06 Richard Guenther <rguenther@suse.de>
6335 * gcc-interface/misc.c (gnat_init): Merge calls to
6336 build_common_tree_nodes and build_common_tree_nodes_2.
6337 Re-initialize boolean_false_node.
6339 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6340 Olivier Hainque <hainque@adacore.com>
6341 Nicolas Setton <setton@adacore.com>
6343 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6344 the type according to the ARTIFICIAL_P parameter.
6345 (create_type_decl): Likewise.
6346 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6348 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6350 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6351 (gnatbind): Likewise.
6353 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6355 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6357 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6359 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6360 local variable throughout. Remove useless call to Base_Type.
6361 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6362 Take it also into account for the volatileness of the field. Set the
6363 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6365 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6367 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6368 on a dereference built for a by-ref object if it has an address clause.
6370 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6372 * einfo.ads (Address_Taken): Document use for the second argument of
6373 Asm_Input and Asm_Output attributes.
6374 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6375 argument is an entity name, then set Address_Taken on it.
6376 <Attribute_Asm_Output>: Likewise.
6377 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6378 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6379 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6380 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6382 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6385 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6387 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6389 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6390 (ada/utils.o): Update dependencies.
6391 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6392 ../../../libcpp/libcpp.a.
6393 * gcc-interface/utils.c: Include common/common-target.h.
6394 (process_attributes): Use targetm_common.have_named_sections.
6396 2011-06-07 Richard Guenther <rguenther@suse.de>
6398 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6401 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6403 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6404 TREE_THIS_NOTRAP flag.
6406 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6408 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6411 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6413 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6414 constants whose full view has discriminants specially.
6416 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6418 * gcc-interface/utils.c: Include diagnostic.h.
6419 (gnat_write_global_declarations): Output debug information for all
6420 global type declarations before finalizing the compilation unit.
6421 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6423 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6425 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6427 2011-05-25 Kai Tietz <ktietz@redhat.com>
6429 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6430 initialization instead of const/none-const pointer assignment.
6432 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6434 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6435 $(EXTRA_GNAT1_OBJS).
6436 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6437 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6438 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6439 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6440 libcommon-target.a instead of prefix.o.
6442 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6445 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6447 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6449 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6450 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6451 instead of version.o.
6453 2011-05-18 Kai Tietz <ktietz@redhat.com>
6455 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6456 boolean_false_node instead of integer_zero_node.
6457 (convert_with_check): Likewise.
6458 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6460 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6462 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6463 type of the parameter is an unconstrained array, convert the actual to
6464 the type of the formal in the In Out and Out cases as well.
6466 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6468 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6469 call build_function_type_array or build_varargs_function_type_array
6471 (create_subprog_type): Don't call build_function_type; call
6472 build_function_type_vec instead.
6474 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6476 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6477 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6478 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6480 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6482 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6484 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6485 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6487 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6489 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6491 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6493 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6494 instead of accessing TYPE_ARG_TYPES directly.
6495 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6497 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6500 * gcc-interface/gigi.h (get_variant_part): Declare.
6501 * gcc-interface/decl.c (get_variant_part): Make global.
6502 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6503 types have the same constant size, are record types and T1 has a
6504 variant part while T2 doesn't.
6506 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6508 * gcc-interface/utils.c (begin_subprog_body): Do not call
6510 (end_subprog_body): Likewise.
6512 2011-05-04 Richard Guenther <rguenther@suse.de>
6514 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6516 (pos_to_constructor): Likewise.
6518 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6519 Eric Botcazou <ebotcazou@adacore.com>
6521 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6522 of build_function_type. Adjust calls to...
6523 (build_raise_check): ...this. Do not take a void_tree parameter.
6524 Call build_function_type_list instead of build_function_type.
6525 Fix head comment and swap couple of conditional blocks.
6527 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6529 * gnatvsn.ads (Library_Version): Bump to 4.7.
6530 (Current_Year): Bump to 2011.
6532 2011-04-29 Michael Matz <matz@suse.de>
6534 * gcc-interface/misc.c (gnat_handle_option): Set
6535 warn_maybe_uninitialized.
6537 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6539 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6540 the Watson/McCabe paper.
6542 2011-04-23 Jim Meyering <meyering@redhat.com>
6544 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6546 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6548 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6551 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6553 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6555 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6556 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6557 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6558 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6559 <all>: Do not set flags on the reused DECL node coming from an alias.
6560 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6561 don't need debug info here...
6562 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6563 (gigi): Adjust calls to create_subprog_decl.
6564 (build_raise_check): Likewise.
6565 (establish_gnat_vms_condition_handler): Likewise.
6566 (Compilation_Unit_to_gnu): Likewise.
6567 (gnat_to_gnu): Likewise.
6569 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6571 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6572 (NO_REORDER_ADAFLAGS): New variable.
6573 (EXTRA_GNATTOOLS): Always define.
6574 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6575 Clean up and adjust list of files compiled with special options.
6576 * gcc-interface/Make-lang.in: Likewise.
6577 (ada/decl.o): Cosmetical change.
6578 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6580 2011-04-20 Jim Meyering <meyering@redhat.com>
6582 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6584 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6586 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6587 $(CFLAGS) on the link line.
6589 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6591 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6592 padded type built for the return type if it is unconstrained.
6594 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6596 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6598 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6600 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6601 before calling TREE_CHAIN.
6602 * gcc-interface/misc.c (gnat_init_ts): New function.
6603 (LANG_HOOKS_INIT_TS): Define.
6605 2011-04-12 Martin Jambor <mjambor@suse.cz>
6607 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6608 instead of cgraph_node.
6610 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6612 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6613 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6616 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6618 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6619 of aggregate types that contain a placeholder.
6621 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6623 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6625 (handle_type_generic_attribute): Likewise.
6627 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6630 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6632 2011-04-04 Kai Tietz <ktietz@redhat.com>
6635 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6638 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6640 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6641 type case, do not strip a padding type around the array type.
6643 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6645 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6648 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6650 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6651 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6652 code for -feliminate-unused-debug-types.
6653 (gnat_post_options): Likewise.
6655 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6657 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6658 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6661 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6663 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6664 DECL_ARTIFICIAL flag on enumeration types.
6666 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6668 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6669 fat pointer types artificial unconditionally.
6670 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6673 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6675 * gcc-interface/gigi.h (get_dummy_type): Declare.
6676 (build_dummy_unc_pointer_types): Likewise.
6677 (finish_fat_pointer_type): Likewise.
6678 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6679 fat pointer type has been built, complete it in place.
6680 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6681 and thin pointers. Remove useless variable.
6682 (finish_fat_pointer_type): Make global and move to...
6683 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6684 (get_dummy_type): New function.
6685 (build_dummy_unc_pointer_types): Likewise.
6686 (gnat_pushdecl): Propage the name to the anonymous variants only.
6687 (update_pointer_to): Only adjust the pointer types in the unconstrained
6690 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6692 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6693 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6694 if this is a Taft amendment type and the full declaration is available.
6695 * gcc-interface/trans.c (process_type): Likewise.
6696 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6697 (process_freeze_entity): Likewise.
6698 * gcc-interface/utils.c (dummy_global): New static variable.
6699 (gnat_write_global_declarations): If there are types declared as used
6700 at the global level, insert them in the global hash table.
6702 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6704 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6705 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6706 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6708 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6709 flag of the type accordingly.
6710 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6712 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6714 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6715 finalizing types when updating the pointers to the designated type.
6716 <all>: Finalize the deferred types even if we didn't defer processing
6717 of incomplete types in this invocation.
6719 2011-04-01 Olivier Hainque <hainque@adacore.com>
6720 Nicolas Setton <setton@adacore.com>
6721 Eric Botcazou <ebotcazou@adacore.com>
6723 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6724 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6726 2011-03-28 Kai Tietz <ktietz@redhat.com>
6728 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6730 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6731 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6733 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6735 2011-03-28 Tristan Gingold <gingold@adacore.com>
6738 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6739 Use ada output of gnatbind.
6740 (ada/b_gnatb.adb): Ditto.
6741 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6742 (ada.mostlyclean, ada.stage1)
6743 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6744 (ada.stagefeedback): Adjust.
6745 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6746 Use ada output of gnatbind.
6747 (b_gnatm.adb): Ditto.
6748 (b_gnatl.o, b_gnatm.o): New rules.
6750 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6752 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6753 for the padded type built to support a specified size or alignment.
6755 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6757 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6758 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6759 unconditionally to the end of the unit when the designated type is
6761 <all>: Rename local variable. Attempt to un-defer types only and do it
6762 for limited_with'ed types as well.
6763 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6764 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6765 consistently and remove redundant call to finalize_from_with_types.
6767 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6769 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6770 subprograms without a previous spec declared in the same unit.
6771 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6772 subprograms at the end of the unit instead of at the beginning.
6773 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6774 isn't public for the special handling of non-inline functions nested
6775 inside inline external functions.
6777 2011-03-25 Jeff Law <law@redhat.com>
6779 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6781 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6783 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6784 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6785 to compute Set_Size_Depends_On_Discriminant.
6786 (Layout_Type): Call it on array types in back-end layout mode.
6787 * sem_util.adb (Requires_Transient_Scope): Return true for array
6788 types only if the size depends on the value of discriminants.
6789 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6790 type if the RHS is a call to a function that returns an unconstrained
6791 type with default discriminant.
6793 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6795 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6796 non-conversion to the nominal result type at the end.
6798 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6800 * gcc-interface/trans.c (create_temporary): New function taken from...
6801 (create_init_temporary): ...here. Call it.
6802 (call_to_gnu): Create the temporary for the return value early, if any.
6803 Create it for a function with copy-in/copy-out parameters if there is
6804 no target; in other cases of copy-in/copy-out, use another temporary.
6805 Push the new binding level lazily. Add and rename local variables.
6807 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6809 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6811 (set_rm_size): Likewise.
6813 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6815 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6816 for the padded type built in order to support a specified alignment.
6817 Fix incorrect formatting.
6819 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6822 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6824 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6826 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6827 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6828 to the end of the list. Adjust recursive call. Rename local variable.
6829 If REORDER is true, reorder components of the record type.
6830 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6831 components_to_record and adjust the parameter list.
6833 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6835 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6836 disabled, use the variable for bounds of loop iteration scheme.
6838 2011-03-21 Kai Tietz <ktietz@redhat.com>
6841 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6843 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6845 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6846 out whether the expression is read-only. Short-circuit placeholder
6847 case and rename a couple of local variables.
6849 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6851 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6852 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6853 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6854 (convert): Deal with conversions from a smaller form type specially.
6856 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6858 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6859 its argument, except for the special -I- switch.
6861 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6863 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6866 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6868 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6870 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6872 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6874 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6875 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6876 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6877 Do not generate the check directly, instead instantiate the template
6878 check present in the descriptor.
6879 (make_descriptor_field): Move around.
6880 (build_vms_descriptor32): Build a template check in the POINTER field.
6881 (build_vms_descriptor): Remove useless suffixes.
6882 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6884 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6887 * targext.c: Include target files if IN_RTS is defined.
6889 2011-01-26 Richard Guenther <rguenther@suse.de>
6892 * targext.c: Include config.h.
6893 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6896 2011-01-04 Pascal Obry <obry@adacore.com>
6897 Eric Botcazou <ebotcazou@adacore.com>
6899 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6901 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6903 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6904 end-of-case on the end label and its associated gotos, if any.
6906 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6908 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6909 expressions of the parameter cache within the statement group of
6912 2011-01-04 Olivier Hainque <hainque@adacore.com>
6913 Eric Botcazou <ebotcazou@adacore.com>
6915 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6916 (set_end_locus_from_node): New function.
6917 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6918 make and the function end_locus.
6919 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6920 for the elaboration subprogram.
6921 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6922 set the end_locus of the expression as well.
6924 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6927 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6928 variables that are referenced in exception handlers volatile.
6932 Copyright (C) 2011 Free Software Foundation, Inc.
6934 Copying and distribution of this file, with or without modification,
6935 are permitted in any medium without royalty provided the copyright
6936 notice and this notice are preserved.
6938 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6939 - fix bugs in the description of Source_Trace;
6940 - get rid of UNIT_NAME;
6942 2011-08-02 Javier Miranda <miranda@adacore.com>
6945 (Build_Dispatching_Requeue): Adding support for VM targets
6946 since we cannot directly reference the Tag entity.
6947 * exp_sel.adb (Build_K): Adding support for VM targets.
6948 (Build_S_Assignment): Adding support for VM targets.
6950 (Default_Prim_Op_Position): In VM targets do not restrict availability
6951 of predefined interface primitives to compiling in Ada 2005 mode.
6952 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6953 restricted to compiling in Ada 2005 mode.
6954 (Make_VM_TSD): Generate code that declares and initializes the OSD
6955 record. Needed to support dispatching calls through synchronized
6958 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6959 primitives associated with synchronized interfaces.
6960 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6961 primitives associated with synchronized interfaces.
6963 2011-08-02 Yannick Moy <moy@adacore.com>
6965 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6966 statements hidden in SPARK if preceded by the HIDE directive
6967 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6968 exception handlers as hidden in SPARK if preceded by the HIDE directive
6969 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6970 if starting with the HIDE directive
6971 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6972 starting with the HIDE directive; mark the declarations in a private
6973 part as hidden in SPARK if the private part starts with the HIDE
6975 * restrict.adb, restrict.ads
6976 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6977 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6978 argument node belongs to a part which is hidden in SPARK
6979 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6980 parts in SPARK; protect the possibly costly call to
6981 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6982 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6983 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6984 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6986 (Scan): recognize special comment starting with '#' and followed by
6987 SPARK keyword "hide" as a HIDE directive.
6989 2011-08-02 Yannick Moy <moy@adacore.com>
6991 * types.ads, erroutc.ads: Minor reformatting.
6993 2011-08-02 Vincent Celier <celier@adacore.com>
6995 * link.c: Add response file support for cross platforms.
6997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6999 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7000 in an association, set parent field of copy before partial analysis.
7001 * sem_res.adb (Resolve_Slice): create reference to itype only when
7002 expansion is enabled.
7004 2011-08-02 Yannick Moy <moy@adacore.com>
7006 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7007 for new flag denoting which subprogram bodies are in ALFA
7008 * restrict.adb, sem_ch7.adb: Update comment
7009 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7010 sem_ch9.adb, sem_res.adb: Add calls to
7011 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7012 * sem_ch6.adb (Analyze_Function_Return): add calls to
7013 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7014 middle of the body, and extended return.
7015 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7016 False when missing return.
7017 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7018 to True for subprograms whose spec is in ALFA. Remove later on the flag
7019 on the entity used for a subprogram body when there exists a separate
7021 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7022 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7023 False, otherwise do nothing.
7025 2011-08-02 Robert Dewar <dewar@adacore.com>
7027 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7029 2011-08-02 Yannick Moy <moy@adacore.com>
7031 * sem_ch4.ads: minor formatting.
7033 2011-08-02 Yannick Moy <moy@adacore.com>
7035 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7036 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7037 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7038 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7039 opt.ads: cleanup of SPARK mode
7041 2011-08-02 Yannick Moy <moy@adacore.com>
7043 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7045 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7046 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7048 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7049 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7050 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7051 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7053 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7055 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7056 functions whose return type is not in ALFA.
7057 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7059 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7060 parameter's type is not in ALFA.
7061 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7064 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7066 * sem_ch6 (Analyze_Expression_Function): treat the function as
7067 Inline_Always, and introduce a subprogram declaration for it when it is
7069 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7070 expression functions, so that the back-end can determine whether they
7071 can in fact be inlined.
7072 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7073 a function body comes from an expression function.
7075 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7077 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7078 null exclusions to test Can_Never_Be_Null on the anonymous access types
7079 of the formals rather than testing the formals themselves. Exclude this
7080 check in cases where the Old_Formal is marked as a controlling formal,
7081 to avoid issuing spurious errors for bodies completing dispatching
7082 operations (due to the flag not getting set on controlling access
7083 formals in body specs).
7084 (Find_Corresponding_Spec): When checking full and subtype conformance of
7085 subprogram bodies in instances, pass Designated and E in that order, for
7086 consistency with the expected order of the formals (New_Id followed by
7089 2011-08-02 Robert Dewar <dewar@adacore.com>
7091 * sem_ch8.adb: Minor reformatting.
7093 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7095 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7096 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7097 primitive operations of class-wide actuals.
7099 2011-08-02 Javier Miranda <miranda@adacore.com>
7101 * exp_atag.ads, exp_atag.adb
7102 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7103 since its value is implicitly passed in argument Typ.
7104 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7105 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7106 Build_Common_Dispatching_Select_Statements.
7108 2011-08-02 Robert Dewar <dewar@adacore.com>
7110 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7111 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7114 2011-08-02 Robert Dewar <dewar@adacore.com>
7116 * sem_res.adb: Minor reformatting.
7117 * sem_prag.adb: Minor reformatting.
7119 2011-08-02 Javier Miranda <miranda@adacore.com>
7121 * exp_atag.adb, exp_atags.ads
7122 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7123 by the tagged type Entity. Required to use this routine in the VM
7124 targets since we do not have available the Tag entity in the VM
7127 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7128 Ada.Tags has not been previously loaded.
7130 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7131 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7133 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7134 view of enclosing scopes. Required to handle enclosing scopes that
7135 are synchronized types whose full view is a task type.
7137 (Build_VM_TSDs): Minor code improvement to avoid generating and
7138 analyzing lists with empty nodes.
7139 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7140 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7141 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7142 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7143 (Make_Select_Specific_Data_Table): Add support for VM targets.
7144 (Make_VM_TSD): Generate code to initialize the SSD structure of
7147 2011-08-02 Yannick Moy <moy@adacore.com>
7149 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7150 cross-references section in ALI.
7151 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7152 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7154 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7155 subprogram or package entity of a node
7156 (Is_Local_Reference_Type): new function returns True for references
7157 selected in local cross-references.
7158 (Lt): function extracted from Lt in Output_References
7159 (Write_Entity_Name): function extracted from Output_References
7160 (Generate_Definition): generate reference with type 'D' for definition
7161 of objects (object declaration and parameter specification), with
7162 appropriate locations and units, for use in local cross-references.
7163 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7164 references of type 'I' for initialization in object definition.
7165 (Output_References): move part of function Lt and procedure
7166 Write_Entity_Name outside of the body. Ignore references of types 'D'
7167 and 'I' introduced for local cross-references.
7168 (Output_Local_References): new procedure to output the local
7169 cross-references sections.
7170 (Lref_Entity_Status): new array defining whether an entity is a local
7171 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7172 with 'I' type when initialization expression is present.
7173 * get_scos.adb, get_scos.ads: Correct comments and typos
7175 2011-08-02 Javier Miranda <miranda@adacore.com>
7177 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7179 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7181 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7184 2011-08-02 Vincent Celier <celier@adacore.com>
7186 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7187 (No_Space_Img): New function
7188 (Find_Excluded_Sources): When reading from a file, record the file name
7189 and the line number for each excluded source.
7190 (Mark_Excluded_Sources): When reporting an error, if the excluded
7191 sources were read from a file, include file name and line number in
7194 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7196 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7198 2011-08-02 Robert Dewar <dewar@adacore.com>
7200 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7202 2011-08-02 Javier Miranda <miranda@adacore.com>
7204 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7205 generation of TSDs to the DOTNET compiler.
7206 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7207 generation of TSDs to the DOTNET compiler.
7209 2011-08-02 Javier Miranda <miranda@adacore.com>
7211 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7212 record of all the tagged types declared inside library level package
7213 declarations, library level package bodies or library level subprograms.
7214 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7215 associated with a given tagged type.
7216 (Build_VM_TSDs): New subprogram.
7217 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7218 compilation units that are subprograms.
7219 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7220 compilation units that are package bodies.
7221 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7222 units that are a package declaration or a package instantiation.
7223 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7224 reorganization to improve the error generated by the frontend when the
7225 function Ada.Tags.Secondary_Tag is not available.
7226 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7227 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7229 2011-08-02 Javier Miranda <miranda@adacore.com>
7231 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7233 2011-08-02 Robert Dewar <dewar@adacore.com>
7235 * s-imenne.ads: Minor reformatting.
7237 2011-08-02 Robert Dewar <dewar@adacore.com>
7239 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7240 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7241 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7243 2011-08-02 Robert Dewar <dewar@adacore.com>
7245 * einfo.ads (Materialize_Entity): Document this is only for renamings
7246 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7247 required debug information in the case where we transform the object
7248 declaration into a renaming declaration.
7249 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7251 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7254 2011-08-02 Robert Dewar <dewar@adacore.com>
7256 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7257 Suppress_Init_Procs.
7258 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7259 Suppress_Initialization/Initialization_Suppressed.
7260 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7261 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7262 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7263 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7265 2011-08-02 Robert Dewar <dewar@adacore.com>
7267 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7270 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7272 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7273 only have inheritable classwide pre/postconditions.
7275 2011-08-02 Javier Miranda <miranda@adacore.com>
7277 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7278 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7279 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7280 checks if the external tag of a type is the same as the external tag
7281 of some other declaration.
7283 2011-08-02 Thomas Quinot <quinot@adacore.com>
7285 * s-taskin.ads: Minor reformatting.
7287 2011-08-02 Emmanuel Briot <briot@adacore.com>
7289 * g-comlin.adb (Display_Help): swap the order in which it prints the
7290 short help and the general usage.
7292 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7294 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7295 the aspect declarations and attach them to the generic copy for
7296 subsequent analysis.
7297 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7298 declarations of the generic tree to the new subprogram declarations.
7299 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7300 conditions that apply to a subprogram instance.
7302 2011-08-02 Robert Dewar <dewar@adacore.com>
7304 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7306 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7308 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7309 private type with a tagged full view is not derived in the immediate
7310 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7312 2011-08-02 Robert Dewar <dewar@adacore.com>
7314 * exp_ch4.adb: Minor reformatting.
7316 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7318 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7319 Ada2012 iterator, the loop will be rewritten during expansion into a
7320 while loop with a cursor and an element declaration. Do not analyze the
7321 body in this case, because if the container is for indefinite types the
7322 actual subtype of the elements will only be determined when the cursor
7323 declaration is analyzed.
7325 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7327 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7328 size/alignment related attributes in CodePeer_Mode.
7330 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7332 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7333 Prepend_Element, since this can result in the operation getting the
7334 wrong slot in the full type's dispatch table if the full type has
7335 inherited operations. The incomplete type's operation will get added
7336 to the proper position in the full type's primitives
7337 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7338 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7339 dispatching operations, since there are cases where nonprimitive
7340 subprograms can get added to the list of incomplete dependents (such
7341 as subprograms in nested packages).
7342 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7343 private part when determining whether to add a primitive with a
7344 parameter of a tagged incomplete type to the Private_Dependents list.
7345 Such primitives can also occur in the visible part, and should not have
7346 been excluded from being private dependents.
7347 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7348 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7349 list of a Taft-amendment incomplete type is a primitive before issuing
7350 an error that the full type must appear in the same unit. There are
7351 cases where nonprimitives can be in the list (such as subprograms in
7353 * sem_disp.adb (Derives_From): Use correct condition for checking that
7354 a formal's type is derived from the type of the corresponding formal in
7355 the parent subprogram (the condition was completely wrong). Add
7356 checking that was missing for controlling result types being derived
7357 from the result type of the parent operation.
7359 2011-08-02 Yannick Moy <moy@adacore.com>
7361 * errout.adb (First_Node): minor renaming
7362 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7365 2011-08-02 Yannick Moy <moy@adacore.com>
7367 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7368 before accessing operands.
7369 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7370 decide whether an initialization expression respects SPARK rules, as
7371 the plain node is the expanded one. This allows for more valid warnings
7373 * gnat_rm.texi: Minor update.
7375 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7377 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7380 2011-08-02 Robert Dewar <dewar@adacore.com>
7382 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7384 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7386 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7387 loop statements and the element renaming declaration with a block when
7388 the element type is controlled.
7390 2011-08-02 Yannick Moy <moy@adacore.com>
7392 * sinfo.ads: Minor formatting.
7394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7396 * sem_aggr.adb (Add_Association): if the association has a box and no
7397 expression, use the Sloc of the aggregate itself for the new
7399 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7402 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7404 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7405 When a container is provided via a function call, generate a renaming
7406 of the function result. This avoids the creation of a transient scope
7407 and the premature finalization of the container.
7408 * exp_ch7.adb (Is_Container_Cursor): Removed.
7409 (Wrap_Transient_Declaration): Remove the supression of the finalization
7410 of the list controller when the declaration denotes a container cursor,
7413 2011-08-02 Yannick Moy <moy@adacore.com>
7415 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7416 node is from source, instead of the original node being from source.
7418 (Resolve_Array_Aggregate): refine the check for a static expression, to
7419 recognize also static ranges
7420 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7421 Array_Type_Declaration): postpone the test for the type being a subtype
7422 mark after the type has been resolved, so that component-selection and
7423 expanded-name are discriminated.
7424 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7425 to distinguish the case of an iteration scheme, so that an error is
7426 issed on a non-static range in SPARK except in an iteration scheme.
7427 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7428 In_Iter_Schm = True.
7429 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7430 user-defined operators so that they are allowed in renaming
7432 (Find_Selected_Component): refine the check for prefixing of operators
7433 so that they are allowed in renaming. Move the checks for restrictions
7434 on selector name after analysis discriminated between
7435 component-selection and expanded-name.
7436 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7437 concatenation argument of string type if it is static.
7438 * sem_util.adb, sem_util.ads
7439 (Check_Later_Vs_Basic_Declarations): add a new function
7440 Is_Later_Declarative_Item to decice which declarations are allowed as
7441 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7442 mode, add that renamings are considered as later items.
7443 (Enclosing_Package): new function to return the enclosing package
7444 (Enter_Name): correct the rule for homonyms in SPARK
7445 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7446 from source (result of expansion) to avoid issuing wrong warnings.
7448 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7450 * errout.adb: On anything but an expression First_Node returns its
7453 2011-08-02 Pascal Obry <obry@adacore.com>
7455 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7457 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7459 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7460 Set the associated loop as the related expression of internally
7462 * exp_ch7.adb (Is_Container_Cursor): New routine.
7463 (Wrap_Transient_Declaration): Supress the finalization of the list
7464 controller when the declaration denotes a container cursor.
7466 2011-08-02 Yannick Moy <moy@adacore.com>
7468 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7470 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7471 expression is a simple expression. This check cannot be performed in
7472 the semantics, so just drop it.
7473 (P_Index_Or_Discriminant_Constraint): move check that the index or
7474 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7475 semantics. Other cases were previously checked in the semantics.
7476 * par-ch4.adb (P_Name): move checks that a selector name is not
7477 character literal or an operator symbol to Find_Selected_Component in
7479 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7480 declarations are not placed after later declarations in a separate
7481 procedure in Sem_Util (possibly not the best choice?), to be used both
7482 during parsing, for Ada 83 mode, and during semantic analysis, for
7484 * par-endh.adb (Check_End): move check that end label is not missing
7485 to Process_End_Label in the semantics
7486 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7487 the special case for SPARK restriction
7488 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7489 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7490 parameter Force to issue the error message even on internal node (used
7491 for generated end label). Call Check_Restriction to check when an error
7492 must be issued. In SPARK mode, issue an error message even if the
7493 restriction is not set.
7494 (Check_Restriction): new procedure with an additional out parameter to
7495 inform the caller that a message has been issued
7496 * sem_aggr.adb: Minor modification of message
7497 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7498 instead of issuing an error message directly
7499 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7500 declarations are not placed after later declarations, by calling
7501 Check_Later_Vs_Basic_Declarations
7502 (Analyze_Subtype_Declaration): move here the check that an index or
7503 discriminant constraint must be a subtype mark. Change the check that
7504 a subtype of String must start at one so that it works on subtype marks.
7505 * sem_ch4.adb (Analyze_Call): move here the check that a named
7506 association cannot follow a positional one in a call
7507 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7508 instead of issuing an error message directly
7509 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7510 selector name is not a character literal or an operator symbol. Move
7511 here the check that the prefix of an expanded name cannot be a
7512 subprogram or a loop statement.
7513 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7514 procedure called from parsing and semantics to check that basic
7515 declarations are not placed after later declarations
7516 (Process_End_Label): move here the check that end label is not missing
7518 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7520 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7521 representation clause in codepeer mode, since it confuses CodePeer and
7522 does not bring useful info.
7524 2011-08-02 Ed Falis <falis@adacore.com>
7526 * init.c: initialize fp hw on MILS.
7528 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7530 * errout.adb (First_Node): for bodies, return the node itself (small
7531 optimization). For other nodes, do not check source_unit if the node
7532 comes from Standard.
7534 2011-08-02 Robert Dewar <dewar@adacore.com>
7536 * exp_ch3.adb: Minor comment additions.
7537 * sem_ch13.adb: Minor reformatting.
7539 2011-08-02 Pascal Obry <obry@adacore.com>
7541 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7543 2011-08-02 Robert Dewar <dewar@adacore.com>
7545 * sem_attr.adb: Minor reformatting.
7547 2011-08-02 Robert Dewar <dewar@adacore.com>
7549 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7550 (Has_Default_Component_Value): Removed
7551 * einfo.ads Comment updates
7552 (Has_Default_Aspect): Replaces Has_Default_Value
7553 (Has_Default_Component_Value): Removed
7555 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7557 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7558 (Get_Simple_Init_Val): Handle Default_Value aspect
7559 (Needs_Simple_Initialization): Handle Default_Value aspect
7560 * exp_ch3.ads: Needs_Simple_Initialization
7561 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7562 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7564 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7565 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7566 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7568 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7570 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7571 package containing iteration primitives.
7572 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7574 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7576 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7577 "of", pre-analyze expression in case it is a function call with
7578 finalization actions that must be placed ahead of the loop.
7579 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7580 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7582 2011-08-02 Geert Bosch <bosch@adacore.com>
7584 * cstand.adb (Create_Float_Types): Only consider C's long double for
7585 Long_Long_Float, in addition to double.
7587 2011-08-02 Robert Dewar <dewar@adacore.com>
7589 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7590 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7591 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7594 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7596 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7599 2011-08-02 Javier Miranda <miranda@adacore.com>
7601 * einfo.ads, einfo.adb
7602 (Original_Access_Type): Move this attribute to Node26 since there was
7603 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7604 which causes conflicts and breaks the generation of the .NET compiler.
7605 (Interface_Name): Add missing documentation on JGNAT only uses of
7608 2011-08-02 Geert Bosch <bosch@adacore.com>
7610 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7611 (Find_Back_End_Float_Type): Likewise
7612 (Create_Back_End_Float_Types): Likewise
7613 (Create_Float_Types): Likewise
7614 (Register_Float_Type): Likewise
7615 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7616 Nlist and split out type selection in new local Find_Base_Type function.
7617 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7619 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7621 2011-08-02 Robert Dewar <dewar@adacore.com>
7623 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7625 * opt.ads: Minor comment change.
7626 * sem_ch12.adb: Minor code reorganization.
7628 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7630 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7631 subtype's list of rep items to the list on the full subtype in the case
7632 where the lists are the same.
7634 2011-08-02 Geert Bosch <bosch@adacore.com>
7636 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7637 using the one from System.Strings, which also deallocates all strings.
7639 2011-08-02 Geert Bosch <bosch@adacore.com>
7641 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7643 * gcc-interface/Make-lang.in: Update dependencies.
7645 2011-08-02 Olivier Hainque <hainque@adacore.com>
7647 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7650 2011-08-02 Javier Miranda <miranda@adacore.com>
7652 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7653 associated with anonymous access to subprograms.
7655 2011-08-02 Geert Bosch <bosch@adacore.com>
7658 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7659 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7660 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7661 (Add_Symbol_Definition): Move to switch-c.adb
7662 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7663 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7664 (Add_Symbol_Definition): Move to switch-c.adb.
7665 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7667 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7669 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7670 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7672 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7673 (Add_Symbol_Definition): Moved from Prepcomp.
7674 * switch-c.ads: Update copyright notice. Use String_List instead of
7675 Argument_List, removing dependency on System.OS_Lib.
7677 2011-08-02 Yannick Moy <moy@adacore.com>
7679 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7680 mode on initialization expression which does not respect SPARK
7682 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7683 if the tree referenced by its argument represents an initialization
7684 expression in SPARK, suitable for initializing an object in an object
7687 2011-08-02 Javier Miranda <miranda@adacore.com>
7689 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7690 internally generated access to subprogram with its associated protected
7692 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7694 2011-08-02 Geert Bosch <bosch@adacore.com>
7696 * cstand.adb (Register_Float_Type): Print information about type to
7697 register, if the Debug_Flag_Dot_B is set.
7698 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7699 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7700 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7701 with a requested precision of more than Max_Digits digits and no more
7702 than Max_Base_Digits digits, if a range specification is present and the
7703 Predefined_Float_Types list has a suitable type to derive from.
7704 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7705 case of type completion with pragma Import
7707 (Process_Import_Predefined_Type): Processing to complete a type
7708 with pragma Import. Currently supports floating point types only.
7709 (Set_Convention_From_Pragma): Do nothing without underlying type.
7710 (Process_Convention): Guard against absence of underlying type,
7711 which may happen when importing incomplete types.
7712 (Process_Import_Or_Interface): Handle case of importing predefined
7713 types. Tweak error message.
7715 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7717 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7718 functions to previous change. Reorganize code slightly.
7720 2011-08-02 Geert Bosch <bosch@adacore.com>
7722 * back_end.ads (Register_Type_Proc): New call back procedure type for
7723 allowing the back end to provide information about available types.
7724 (Register_Back_End_Types): New procedure to register back end types.
7725 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7727 * cstand.adb (Back_End_Float_Types): New list for floating point types
7728 supported by the back end.
7729 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7730 (Copy_Float_Type): New procedure to make new copies of predefined types.
7731 (Register_Float_Type): New call back procedure to populate the BEFT list
7732 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7733 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7734 (Create_Float_Types): New procedure to create entities for floating
7735 point types predefined in Standard, and put these and any remaining
7736 BEFTs on the Predefined_Float_Types list.
7737 * stand.ads (Predefined_Float_Types): New list for predefined floating
7738 point types that do not have declarations in package Standard.
7740 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7742 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7743 entity node for the unit containing the parameter.
7744 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7745 (Add_Inlined_Subprogram): Likewise.
7746 * gcc-interface/Make-lang.in: Update dependencies.
7748 2011-08-02 Thomas Quinot <quinot@adacore.com>
7750 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7753 2011-08-02 Geert Bosch <bosch@adacore.com>
7755 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7757 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7759 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7760 computed value of Base_Type.
7762 2011-08-02 Yannick Moy <moy@adacore.com>
7764 * restrict.adb (Check_Restriction): issue an error for any use of
7765 class-wide, even if the No_Dispatch restriction is not set.
7766 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7767 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7768 when completing a private extension, the type named in the private part
7769 is not the same as that named in the visible part.
7770 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7771 of an inherited primitive operations of a tagged type or type extension
7772 that returns the tagged type.
7773 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7774 function which returns True for an implicit operation inherited by the
7775 derived type declaration for the argument type.
7776 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7781 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7782 Process_Bounds, to perform analysis with expansion of a range or an
7783 expression that is the iteration scheme for a loop.
7784 (Analyze_Iterator_Specification): If domain of iteration is given by a
7785 function call with a controlled result, as is the case if call returns
7786 a predefined container, ensure that finalization actions are properly
7788 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7790 2011-08-02 Javier Miranda <miranda@adacore.com>
7792 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7793 * gcc-interface/Make-lang.in: Update dependencies.
7795 2011-08-02 Javier Miranda <miranda@adacore.com>
7797 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7798 determine if the analysis is performed using N or Original_Node (N).
7799 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7800 functionality of routine Is_Variable avoids code duplication.
7801 * checks.adb (Determine_Range): Handle temporaries generated by
7802 Remove_Side_Effects.
7804 2011-08-02 Javier Miranda <miranda@adacore.com>
7806 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7807 expansion of the condition. Required since the previous analysis was
7808 done with expansion disabled (see Resolve_Quantified_Expression) and
7809 hence checks were not inserted and record comparisons have not been
7812 2011-08-02 Ed Falis <falis@adacore.com>
7814 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7817 2011-08-02 Bob Duff <duff@adacore.com>
7819 * opt.ads: Minor comment fix.
7821 2011-08-02 Bob Duff <duff@adacore.com>
7823 * sem_ch12.adb (Analyze_Package_Instantiation,
7824 Analyze_Subprogram_Instantiation): Turn off style checking while
7825 analyzing an instance. Whatever style checks that apply to the generic
7826 unit should apply, so it makes no sense to apply them in an instance.
7827 This was causing trouble when compiling an instance of a runtime
7828 unit that violates the -gnatyO switch.
7829 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7830 one of the two case statements, causing spurious errors.
7832 2011-08-02 Robert Dewar <dewar@adacore.com>
7834 * uname.adb: Minor reformatting.
7835 * gnatcmd.adb: Minor reformatting.
7836 * exp_attr.adb: Minor reformatting.
7838 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7840 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7841 No_Dispatching_Calls, do not look for the Assign primitive, because
7842 predefined primitives are not created in this case.
7844 2011-08-02 Bob Duff <duff@adacore.com>
7846 * stylesw.ads: Minor comment fixes.
7848 2011-08-02 Robert Dewar <dewar@adacore.com>
7850 * freeze.adb (Add_To_Result): New procedure.
7852 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7854 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7855 time, if the specific run-time routines for handling streams of strings
7856 are not available, use the default mechanism.
7858 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7860 * s-regpat.ads: Fix typo.
7862 2011-08-02 Vincent Celier <celier@adacore.com>
7864 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7865 not null, call it to create the in memory config project file without
7866 parsing an existing default config project file.
7868 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7870 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7872 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7874 * sem_elim.adb: an abstract subprogram does not need an eliminate
7875 pragma for its descendant to be eliminable.
7877 2011-08-02 Ed Falis <falis@adacore.com>
7879 * init.c: revert to handling before previous checkin for VxWorks
7880 * s-intman-vxworks.adb: delete unnecessary declarations related to
7881 using Ada interrupt facilities for handling signals.
7882 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7883 * s-intman-vxworks.ads: Import __gnat_install_handler as
7884 Initialize_Interrupts.
7885 * s-taprop-vxworks.adb: Delete Signal_Mask.
7886 (Abort_Handler): change construction of mask to unblock exception
7889 2011-08-02 Jerome Guitton <guitton@adacore.com>
7891 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7892 Debug_Raise_Exception before propagation starts.
7894 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7896 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7897 to Restriction_Check_Required.
7898 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7899 * sem_res.adb (Resolve_Call): Likewise.
7900 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7902 2011-08-02 Bob Duff <duff@adacore.com>
7904 * stylesw.ads: Update comment.
7905 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7906 * errout.ads: Remove obsolete comment.
7908 2011-08-02 Javier Miranda <miranda@adacore.com>
7910 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7911 (Set_Is_Safe_To_Reevaluate): new procedure.
7912 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7913 assignment is allowed on safe-to-reevaluate variables.
7914 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7915 temporary created to remove side effects in expressions that use
7916 the secondary stack as safe-to-reevaluate.
7917 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7918 variables that are not true constants.
7920 2011-08-02 Robert Dewar <dewar@adacore.com>
7922 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7923 sem_res.adb, sem_ch6.adb: Minor reformatting.
7925 2011-08-02 Jerome Guitton <guitton@adacore.com>
7927 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7929 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7931 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7932 not set Overridden_Operation if subprogram is an initialization
7935 2011-08-02 Yannick Moy <moy@adacore.com>
7937 * par-ch6.adb: Correct obsolete name in comments
7938 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7939 which takes two message arguments (existing function takes one), with
7940 second message used for continuation.
7941 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7942 block statements that originate from a source block statement, not
7943 generated block statements
7944 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7945 symmetry with procedure case
7946 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7947 function to issue an error in formal mode if a package specification
7948 contains more than one tagged type or type extension.
7949 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7950 parameters matching formals of tagged types are objects (or ancestor
7951 type conversions of objects), not general expressions. Issue an error
7952 on view conversions that are not involving ancestor conversion of an
7954 (Resolve_Type_Conversion): in formal mode, issue an error on the
7955 operand of an ancestor type conversion which is not an object
7956 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7957 procedure so that it works also for actuals of function calls
7958 (Is_Actual_Tagged_Parameter): new function which determines if its
7959 argument is an actual parameter of a formal of tagged type in a
7961 (Is_SPARK_Object_Reference): new function which determines if the tree
7962 referenced by its argument represents an object in SPARK
7964 2011-08-02 Robert Dewar <dewar@adacore.com>
7966 * sem_ch3.adb: Minor reformatting
7967 Minor comment addition
7968 Minor error msg text change
7970 2011-08-02 Javier Miranda <miranda@adacore.com>
7972 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7973 function. Used to be more precise when we generate a variable plus one
7974 assignment to remove side effects in the evaluation of the Bound
7976 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7977 of the bound expression to force its re-analysis and thus expand the
7978 associated transient scope (if required). Code cleanup replacing the
7979 previous code that declared the constant entity by an invocation to
7980 routine Force_Evaluation which centralizes this work in the frontend.
7982 2011-08-02 Robert Dewar <dewar@adacore.com>
7984 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7985 (Base_Type): Now uses improved Is_Base_Type function
7986 * einfo.ads (Base_Type): Inline this function
7988 2011-08-02 Robert Dewar <dewar@adacore.com>
7990 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7991 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7993 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7995 * gcc-interface/Make-lang.in: Update dependencies.
7996 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7999 2011-08-02 Yannick Moy <moy@adacore.com>
8001 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8002 non-simple expression used in delta constraint
8003 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8004 index constraint which is not a subtype mark
8005 * par.adb: With and use Restrict
8006 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8007 mode on component type which is not a subtype mark and default
8008 expression on component
8009 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8010 of string which does not have a lower index bound equal to 1
8011 (Array_Type_Declaration): issue an error in formal mode on index or
8012 component type which is not a subtype mark, and on aliased keyword on
8014 (Derived_Type_Declaration): issue an error in formal mode on interface,
8015 limited or abstract type
8016 (Record_Type_Declaration): issue an error in formal mode on interface
8017 (Record_Type_Definition): issue an error in formal mode on tagged types
8018 and type extensions not declared in the specification of a library unit
8019 package; on null non-tagged record; on variant part
8021 2011-08-02 Vincent Celier <celier@adacore.com>
8023 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8024 not declared for qualified library project when Library_Name is not
8025 declared, but Library_Dir is.
8027 2011-08-02 Robert Dewar <dewar@adacore.com>
8029 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8030 pragmas (affects aspects [Component_]Default_Value
8031 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8032 component type for the resolution
8034 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8036 * einfo.adb (Base_Type): Tune implementation for speed.
8038 2011-08-02 Robert Dewar <dewar@adacore.com>
8040 * freeze.adb: Minor reformatting.
8042 2011-08-02 Thomas Quinot <quinot@adacore.com>
8044 * scos.ads: Update comments.
8046 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8048 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8049 base type, because the parent may be a subtype of a private type whose
8050 convention is established in a private part.
8052 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8054 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8055 statement in a block when the expansion of the return expression has
8056 created a finalization chain.
8057 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8058 with the parent node.
8059 Add N_Extended_Return_Statement to handle the case where a transient
8060 object declaration appears in the Return_Object_Declarations list of
8061 an extended return statement.
8063 2011-08-02 Matthew Gingell <gingell@adacore.com>
8065 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8066 unused parameter 'name'.
8068 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8070 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8071 inherited operation, check whether its alias, which is the source
8072 operastion that it renames, has been marked eliminated.
8074 2011-08-02 Javier Miranda <miranda@adacore.com>
8076 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8077 in-mode parameter whose type is an access type since it can be used to
8078 modify its designated object. Enforce code that handles as safe an
8079 access type that is not access-to-constant but it is the result of a
8080 previous removal of side-effects.
8081 (Remove_Side_Effects): Minor code reorganization of cases which require
8082 no action. Done to incorporate documentation on new cases uncovered
8083 working in this ticket: no action needed if this routine was invoked
8084 too early and the nodes are not yet decorated.
8085 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8086 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8087 were issued with actuals that are implicitly provided by
8090 2011-08-02 Robert Dewar <dewar@adacore.com>
8092 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8094 2011-08-02 Yannick Moy <moy@adacore.com>
8096 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8097 to issue an error in formal mode on attribute not supported in this mode
8098 (Analyze_Attribute): issue errors on standard attributes not supported
8100 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8101 comment, and issue error in formal mode on modulus which is not a power
8103 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8105 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8107 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8108 operator on modular type (except 'not').
8110 2011-08-02 Robert Dewar <dewar@adacore.com>
8112 * gnat_rm.texi: Minor reformatting.
8114 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8116 * s-osinte-linux.ads: Minor comment update and reformatting.
8117 * i-cexten.ads: Make this unit pure, as for its parent.
8118 Will allow its usage in more contexts if needed.
8120 2011-08-02 Robert Dewar <dewar@adacore.com>
8122 * s-utf_32.ads: Minor comment fix.
8124 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8126 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8127 operation of a tagged synchronized type, handle the case where the
8128 controlling argument is overloaded.
8130 2011-08-02 Yannick Moy <moy@adacore.com>
8132 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8133 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8134 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8135 SPARK mode and formal verification mode on processing SPARK restriction
8136 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8137 requiring consistency checking.
8139 2011-08-02 Robert Dewar <dewar@adacore.com>
8141 * sem_res.adb: Minor reformatting.
8143 2011-08-02 Robert Dewar <dewar@adacore.com>
8145 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8146 a-cforse.ads: Remove unneeded with of Ada.Containers
8147 Remove commented out pragma Inline's
8148 Move specifications of new subprograms to the actual specs
8150 2011-08-02 Yannick Moy <moy@adacore.com>
8152 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8153 a-cforse.ads: Update comments.
8155 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8157 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8159 2011-08-02 Robert Dewar <dewar@adacore.com>
8161 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8162 a-cforse.ads, a-cofove.ads: Minor reformatting.
8164 2011-08-02 Claire Dross <dross@adacore.com>
8166 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8167 a-cofove.ads: Add comments.
8169 2011-08-02 Yannick Moy <moy@adacore.com>
8171 * gnat_rm.texi: Document formal containers.
8173 2011-08-02 Emmanuel Briot <briot@adacore.com>
8175 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8178 2011-08-02 Robert Dewar <dewar@adacore.com>
8180 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8183 2011-08-02 Robert Dewar <dewar@adacore.com>
8185 * aspects.adb: New aspects Default_Value and Default_Component_Value
8186 New format of Aspect_Names table checks for omitted entries
8187 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8188 handling of boolean aspects for derived types.
8189 New aspects Default_Value and Default_Component_Value
8190 New format of Aspect_Names table checks for omitted entries
8191 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8192 (Has_Default_Value): New flag
8193 (Has_Default_Component_Value): New flag
8194 (Has_Default_Value): New flag
8195 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8197 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8198 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8199 Default_Value and Default_Component_Value
8200 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8201 New aspects Default_Value and Default_Component_Value
8202 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8203 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8205 2011-08-02 Vincent Celier <celier@adacore.com>
8207 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8208 inherit library kind.
8210 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8212 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8215 2011-08-02 Robert Dewar <dewar@adacore.com>
8217 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8219 2011-08-02 Yannick Moy <moy@adacore.com>
8221 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8223 2011-08-02 Robert Dewar <dewar@adacore.com>
8225 * impunit.adb: Add comment.
8227 2011-08-02 Yannick Moy <moy@adacore.com>
8229 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8230 qualification of aggregates in formal mode
8231 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8233 (Resolve_Aggregate): complete the test that an aggregate is adequately
8234 qualified in formal mode
8236 2011-08-02 Pascal Obry <obry@adacore.com>
8238 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8239 * mlib-prj.adb: Supress warning when compiling binder generated file.
8240 (Build_Library): Supress all warnings when compiling the binder
8243 2011-08-02 Yannick Moy <moy@adacore.com>
8245 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8247 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8248 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8249 Add with/use clauses to make Check_Formal_Restriction visible
8251 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8253 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8254 in-parameters when type of the generic formal is private in the generic
8255 spec and non-private in the body.
8257 2011-08-02 Claire Dross <dross@adacore.com>
8259 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8260 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8261 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8262 * impunit.adb, Makefile.rtl: Take new files into account.
8264 2011-08-02 Robert Dewar <dewar@adacore.com>
8266 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8267 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8269 2011-08-02 Yannick Moy <moy@adacore.com>
8271 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8273 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8274 matching static array bounds, taking into account the special case of
8276 * sem_ch3.adb: Typo in comment.
8278 2011-08-02 Yannick Moy <moy@adacore.com>
8280 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8281 which issues an error in formal mode if its argument node is originally
8283 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8284 has a discriminant specification so that it does not include the case
8286 (Derived_Type_Declaration): move here the test that a derived type has a
8287 discriminant specification
8288 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8289 first element of a component association before accessing its choices
8290 (presence of component association is not enough)
8291 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8292 declaration is a library item before accessing the next element in a
8293 list, as library items are not member of lists
8294 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8295 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8296 Check_Formal_Restriction whenever possible.
8298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8300 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8301 reference when needed.
8303 2011-08-02 Bob Duff <duff@adacore.com>
8305 * gnat_ugn.texi: Fix typo.
8307 2011-08-02 Vincent Celier <celier@adacore.com>
8309 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8310 archive file name. Do not use the full path name of archives for Open
8313 2011-08-02 Robert Dewar <dewar@adacore.com>
8315 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8316 Analyze_Aspect_Specifications
8318 (Analyze_Aspect_Specifications): New handling for boolean aspects
8319 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8320 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8321 sequence for Analyze_Aspect_Specifications
8322 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8323 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8325 2011-08-02 Robert Dewar <dewar@adacore.com>
8327 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8328 aspects, since these no longer exist.
8330 2011-08-02 Robert Dewar <dewar@adacore.com>
8332 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8333 semicolon, do not try to see if there are aspects following it.
8334 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8337 2011-08-02 Robert Dewar <dewar@adacore.com>
8339 * sem_ch8.adb, aspects.ads: Minor reformatting.
8341 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8343 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8344 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8346 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8348 2011-08-02 Yannick Moy <moy@adacore.com>
8350 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8351 mode on subprogram declaration outside of package specification, unless
8352 it is followed by a pragma Import
8353 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8354 Access_Type_Declaration): issue error in formal mode on access type
8355 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8357 (Analyze_Object_Declaration): issue error in formal mode on object
8358 declaration which does not respect SPARK restrictions
8359 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8360 declaration which does not respect SPARK restrictions
8361 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8362 error in formal mode on digits or delta constraint
8363 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8364 decimal fixed point type
8365 (Derived_Type_Declaration): issue error in formal mode on derived type
8366 other than type extensions of tagged record types
8367 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8368 with check on access definition
8369 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8370 mode on protected definition.
8371 (Analyze_Task_Definition): issue error in formal mode on task definition
8373 2011-08-02 Robert Dewar <dewar@adacore.com>
8375 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8377 2011-08-02 Javier Miranda <miranda@adacore.com>
8379 * sem_ch6.adb (Can_Override_Operator): New function.
8380 (Verify_Overriding_Indicator): Add missing code to check overriding
8381 indicator in operators. Fixes regression.
8382 (Check_Overriding_Indicator): Minor reformating after replacing the
8383 code that evaluates if the subprogram can override an operator by
8384 invocations to the above new function.
8386 (Write_Field26_Name): Add missing code to ensure that, following
8387 the documentation in einfo.ads, this field is not shown as attribute
8388 "Static_Initialization" on non-dispatching functions.
8390 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8392 * sem_res.adb (Resolve_Call): A call to
8393 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8394 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8395 i.e., when the second parameter is of type Time_Span.
8397 2011-08-02 Vincent Celier <celier@adacore.com>
8399 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8400 with an archive instead of -L<library dir> -l<library name>.
8402 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8404 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8405 mark the base types In_Use in addition to making the operations
8408 2011-08-02 Ed Falis <falis@adacore.com>
8410 * init.c: add and setup __gnat_signal_mask for the exception signals
8411 * s-inmaop-vxworks.adb: new file.
8412 * s-intman-vxworks.adb: remove unnecessary initializations and
8414 * s-intman-vxworks.ads: remove unnecessary variable
8415 * s-taprop-vxworks.adb: simplify signal initialization
8417 2011-08-02 Robert Dewar <dewar@adacore.com>
8419 * sem_ch8.adb: Minor code reorganization, comment updates.
8421 2011-08-02 Robert Dewar <dewar@adacore.com>
8423 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8424 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8426 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8427 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8429 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8431 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8432 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8433 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8434 use_type_clauses, to handle more efficiently use_type and use_all_type
8436 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8437 Ada2012 Use_All_Type clause.
8438 (Use_Class_Wide_Operations): new procedure.
8440 2011-08-02 Robert Dewar <dewar@adacore.com>
8442 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8443 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8444 expression to expression function.
8446 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8448 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8449 if types are compatible.
8451 2011-08-02 Yannick Moy <moy@adacore.com>
8453 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8454 returns True if its argument array types have same dimension and same
8455 static bounds at each index.
8456 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8457 OUT or IN OUT paramaters which are not view conversions in SPARK.
8458 (Resolve_Arithmetic_Op): issue an error in formal mode on
8459 multiplication or division with operands of fixed point types which are
8460 not qualified or explicitly converted.
8461 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8462 Boolean or array type (except String) operands.
8463 (Resolve_Equality_Op): issue an error in formal mode on equality
8464 operators for array types other than String with non-matching static
8466 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8467 for array types with non-matching static bounds. Factorize the code in
8468 Matching_Static_Array_Bounds.
8469 (Resolve_Qualified_Expression): issue an error in formal mode on
8470 qualified expressions for array types with non-matching static bounds.
8471 (Resolve_Type_Conversion): issue an error in formal mode on type
8472 conversion for array types with non-matching static bounds
8474 2011-08-02 Robert Dewar <dewar@adacore.com>
8476 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8480 * par-ch9.adb: save location of entry for proper error message.
8482 2011-08-02 Javier Miranda <miranda@adacore.com>
8484 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8485 (Use_Full_View) which permits this routine to climb through the
8486 ancestors using the full-view of private parents.
8487 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8488 Use_Full_View to true in calls to Is_Ancestor.
8489 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8490 true in call to Is_Ancestor.
8491 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8492 Use_Full_View to true in call to Is_Ancestor.
8493 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8494 call to Is_Ancestor.
8495 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8496 Use_Full_View to true in calls to Is_Ancestor.
8497 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8498 Make_Select_Specific_Data_Table, Register_Primitive,
8499 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8500 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8501 to true in call to Is_Ancestor.
8502 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8503 Use_Full_View to true in calls to Is_Ancestor.
8505 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8506 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8508 2011-08-02 Robert Dewar <dewar@adacore.com>
8510 * gnat_rm.texi: Minor reformatting.
8511 * sem_prag.adb: Minor reformatting.
8513 2011-08-02 Tristan Gingold <gingold@adacore.com>
8515 * vms_data.ads: Add VMS qualifier for -gnateP.
8517 2011-08-02 Robert Dewar <dewar@adacore.com>
8519 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8520 * par-ch7.adb (P_Package): Proper placement of aspects for package
8522 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8523 (End_Statements): Add Is_Sloc parameterr
8524 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8525 (Check_End): Ad Is_Sloc parameter
8526 (End_Statements): Add Is_Sloc parameterr
8528 2011-08-02 Vincent Celier <celier@adacore.com>
8530 * ug_words: Add VMS qualifier equivalent to -gnateP:
8531 /SYMBOL_PREPROCESSING.
8533 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8535 * gnat-style.texi: For hexadecimal numeric literals the typical
8536 grouping of digits is 4 to represent 2 bytes.
8537 A procedure spec which is split into several lines is indented two
8540 2011-08-02 Yannick Moy <moy@adacore.com>
8542 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8543 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8544 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8546 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8547 choice in array aggregate
8548 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8550 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8551 positional and named aggregate for record, or others in record
8552 aggregate, or multiple choice in record aggregate
8553 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8554 array operands to logical operations AND, OR and XOR do not have the
8555 same static lower and higher bounds
8556 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8558 2011-08-01 Robert Dewar <dewar@adacore.com>
8560 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8561 Replaces Last_Source_Node_In_Sequence.
8562 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8563 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8564 parens and blank in string (this was inconsistently implemented).
8566 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8567 blank in string (this was inconsistently implemented).
8569 (Set_Global_Switches): Set formal mode switches appropriately
8570 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8572 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8573 call Set_Error_Msg_Lang to set "spark" as language name.
8574 * par.adb: Remove unnecessary call to set formal language for errout
8575 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8576 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8578 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8579 calls to it, moved after resolution so that types are known
8580 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8581 result of concatenation is not of type String
8582 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8583 concatenation is not properly restricted
8584 * gnat_rm.texi: Add doc on pragma Spark_95.
8585 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8586 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8587 * gcc-interface/Make-lang.in: Update dependencies.
8589 2011-08-01 Javier Miranda <miranda@adacore.com>
8591 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8592 condition that detects if the overridden operation must replace an
8595 2011-08-01 Javier Miranda <miranda@adacore.com>
8597 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8598 code declarations inserted by Insert_Actions in each alternative of the
8599 N_Case_Expression node.
8601 2011-08-01 Robert Dewar <dewar@adacore.com>
8603 * sem_ch6.adb: Minor code reorganization.
8604 * sem_util.adb: Minor reformatting.
8606 2011-08-01 Pascal Obry <obry@adacore.com>
8608 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8609 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8611 2011-08-01 Yannick Moy <moy@adacore.com>
8613 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8614 literal or operator symbol which is prefixed
8615 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8616 mode on access attributes.
8617 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8618 that concatenation operands are properly restricted in formal mode
8619 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8620 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8621 result of the concatenation has a type different from String.
8622 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8623 Analyze_Quantified_Expression, Analyze_Slice,
8624 Analyze_Null): issue an error in formal mode on unsupported constructs
8626 (Analyze_Block_Statement): only issue error on source block statement
8627 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8628 function which returns the last node in a list of nodes for which
8629 Comes_From_Source returns True, if any
8630 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8631 Last_Source_Node_In_Sequence
8632 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8633 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8634 mode on unsupported constructs
8635 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8636 rest of the actions may be needed later on since the error is marked as
8638 * sinfo.ads: Typos in comments.
8640 2011-08-01 Pascal Obry <obry@adacore.com>
8642 * projects.texi: Minor editing.
8644 2011-08-01 Yannick Moy <moy@adacore.com>
8646 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8647 insertion character ~~
8648 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8649 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8650 with insertion character ~~
8651 (Set_Msg_Text): treat insertion character ~~
8652 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8653 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8654 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8655 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8656 errors related to the formal language restriction not serious
8657 (insertion character |).
8658 * par.adb (Par): set formal language for error messages if needed
8659 * sem_ch6.adb (Check_Missing_Return): take into account possible
8660 generated statements at the end of the function
8661 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8662 enumeration value to define a new pragma SPARK_95
8663 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8664 SPARK_Version): new type and variables to store the SPARK version
8666 (SPARK_Mode): return True when SPARK_Version is set
8667 * par-prag.adb: Correct indentation
8668 (Prag): take Pragma_SPARK_95 into account
8669 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8672 2011-08-01 Robert Dewar <dewar@adacore.com>
8674 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8675 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8676 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8678 2011-08-01 Pascal Obry <obry@adacore.com>
8680 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8681 Target_Name to Get_Path call.
8682 (Parse_Single_Project): Likewise.
8683 (Post_Parse_Context_Clause): Likewise.
8684 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8685 Call Initialise_Project_Path with the proper Target_Name.
8686 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8688 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8689 with the proper Target_Name.
8690 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8692 (Parse_Project_And_Apply_Config): Likewise.
8693 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8694 This is fine as this part of the code is supporting only native
8696 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8697 is fine as this part of the code is supporting only native compilation.
8699 2011-08-01 Yannick Moy <moy@adacore.com>
8701 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8702 of homonym, unless the homonym is one of the cases allowed in SPARK
8703 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8704 package declaration occurring after a body.
8706 2011-08-01 Robert Dewar <dewar@adacore.com>
8708 * checks.adb, exp_ch4.adb: Minor reformatting.
8710 2011-08-01 Javier Miranda <miranda@adacore.com>
8712 * einfo.ads (Access_Disp_Table): Fix documentation.
8713 (Dispatch_Table_Wrappers): Fix documentation.
8715 2011-08-01 Pascal Obry <obry@adacore.com>
8717 * prj-env.adb, prj-env.ads: Minor reformatting.
8719 2011-08-01 Yannick Moy <moy@adacore.com>
8721 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8722 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8723 procedures out of these packages.
8724 * errout.ads, errout.adb
8725 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8726 procedures in of this package
8727 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8728 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8729 on misplaced later vs initial declarations, like in Ada 83
8730 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8731 formal mode on attribute of private type whose full type declaration
8733 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8734 package declaration inside a package specification
8735 (Analyze_Full_Type_Declaration): issue error in formal mode on
8736 controlled type or discriminant type
8737 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8738 user-defined operator means that it should come from the source
8739 (New_Overloaded_Entity): issue error in formal mode on overloaded
8741 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8743 2011-08-01 Thomas Quinot <quinot@adacore.com>
8745 * atree.adb: Minor reformatting.
8746 * checks.adb: Minor reformatting.
8748 2011-08-01 Vincent Celier <celier@adacore.com>
8750 * s-parame-vms-ia64.ads: Fix typo in comment
8752 * s-parame-vms-restrict.ads: Removed, unused.
8754 2011-08-01 Javier Miranda <miranda@adacore.com>
8757 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8759 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8760 * sem_ch3.ads, sem_ch3.adb
8761 (Is_Constant_Bound): New extended version of the subprogram that was
8762 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8763 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8764 * sem_aux.ads (Constant_Value): Fix typo in comment.
8765 * checks.adb (Generate_Index_Checks): New implementation which, for
8766 array objects with constant bounds, generates the runtime check
8767 referencing the bounds of the array type. For other cases this routine
8768 provides its previous behavior obtaining such values from the array
8770 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8772 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8773 we cannot have semantic interpretations of the new node.
8775 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8777 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8780 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8782 * sem_ch8.adb: Minor code editing.
8783 * s-vxwext.adb: Remove trailing space.
8784 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8785 consistency with other files.
8787 2011-08-01 Thomas Quinot <quinot@adacore.com>
8789 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8791 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8793 * par-ch10.adb: reject parameterized expressions as compilation unit.
8794 * sem_ch4.adb: handle properly conditional expression with overloaded
8795 then_clause and no else_clause.
8797 2011-08-01 Tristan Gingold <gingold@adacore.com>
8799 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8800 like done by System.Aux_DEC.
8801 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8803 2011-08-01 Yannick Moy <moy@adacore.com>
8805 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8806 missing label at end of declaration (subprogram or package)
8807 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8808 of positional and named parameter association
8809 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8810 Error_Msg_SP which adds a prefix to the error message giving the name
8811 of the formal language analyzed
8812 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8813 access result type in subprogram, unconstrained array as result type,.
8814 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8816 * sem_ch8.adb: Code clean up.
8818 2011-08-01 Javier Miranda <miranda@adacore.com>
8820 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8821 * einfo.ads (Access_Disp_Table): Fix documentation.
8822 (Dispatch_Table_Wrappers): Fix documentation.
8823 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8824 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8825 to enforce the documentation of this attribute.
8826 (Set_Is_Interface): Cleanup the assertion.
8827 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8828 the Underlying_Type entity before reading attribute Access_Disp_Table.
8829 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8830 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8831 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8832 the Underlying_Type entity before reading attribute Access_Disp_Table.
8833 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8834 Locate the Underlying_Type entity before reading attribute
8837 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8839 * s-poosiz.ads: Additional overriding indicators.
8841 2011-08-01 Yannick Moy <moy@adacore.com>
8843 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8845 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8846 parameter specification does not include a subtype mark.
8847 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8848 formal mode on abstract subprogram.
8849 (Analyze_Subprogram_Specification): issue error in formal mode on
8850 user-defined operator.
8851 (Process_Formals): issue error in formal mode on access parameter and
8853 * sem_ch9.adb (Analyze_Abort_Statement,
8854 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8855 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8856 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8857 Analyze_Requeue, Analyze_Selective_Accept,
8858 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8859 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8860 issue error in formal mode on user-defined raise statement.
8862 2011-08-01 Thomas Quinot <quinot@adacore.com>
8864 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8865 declaration being hidden when overriding an implicit inherited
8867 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8868 (-gnats), do not complain about a source file that contains only a
8871 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8873 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8874 variable if already set.
8876 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8878 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8879 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8880 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8881 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8882 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8883 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8884 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8885 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8886 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8887 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8888 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8889 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8890 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8891 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8892 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8893 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8894 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8895 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8896 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8897 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8898 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8899 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8900 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8901 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8902 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8903 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8904 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8905 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8906 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8907 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8908 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8909 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8910 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8911 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8912 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8913 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8914 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8915 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8916 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8917 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8918 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8919 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8920 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8921 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8922 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8923 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8924 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8925 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8926 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8927 Use GNAT instead of GNARL.
8929 2011-08-01 Bob Duff <duff@adacore.com>
8931 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8932 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8933 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8936 2011-08-01 Yannick Moy <moy@adacore.com>
8938 * debug.adb (d.D) reverve flag for the SPARK mode
8939 (d.E) reverve flag for SPARK generation mode
8940 (d.F) reverve flag for Why generation mode
8941 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8942 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8943 functions which return True when the corresponding modes are set
8944 (Formal_Language): return "spark" or "alfa" when in formal verification
8946 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8947 Error_Msg to prefix the error message with a tag giving the formal
8949 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8950 message with a tag giving the formal language
8951 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8953 (Analyze_Case_Statement): issue error in formal mode on case statement
8954 with a single "others" case alternative
8955 (Analyze_Exit_Statement): issue errors in formal mode on exit
8956 statements which do not respect SPARK restrictions
8957 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8958 (Check_Unreachable_Code): always issue an error (not a warning) in
8959 formal mode on unreachable code (concerns both code after an infinite
8960 loop and after an unconditional jump, both not allowed in SPARK)
8961 * sem_ch6.adb (Analyze_Return_Statement): add call to
8962 Set_Return_Present for a procedure containing a return statement
8963 (already done for functions in Analyze_Function_Return)
8964 (Analyze_Function_Return): issue error in formal mode on extended
8965 return or if return is not last statement in function
8966 (Check_Missing_Return): issue error in formal mode if function does
8967 not end with return or if procedure contains a return
8968 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8969 function to detect if there is an inner scope of its parameter S which
8972 2011-08-01 Thomas Quinot <quinot@adacore.com>
8974 * sem_ch6.ads: Minor reformatting.
8976 2011-08-01 Javier Miranda <miranda@adacore.com>
8978 * sem_util.adb (Abstract_Interface_List): Complete condition when
8979 processing private type declarations to avoid reading unavailable
8981 (Is_Synchronized_Tagged_Type): Complete condition when processing
8982 private extension declaration nodes to avoid reading unavailable
8985 2011-08-01 Thomas Quinot <quinot@adacore.com>
8987 * sem_ch3.adb: Minor reformatting.
8989 2011-08-01 Thomas Quinot <quinot@adacore.com>
8991 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8992 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8993 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8994 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8995 for VMS, instead parametrize the common implementation with
8996 System.Parameters declarations.
8998 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9000 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9002 2011-08-01 Tristan Gingold <gingold@adacore.com>
9004 * seh_init.c: Fix SEH handler installation on win64.
9006 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9008 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9009 double analysis of an anonymous access to subprogram, because it can
9010 lead to improper sharing of profiles and a back-end crash.
9012 2011-08-01 Robert Dewar <dewar@adacore.com>
9014 * make.adb, sem_ch4.adb: Minor reformatting.
9015 * gcc-interface/Make-lang.in: Update dependencies.
9016 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9018 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9020 * gnat_rm.texi: Fix definition of Long_Integer.
9022 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9024 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9025 to prevent storage exhaustion.
9026 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9027 finalized is a function body, insert the cleanup code before the final
9028 return statement, to prevent spurious warnings.
9029 * s-pooglo.ads: add overriding indicator.
9031 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9033 * sem_ch4.adb (Operator_Check): improve error message when both a
9034 with_clause and a use_clause are needed to make operator usage legal.
9035 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9036 determine whether a compilation unit is visible within an other,
9037 either through a with_clause in the current unit, or a with_clause in
9038 its library unit or one one of its parents.
9040 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9042 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9043 over an arbitrary expression of an array or container type.
9044 * lib-xref.adb: clarify comment.
9046 2011-08-01 Bob Duff <duff@adacore.com>
9048 * einfo.ads: Minor reformatting.
9049 * debug.adb: Minor comment improvement.
9051 2011-08-01 Javier Miranda <miranda@adacore.com>
9053 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9054 consider hidden subprograms as valid candidates.
9056 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9058 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9060 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9062 * gnat_ugn.texi: Fix typo.
9064 2011-08-01 Robert Dewar <dewar@adacore.com>
9066 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9067 lib-xref.adb: Minor reformatting
9069 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9071 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9072 when to generate a call to Move_Final_List.
9073 (Has_Controlled_Parts): Remove this function.
9075 2011-08-01 Geert Bosch <bosch@adacore.com>
9077 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9080 2011-08-01 Thomas Quinot <quinot@adacore.com>
9082 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9083 explicit raise of a predefined exception as Comes_From_Source if the
9084 original N_Raise_Statement comes from source.
9086 2011-08-01 Robert Dewar <dewar@adacore.com>
9088 * sinfo.ads: Add comment.
9089 * sem_ch6.adb: Minor reformatting.
9091 2011-08-01 Robert Dewar <dewar@adacore.com>
9093 * freeze.adb (Freeze_Entity): Refine check for bad component size
9094 clause to avoid rejecting confirming clause when atomic/aliased present.
9096 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9098 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9099 better determine whether an entity reference is a write.
9100 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9102 * lib-xref.adb (Output_References): Do no suppress a read reference at
9103 the same location as an immediately preceeding modify-reference, to
9104 handle properly in-out actuals.
9106 2011-08-01 Tristan Gingold <gingold@adacore.com>
9108 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9110 2011-08-01 Quentin Ochem <ochem@adacore.com>
9112 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9113 heap to compute the result.
9115 2011-08-01 Robert Dewar <dewar@adacore.com>
9117 * atree.ads: Minor reformatting.
9119 2011-08-01 Emmanuel Briot <briot@adacore.com>
9121 * g-expect.adb (Get_Command_Output): Fix memory leak.
9123 2011-08-01 Geert Bosch <bosch@adacore.com>
9125 * cstand.adb (P_Float_Type): New procedure to print the definition of
9126 predefined fpt types.
9127 (P_Mixed_Name): New procedure to print a name using mixed case
9128 (Print_Standard): Use P_Float_Type for printing floating point types
9129 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9130 precision IEEE float.
9132 2011-08-01 Thomas Quinot <quinot@adacore.com>
9134 * sem_ch3.adb: Minor reformatting.
9136 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9138 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9139 the completion of a generic function, insert the new body rather than
9140 rewriting the original.
9142 2011-08-01 Yannick Moy <moy@adacore.com>
9144 * sinfo.ads, errout.ads: Typos in comments.
9146 2011-08-01 Robert Dewar <dewar@adacore.com>
9148 * par-endh.adb: Minor reformatting.
9150 2011-08-01 Robert Dewar <dewar@adacore.com>
9152 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9153 (Pre_Post_Aspects): New subtype.
9154 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9155 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9156 * par-ch7.adb (P_Package): Remove Decl parameter
9157 (P_Package): Handle new syntax for aspects (before IS)
9158 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9160 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9161 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9162 (P_Package): Remove Decl parameter
9163 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9165 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9167 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9168 * sinfo.ads: Document new syntax for aspects in packages etc.
9169 * sprint.adb: Handle new syntax of aspects before IS in package
9171 2011-08-01 Thomas Quinot <quinot@adacore.com>
9173 * atree.ads: Minor reformatting.
9174 * sem_prag.adb: Minor reformatting.
9176 2011-08-01 Robert Dewar <dewar@adacore.com>
9178 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9179 case expr alternative.
9181 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9183 * sem_ch12.adb: Fix typo.
9185 2011-08-01 Geert Bosch <bosch@adacore.com>
9187 * sem_prag.adb (Check_No_Link_Name): New procedure.
9188 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9189 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9190 instead of Standard_Long_Long_Float_Size global. Preparation for
9191 eventual removal of per type constants.
9192 * exp_util.ads (Get_Stream_Size): New function returning the stream
9193 size value of subtype E.
9194 * exp_util.adb (Get_Stream_Size): Implement new function.
9195 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9197 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9199 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9201 2011-08-01 Geert Bosch <bosch@adacore.com>
9203 * cstand.adb: Fix comments.
9204 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9207 2011-08-01 Robert Dewar <dewar@adacore.com>
9209 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9211 2011-08-01 Geert Bosch <bosch@adacore.com>
9213 * atree.ads: Fix comment.
9215 2011-08-01 Robert Dewar <dewar@adacore.com>
9217 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9218 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9219 * par.adb: Add with for Namet.Sp.
9220 * par-tchk.adb: Minor reformatting.
9222 2011-08-01 Vincent Celier <celier@adacore.com>
9224 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9225 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9226 of the init procedure of a SAL.
9227 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9230 2011-08-01 Thomas Quinot <quinot@adacore.com>
9232 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9235 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9237 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9239 2011-08-01 Thomas Quinot <quinot@adacore.com>
9241 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9242 conformant with its spec (return True only for types that have
9243 an overriding Initialize primitive operation that prevents them from
9244 having preelaborable initialization).
9245 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9246 initialization for controlled types in Ada 2005 or later mode.
9248 2011-08-01 Robert Dewar <dewar@adacore.com>
9250 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9252 (Same_Aspect): New function.
9253 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9254 Type_Invariant, Precondition, Postcondition.
9255 * snames.ads-tmpl: Add Name_Type_Invariant.
9257 2011-08-01 Robert Dewar <dewar@adacore.com>
9259 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9261 (Freeze_All_Ent): Fix error in handling inherited aspects.
9262 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9263 already analyzed, but don't skip entire processing of a declaration,
9264 that's wrong in some cases of declarations being rewritten.
9265 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9266 Don't delay for integer, string literals
9267 Treat predicates in usual manner for delay, remove special case code,
9269 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9270 (Build_Predicate_Function): Update saved expression in aspect
9271 (Build_Invariant_Procedure): Update saved expression in aspect
9272 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9273 of replacement of discriminant references if the reference is simple.
9275 2011-08-01 Robert Dewar <dewar@adacore.com>
9277 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9278 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9279 Static_Predicate and Dynamic_Predicate.
9280 (Build_Predicate_Function): Add processing for Static_Predicate
9281 and Dynamic_Predicate.
9282 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9283 (From_Static_Predicate): New flag
9284 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9286 2011-08-01 Robert Dewar <dewar@adacore.com>
9288 * usage.adb: Documentation cleanup for Ada version modes in usage.
9289 * expander.adb: Minor reformatting.
9291 2011-08-01 Robert Dewar <dewar@adacore.com>
9293 * atree.ads: Minor comment fix.
9294 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9295 a-witeio.ads, sem_prag.adb: Minor reformatting.
9297 2011-08-01 Doug Rupp <rupp@adacore.com>
9299 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9300 pointers. Use descrip.h header file for convenience. Add some
9303 2011-08-01 Robert Dewar <dewar@adacore.com>
9305 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9306 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9307 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9309 (Check_Aspect_At_End_Of_Declarations): New procedure
9310 (Analye_Aspect_Specification): Minor changes for above procedures
9311 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9312 specification node as well.
9314 2011-08-01 Pascal Obry <obry@adacore.com>
9316 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9317 Windows files. Use GetFilesAttributes() in this case to check for file
9318 existence instead of returning with an error code.
9320 2011-08-01 Vincent Celier <celier@adacore.com>
9322 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9323 High is above Source length.
9325 2011-08-01 Robert Dewar <dewar@adacore.com>
9327 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9329 2011-08-01 Robert Dewar <dewar@adacore.com>
9331 * aspects.ads (Boolean_Aspects): New subtype.
9332 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9333 for derived types in cases where the parent type and derived type have
9335 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9336 with aspects when parent type also has aspects.
9337 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9338 boolean expression at this point).
9339 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9340 accordance with final decision on the Ada 2012 feature.
9341 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9343 2011-08-01 Matthew Heaney <heaney@adacore.com>
9345 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9347 2011-08-01 Pascal Obry <obry@adacore.com>
9349 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9350 Fix Replace_Slice when High is above current string size.
9351 (Replace_Slice): Fix DL computation when High is above current
9354 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9356 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9358 2011-08-01 Matthew Heaney <heaney@adacore.com>
9360 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9363 2011-08-01 Pascal Obry <obry@adacore.com>
9365 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9368 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9370 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9371 access to protected subprograms in generic bodies.
9372 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9373 protected type, indicate that the convention of the subprogram is
9374 Convention_Protected, because it may be used in subsequent declarations
9375 within the protected declaration.
9377 2011-08-01 Vincent Celier <celier@adacore.com>
9379 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9380 and "final" procedures when the name of the library is "ada", to avoid
9381 duplicate symbols "adainit" and "adafinal" in executables.
9383 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9385 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9386 quantified expression that appears within a postcondition and uses the
9387 Ada2012 'Result attribute.
9389 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9391 * init.c (__gnat_error_handler): Cast reason to int.
9392 (__gnat_install_handler): Explain sa_sigaction use.
9394 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9396 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9397 subprogram has copy-in copy-out parameters, try to promote the mode of
9398 the return type if it is passed in registers.
9400 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9402 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9403 left operand as addressable.
9405 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9407 * gcc-interface/gigi.h (build_function_stub): Remove.
9408 (build_return_expr): Likewise.
9409 (convert_vms_descriptor): Declare.
9410 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9411 (build_function_stub): Move to...
9412 * gcc-interface/utils2.c (build_return_expr): Move to...
9413 * gcc-interface/trans.c (build_function_stub): ...here.
9414 (build_return_expr): ...here.
9415 (Subprogram_Body_to_gnu): Add local variable for language_function.
9416 Disconnect the parameter attributes cache, if any, once done with it.
9417 Call end_subprog_body only after setting the end_locus.
9418 Build the stub associated with the function, if any, at the very end.
9419 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9420 variables and streamline control flow.
9422 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9425 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9428 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9431 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9432 Assign to act.sa_sigaction.
9433 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9434 current->return_address to char * before arithmetic.
9436 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9438 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9439 Correct argument types.
9440 Extract code from reason.
9441 (__gnat_install_handler): Assign to act.sa_sigaction.
9443 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9445 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9446 (GNAT1_OBJS): ...here.
9448 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9451 * g-socthi-mingw.adb (Fill): Fix formatting.
9453 * gcc-interface/gigi.h: Move around comment.
9455 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9458 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9460 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9463 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9465 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9467 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9468 range comparison if Pmode is SImode.
9470 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9471 Eric Botcazou <ebotcazou@adacore.com>
9473 * adadecode.c: Wrap up in extern "C" block.
9474 * adadecode.h: Likewise.
9475 * adaint.c: Likewise. Remove 'const' keyword.
9476 * adaint.h: Likewise.
9478 * atree.h: Likewise.
9480 * cstreams.c: Likewise.
9484 * final.c: Likewise.
9486 * initialize.c: Likewise.
9488 * namet.h: Likewise.
9489 * nlists.h: Likewise.
9490 * raise.c: Likewise.
9491 * raise.h: Likewise.
9492 * repinfo.h: Likewise.
9493 * seh_init.c: Likewise.
9494 * targext.c: Likewise.
9495 * tracebak.c: Likewise.
9496 * uintp.h: Likewise.
9497 * urealp.h: Likewise.
9498 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9499 * xsinfo.adb: Likewise.
9500 * xsnamest.adb: Likewise.
9501 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9502 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9503 * gcc-interface/misc.c: Likewise.
9504 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9505 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9506 ada/targext.o here...
9507 (GNAT_ADA_OBJS): ...and not here.
9508 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9509 (GNATBIND_OBJS): Reorder.
9511 2011-07-07 Richard Henderson <rth@redhat.com>
9513 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9514 dwarf2out_frame_init.
9516 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9518 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9520 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9523 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9525 2011-07-06 Richard Guenther <rguenther@suse.de>
9527 * gcc-interface/misc.c (gnat_init): Merge calls to
9528 build_common_tree_nodes and build_common_tree_nodes_2.
9529 Re-initialize boolean_false_node.
9531 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9532 Olivier Hainque <hainque@adacore.com>
9533 Nicolas Setton <setton@adacore.com>
9535 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9536 the type according to the ARTIFICIAL_P parameter.
9537 (create_type_decl): Likewise.
9538 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9540 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9542 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9543 (gnatbind): Likewise.
9545 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9547 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9549 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9551 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9552 local variable throughout. Remove useless call to Base_Type.
9553 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9554 Take it also into account for the volatileness of the field. Set the
9555 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9557 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9559 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9560 on a dereference built for a by-ref object if it has an address clause.
9562 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9564 * einfo.ads (Address_Taken): Document use for the second argument of
9565 Asm_Input and Asm_Output attributes.
9566 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9567 argument is an entity name, then set Address_Taken on it.
9568 <Attribute_Asm_Output>: Likewise.
9569 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9570 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9571 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9572 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9574 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9577 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9579 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9581 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9582 (ada/utils.o): Update dependencies.
9583 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9584 ../../../libcpp/libcpp.a.
9585 * gcc-interface/utils.c: Include common/common-target.h.
9586 (process_attributes): Use targetm_common.have_named_sections.
9588 2011-06-07 Richard Guenther <rguenther@suse.de>
9590 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9593 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9595 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9596 TREE_THIS_NOTRAP flag.
9598 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9600 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9603 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9605 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9606 constants whose full view has discriminants specially.
9608 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9610 * gcc-interface/utils.c: Include diagnostic.h.
9611 (gnat_write_global_declarations): Output debug information for all
9612 global type declarations before finalizing the compilation unit.
9613 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9615 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9617 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9619 2011-05-25 Kai Tietz <ktietz@redhat.com>
9621 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9622 initialization instead of const/none-const pointer assignment.
9624 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9626 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9627 $(EXTRA_GNAT1_OBJS).
9628 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9629 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9630 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9631 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9632 libcommon-target.a instead of prefix.o.
9634 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9637 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9639 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9641 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9642 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9643 instead of version.o.
9645 2011-05-18 Kai Tietz <ktietz@redhat.com>
9647 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9648 boolean_false_node instead of integer_zero_node.
9649 (convert_with_check): Likewise.
9650 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9652 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9654 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9655 type of the parameter is an unconstrained array, convert the actual to
9656 the type of the formal in the In Out and Out cases as well.
9658 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9660 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9661 call build_function_type_array or build_varargs_function_type_array
9663 (create_subprog_type): Don't call build_function_type; call
9664 build_function_type_vec instead.
9666 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9668 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9669 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9670 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9672 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9674 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9676 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9677 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9679 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9681 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9683 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9685 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9686 instead of accessing TYPE_ARG_TYPES directly.
9687 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9689 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9692 * gcc-interface/gigi.h (get_variant_part): Declare.
9693 * gcc-interface/decl.c (get_variant_part): Make global.
9694 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9695 types have the same constant size, are record types and T1 has a
9696 variant part while T2 doesn't.
9698 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9700 * gcc-interface/utils.c (begin_subprog_body): Do not call
9702 (end_subprog_body): Likewise.
9704 2011-05-04 Richard Guenther <rguenther@suse.de>
9706 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9708 (pos_to_constructor): Likewise.
9710 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9711 Eric Botcazou <ebotcazou@adacore.com>
9713 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9714 of build_function_type. Adjust calls to...
9715 (build_raise_check): ...this. Do not take a void_tree parameter.
9716 Call build_function_type_list instead of build_function_type.
9717 Fix head comment and swap couple of conditional blocks.
9719 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9721 * gnatvsn.ads (Library_Version): Bump to 4.7.
9722 (Current_Year): Bump to 2011.
9724 2011-04-29 Michael Matz <matz@suse.de>
9726 * gcc-interface/misc.c (gnat_handle_option): Set
9727 warn_maybe_uninitialized.
9729 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9731 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9732 the Watson/McCabe paper.
9734 2011-04-23 Jim Meyering <meyering@redhat.com>
9736 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9738 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9740 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9743 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9745 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9747 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9748 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9749 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9750 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9751 <all>: Do not set flags on the reused DECL node coming from an alias.
9752 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9753 don't need debug info here...
9754 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9755 (gigi): Adjust calls to create_subprog_decl.
9756 (build_raise_check): Likewise.
9757 (establish_gnat_vms_condition_handler): Likewise.
9758 (Compilation_Unit_to_gnu): Likewise.
9759 (gnat_to_gnu): Likewise.
9761 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9763 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9764 (NO_REORDER_ADAFLAGS): New variable.
9765 (EXTRA_GNATTOOLS): Always define.
9766 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9767 Clean up and adjust list of files compiled with special options.
9768 * gcc-interface/Make-lang.in: Likewise.
9769 (ada/decl.o): Cosmetical change.
9770 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9772 2011-04-20 Jim Meyering <meyering@redhat.com>
9774 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9776 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9778 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9779 $(CFLAGS) on the link line.
9781 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9783 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9784 padded type built for the return type if it is unconstrained.
9786 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9788 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9790 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9792 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9793 before calling TREE_CHAIN.
9794 * gcc-interface/misc.c (gnat_init_ts): New function.
9795 (LANG_HOOKS_INIT_TS): Define.
9797 2011-04-12 Martin Jambor <mjambor@suse.cz>
9799 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9800 instead of cgraph_node.
9802 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9804 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9805 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9808 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9810 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9811 of aggregate types that contain a placeholder.
9813 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9815 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9817 (handle_type_generic_attribute): Likewise.
9819 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9822 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9824 2011-04-04 Kai Tietz <ktietz@redhat.com>
9827 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9830 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9832 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9833 type case, do not strip a padding type around the array type.
9835 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9837 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9840 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9842 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9843 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9844 code for -feliminate-unused-debug-types.
9845 (gnat_post_options): Likewise.
9847 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9849 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9850 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9853 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9855 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9856 DECL_ARTIFICIAL flag on enumeration types.
9858 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9860 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9861 fat pointer types artificial unconditionally.
9862 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9865 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9867 * gcc-interface/gigi.h (get_dummy_type): Declare.
9868 (build_dummy_unc_pointer_types): Likewise.
9869 (finish_fat_pointer_type): Likewise.
9870 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9871 fat pointer type has been built, complete it in place.
9872 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9873 and thin pointers. Remove useless variable.
9874 (finish_fat_pointer_type): Make global and move to...
9875 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9876 (get_dummy_type): New function.
9877 (build_dummy_unc_pointer_types): Likewise.
9878 (gnat_pushdecl): Propage the name to the anonymous variants only.
9879 (update_pointer_to): Only adjust the pointer types in the unconstrained
9882 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9884 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9885 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9886 if this is a Taft amendment type and the full declaration is available.
9887 * gcc-interface/trans.c (process_type): Likewise.
9888 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9889 (process_freeze_entity): Likewise.
9890 * gcc-interface/utils.c (dummy_global): New static variable.
9891 (gnat_write_global_declarations): If there are types declared as used
9892 at the global level, insert them in the global hash table.
9894 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9896 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9897 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9898 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9900 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9901 flag of the type accordingly.
9902 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9904 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9906 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9907 finalizing types when updating the pointers to the designated type.
9908 <all>: Finalize the deferred types even if we didn't defer processing
9909 of incomplete types in this invocation.
9911 2011-04-01 Olivier Hainque <hainque@adacore.com>
9912 Nicolas Setton <setton@adacore.com>
9913 Eric Botcazou <ebotcazou@adacore.com>
9915 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9916 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9918 2011-03-28 Kai Tietz <ktietz@redhat.com>
9920 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9922 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9923 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9925 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9927 2011-03-28 Tristan Gingold <gingold@adacore.com>
9930 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9931 Use ada output of gnatbind.
9932 (ada/b_gnatb.adb): Ditto.
9933 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9934 (ada.mostlyclean, ada.stage1)
9935 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9936 (ada.stagefeedback): Adjust.
9937 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9938 Use ada output of gnatbind.
9939 (b_gnatm.adb): Ditto.
9940 (b_gnatl.o, b_gnatm.o): New rules.
9942 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9944 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9945 for the padded type built to support a specified size or alignment.
9947 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9949 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9950 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9951 unconditionally to the end of the unit when the designated type is
9953 <all>: Rename local variable. Attempt to un-defer types only and do it
9954 for limited_with'ed types as well.
9955 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9956 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9957 consistently and remove redundant call to finalize_from_with_types.
9959 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9961 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9962 subprograms without a previous spec declared in the same unit.
9963 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9964 subprograms at the end of the unit instead of at the beginning.
9965 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9966 isn't public for the special handling of non-inline functions nested
9967 inside inline external functions.
9969 2011-03-25 Jeff Law <law@redhat.com>
9971 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9973 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9975 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9976 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9977 to compute Set_Size_Depends_On_Discriminant.
9978 (Layout_Type): Call it on array types in back-end layout mode.
9979 * sem_util.adb (Requires_Transient_Scope): Return true for array
9980 types only if the size depends on the value of discriminants.
9981 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9982 type if the RHS is a call to a function that returns an unconstrained
9983 type with default discriminant.
9985 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9987 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9988 non-conversion to the nominal result type at the end.
9990 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9992 * gcc-interface/trans.c (create_temporary): New function taken from...
9993 (create_init_temporary): ...here. Call it.
9994 (call_to_gnu): Create the temporary for the return value early, if any.
9995 Create it for a function with copy-in/copy-out parameters if there is
9996 no target; in other cases of copy-in/copy-out, use another temporary.
9997 Push the new binding level lazily. Add and rename local variables.
9999 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10001 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10003 (set_rm_size): Likewise.
10005 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10007 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10008 for the padded type built in order to support a specified alignment.
10009 Fix incorrect formatting.
10011 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10014 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10016 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10018 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10019 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10020 to the end of the list. Adjust recursive call. Rename local variable.
10021 If REORDER is true, reorder components of the record type.
10022 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10023 components_to_record and adjust the parameter list.
10025 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10027 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10028 disabled, use the variable for bounds of loop iteration scheme.
10030 2011-03-21 Kai Tietz <ktietz@redhat.com>
10033 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10035 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10037 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10038 out whether the expression is read-only. Short-circuit placeholder
10039 case and rename a couple of local variables.
10041 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10043 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10044 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10045 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10046 (convert): Deal with conversions from a smaller form type specially.
10048 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10050 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10051 its argument, except for the special -I- switch.
10053 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10055 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10058 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10060 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10062 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10064 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10066 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10067 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10068 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10069 Do not generate the check directly, instead instantiate the template
10070 check present in the descriptor.
10071 (make_descriptor_field): Move around.
10072 (build_vms_descriptor32): Build a template check in the POINTER field.
10073 (build_vms_descriptor): Remove useless suffixes.
10074 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10076 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10079 * targext.c: Include target files if IN_RTS is defined.
10081 2011-01-26 Richard Guenther <rguenther@suse.de>
10084 * targext.c: Include config.h.
10085 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10088 2011-01-04 Pascal Obry <obry@adacore.com>
10089 Eric Botcazou <ebotcazou@adacore.com>
10091 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10093 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10095 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10096 end-of-case on the end label and its associated gotos, if any.
10098 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10100 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10101 expressions of the parameter cache within the statement group of
10102 the CICO mechanism.
10104 2011-01-04 Olivier Hainque <hainque@adacore.com>
10105 Eric Botcazou <ebotcazou@adacore.com>
10107 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10108 (set_end_locus_from_node): New function.
10109 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10110 make and the function end_locus.
10111 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10112 for the elaboration subprogram.
10113 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10114 set the end_locus of the expression as well.
10116 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10119 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10120 variables that are referenced in exception handlers volatile.
10124 Copyright (C) 2011 Free Software Foundation, Inc.
10126 Copying and distribution of this file, with or without modification,
10127 are permitted in any medium without royalty provided the copyright
10128 notice and this notice are preserved.