1 2011-08-05 Bob Duff <duff@adacore.com>
3 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
7 2011-08-05 Ed Schonberg <schonberg@adacore.com>
9 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
10 general indexing aspects of Ada2012. Called when analyzing indexed
11 components when other interpretations fail.
12 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
13 in an expression context where overloading is meaningful. This excludes
14 the occurrence in an aspect specification (efficiency only).
15 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
16 related to iterators can be set by an attribute specification, but
18 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
19 Constant_Indexing and Variable_Indexing.
20 (Check_Indexing_Functions): New procedure to perform legality checks.
21 Additional semantic checks at end of declarations.
23 2011-08-05 Sergey Rybin <rybin@adacore.com>
25 * tree_io.ads: Update ASIS_Version_Number because of the change of the
26 order of calling Tree_Write/Tree_Read routines made for aspects.
28 2011-08-05 Bob Duff <duff@adacore.com>
30 * a-fihema.adb (Finalize): Fix race condition.
32 2011-08-05 Yannick Moy <moy@adacore.com>
34 * sem_ch12.adb (Analyze_Package_Instantiation,
35 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
38 2011-08-05 Ed Schonberg <schonberg@adacore.com>
40 * sem_type.adb (Specific_Type): in an instance, the type-specific
41 operand of an equality check that involves null may have a private
42 type. Use full view to determine legality of construct.
44 2011-08-05 Vincent Celier <celier@adacore.com>
46 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
47 delete or close the file when the call to gnatmake was successful.
49 2011-08-05 Yannick Moy <moy@adacore.com>
51 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
54 2011-08-05 Ed Schonberg <schonberg@adacore.com>
56 * sinfo.ads: comments on use of entity field for aspect specifications.
58 2011-08-05 Ed Schonberg <schonberg@adacore.com>
60 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
61 node is not itself an entity but a selected component, it is a
62 rewritten parameterless call to an en enclosing synchronized operation,
63 and this expansion will be performed again in the instance, so there is
64 no global information to preserve.
66 2011-08-05 Javier Miranda <miranda@adacore.com>
68 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
69 for renamings of predefined primitives.
70 (In_Predef_Prims_DT): New subprogram.
72 2011-08-05 Ed Schonberg <schonberg@adacore.com>
74 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
75 possible interpretation of name is a reference type, add an
76 interpretation that is the designated type of the reference
77 discriminant of that type.
78 * sem_res.adb (resolve): If the interpretation imposed by context is an
79 implicit dereference, rewrite the node as the deference of the
80 reference discriminant.
81 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
82 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
83 parent type or base type.
84 * sem_ch4.adb (Process_Indexed_Component,
85 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
86 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
87 Check for implicit dereference.
88 (List_Operand_Interps): Indicate when an implicit dereference is
90 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
92 2011-08-05 Thomas Quinot <quinot@adacore.com>
94 * scos.ads: Update documentation of SCO table. Pragma statements can now
95 be marked as disabled (using 'p' instead of 'P' as the statement kind).
96 * par_sco.ads, par_sco.adb: Implement the above change.
97 (Process_Decisions_Defer): Generate a P decision for the first parameter
98 of a dyadic pragma Debug.
99 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
101 * put_scos.adb: Code simplification based on above change.
103 2011-08-05 Robert Dewar <dewar@adacore.com>
105 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
106 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
107 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
108 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
110 2011-08-05 Bob Duff <duff@adacore.com>
112 * a-stunau.ads, g-spipat.adb: Update comments.
114 2011-08-05 Bob Duff <duff@adacore.com>
116 * a-fihema.ads: Minor comment fix.
117 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
119 (Attach, Detach): Remove some unnecessary code.
120 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
122 2011-08-05 Bob Duff <duff@adacore.com>
124 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
125 allocation for Objects component. This simplifies the code somewhat. It
126 is also a little more efficient in the not-so-unusual case where there
127 are no controlled objects allocated.
128 Make Finalization_Started flag atomic.
129 (Finalize): Avoid unnecessary detachment of items from the list.
130 (pcol): Minor cleanup.
132 2011-08-05 Ed Schonberg <schonberg@adacore.com>
134 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
135 package whose name is the same as that of the generic unit, or its
138 2011-08-05 Bob Duff <duff@adacore.com>
140 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
141 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
144 2011-08-05 Arnaud Charlet <charlet@adacore.com>
146 * make.adb (Linking_Phase): No longer need to set source search path
147 before calling gnatlink in CodePeer mode.
148 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
149 gcc in CodePeer mode, since the binder generated file no longer has a
151 * switch.ads, switch.adb (Is_Language_Switch): Removed.
152 * switch-c.adb: Update comment.
154 2011-08-05 Thomas Quinot <quinot@adacore.com>
156 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
158 2011-08-05 Nicolas Roche <roche@adacore.com>
160 * gnat_ugn.texi: Fix minor syntax error issue.
162 2011-08-05 Vincent Celier <celier@adacore.com>
164 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
165 delete or close the file when the call to gnatmake returns a non
166 successful return code.
168 2011-08-05 Ed Schonberg <schonberg@adacore.com>
170 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
171 check, indicate that the copy of the original node does not come from
172 source, to prevent an infinite recursion of the expansion.
174 2011-08-05 Johannes Kanig <kanig@adacore.com>
176 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
177 VC generation for subprogram bodies.
179 2011-08-05 Yannick Moy <moy@adacore.com>
182 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
183 the base type with the smallest allowed base type.
185 2011-08-05 Sergey Rybin <rybin@adacore.com>
187 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
190 2011-08-05 Ed Schonberg <schonberg@adacore.com>
192 * sem_ch12.ads: minor comment updates.
194 2011-08-05 Ed Schonberg <schonberg@adacore.com>
196 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
197 instantiation and a formal package the compiler generates a package
198 renaming declaration so that the generic name within the declaration
199 is interpreted as a renaming of the instance. At the end of a formal
200 package declaration, this renaming must become invisible.
202 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
204 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
205 comparison and rely on concrete entities instead.
207 2011-08-05 Ed Schonberg <schonberg@adacore.com>
209 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
210 and discriminants, to indicate that the type has an access discriminant
211 that supports implicit dereference.
212 * snames.ads-tmpl: Add names of aspects and attributes related to
213 Ada2012 iterators: constant_indexing, default_iterator,
214 iterator_element, implicit_dereference, variable_indexing.
215 * aspects.ads, aspects.adb: entries for iterator-related aspects.
216 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
217 iterator-related aspects.
218 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
220 2011-08-05 Sergey Rybin <rybin@adacore.com>
222 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
223 metrics in gnatmetric to cover new kinds of coupling mentrics.
225 2011-08-05 Steve Baird <baird@adacore.com>
227 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
228 of calling the user-defined main subprogram.
229 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
230 is set) Call_Main_Subprogram ahead of, as opposed to
232 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
233 generation of a "with" of the user-defined main subprogram.
234 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
235 (which is now called from Gen_Main instead).
237 2011-08-05 Emmanuel Briot <briot@adacore.com>
239 * projects.texi: Added reference to the Makefile package.
241 2011-08-05 Thomas Quinot <quinot@adacore.com>
243 * exp_ch7.adb: Minor comment rewording.
245 2011-08-05 Ed Falis <falis@adacore.com>
247 * env.c: Fix comment.
249 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
251 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
252 character comparison and rely on concrete entities instead.
254 2011-08-05 Ed Schonberg <schonberg@adacore.com>
256 * sem_ch3.adb: (Check_Private_Overriding): better error message,
257 suggested by AI95-0068.
259 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
261 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
262 the two potential initialization calls. This accounts for any
263 access-before-elaboration checks which may precede the initialization
265 (Next_Suitable_Statement): New routine. Returns the next real statement
266 after the input node while skipping generated checks.
267 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
268 with comment on usage.
269 Do not generate Elaborate_All when the trigger is a finalization call
270 coming from a type init proc.
271 (Check_Elab_Call): Propagate the initialization procedure context to
272 subsequent calls to Check_A_Call.
273 (Check_Internal_Call_Continue): Propagate the initialization procedure
274 context to subsequent calls to Check_Elab_Call.
275 (Is_Finalization_Procedure): New routine. Returns True if the input
276 entity denotes a [Deep_]Finalize routine.
277 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
278 along with comment on usage.
280 2011-08-05 Vadim Godunko <godunko@adacore.com>
282 * s-atocou.ads: Add list of supported platforms.
284 2011-08-05 Yannick Moy <moy@adacore.com>
286 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
288 * opt.ads (Disable_ALI_File): new Boolean flag
289 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
291 2011-08-05 Ed Falis <falis@adacore.com>
293 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
294 environ is properly defined.
296 2011-08-05 Vincent Celier <celier@adacore.com>
298 * make.adb (Compilation_Phase): Exit immediately when all objects have
299 been found up to date, to avoid multiple exit messages.
300 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
301 same project for languages with no compiler.
302 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
304 2011-08-05 Robert Dewar <dewar@adacore.com>
306 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
307 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
308 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
309 s-atocou-builtin.adb: Minor reformatting.
311 2011-08-05 Yannick Moy <moy@adacore.com>
313 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
314 if the node to wrap is a pragma check, this node and enclosed
315 expression are not expanded, so do not apply any transformations here.
316 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
317 introducing transient scopes.
319 2011-08-05 Jose Ruiz <ruiz@adacore.com>
321 * adaint.c (__gnat_set_writable, __gnat_set_readable,
322 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
323 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
324 routine is available, so we use the default implementation of these
326 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
327 support for copying attributes on VxWorks 6.
329 2011-08-05 Yannick Moy <moy@adacore.com>
331 * debug.adb: Remove use of -gnatd.D.
332 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
333 * opt.ads: Simplify variables for ALFA mode, to keep one only
334 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
337 2011-08-05 Vincent Celier <celier@adacore.com>
339 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
340 Builder'Default_Switches.
342 2011-08-05 Vincent Celier <celier@adacore.com>
344 * makeusg.adb: Add lines for --create-map-file switches.
346 2011-08-05 Ed Schonberg <schonberg@adacore.com>
348 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
349 profile is incomplete and the full view is available, replace it with
351 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
352 incomplete, freezing the subprogram is delayed until the full view is
354 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
355 fixed-point multiplication operator and the predefined operator is
356 resolved in favor of the user-defined one.
358 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
360 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
363 2011-08-04 Ed Schonberg <schonberg@adacore.com>
365 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
366 whether a type lacks user-defined Read or Write operations, or has a
367 component that lacks them.
368 * sem_attr.adb (Check_Stream_Attribute): if restriction
369 No_Default_Stream_Attributes is active, verify that all subcomponent
370 types of the target have user-defined stream operations, and report
372 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
373 * exp_strm.adb: Build_Elementary_Input_Call,
374 Build_Elementary_Write_Call): remove checks for restriction
375 No_Default_Stream_Attributes, now checked in semantics.
377 2011-08-04 Vincent Celier <celier@adacore.com>
379 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
380 switches on the command line, look for all valid --RTS switches in the
381 Builder switches and for each language use the first runtime name found
383 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
384 command line and there is no auto-configuration.
385 (Runtime_Name_Set_For): New function.
387 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
389 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
390 elaborate initialization expression for variable Abort when processing
391 a package body or a declaration.
392 (Create_Finalizer): Propagate the package context when creating the
393 exception-related variables.
394 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
395 For_Package along with usage comment.
397 2011-08-04 Arnaud Charlet <charlet@adacore.com>
399 * gcc-interface/Makefile.in: Clean up targets.
400 Enable new package for atomic counters and copy-on-write implementation
401 of unbounded strings on x86 platforms.
402 * gcc-interface/Make-lang.in: Update dependencies.
404 2011-08-04 Robert Dewar <dewar@adacore.com>
406 * exp_ch7.adb: Minor reformatting.
408 2011-08-04 Robert Dewar <dewar@adacore.com>
410 * exp_strm.adb: Minor reformatting.
412 2011-08-04 Vadim Godunko <godunko@adacore.com>
414 * s-atocou.adb: Replace by dummy version and use on targets where atomic
415 operations are not supported.
416 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
417 * s-atocou-x86.adb: New file.
418 * Makefile.rtl: Add s-atocou.o file
420 2011-08-04 Arnaud Charlet <charlet@adacore.com>
422 * make.adb (Compile): Move setting of CodePeer_Mode to ...
423 (Compilation_Phase): ... here.
424 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
426 2011-08-04 Thomas Quinot <quinot@adacore.com>
428 * Make-generated.in: Fix minor typo in comment.
430 2011-08-04 Thomas Quinot <quinot@adacore.com>
432 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
435 2011-08-04 Robert Dewar <dewar@adacore.com>
437 * a-coinho.adb: Minor reformatting.
439 2011-08-04 Robert Dewar <dewar@adacore.com>
441 * a-coinho.ads: Minor reformatting.
443 2011-08-04 Vadim Godunko <godunko@adacore.com>
445 * s-atocou.ads, s-atocou.adb: New files.
446 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
447 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
448 direct use of GCC's atomic builtins and replace them by use of new
449 atomic counter package.
451 2011-08-04 Ed Schonberg <schonberg@adacore.com>
453 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
455 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
457 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
458 with a call to Get_External_Tag.
459 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
460 subprogram usage. Remove the guard against package declarations and
461 bodies since Build_Cleanup_Statements is no longer invoked in that
463 (Build_Components): Initialize Tagged_Type_Stmts when the context
464 contains at least one library-level tagged type.
465 (Build_Finalizer): New local variables Has_Tagged_Types and
466 Tagged_Type_Stmts along with associated comments on usage. Update the
467 logic to include tagged type processing.
468 (Create_Finalizer): Insert all library-level tagged type unregistration
469 code before the jump block circuitry.
470 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
471 (Expand_N_Package_Declaration): Remove the call to
472 Build_Cleanup_Statements.
473 (Process_Tagged_Type_Declaration): New routine. Generate a call to
474 unregister the external tag of a tagged type.
475 (Processing_Actions): Reimplemented to handle tagged types.
476 (Process_Declarations): Detect the declaration of a library-level
477 tagged type and carry out the appropriate actions.
478 (Unregister_Tagged_Types): Removed. The machinery has been directly
479 merged with Build_Finalizer.
481 2011-08-04 Robert Dewar <dewar@adacore.com>
483 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
484 gnatls.adb, exp_ch3.adb: Minor reformatting.
486 2011-08-04 Marc Sango <sango@adacore.com>
488 * sem_attr.adb (Analyze_Attribute): Replace the message
489 "invisible attribute of}" of the spark restriction violation in
490 attribute reference by the simple message "invisible attribute of type".
491 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
492 two insertion characters: '&' and '}'.
494 2011-08-04 Vadim Godunko <godunko@adacore.com>
496 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
497 * a-coinho.ads, a-coinho.adb: New file.
498 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
500 2011-08-04 Nicolas Roche <roche@adacore.com>
502 * alfa_test.adb: Not all ali files are containing alfa information even
503 if compiled with -gnatd.F. So suppress warning about missing ALFA
506 2011-08-04 Yannick Moy <moy@adacore.com>
508 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
510 * put_alfa.adb: Check that scope name is not empty.
512 2011-08-04 Ed Schonberg <schonberg@adacore.com>
514 * exp_ch3.adb (Stream_Operation_Ok): new predicate
515 Needs_Elementary_Stream_Operation, to determine whether user-defined
516 Read and Write attributes are available for the elementary components
517 of the given type. If only the predefined attributes are available,
518 then when restriction No_Default_Stream_Attributes is active the
519 predefined stream attributes for the composite type cannot be created.
521 2011-08-04 Robert Dewar <dewar@adacore.com>
523 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
524 Put routines in alpha order
526 2011-08-04 Jose Ruiz <ruiz@adacore.com>
528 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
529 * gcc-interface/Make-lang.in: Update dependencies.
531 2011-08-04 Arnaud Charlet <charlet@adacore.com>
533 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
534 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
537 2011-08-04 Robert Dewar <dewar@adacore.com>
539 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
540 lib-xref-alfa.adb: Minor reformatting.
542 2011-08-04 Marc Sango <sango@adacore.com>
544 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
545 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
546 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
549 2011-08-04 Tristan Gingold <gingold@adacore.com>
551 * bindgen.adb (Gen_Adainit_C): Remove.
552 (Gen_Adafinal_C): Ditto.
553 (Gen_Elab_Externals_C): Ditto.
554 (Gen_Elab_Calls_C): Ditto.
555 (Gen_Elab_Order_C): Ditto.
556 (Gen_Elab_Defs_C): Ditto.
557 (Gen_Finalize_Library_C): Ditto.
558 (Gen_Finalize_Library_Defs_C): Ditto.
560 (Gen_Output_File_C): Ditto.
561 (Gen_Restrictions_C): Ditto.
562 (Gen_Versions_C): Ditto.
563 (Write_Info_Ada_C): Ditto.
564 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
565 (Gen_Output_File): Do not force Ada_Bind_File anymore.
566 Always call Gen_Output_File_Ada.
567 * gnatlink.adb (Begin_Info): Now a constant.
569 (Ada_Bind_File): Remove
570 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
571 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
572 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
573 * opt.ads (Ada_Bind_File): Remove.
575 2011-08-04 Thomas Quinot <quinot@adacore.com>
577 * projects.texi: Document target-specific directory in default project
580 2011-08-04 Thomas Quinot <quinot@adacore.com>
582 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
585 2011-08-04 Yannick Moy <moy@adacore.com>
587 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
588 opt.ads, lib-xref.ads: Code clean up.
590 2011-08-04 Yannick Moy <moy@adacore.com>
592 * gnat_rm.texi: Update description of Test_Case
593 * gnat_ugn.texi: Typo.
595 2011-08-04 Ed Falis <falis@adacore.com>
597 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
599 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
601 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
602 it is of type Root_Controlled. This action eliminates fields Prev and
603 Next from type equality.
605 2011-08-04 Yannick Moy <moy@adacore.com>
607 * lib-xref-alfa.adb: Correct typo.
609 2011-08-04 Matthew Heaney <heaney@adacore.com>
611 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
614 2011-08-04 Yannick Moy <moy@adacore.com>
616 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
617 (Analyze_Pragma): allow static string expression for name of Test_Case,
618 instead of simply string literals.
619 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
622 2011-08-04 Vincent Celier <celier@adacore.com>
624 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
625 case suffixes to find truncated main sources.
627 2011-08-04 Tristan Gingold <gingold@adacore.com>
629 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
630 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
631 (Compute_Current_Task): Ditto.
633 2011-08-04 Tristan Gingold <gingold@adacore.com>
635 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
637 2011-08-04 Yannick Moy <moy@adacore.com>
639 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
640 library-level constant.
641 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
642 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
643 used as selector of parameter association, in ALFA mode.
645 2011-08-04 Robert Dewar <dewar@adacore.com>
647 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
648 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
651 2011-08-04 Arnaud Charlet <charlet@adacore.com>
653 * make.adb (Linking_Phase): Set source search path before calling
654 gnatlink in CodePeer mode.
656 2011-08-04 Javier Miranda <miranda@adacore.com>
658 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
659 Remove code which takes care of building TSDs.
660 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
661 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
662 the accessibility check in VM targets.
663 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
664 (Building_Static_DT): Now returns false for VM targets.
665 (Build_VM_TSDs): Removed.
666 (Expand_Interface_Conversion): Generate missing runtime check for
667 conversions to interface types whose target type is unknown at compile
669 (Make_VM_TSD): Add missing code to disable the generation of calls to
670 Check_TSD if the tagged type is not defined at library level, or not
671 has a representation clause specifying its external tag, or -gnatdQ is
673 * exp_disp.ads (Build_VM_TSDs): Removed.
674 (Make_VM_TSDs): Spec relocated from exp_disp.adb
675 * sem_disp.adb (Check_Dispatching_Operation): No code required to
676 register primitives in the dispatch tables in VM targets.
677 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
678 initialization of class-wide interface objects in VM targets.
679 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
682 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
684 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
685 when dotnet-ld cannot be found.
687 2011-08-04 Arnaud Charlet <charlet@adacore.com>
689 * bindgen.adb: Simplify significantly generation of binder body file in
691 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
692 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
695 2011-08-04 Yannick Moy <moy@adacore.com>
697 * sem_prag.adb, sem.ads: Code cleanup.
699 2011-08-04 Tristan Gingold <gingold@adacore.com>
701 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
702 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
704 * s-stusta.adb (Print): Adjust after changes in s-stausa.
705 * gnat_ugn.texi: Update dynamic stack usage section.
707 2011-08-04 Steve Baird <baird@adacore.com>
709 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
710 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
711 contains only a call to the user-defined main subprogram.
712 (Gen_Main_Ada) - If CodePeer_Mode is set, then
713 call the "wrapper" subprogram instead of directly
714 calling the user-defined main subprogram.
716 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
718 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
719 alternatives of a case statement for controlled objects. Rename local
720 variable A to Dead_Alt.
721 (Expand_N_If_Statement): Check the then and else statements of an if
722 statement for controlled objects. Check the then statements of all
723 elsif parts of an if statement for controlled objects.
724 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
726 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
727 detects a loop associated with the expansion of an array object.
728 Augment the processing of the loop statements to account for a possible
729 wrap done by Process_Statements_For_Controlled_Objects.
730 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
731 statements and abortable part of an asynchronous select for controlled
733 (Expand_N_Conditional_Entry_Call): Check the else statements of a
734 conditional entry call for controlled objects.
735 (Expand_N_Selective_Accept): Check the alternatives of a selective
736 accept for controlled objects.
737 (Expand_N_Timed_Entry_Call): Check the entry call and delay
738 alternatives of a timed entry call for controlled objects.
739 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
740 exception handler for controlled objects.
741 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
742 Add formal parameter Nested_Constructs along with its associated
744 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
745 Requires_Cleanup_Actions.
746 (Process_Statements_For_Controlled_Objects): New routine.
747 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
748 routine. Inspect a node which contains a non-handled sequence of
749 statements for controlled objects. If such an object is found, the
750 statements are wrapped in a block.
752 2011-08-04 Bob Duff <duff@adacore.com>
754 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
755 need to compare with Class_Wide_Type (T2), in order to get at the
756 original class-wide type node.
757 * sem_type.ads (Covers): Improve the comment.
758 * einfo.ads (Class_Wide_Type): Improve the comment.
759 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
760 the type of the Deref.
762 2011-08-04 Yannick Moy <moy@adacore.com>
764 * gnat_rm.texi: Document that Test_Case pragma can only appear on
765 separate declarations.
766 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
767 check identifier of pragma argument.
768 (Chain_TC): check that no other test case associated to the same entity
770 (Check_Test_Case): disallow test case inside subprogram body
771 (Analyze_Pragma): correct call to check identifier and not argument
772 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
773 function gets name from test case pragma.
775 2011-08-04 Yannick Moy <moy@adacore.com>
777 * gnat_rm.texi: Document new pragma and aspect.
778 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
779 (No_Duplicates_Allowed): new constant array defining whether duplicates
780 aspects of each kind can appear on the same declaration.
781 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
782 field, which points to a node holding the previous Spec_PPC_List.
783 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
784 through the indirection with Contract.
785 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
786 * par-prag.adb (Prag): do nothing on Test_Case pragma
787 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
789 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
790 component Ensures of Test_Case.
791 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
792 (Analyze_Generic_Subprogram_Declaration,
793 Analyze_Subprogram_Instantiation,
794 Analyze_Abstract_Subprogram_Declaration,
795 Analyze_Subprogram_Body_Helper,
796 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
797 insert contract in subprogram node at point of definition
799 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
800 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
802 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
803 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
804 similar to the analysis of pre/post
805 (Derive_Subprogram): insert contract in subprogram node at point of
807 * sem_prag.adb, sem_prag.ads
808 (Check_Arg_Is_String_Literal, Check_Identifier):
809 new checking procedures to be called in treatment of pragmas
810 (Check_Test_Case): new procedure to check that a Test_Case aspect or
811 pragma is well-formed. This does not check currently that 'Result is
812 used only in the Ensures component of a Test_Case.
813 (Analyze_Pragma): add case for Test_Case
814 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
815 components of a Test_Case.
816 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
817 expressions in the 3rd (and 4th if present) arguments of a Test_Case
818 pragma, treated as spec expressions.
819 (Sig_Flags): add value -1 for Test_Case.
820 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
821 Get_Requires_From_Test_Case_Pragma): getters for both expression
822 components of a Test_Case.
823 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
824 indirection between an entry or [generic] subprogram entity and its
825 pre/post + test-cases.
826 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
827 get/set for fields of an N_Contract node.
828 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
829 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
830 names and pragma for Test_Case.
831 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
833 2011-08-04 Vincent Celier <celier@adacore.com>
835 * gnat_ugn.texi: Improve documentation of gnatmake switch
838 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
840 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
841 type). Initialize Atyp to the appropriate type which is later checked
842 for completion. Rewrite the assertion associated with private type
845 2011-08-04 Ed Falis <falis@adacore.com>
847 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
848 initialize the number of CPUs.
850 2011-08-04 Ed Schonberg <schonberg@adacore.com>
852 * sem_type.adb (Disambiguate): New subsidiary routine
853 In_Same_Declaration_List, to implement AI05-0020: a user-defined
854 equality on an anonymous access type whose designated type is private
855 does not lead to an ambiguity with the universal access equality
856 operator in the body or child units of the defining package. The same
857 is true for a multiplication operator on a private type completed with
860 2011-08-04 Javier Miranda <miranda@adacore.com>
862 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
863 (Normalize_Scalars_Config): Removed.
865 (Register_Opt_Config_Switches): Remove registering config values of
866 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
867 (Restore_Opt_Config_Switches): Remove code which restores the values of
868 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
869 Init_Or_Norm_Scalars.
870 (Save_Opt_Config_Switches): Remove code which saves values of
871 Init_Or_Norm_Scalars and Normalize_Scalars.
872 (Set_Opt_Config_Switches): Remove code which restores config values of
873 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
874 Init_Or_Norm_Scalars.
876 2011-08-04 Yannick Moy <moy@adacore.com>
878 * frontend.adb (Frontend): remove previous patch to avoid full
879 qualification in ALFA mode.
880 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
881 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
882 unique name for an entity, which could be used to identify the entity
883 across compilation units.
885 2011-08-04 Thomas Quinot <quinot@adacore.com>
888 (Initialize_Default_Project_Path): Add target specific directory
889 ($prefix/$target/lib/gnat) in front of project path in all cases
890 (making gnatmake's behaviour consistent with gprbuild).
891 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
892 Pass target name from Sdefault to project subsystem.
893 * gnatls.adb: Show new target specific default project directory.
895 2011-08-04 Johannes Kanig <kanig@adacore.com>
897 * cstand.adb: Add Information to Identifier in Standard
898 (Identifer_For): Set Entity to the corresponding entity
900 2011-08-04 Sergey Rybin <rybin@adacore.com>
902 * gnat_ugn.texi: Update doc on gnatcheck.
904 2011-08-04 Yannick Moy <moy@adacore.com>
906 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
909 2011-08-04 Yannick Moy <moy@adacore.com>
911 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
912 performing expansion.
913 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
914 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
915 it is not called in ALFA mode.
917 2011-08-04 Emmanuel Briot <briot@adacore.com>
919 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
920 after all, so removed.
922 2011-08-04 Sergey Rybin <rybin@adacore.com>
924 * vms_data.ads: Add missing VMS qualifiers.
926 2011-08-04 Emmanuel Briot <briot@adacore.com>
928 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
929 the list of files on the command line after processing it through
932 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
934 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
935 processing for .NET/JVM. These targets can now benefit from
936 Raise_From_Controlled_Operation and they share the same processing with
938 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
939 These targets need transient scopes in order to properly finalize short
940 lived controlled objects.
941 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
942 NET/JVM. These targets can now benefit from
943 Raise_From_Controlled_Operation and they share the same processing with
946 2011-08-04 Geert Bosch <bosch@adacore.com>
948 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
950 2011-08-04 Ed Schonberg <schonberg@adacore.com>
952 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
953 Expand_Record_Aggregate, to determine whether aggregate must be
954 expanded into assignments. This is the case if the ancestor part is
955 private, regarless of the setting of the flag Has_Private_Ancestor.
957 2011-08-04 Ed Falis <falis@adacore.com>
959 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
961 2011-08-04 Bob Duff <duff@adacore.com>
963 * sinfo.ads: Fix comment.
965 2011-08-04 Steve Baird <baird@adacore.com>
967 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
968 choose a package name in much the same way as is
969 done for JGNAT when VM_Target /= No_VM, except that
970 a slightly more distinctive prefix string is used.
972 2011-08-04 Emmanuel Briot <briot@adacore.com>
974 * makeutl.adb (Complete_Mains): no longer accept unit names on the
975 gnatmake command line.
976 This behavior was never documented (and was supported only because of
977 an early bug in the code). This case might lead to ambiguous cases
978 (between unit names and truncated base names without suffixes).
980 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
982 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
983 Remove the external tag of a tagged type from the internal hash table.
984 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
985 expanded usage of the routine. Strenghten the check for Is_Master. Add
986 processing for tagged types.
987 (Build_Finalizer): Create all the necessary lists used in finalizer
988 creation when the processed context is a package that may contain
990 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
991 Requires_Cleanup_Actions.
992 (Expand_N_Package_Body): Package bodies may need clean up code
993 depending on whether they contain tagged types.
994 (Expand_N_Package_Declaration): Package declarations may need clean up
995 code depending on whether they contain tagged types.
996 (Unregister_Tagged_Types): New routine. Search through a list of
997 declarations or statements, looking for non-abstract Ada tagged types.
998 For each such type, generate code to unregister the external tag.
999 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1000 Requires_Cleanup_Actions.
1001 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1002 through a list of declarations or statements looking for non-abstract
1003 Ada tagged types or controlled objects.
1004 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1005 Requires_Cleanup_Actions.
1006 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1007 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1010 2011-08-04 Vincent Celier <celier@adacore.com>
1012 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1013 has Ada sources, not project Project, because if the root project
1014 Project has no sources of its own, all projects will be deemed without
1017 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1019 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1020 of the No_Param_Proc acc-to-subp type used for initialization of
1021 __gnat_finalize_library_objects so that it's declared at library level
1022 rather than nested inside of the adainit routine.
1024 2011-08-04 Javier Miranda <miranda@adacore.com>
1026 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1027 if the tagged type has a representation clause which specifies its
1030 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1032 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1033 Remove previous procedure with that name.
1034 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1036 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1037 subtype mark, the ancestor cannot have unknown discriminants.
1038 (Resolve_Record_Aggregate): if the type has invisible components
1039 because of a private ancestor, the aggregate is illegal.
1041 2011-08-04 Vincent Celier <celier@adacore.com>
1043 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1044 account switches -gnat2005, -gnat12 and -gnat2012.
1046 2011-08-04 Bob Duff <duff@adacore.com>
1048 * s-tasdeb.ads: Minor comment fix.
1050 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1052 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1054 * switch.ads, switch.adb (Is_Language_Switch): New function.
1056 2011-08-04 Vincent Celier <celier@adacore.com>
1058 * switch-c.adb: Minor comment addition.
1060 2011-08-04 Vincent Celier <celier@adacore.com>
1062 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1063 ending with '=' is followed by a space (missing file name).
1065 2011-08-04 Pascal Obry <obry@adacore.com>
1067 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1069 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1071 * sem_ch12.adb (Analyze_Associations): New routine
1072 Check_Overloaded_Formal_Subprogram to reject a formal package when
1073 there is a named association or a box initialisation for an overloaded
1074 formal subprogram of the corresponding generic.
1076 2011-08-04 Yannick Moy <moy@adacore.com>
1078 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1079 * get_alfa.adb, put_alfa.adb: Read and write new component of
1081 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1083 2011-08-04 Pascal Obry <obry@adacore.com>
1085 * urealp.adb: Minor reformatting.
1087 2011-08-04 Tristan Gingold <gingold@adacore.com>
1089 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1090 Handle the case when Cleanup_Protected_Object returns Empty.
1092 2011-08-04 Yannick Moy <moy@adacore.com>
1094 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1096 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1098 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1099 call, ignore functions.
1101 2011-08-04 Geert Bosch <bosch@adacore.com>
1103 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1106 2011-08-04 Emmanuel Briot <briot@adacore.com>
1108 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1109 as an index for Builder'Switches. This conforms to the documentation.
1110 * make.adb (Insert_Project_Sources): avoid duplicate code
1112 2011-08-04 Emmanuel Briot <briot@adacore.com>
1114 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1115 name on the command line (for instance "../dummy"), never assume it can
1118 2011-08-04 Tristan Gingold <gingold@adacore.com>
1120 * bindgen.adb: Remove code the reference or create the
1121 Break_Start/__gnat_break_start procedure.
1122 * s-stalib.adb (Break_Start): Removed.
1124 2011-08-04 Emmanuel Briot <briot@adacore.com>
1126 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1127 shared with gprbuild.
1129 2011-08-04 Yannick Moy <moy@adacore.com>
1131 * par-ch4.adb (P_Primary): preferentially issue an error message about
1132 a missing parenthesis arount a conditional or case expression in Ada
1133 2012 mode, if we detect that the alignment is not correct for a
1136 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1138 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1139 tag-to-class-wide conversion as needing finalization actions.
1140 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1141 a tag-to-class-wide conversion as needing finalization actions.
1142 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1143 conversion does not need finalization actions.
1144 (Is_Tag_To_CW_Conversion): New routine.
1145 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1146 whether an object is the result of a tag-to-class-wide conversion.
1148 2011-08-04 Yannick Moy <moy@adacore.com>
1150 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1151 the left-hand-side and right-hand-side of a conjunct are inserted when
1152 translating a pre- or postcondition
1153 * sem_ch6.adb: Correct typo in comment
1155 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1157 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1158 Unchecked_Conversion and Unchecked_Deallocation.
1160 2011-08-04 Thomas Quinot <quinot@adacore.com>
1162 * make.adb: Minor reformatting.
1164 2011-08-04 Emmanuel Briot <briot@adacore.com>
1166 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1167 sources in the project and its imported projects, but not in the whole
1170 2011-08-04 Emmanuel Briot <briot@adacore.com>
1172 * make.adb: Remove debug trace.
1174 2011-08-04 Vincent Celier <celier@adacore.com>
1176 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1177 path in canonical form, to be able to compare path names on platforms
1178 such as Windows or Darwin.
1180 2011-08-04 Thomas Quinot <quinot@adacore.com>
1182 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1183 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1184 * scos.ads: Update documentation accordingly.
1185 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1188 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1190 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1191 attribute only if prefix type is scalar.
1193 2011-08-04 Emmanuel Briot <briot@adacore.com>
1195 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1196 in gnatmake for specifying mains on the command line that do not belong
1197 to the main project. These mains must currently all belong to the same
1199 (Ultimate_Extension_Of): removed, since duplicated
1200 Ultimate_Extending_Project.
1202 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1204 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1206 (CodePeer_Mode_String): New.
1207 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1209 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1210 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1211 mode, since no useful elaboration subprogram is needed by CodePeer.
1212 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1213 In this mode, compile binder file with -gnatC and do stop after this
1216 2011-08-04 Vincent Celier <celier@adacore.com>
1218 * exp_ch7.adb: Minor comment fix.
1220 2011-08-04 Robert Dewar <dewar@adacore.com>
1222 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1223 exp_ch4.adb, makeutl.adb: Minor reformatting.
1225 2011-08-04 Emmanuel Briot <briot@adacore.com>
1227 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1228 Create several new subprograms to move code out of Make. This makes the
1229 code more readable, removes code duplication, and is a preparation work
1230 for adding support for aggregate projects.
1232 2011-08-04 Tristan Gingold <gingold@adacore.com>
1234 * s-po32gl.ads, s-po32gl.adb: New files.
1235 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1236 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1237 (Build_Finalization_Collection): Use it.
1238 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1239 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1241 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1242 * gcc-interface/Make-lang.in: Update dependencies.
1244 2011-08-04 Emmanuel Briot <briot@adacore.com>
1246 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1249 2011-08-04 Emmanuel Briot <briot@adacore.com>
1251 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1252 command line is not a file name, also check whether it could be a unit
1255 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1257 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1258 the header of the finalization routine.
1259 If the unit has no finalizer but is a body whose spec has one, then
1260 generate the decrement of the elaboration entity only.
1261 If the unit has a finalizer and is a spec, then do not generate the
1262 decrement of the elaboration entity.
1263 (Gen_Finalize_Library_C): Likewise.
1265 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1267 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1268 (Bounds_Size_Expression): Removed.
1269 (Double_Alignment_Of): New subsidiary routine.
1270 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1271 for a hole in the dope vector of unconstrained arrays due to different
1272 index and element alignments.
1274 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1276 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1277 raise program_error because body has not been seen yet.
1279 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1281 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1284 2011-08-04 Vincent Celier <celier@adacore.com>
1286 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1288 2011-08-04 Yannick Moy <moy@adacore.com>
1290 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1291 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1293 2011-08-04 Thomas Quinot <quinot@adacore.com>
1295 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1296 instantiation in RCI.
1298 2011-08-04 Emmanuel Briot <briot@adacore.com>
1300 * make.adb: Share more code with gprbuild
1302 2011-08-04 Emmanuel Briot <briot@adacore.com>
1304 * projects.texi: Added documentation for the IDE'Gnat project file
1307 2011-08-04 Nicolas Roche <roche@adacore.com>
1309 * gnat_rm.texi: Minor editing.
1311 2011-08-04 Javier Miranda <miranda@adacore.com>
1313 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1314 and the library case for VM targets.
1315 (Gen_Adainit_Ada): Likewise.
1317 2011-08-04 Robert Dewar <dewar@adacore.com>
1319 * g-altive.ads: Minor comment updates.
1320 * prj-nmsc.adb: Minor reformatting.
1322 2011-08-04 Javier Miranda <miranda@adacore.com>
1325 (Normalize_Scalars_Config): Value of the configuration switch set by
1326 pragma Normalize_Scalars when it appears in the gnat.adc file.
1327 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1328 to save and restore settings of this pragma.
1330 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1331 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1333 2011-08-04 Vincent Celier <celier@adacore.com>
1335 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1337 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1339 * makeutl.adb: Minor reformatting.
1341 2011-08-04 Olivier Hainque <hainque@adacore.com>
1343 * g-altive.ads: Update comments to reflect that only the soft
1344 binding is available today.
1346 2011-08-04 Robert Dewar <dewar@adacore.com>
1348 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1349 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1350 * gcc-interface/Make-lang.in: Update dependencies.
1352 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1354 * prj-env.adb: Remove local debug traces.
1356 2011-08-04 Yannick Moy <moy@adacore.com>
1358 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1359 was used instead of Hi_OK, which could cause a read of an uninitialized
1360 value later on. Detected while working on the new warning.
1361 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1363 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1364 in more cases, in order to detect more unreferenced values.
1365 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1366 object for expression, if any.
1368 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1370 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1371 the operand types instead of the Esize.
1373 2011-08-04 Steve Baird <baird@adacore.com>
1375 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1376 enable CodePeer_Mode.
1377 * bindusg.adb (Display): Add help message describing -P binder switch.
1378 * gnat_ugn.texi: Document -P binder switch.
1379 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1380 user-defined main program directly.
1381 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1382 user-defined main program in the context clause of the package body.
1384 2011-08-04 Yannick Moy <moy@adacore.com>
1386 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1387 duplicate of Defining_Entity
1388 (Get_Unique_Entity_For_Decl): rename function into
1389 Unique_Defining_Entity
1390 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1391 (Formal_Proof_On): remove synthesized flag
1392 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1393 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1394 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1395 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1396 Annotate (Formal_Proof)
1398 2011-08-04 Emmanuel Briot <briot@adacore.com>
1400 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1401 source files with non-standard naming schemes, in imported projects
1403 2011-08-04 Emmanuel Briot <briot@adacore.com>
1405 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1406 specified on the gprbuild command line, we need to compile all units
1407 within that file, not just the first one we find
1408 Fix error message for mains that are not found.
1410 2011-08-04 Thomas Quinot <quinot@adacore.com>
1412 * sem_ch6.adb: Update comment.
1413 * sem_ch12.adb: Minor reformatting.
1415 2011-08-04 Bob Duff <duff@adacore.com>
1417 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1418 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1419 race condition whose symptom is to fail to lock Parent. That, in turn,
1420 causes Parent.Awake_Count to be accessed without locking Parent, which
1421 causes another race condition whose symptom is that Parent.Awake_Count
1422 can be off by 1 (either too high or too low). The solution is to lock
1423 Parent unconditionally, and then lock Acceptor, before reading
1424 Acceptor.Terminate_Alternative.
1426 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1428 * debug.adb: Update comment.
1430 2011-08-04 Robert Dewar <dewar@adacore.com>
1432 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1433 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1434 exp_ch6.adb: Minor reformatting.
1436 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1438 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1441 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1443 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1445 2011-08-04 Thomas Quinot <quinot@adacore.com>
1447 * sinfo.ads: Minor reformatting.
1449 2011-08-04 Emmanuel Briot <briot@adacore.com>
1451 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1452 even if there is no location.
1454 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1456 * sem_res.adb, sem_ch4.adb: move check for restriction
1457 No_Task_Hierarchy to resolve_allocator.
1459 2011-08-04 Thomas Quinot <quinot@adacore.com>
1461 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1462 This flag of N_Pragma nodes is not used, remove it as well as all of
1463 the associated circuitry.
1465 2011-08-04 Javier Miranda <miranda@adacore.com>
1467 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1468 runtime check on duplicated externa tags
1469 * debug.adb Document switch -gnatdQ.
1471 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1473 * a-fihema.ads: Minor typo fix.
1475 2011-08-04 Yannick Moy <moy@adacore.com>
1477 * sem_ch10.adb: Minor comment update.
1479 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1481 * einfo.adb: Update the node field usage to reflect the renaming of
1482 Return_Flag to Return_ Flag_Or_Transient_Decl.
1483 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1484 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1485 (Write_Field15_Name): Change Return_Flag to
1486 Return_Flag_Or_Transient_Decl.
1487 * einfo.ads: Rename node field Return_Flag to
1488 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1489 occurrences in entities.
1490 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1491 associated Inline pragma.
1492 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1493 associated Inline pragma.
1494 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1496 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1497 Return_Flag and Set_Return_Flag.
1498 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1499 objects generated for controlled transients declared inside an
1500 Exception_With_Actions. Update the calls to Return_Flag.
1501 (Process_Object_Declaration): Add code to add a null guard for hook
1502 objects generated for controlled transients declared inside an
1503 Exception_With_Actions. Update related comment.
1504 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1505 objects generated for controlled transients declared inside an
1506 Exception_With_Actions. Update the calls to Return_Flag.
1507 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1509 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1511 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1512 positional aggregate.
1514 2011-08-04 Vincent Celier <celier@adacore.com>
1516 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1517 SLOC only for pragmas.
1519 2011-08-04 Emmanuel Briot <briot@adacore.com>
1521 * projects.texi: Minor typo fix.
1523 2011-08-04 Emmanuel Briot <briot@adacore.com>
1525 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1526 on case-sensitive file systems.
1528 2011-08-04 Thomas Quinot <quinot@adacore.com>
1530 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1531 nested in a disabled pragma.
1532 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1533 enclosing pragma, if any, for X decisions.
1535 2011-08-04 Thomas Quinot <quinot@adacore.com>
1537 * sem_prag.adb: Minor reformatting.
1539 2011-08-04 Vincent Celier <celier@adacore.com>
1541 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1542 allowed in no run time mode.
1544 2011-08-04 Vincent Celier <celier@adacore.com>
1546 * make.adb (Check): When -gnatc is used, check for the source file
1547 inside the ALI file with a canonical case file name.
1549 2011-08-04 Emmanuel Briot <briot@adacore.com>
1551 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1552 overriding the separator.
1554 2011-08-04 Robert Dewar <dewar@adacore.com>
1556 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1557 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1559 2011-08-04 Robert Dewar <dewar@adacore.com>
1561 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1563 2011-08-04 Yannick Moy <moy@adacore.com>
1565 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1566 'Result only appears in postcondition of function.
1568 2011-08-04 Thomas Quinot <quinot@adacore.com>
1570 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1571 external tag, include the value of the external tag in the exception
1574 2011-08-04 Yannick Moy <moy@adacore.com>
1576 * sem_attr.adb (Result): modify error message for misplaced 'Result
1578 2011-08-04 Sergey Rybin <rybin@adacore.com>
1580 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1581 clear that the second argument must be an identifier.
1583 2011-08-04 Thomas Quinot <quinot@adacore.com>
1585 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1586 -fpreserve-control-flow, insert an IF statement on the barrier
1587 condition to ensure that a conditional branch instruction is generated.
1589 2011-08-04 Emmanuel Briot <briot@adacore.com>
1591 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1592 (Processing_Flags.Ignore_Missing_With): new flag.
1594 2011-08-04 Emmanuel Briot <briot@adacore.com>
1596 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1597 Source_List_File on case-insensitive systems where the file is actually
1598 on a case-sensitive file system (NFS,...).
1600 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1602 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1603 function return contains a controlled [extension] aggregate and the
1604 return statement is not part of a handled sequence of statements, wrap
1605 the return in a block. This ensures that all controlled temporaries
1606 generated during aggregate resolution will be picked up by the
1607 finalization machinery.
1609 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1611 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1612 components, freeze type before resolution, to ensure that default
1613 initializations are present for all components.
1614 * sem_res.adb (Resolve_Actuals): the designated object of an
1615 accces-to-constant type is a legal actual in a call to an
1616 initialization procedure.
1618 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1620 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1621 N_Unchecked_Type_Conversion to the possible containers of a renamed
1624 2011-08-04 Yannick Moy <moy@adacore.com>
1626 * par-ch13.adb (Aspect_Specifications_Present): recognize
1627 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1628 is issued in Strict mode.
1629 * par.adb: Fix typos in comments.
1631 2011-08-04 Yannick Moy <moy@adacore.com>
1633 * sem_attr.adb (Result): modify error message to take into account Post
1634 aspect when compiling Ada 2012 (or newer) code.
1636 2011-08-04 Nicolas Roche <roche@adacore.com>
1638 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1639 remove need for GCC exceptions.
1641 2011-08-04 Vincent Celier <celier@adacore.com>
1643 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1644 project, not the source file name.
1645 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1646 excluded, continue looking. This excluded source will only be returned
1647 if there is no other source with the same base name that is not locally
1650 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1652 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1653 private and one of the operands is a real literal, use a qualified
1654 expression rather than a conversion which is not meaningful to the
1657 2011-08-04 Yannick Moy <moy@adacore.com>
1659 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1660 corresponding aspect X'Class are allowed, proceed with analysis of the
1661 aspect instead of skipping it.
1663 2011-08-04 Tristan Gingold <gingold@adacore.com>
1665 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1666 This will allow to have an Ada implementation for the subprogram.
1668 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1670 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1671 completion and aspects are present, apply them to the entity for the
1672 type which is currently the partial view, but which is the one that
1674 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1675 applies to a partial view, indicate that the full view has predicates
1676 and delayed aspects.
1677 (Replace_Type_Reference): Handle properly predicates that apply to the
1678 full view of a private completion.
1680 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1682 * layout.adb (Layout_Type): For composite types, do not set Esize.
1683 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1685 (Size_Known): Look at the RM size of components instead of the Esize.
1686 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1687 issue warning and activate Implicit_Packing.
1688 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1689 if the Esize is not known.
1690 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1691 for elementary types only.
1692 (Analyze_Record_Representation_Clause): Look at the RM size instead
1693 of the Esize to issue errors.
1694 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1696 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1698 Look at the RM size instead of the Esize for types if the latter is
1700 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1702 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1704 * sem_type.adb: proper handling of equality not involving anonymous
1707 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1709 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1710 Vis_Decls. When creating a library-level finalizer for a package spec,
1711 both the declaration and body of the finalizer are inserted either in
1712 the visible or private declarations of the package spec.
1714 2011-08-04 Javier Miranda <miranda@adacore.com>
1716 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1717 use of the full-view of a type when invoking Is_Ancestor.
1718 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1719 the full-view of private parents is requested, then use also the
1720 full-view of the parent of the first derivation.
1722 2011-08-04 Tristan Gingold <gingold@adacore.com>
1724 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1725 instead of the locally imported procedure.
1726 * s-taprop-mingw.adb (Enter_Task): Ditto.
1727 * s-valrea.adb (Scan_Real): Ditto.
1728 * s-imgrea.adb (Set_Image_Real): Ditto.
1729 * s-flocon.ads: Make the package pure.
1731 2011-08-04 Thomas Quinot <quinot@adacore.com>
1733 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1734 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1735 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1736 New subprogram, moved here from...
1737 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1738 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1739 rewriting of the last argument into a procedure call statement here...
1740 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1743 2011-08-04 Thomas Quinot <quinot@adacore.com>
1745 * par_sco.adb: Minor reformatting.
1747 2011-08-04 Robert Dewar <dewar@adacore.com>
1749 * erroutc.adb: Minor reformatting.
1751 2011-08-04 Thomas Quinot <quinot@adacore.com>
1753 * par_sco.adb: Comment update.
1755 2011-08-04 Tristan Gingold <gingold@adacore.com>
1757 * s-flocon.ads: New file.
1758 * g-flocon.ads: Now a renaming of s-flocon.
1759 * Makefile.rtl: Add s-flocon.o
1761 2011-08-04 Javier Miranda <miranda@adacore.com>
1763 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1764 constrained, do not attempt to build a subtype of it.
1766 2011-08-04 Yannick Moy <moy@adacore.com>
1768 * errout.ads Change comments: remove 'R'M as an example where quotes
1769 are needed; add ALFA as another case where quotes are not needed
1770 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1771 case where quotes are not needed.
1772 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1773 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1774 Remove all occurrences of 'A'L'F'A
1776 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1778 * sem_ch13.adb: check legality of invariant pragma.
1780 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1782 * bindgen.adb: Add comments.
1784 2011-08-04 Yannick Moy <moy@adacore.com>
1786 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1788 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1789 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1791 2011-08-04 Robert Dewar <dewar@adacore.com>
1793 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1794 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1795 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1797 2011-08-04 Thomas Quinot <quinot@adacore.com>
1799 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1801 2011-08-04 Thomas Quinot <quinot@adacore.com>
1804 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1807 2011-08-04 Robert Dewar <dewar@adacore.com>
1809 * einfo.ads, exp_ch4.adb: Minor reformatting.
1811 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1813 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1815 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1817 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1818 type in all cases to compute list of primitive operations, because full
1819 view may be an itype that is not attached to the list of declarations.
1821 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1823 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1824 library has already been finalized.
1825 (Gen_Adafinal_C): Likewise.
1826 (Gen_Adainit_Ada): Generate an early return if the library has
1827 already been elaborated.
1828 (Gen_Adainit_C): Likewise.
1829 (Gen_Output_File_Ada): Generate an elaboration flag.
1830 (Gen_Output_File_C): Likewise.
1832 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1834 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1835 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1836 built in the first place.
1837 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1838 for CodePeer because Finalize_Address was not built to begin with.
1839 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1841 2011-08-04 Pascal Obry <obry@adacore.com>
1843 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1844 filenames, this ensures unicity of filenames across processes.
1846 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1848 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1849 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1850 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1851 Add False as the actual to From_Abort in the generated call to
1852 Raise_From_Controlled_Operation.
1854 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1856 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1857 so that the ali file name can be retrieved from outside of this package.
1858 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1859 doing nothing in the general case, but used to update the object file
1860 timestamp if directly generated by the backend.
1861 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1862 to a later time than the ali file one.
1864 2011-08-04 Yannick Moy <moy@adacore.com>
1866 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1867 entities whose body contains an Annotate pragma which forces formal
1869 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1870 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1871 Mark_Non_ALFA_Subprogram to pass in a message and node.
1872 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1873 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1874 surrounding subprogram.
1875 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1876 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1877 as not in ALFA is annotated with Formal_Proof being On, then an error
1878 is issued based on the additional parameters for message and node.
1879 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1880 * gcc-interface/Make-lang.in: Update dependencies.
1882 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1884 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1885 Finalize_Address when CodePeer is enabled.
1887 2011-08-04 Pascal Obry <obry@adacore.com>
1889 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1890 the latter returns a pointer to a static buffer which is deallocated
1891 at the end of the routine.
1893 2011-08-04 Yannick Moy <moy@adacore.com>
1895 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1896 after index creation; mark unconstrained base array type generated as
1897 being in/not in ALFA as well
1898 (Make_Index): mark subtype created as in/not in ALFA
1899 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1900 over a loop as in/not in ALFA, depending on its type and form of loop
1903 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1905 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1906 directly to False on .NET and JVM.
1908 2011-08-04 Yannick Moy <moy@adacore.com>
1910 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1911 constraint that subtype must come from source code to be in ALFA, so
1912 that anonymous subtypes can be in ALFA too.
1914 2011-08-04 Yannick Moy <moy@adacore.com>
1916 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1917 reference for ALFA mode.
1918 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1919 procedure public so as to use it from formal verification back-end.
1921 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1923 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1924 invalid checks of the Parameter, making Remove_Switch not working
1927 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1929 * targparm.ads: Update header: no run-time exception is needed on this
1932 2011-08-04 Vincent Celier <celier@adacore.com>
1934 * a-fihema.adb: Use System.IO instead of GNAT.IO
1936 2011-08-04 Thomas Quinot <quinot@adacore.com>
1938 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1939 are forbidden in Compiler_Unit mode.
1941 2011-08-04 Robert Dewar <dewar@adacore.com>
1943 * sem_util.adb: Minor reformatting.
1945 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1947 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
1948 library-level finalizers.
1949 (Gen_Finalize_Library_C): Update the import string for library-level
1951 (Gen_Finalize_Library_Defs_C): Update the definition name of a
1952 library-level finalizer.
1953 * exp_ch7.adb: Remove with and use clauses for Stringt.
1954 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
1955 Spec_Decl. Add local variable Body_Id. The names of library-level
1956 finalizers are now manually fully qualified and are no longer external.
1957 A single name is now capable of servicing .NET, JVM and non-VM targets.
1958 Pragma Export is no longer required to provide visibility for the name.
1959 (Create_Finalizer_String): Removed.
1960 (New_Finalizer_Name): New routine which mimics New_..._Name.
1962 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1964 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
1965 elaboration counter to Standard_Short_Integer.
1966 * sem_util.adb (Build_Elaboration_Entity): Likewise.
1967 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
1968 (Gen_Elab_Externals_C): Likewise.
1970 2011-08-04 Ed Falis <falis@adacore.com>
1972 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1973 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1974 system-vxworks-mips.ads, system-vxworks-x86.ads
1975 (Always_Compatible_Rep): set to False for all VxWorks targets.
1977 2011-08-04 Robert Dewar <dewar@adacore.com>
1979 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
1980 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
1981 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
1982 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
1983 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
1984 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
1985 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
1986 Minor reformatting and code reorganization.
1988 2011-08-04 Emmanuel Briot <briot@adacore.com>
1990 * projects.texi: Added doc for aggregate projects.
1992 2011-08-04 Emmanuel Briot <briot@adacore.com>
1994 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
1995 Add support for overriding the Project_Path in aggregate projects.
1997 2011-08-04 Robert Dewar <dewar@adacore.com>
1999 * a-cofove.ads: Minor reformatting.
2001 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2003 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2004 on the generated code.
2005 (Build_Finalize_Statements): Update the comment on the generated code.
2006 (Build_Initialize_Statements): Update the comment on the generated code.
2007 (Build_Object_Declarations): Add local variable Result. The object
2008 declarations are now built in sequence.
2009 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2012 2011-08-04 Robert Dewar <dewar@adacore.com>
2014 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2016 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2018 * einfo.ads (Elaboration_Entity): Document new definition and use.
2019 (Elaboration_Entity_Required): Adjust to above change.
2020 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2021 * exp_ch12.adb: And with and use for Snames.
2022 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2023 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2024 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2025 <Check_Unit_Name>: Deal with N_Expanded_Name.
2026 <Attribute_Elaborated>: Extend to all unit names.
2027 * sem_elab.adb: And with and use for Uintp.
2028 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2029 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2030 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2031 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2032 from Gen_Adainit_Ada.
2033 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2034 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2035 case, do not call System.Standard_Library.Adafinal; instead call
2036 finalize_library if needed.
2037 (Gen_Adafinal_C): Likewise.
2038 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2039 non-main program case.
2040 (Gen_Adainit_C): Generate a couple of external declarations here.
2041 In the main program case, set SSL.Finalize_Library_Objects.
2042 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2043 (Gen_Elab_Calls_C): Likewise.
2044 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2045 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2046 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2048 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2049 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2051 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2052 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2053 of external declarations. Â Call Gen_Finalize_Library_C.
2055 2011-08-04 Emmanuel Briot <briot@adacore.com>
2057 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2058 Compute_Compilation_Phases): new subprogram.
2059 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2060 The number of mains as well as the various compilation phases that
2061 need to be run are now project tree specific, since various
2062 aggregated trees might have different requirements. In particular,
2063 they do not all require bind or link phases.
2065 2011-08-04 Emmanuel Briot <briot@adacore.com>
2067 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2068 (Project_Tree_Appdata): New type.
2069 It is now possible to associate application-specific data to a project
2070 tree. In particular, this is used in the gprbuild builder to avoid a
2071 number of global tables and htables, especially now that there can be
2072 several project trees loaded at once because of aggregate projects.
2073 (Debug_Name): new procedure.
2074 * projects.texi: Clarify syntax of "**" for Source_Dirs
2076 2011-08-03 Emmanuel Briot <briot@adacore.com>
2078 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2079 the "roots" for a main.
2080 (Fill_From_Project): add support for aggregate projects. Main units
2081 in aggregated projects are now automatically added in the list of
2082 files to build (although this fails later on in gprbuild, because
2083 these files are not using the root proejct tree, so this needs
2085 * gcc-interface/Make-lang.in: Update dependencies.
2087 2011-08-03 Yannick Moy <moy@adacore.com>
2089 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2090 conditional expression in ALFA.
2091 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2092 expressions as not in ALFA.
2094 2011-08-03 Robert Dewar <dewar@adacore.com>
2096 * a-cofove.adb: Minor reformatting.
2098 2011-08-03 Emmanuel Briot <briot@adacore.com>
2100 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2101 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2103 These packages are more logically placed in the Queue package, since
2104 they manipulate the queue. It is also likely that they can be adapted
2105 for gnatmake, thus sharing more code.
2106 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2107 that we could move the above.
2109 2011-08-03 Emmanuel Briot <briot@adacore.com>
2111 * errutil.adb (Finalize): clean up the list of error messages on exit.
2112 Calling this subprogram multiple times will no longer show duplicate
2113 error messages on stderr.
2115 2011-08-03 Emmanuel Briot <briot@adacore.com>
2117 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2118 Getopt_Switches when we have already define a command line
2121 2011-08-03 Yannick Moy <moy@adacore.com>
2123 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2124 in ALFA. Instead, they are considered as assertions to prove.
2125 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2126 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2127 if they have no ELSE part, or if they occur in pre- and postconditions,
2128 where the Condition cannot have side-effects in ALFA
2129 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2130 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2131 Instead, include type conversion between scalar types in ALFA.
2132 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2133 if-and-only-if its type is in ALFA.
2135 2011-08-03 Thomas Quinot <quinot@adacore.com>
2137 * scos.adb, get_scos.adb, put_scos.adb
2138 New code letter for decisions: G (entry guard)
2140 (Traverse_Subprogram_Body): Rename to...
2141 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2142 (Traverse_Protected_Body): New subprogram
2143 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2144 protected bodies and entry bodies.
2146 2011-08-03 Yannick Moy <moy@adacore.com>
2148 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2149 entities with get/set subprograms, which is set on procedure entities
2150 generated by the compiler for a postcondition.
2151 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2152 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2153 entity for a declaration
2154 (Get_Unique_Entity_For_Decl): new function returning an entity which
2155 represents a declaration, so that matching spec and body have the same
2158 2011-08-03 Robert Dewar <dewar@adacore.com>
2160 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2161 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2163 2011-08-03 Yannick Moy <moy@adacore.com>
2165 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2166 library-level because retriction No_Implicit_Dynamic_Code in the
2167 front-end prevents its definition as a local subprogram
2168 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2169 for reuse in other contexts
2170 (Traverse_Declarations_Or_Statements,
2171 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2172 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2173 procedures take a callback parameter to be called on all declarations
2175 (Traverse_All_Compilation_Units): new generic function to traverse a
2176 compilation unit and call a callback parameter on all declarations
2178 2011-08-03 Javier Miranda <miranda@adacore.com>
2180 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2181 in Java since they are always enclosed in a namespace that
2182 differentiates them, and overloaded entities are supported by the VM.
2184 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2186 * checks.adb (Determine_Range): If a computed bound of an operation is
2187 outside the range of the base type of the expression, and overflow
2188 checks are enabled, the result is unknown and cannot be used for any
2189 subsequent constant folding.
2190 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2191 unknown, so is the result of the comparison.
2193 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2195 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2196 From_Abort. When finalization was triggered by an abort, propagate
2197 Standard'Abort_Signal rather than Program_Error.
2198 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2200 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2201 From_Abort. When finalization was triggered by an abort, propagate
2202 Standard'Abort_Signal rather than Program_Error.
2203 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2205 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2206 Abort_Id. Update the calls to Build_Object_Declarations and
2207 Build_Raise_Statement to include Abort_Id.
2208 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2209 calls to Build_Object_Declarations and Build_Raise_Statement to include
2211 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2212 calls to Build_Object_Declarations and Build_Raise_Statement to include
2214 (Build_Components): Create an entity for Abort_Id when exceptions are
2215 allowed on the target.
2216 (Build_Finalizer): New local variable Abort_Id.
2217 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2218 calls to Build_Object_Declarations and Build_Raise_Statement to include
2220 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2221 declaration of flag Abort_Id to preserve the original abort status
2222 before finalization code is executed.
2223 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2224 runtime routine Raise_From_Controlled_Operation.
2225 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2226 Abort_Id. Update the call to Build_Object_Declarations to include
2227 Abort_Id. Update the layout of the finalizer body.
2228 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2229 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2230 clunky code to create all flags and objects related to
2231 exception propagation and replace it with a call to
2232 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2234 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2235 Add new formal Abort_Id and associated comment on its use.
2236 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2238 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2239 Remove the clunky code to create all flags and objects related to
2240 exception propagation and replace it with a call to
2241 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2243 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2245 * s-tassta.adb: Fix minor typos.
2247 2011-08-03 Robert Dewar <dewar@adacore.com>
2249 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2250 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2252 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2254 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2255 to packages. This ensures that the finalizer body will not end up
2256 inside the freeze node.
2257 (Process_Declarations): Add code to detect whether a freeze node has a
2258 nested finalization collection.
2260 2011-08-03 Pascal Obry <obry@adacore.com>
2262 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2263 (Current_Session): Return a not null access to Session_Type.
2264 (Default_Session): Likewise.
2266 2011-08-03 Robert Dewar <dewar@adacore.com>
2268 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2269 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2271 2011-08-03 Pascal Obry <obry@adacore.com>
2273 * g-awk.ads: Minor comment fix.
2275 2011-08-03 Sergey Rybin <rybin@adacore.com>
2277 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2278 the tree structure related to discriminant constraints.
2279 Original_Discriminant cannot be used any more for computing the
2280 defining name for the reference to a discriminant.
2282 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2284 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2285 function is not visibly tagged, this is not a dispatching call and
2286 therfore is not Tag_Indeterminate, even if the function is marked as
2287 dispatching on result.
2289 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2291 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2292 (Expand_N_Free_Statement): Add a guard to protect against run-times
2293 which do not support controlled types.
2294 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2295 against run-times which do not support controlled types.
2296 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2297 against run-times which do not support controlled types.
2298 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2299 against run-times which do not support controlled types.
2300 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2301 protect against run-times which do not support controlled types.
2303 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2305 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2306 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2308 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2310 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2311 modified in the source, to prevent spurious warnings when compiling
2314 2011-08-03 Thomas Quinot <quinot@adacore.com>
2316 * a-except-2005.adb: Minor reformatting.
2318 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2320 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2321 is a renaming declaration in the private part of a package, do not emit
2322 a warning that the with_clause could be moved because the renaming may
2323 be used in the body or in a child unit.
2325 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2327 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2328 Propagate the Comes_From_Source attribute from the original return
2329 object to the renaming.
2331 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2333 * exp_ch7.adb (Build_Raise_Statement): Do not call
2334 Raise_From_Controlled_Operation when this routine is not present in
2335 the run-time library.
2336 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2337 libraries (Ravenscar), tasks are non-terminating, and protected objects
2338 and tasks can only appear at library level, so we do not want
2339 finalization of protected objects nor tasks.
2340 * exp_intr.adb: Minor clarification in comment.
2341 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2342 Gen_Output_File_C): Remove references to finalization of library-level
2343 objects when using restricted run-time libraries.
2345 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2347 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2348 Original_Discriminant only if the parent type is a generic formal.
2350 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2352 * exp_ch13.adb: Add with and use clause for Targparm;
2353 (Expand_N_Free_Statement): Prevent the generation of a custom
2354 Deallocate on .NET/JVM targets since this requires pools and address
2356 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2357 .NET/JVM targets, attach the newly allocated object to the access
2358 type's finalization collection. Do not generate a call to
2359 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2360 exist in the runtime.
2361 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2362 create a custom Allocate for object that do not require initialization.
2363 Attach a newly allocated object to the access type's finalization
2364 collection on .NET/JVM.
2365 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2366 assignment of controlled types on .NET/JVM. The two hidden pointers
2367 Prev and Next and stored and later restored after the assignment takes
2369 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2370 kludge for .NET/JVM to recognize a particular piece of code coming from
2371 Heap_Management and change the call to Finalize into Deep_Finalize.
2372 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2373 finalization collections on .NET/JVM only for types derived from
2374 Controlled. Separate the association of storage pools with a collection
2375 and only allow it on non-.NET/JVM targets.
2376 (Make_Attach_Call): New routine.
2377 (Make_Detach_Call): New routine.
2378 (Process_Object_Declarations): Suppress the generation of
2379 build-in-place return object clean up code on .NET/JVM since it uses
2381 * exp_ch7.ads (Make_Attach_Call): New routine.
2382 (Make_Detach_Call): New routine.
2383 * exp_intr.adb Add with and use clause for Targparm.
2384 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2385 on .NET/JVM targets.
2386 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2387 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2388 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2389 names used in finalization.
2391 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2393 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2394 (Attach, Detach): Lock the current task when chaining an object onto a
2397 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2399 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2400 Rewritten to create the message strings when the exception is not
2401 raised by an abort during finalization.
2402 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2403 Raise_From_Controlled_Operation and update its associated comment.
2404 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2405 Ada.Finalization.Heap_Management provides key functionality
2406 associated with controlled objects on the heap, their creation,
2407 finalization and reclamation. Type Finalization_Collection is
2408 effectively a wrapper which sits ontop of a storage pool and performs
2409 all necessary bookkeeping for all the objects it contains. Each
2410 access-to-controlled or access-to-class-wide type receives a collection
2411 as part of its expansion. The compiler generates buffer code and
2412 invokes Allocate / Deallocate to create and destroy allocated
2414 * a-finali.adb ("="): Removed.
2415 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2416 fields Prev and Next.
2417 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2418 A library unit with at least one controlled object on the library level
2419 has a special finalizer which is invoked by the binder. To signal this,
2420 ali files carry field PF.
2421 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2422 associated comment on field usage.
2423 * a-tags.adb (Get_RC_Offset): Removed.
2424 (Needs_Finalization): New routine.
2425 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2426 Dispatch tables now carry field Needs_Finalization which provides
2427 runtime indication whether a type is controlled or has controlled
2428 components or both. Remove field RC_Offset.
2429 (Get_RC_Offset): Removed along with its associated pragma Export.
2430 Since tagged types with controlled components no longer carry hidden
2431 field _controller, the special mechanism to retrieve its location is no
2433 (Needs_Finalization): New routine.
2434 * atree.ads, atree.adb (Elist24): New routine.
2435 (Set_Elist24): New routine.
2436 * atree.h: Add a define clause for Elist24.
2437 * bindgen.adb New library-level variable Lib_Final_Built.
2438 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2439 presence of a VM target, the routine generates calls to the proper
2440 library finalization routine.
2441 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2442 targets. Set the correct library finalization routine depending on
2443 whether the library has controlled objects or this is a VM compilation.
2444 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2445 to library-level finalizers of compiled units in reverse order of
2446 elaboration. It also produces exception management code and reraises a
2447 potential exception after all units have been finalized.
2448 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2449 library-level finalizers of compiled units in reverse order of
2451 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2452 definitions of all library-level finalizers available to the compilation
2453 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2455 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2456 System.Standard_Library.Adafinal directly. If the library needs
2457 finalization actions, create the sequence of finalization calls.
2458 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2459 Generate a with clause for System.Soft_Links when compiling for a VM.
2460 Remove the code which imports System.Standard_Library.Adafinal as
2461 Do_Finalize. Generate the library finalization routine.
2462 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2463 If the library needs finalization actions, create all the definitions
2464 of library- level finalizers.
2465 (Has_Finalizer): New routine. Determines whether at least one compiled
2466 unit has a library-level finalizer.
2467 Add type Qualification_Mode.
2468 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2469 * einfo.adb: New usage of field 15 as Return_Flag.
2470 Remove Finalization_Chain_Entity from the usages of field 19.
2471 Remove Associated_Final_Chain from the usages of field 23.
2472 New usage of field 23 as Associated_Collection.
2473 New usage of field 24 as Finalizer.
2474 New usage of flag 252 as Is_Processed_Transient.
2475 (Associated_Final_Chain): Removed.
2476 (Associated_Collection): New routine.
2477 (Finalization_Chain_Entity): Removed.
2478 (Finalizer): New routine.
2479 (Is_Finalizer): New routine.
2480 (Is_Processed_Transient): New routine.
2481 (Return_Flag): New routine.
2482 (Set_Associated_Final_Chain): Removed.
2483 (Set_Associated_Collection): New routine.
2484 (Set_Finalization_Chain_Entity): Removed.
2485 (Set_Finalizer): New routine.
2486 (Set_Is_Processed_Transient): New routine.
2487 (Set_Return_Flag): New routine.
2488 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2490 (Write_Field8_Name): Alphabetize the output.
2491 (Write_Field11_Name): Alphabetize the output.
2492 (Write_Field12_Name): Alphabetize the output.
2493 (Write_Field13_Name): Alphabetize the output.
2494 (Write_Field14_Name): Alphabetize the output.
2495 (Write_Field15_Name): Alphabetize the output.
2496 (Write_Field16_Name): Alphabetize the output.
2497 (Write_Field17_Name): Alphabetize the output.
2498 (Write_Field18_Name): Alphabetize the output.
2499 (Write_Field19_Name): Alphabetize the output. Remove the output of
2500 Finalization_Chain_Entity.
2501 (Write_Field20_Name): Alphabetize the output.
2502 (Write_Field21_Name): Alphabetize the output.
2503 (Write_Field22_Name): Alphabetize the output.
2504 (Write_Field23_Name): Alphabetize the output. Remove the output of
2505 Associated_Final_Chain. Add output for Associated_Collection.
2506 (Write_Field24_Name): Alphabetize the output.
2507 (Write_Field25_Name): Add output for Finalizer.
2508 (Write_Field26_Name): Alphabetize the output.
2509 (Write_Field27_Name): Alphabetize the output.
2510 (Write_Field28_Name): Alphabetize the output.
2511 * einfo.ads: Add new field description for Associated_Collection and
2513 Remove Associated_Final_Chain and its uses in nodes.
2514 Remove Finalization_Chain_Entity and its uses in nodes.
2515 Add new field description for Finalizer and its uses in nodes.
2516 Add new synthesized attribute Is_Finalizer.
2517 Add new flag description for Is_Processed_Transient and its uses in
2519 Add new field description for Return_Flag and its uses in nodes.
2520 (Associated_Final_Chain): Removed along with its pragma Inline.
2521 (Associated_Collection): New routine and pragma Inline.
2522 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2523 (Finalizer): New routine and pragma Inline.
2524 (Is_Finalizer): New routine and pragma Inline.
2525 (Is_Processed_Transient): New routine and pragma Inline.
2526 (Return_Flag): New routine and pragma Inline.
2527 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2528 (Set_Associated_Collection): New routine and pragma Inline.
2529 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2530 (Set_Finalizer): New routine and pragma Inline.
2531 (Set_Is_Processed_Transient): New routine and pragma Inline.
2532 (Set_Return_Flag): New routine and pragma Inline.
2533 * exp_aggr.adb: Alphabetize subprograms.
2534 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2535 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2536 associated comments. Remove local variables External_Final_List and
2538 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2539 Ancestor. Remove the retrieval of finalization lists. Update the call to
2541 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2542 lists. Update the call to Late_Expansion.
2543 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2544 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2545 (Gen_Assign): Remove the retrieval of the finalization list used to
2546 build the assignment. Update the calls to Make_Init_Call and
2548 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2549 Remove the mechanism to determine attachment levels and finalization
2550 list retrieval. Remove the processing for coextensions.
2551 (Init_Controller): Removed. Controllers no longer exist.
2552 (Late_Expansion): Remove formals Flist and Obj along with their
2553 associated comments. Update the calls to Build_Record_Aggr_Code and
2554 Build_Array_Aggr_Code.
2555 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2556 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2557 appear in entry bodies, protected subprograms and task bodies.
2558 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2559 * exp_ch3.adb (Add_Final_Chain): Removed.
2560 (Build_Array_Init_Proc): Alphabetize local variables.
2561 (Build_Assignment): Alphabetize local variables. Update the call to
2563 (Build_Class_Wide_Master): Rename local variables to better reflect
2565 (Build_Discriminant_Assignments): Code reformatting.
2566 (Build_Init_Call_Thru): Code reformatting.
2567 (Build_Init_Procedure): Code reformatting. Generate a special version
2568 of Deep_Finalize which is capable of finalizing all initialized
2569 components and ignore the rest.
2570 (Build_Init_Statements): Rename local variables to better reflect their
2572 Reimplement the mechanism to include the creation and update of an index
2573 variable called a "counter". It is used as a bookmark for tracing
2574 initialized and non-initialized components.
2575 (Build_Initialization_Call): Remove local variable Controller_Typ.
2576 Alphabetize all local variables. Remove the initialization of the
2577 record controller and update the call to Make_Init_Call.
2578 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2579 New local variable Counter.
2580 (Constrain_Array): Alphabetize.
2581 (Expand_Freeze_Array_Type): Create a collection instead of a
2583 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2584 Finalize_Address which is used in conjunction with allocated controlled
2586 (Expand_N_Object_Declaration): Remove the creation of a finalization
2587 list for anonymous access types. Update the calls to Make_Init_Call and
2589 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2590 retrieval of finalization lists. Remove the expansion of the record
2591 controller. Create TSS primitive Finalize_Address used in conjunction
2592 with controlled objects on the heap. Create finalization collections
2593 for access-to-controlled record components.
2594 (Expand_Record_Controller): Removed.
2595 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2596 class-wide types now requires additional processing. Create
2597 finalization collections for access-to-controlled types.
2598 (Increment_Counter): New routine.
2599 (Make_Counter): New routine.
2600 (Make_Eq_If): Remove the mention of Name_uController.
2601 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2602 types coming from System.Finalization_Root.
2603 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2604 (Predefined_Primitive_Bodies): There is no longer need to skip types
2605 coming from System.Finalization_Root.
2606 (Stream_Operation_OK): Do not generate stream routines for
2607 type Ada.Finalization.Heap_Management.Finalization_Collection.
2608 * exp_ch3.ads: Alphabetize subprograms.
2609 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2610 Add with and use clause for Lib.
2611 (Complete_Coextension_Finalization): Removed.
2612 (Complete_Controlled_Allocation): New routine. Create a finalization
2613 collection for anonymous access-to-controlled types. Create a custom
2614 Allocate which interfaces with the back end and the machinery in
2616 (Expand_Allocator_Expression): Add necessary calls to
2617 Complete_Controlled_Allocation. Remove the retrieval of finalization
2618 lists. Update the calls to Make_Adjust_Call. Generate a call to
2619 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2620 the associated collection.
2621 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2622 Code clean up. Remove the retrieval of finalization lists and
2624 Update the call to Make_Init_Call. Generate a call to
2625 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2626 the associated collection.
2627 (Get_Allocator_Final_List): Removed. Finalization lists are not
2629 (Suitable_Element): Remove the mention of Name_uController.
2630 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2631 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2632 the left hand side, carry out the assignment and adjust the left hand
2634 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2635 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2636 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2637 BIP_Collection and BIPcollection.
2638 (Build_Heap_Allocator): New routine used to allocate the return object
2639 of a build-in-place function onto a collection.
2640 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2641 (Expand_Call): Do not replace direct calls to Deep routines with their
2643 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2644 and update their occurrences. Add a special return flag to monitor the
2645 [ab]normal execution of the function. The flag is set right before the
2647 Rewrite the mechanism used to allocate a build-in-place return object
2648 on the heap or on a storage pool.
2649 (Is_Direct_Deep_Call): New routine.
2650 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2651 build-in-place function call instead of a final list. Build a call to
2652 Set_Finalize_Address_Ptr to decorate the associated collection.
2653 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2654 order to name the build-in-place function call's result for later
2655 finalization. Add a collection to a build-in-place function call
2656 instead of a final list.
2657 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2658 build-in-place function call instead of a final list. Remove the code
2659 which moves one final list and transforms it into the actual in a
2660 nested build-in-place call.
2661 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2662 build-in-place function call instead of a final list.
2663 (Move_Final_List): Removed.
2664 (Needs_BIP_Collection): New routine.
2665 (Needs_BIP_Final_List): Removed.
2666 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2667 enumeration type BIP_Formal_Kind.
2668 Update the related comment.
2669 (Needs_BIP_Collection): New routine.
2670 (Needs_BIP_Final_List): Removed.
2671 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2672 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2673 majority of subprograms in this unit. Add Name_Finalize_Address to
2674 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2675 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2676 statements for an array type.
2677 (Build_Adjust_Statements): Create the adjust statements for a record
2679 (Build_Cleanup_Statements): New routine. A procedure which given any
2680 construct containing asynchronous calls, references to _master, or is a
2681 task body, a task allocation or a protected body produces the necessary
2682 runtime calls to clean up these constructs.
2683 (Build_Exception_Handler): New routine.
2684 (Build_Final_List): Removed.
2685 (Build_Finalization_Collection): New routine. A core procedure which
2686 creates a collection to service heap allocated controlled objects
2687 associated with an access-to-controlled type.
2688 (Build_Finalize_Statements): Create the finalization statements for a
2690 (Build_Finalizer): New routine. A core procedure which given any
2691 construct with declarations and/or statements detects all objects which
2692 need any type of clean up (controlled objects, protected objects) and
2693 generates all necessary code to clean up the said objects in the proper
2695 (Build_Finalizer_Call): New routine.
2696 (Build_Initialize_Statements): Create the initialization statements for
2697 an array type. The generated routine contains code to finalize partially
2699 (Build_Object_Declarations): New routine.
2700 (Build_Raise_Statement): New routine.
2701 (Clean_Simple_Protected_Objects): Removed.
2702 (Controller_Component): Removed.
2703 (Enclosing_Function): New routine.
2704 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2705 either declarations or statements or both.
2706 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2707 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2709 (Find_Final_List): Removed.
2710 (Global_Flist_Ref): Removed.
2711 (In_Finalization_Root): Removed.
2712 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2713 scope in terms of tree nodes. Process all transient variables within
2715 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2716 generated after the adjust.
2717 (Make_Attach_Call): Removed.
2718 (Make_Call): New routine.
2719 (Make_Clean): Removed.
2720 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2722 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2724 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2726 (Make_Final_Call): Modified to simply create a call to either
2727 Deep_Finalize or Finalize.
2728 (Make_Finalize_Address_Body): New routine.
2729 (Make_Finalize_Address_Stmts): New routine. A function which produces
2730 TSS primitive Finalize_Address used in conjunction with heap allocated
2732 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2733 (Make_Init_Call): Rewritten. There is no longer an attach call
2734 generated after initialization.
2735 (Make_Local_Deep_Finalize): New routine.
2736 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2737 (Make_Transient_Block): Remove the finalization list retrieval and
2739 (Needs_Finalization): Moved to Exp_Util.
2740 (Parent_Field_Type): New routine.
2741 (Preprocess_Components): New routine.
2742 (Process_Transient_Objects): New routine.
2743 (Wrap_HSS_In_Block): New routine.
2744 (Wrap_Transient_Declaration): Remove finalization list management and
2745 controller insertion.
2746 (Wrap_Transient_Expression): Code reformatting.
2747 (Wrap_Transient_Statement): Code reformatting.
2748 * exp_ch7.ads (Build_Final_List): Removed.
2749 (Build_Finalization_Collection): New routine.
2750 (Build_Raise_Statement): New routine.
2751 (Controller_Component): Removed.
2752 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2753 (Find_Final_List): Removed.
2754 (In_Finalization_Root): Removed.
2755 (Is_Simple_Protected_Type): Update related comment.
2756 (Make_Adjust_Call): New parameter profile and associated comments.
2757 (Make_Attach_Call): Removed.
2758 (Make_Final_Call): New parameter profile and associated comments.
2759 (Make_Finalize_Address_Body): New routine.
2760 (Make_Init_Call): New parameter profile and associated comments.
2761 (Make_Local_Deep_Finalize): New routine.
2762 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2763 (Needs_Finalization): Moved to Exp_Util.
2764 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2765 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2766 (Find_Protection_Type): Moved to Exp_Util.
2767 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2768 (Make_DT): Update sequence of dispatch table initialization. Remove the
2769 initialization of field RC_Offset. Add initialization of field Needs_
2771 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2772 Reimplement how an object is first finalized, then deallocated.
2773 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2775 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2776 Register TSS_Finalize_Address with type TSS_Names.
2777 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2778 procedure provides the interface between an allocation / deallocation
2779 and the support machinery in Ada.Finalization.Heap_Management.
2780 (Find_Init_Call): Code reformatting.
2781 (Find_Init_Call_In_List): Code reformatting.
2782 (Find_Protection_Type): Moved from Exp_Ch9.
2783 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2784 (Has_Controlled_Coextensions): Removed.
2785 (Has_Controlled_Objects): New routine.
2786 (In_Library_Level_Package_Body): New routine.
2787 (Insert_Action_After): New routine.
2788 (Is_Finalizable_Transient): New routine. This predicate determines
2789 whether an object declaration is one of the many variants of controlled
2791 (Is_Null_Access_BIP_Func_Call): New routine.
2792 (Is_Non_BIP_Func_Call): New routine.
2793 (Is_Related_To_Func_Return): New routine.
2794 (Needs_Finalization): Moved from Exp_Ch7.
2795 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2796 (Find_Protection_Type): Moved from Exp_Ch9.
2797 (Has_Controlled_Coextensions): Removed.
2798 (Has_Controlled_Objects): New routine.
2799 (In_Library_Level_Package_Body): New routine.
2800 (Insert_Action_After): New routine.
2801 (Is_Finalizable_Transient): New routine.
2802 (Is_Null_Access_BIP_Func_Call): New routine.
2803 (Is_Non_BIP_Func_Call): New routine.
2804 (Is_Related_To_Func_Return): New routine.
2805 (Needs_Finalization): Moved from Exp_ch7.
2806 * expander.adb (Expand): Add a case for N_Free_Statement.
2807 * freeze.adb (Freeze_All): Replace the generation of a finalization
2808 list with a collection for access-to-controlled types.
2809 (Freeze_Entity): Code reformatting.
2810 (Freeze_Record_Type): Remove the freezing of a record controller
2812 (Freeze_Subprogram): Code reformatting.
2813 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2815 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2816 has a library-level finalizer.
2817 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2818 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2819 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2820 files. Add a-fihema to the list of object files.
2822 Alphabetize the associations in type Is_Parameterless_Attribute.
2823 * rtsfind.ads: Ada.Finalization_List.Controller and
2824 System.Finalization_Implementation are no longer a GNAT unit.
2825 Update the range of type Ada_Finalization_Child. Remove the following
2826 recoverable entities:
2828 RE_Attach_To_Final_List
2832 RE_Finalizable_Ptr_Ptr
2833 RE_Global_Final_List
2834 RE_Limited_Record_Controller
2837 RE_Record_Controller
2838 RE_Simple_List_Controller
2840 Add the following recoverable entities:
2842 RE_Add_Offset_To_Address
2846 RE_Exception_Identity
2847 RE_Finalization_Collection
2848 RE_Finalization_Collection_Ptr
2849 RE_Needs_Finalization
2850 RE_Save_Library_Occurrence
2851 RE_Set_Finalize_Address_Ptr
2852 RE_Set_Storage_Pool_Ptr
2854 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2856 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2857 (First_Stored_Discriminant): Remove the mention of Name_uController.
2858 * sem_aux.ads: Comment reformatting.
2859 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2860 to redecorate an already existing class-wide type.
2861 (Decorate_Tagged_Type): New parameter profile and associated comment.
2862 Create a "shadow class-wide type" for a shadow entity.
2863 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2864 of the final chain along with the associated comment.
2865 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2866 Full_Desig and set it to the full view of the designated type.
2867 Initialize the finalization collection to empty.
2868 (Build_Derived_Record_Type): Alphabetize local variables. Code
2870 (Collect_Fixed_Components): Remove the mention of Name_uController.
2871 (Create_Constrained_Components): Remove the mention of Name_uController.
2872 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2873 class-wide type of a shadow entity.
2874 (Process_Full_View): Update the machinery which marks type
2875 Limited_Controlled's entity as limited.
2876 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2877 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2878 list, instead make a collection build-in-place formal.
2879 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2880 a designated type in order to establish a match between the renaming
2881 and the renamed entity.
2882 (Find_Selected_Component): Add guard to prevent spurious exceptions
2883 from being raised on .NET/JVM.
2884 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2885 to the list of primitive that need special processing. Update arrays
2886 C_Names and D_Names.
2887 (Replace_Types): Handle class-wide types.
2888 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2889 different parameter profile, look at the first formal.
2890 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2891 use clauses for Exp_Util.
2892 * sem_res.adb: Remove with and use clauses for Elists.
2893 (Propagate_Coextensions): Removed.
2894 (Resolve_Allocator): Do not propagate the list of coextensions from one
2895 allocator to another.
2896 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2897 Deaccessed_T to Desig_Typ.
2898 (Enter_Name): Remove the mention of Name_uController.
2899 (Gather_Components): Remove the mention of Name_uController.
2900 (Incomplete_Or_Private_View): New routine.
2901 (Is_Coextension_Root): Removed.
2902 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2903 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2904 (Is_Coextension_Root): Removed.
2905 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2906 Controlled types are now derived from a null tagged record. Remove
2907 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2908 * sinfo.adb (Coextensions): Removed.
2909 (Set_Coextensions): Removed.
2910 * sinfo.ads: Remove Coextensions from the explanation of node fields
2911 and its uses in nodes.
2912 Update the field usage of N_Allocator.
2913 (Coextensions): Removed along with its pragma Inline.
2914 (Set_Coextensions): Removed along with its pragma Inline.
2915 * snames.ads-tmpl: Remove names
2920 Name_uLocal_Final_List
2921 Name_Finalization_Root
2928 Name_Finalize_Address
2929 * s-pooglo.adb (Allocate): Add overriding indicator.
2930 (Deallocate): Add overriding indicator.
2931 (Storage_Size): Add overriding indicator.
2932 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2933 than Finalize_Global_List.
2934 (Null_Finalize_Global_List): Removed.
2935 (Save_Library_Occurrence): New routine.
2936 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2937 initialization. Add variable Finalize_Library_Objects along with its
2938 pragma Export. Add variables Library_Exception and
2939 Library_Exception_Set along with their pragma Export.
2940 (Null_Finalize_Global_List): Removed.
2941 (Save_Library_Occurrence): New routine.
2942 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2943 rather than Finalize_Global_List.
2944 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2945 of the constructed node.
2947 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2949 * link.c: Include "auto-host.h" before system headers.
2951 2011-08-03 Vincent Celier <celier@adacore.com>
2953 * make.adb (Gnatmake): Add to table Library_Projs only library projects
2954 that are not extended. Do not check if a library project that is
2955 extended should be regenerated. Do not add to table Library_Paths the
2956 libraries that are in extended projects. Link only with libraries that
2957 are in libray projects that are not extended.
2958 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
2959 for a library project that is extended.
2961 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2963 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
2964 conforming subprogram renamings that appear to be completions if they
2965 are not fully conformant.
2966 Such renamings are homographs but not completions.
2967 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
2968 names in a subprogram renaming that appears in an instance.
2970 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2972 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
2973 not immutably limited, build actual subtype from expression to provide
2974 proper bounds to caller.
2976 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2978 * sem_ch8.adb: Minor comment correction.
2980 2011-08-03 Thomas Quinot <quinot@adacore.com>
2982 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
2983 returning a limited array, use an extended return statement.
2985 2011-08-03 Vincent Celier <celier@adacore.com>
2987 * make.adb (Initialize): If --subdirs= is used, but no project file is
2988 specified, attempt to create the specify subdir if it does not already
2989 exist and use it as the object directory as if -D had been specified.
2991 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2993 * s-tpopsp-vms.adb: New file.
2994 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
2995 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
2997 2011-08-03 Emmanuel Briot <briot@adacore.com>
2999 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3002 2011-08-03 Yannick Moy <moy@adacore.com>
3004 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3005 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3006 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3007 detect that an array has static bounds.
3009 2011-08-03 Thomas Quinot <quinot@adacore.com>
3011 * exp_dist.adb: Minor reformatting.
3013 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3015 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3016 (ATCB_Key): Removed, not always used.
3018 2011-08-03 Emmanuel Briot <briot@adacore.com>
3020 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3021 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3022 most remaining global variables.
3024 2011-08-03 Robert Dewar <dewar@adacore.com>
3026 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3027 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3030 2011-08-03 Javier Miranda <miranda@adacore.com>
3032 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3033 that must be passed by copy in VM targets.
3035 2011-08-03 Emmanuel Briot <briot@adacore.com>
3037 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3038 duplicates a similar htable now in the project tree.
3040 2011-08-03 Claire Dross <dross@adacore.com>
3042 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3043 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3044 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3045 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3046 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3047 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3048 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3051 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3053 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3054 (ATCB_Key): Removed, not always used.
3055 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3057 * s-tpopsp-tls.adb: New file.
3058 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3059 x86/x64/ia64/powerpc/sparc Linux.
3061 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3063 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3064 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3066 2011-08-03 Thomas Quinot <quinot@adacore.com>
3068 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3069 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3070 Fix type selection for mapping integer types to PolyORB types.
3072 2011-08-03 Bob Duff <duff@adacore.com>
3074 * sem_ch7.adb: Minor comment clarification.
3076 2011-08-03 Bob Duff <duff@adacore.com>
3078 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3079 an error analyzing a choice, skip further processing. Further
3080 processing could cause a crash or cascade errors.
3082 2011-08-03 Emmanuel Briot <briot@adacore.com>
3084 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3085 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3086 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3087 prj-env.ads (Shared_Project_Tree_Data): new type
3088 An aggregate project and its aggregated trees need to share the common
3089 data structures used for lists of strings, packages,... This makes the
3090 code simpler since otherwise we have to pass the root tree (also used
3091 for the configuration file data) in addition to the current project
3092 tree. This also avoids ambiguities as to which tree should be used.
3093 And finally this saves a bit of memory.
3094 (For_Every_Project_Imported): new parameter Tree.
3095 Since aggregated projects are using a different tree, we need to let
3096 the caller know which tree to use to manipulate the returned project.
3098 2011-08-03 Robert Dewar <dewar@adacore.com>
3100 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3101 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3102 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3103 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3105 2011-08-03 Javier Miranda <miranda@adacore.com>
3107 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3108 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3110 2011-08-03 Bob Duff <duff@adacore.com>
3112 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3115 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3117 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3118 g-sehash.ads: Fix typo. Update header.
3120 2011-08-03 Thomas Quinot <quinot@adacore.com>
3122 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3125 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3127 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3128 prefixes of private types along with records, since the selector may be
3130 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3131 private types along with records, since the selector may be a
3134 2011-08-03 Emmanuel Briot <briot@adacore.com>
3136 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3138 2011-08-03 Javier Miranda <miranda@adacore.com>
3140 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3141 Tagged_Type_Expansion.
3143 2011-08-03 Yannick Moy <moy@adacore.com>
3146 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3147 concatenation is the name of a constant
3149 2011-08-03 Emmanuel Briot <briot@adacore.com>
3151 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3152 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3153 (Process_Declarative_Items): new parameter Child_Env.
3155 2011-08-03 Yannick Moy <moy@adacore.com>
3157 * alfa.ads Update format of ALFA section in ALI file in order to add a
3158 mapping from bodies to specs when both are present
3159 (ALFA_Scope_Record): add components for spec file/scope
3160 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3162 (Collect_ALFA): after all scopes have been collected, fill in the spec
3163 information when relevant
3164 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3167 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3169 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3170 code unit to decide whether to add internally generated subprograms.
3172 2011-08-03 Javier Miranda <miranda@adacore.com>
3174 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3176 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3179 2011-08-03 Emmanuel Briot <briot@adacore.com>
3181 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3182 code with Makeutl.Get_Switches.
3183 * prj-tree.adb: Update comment.
3185 2011-08-03 Thomas Quinot <quinot@adacore.com>
3187 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3188 subprogram with a limited formal that does not support external
3191 2011-08-03 Yannick Moy <moy@adacore.com>
3193 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3195 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3196 not from current unit in two phases, because it is not possible to
3197 change the table while iterating over its content.
3198 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3200 2011-08-03 Sergey Rybin <rybin@adacore.com>
3202 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3203 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3205 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3207 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3208 and the component type is composite, this is ambiguous for predefined
3209 concatenation, but if the node is not overloaded and the entity is a use
3210 -defined function its profile can be used to resolve that aggregate.
3212 2011-08-03 Robert Dewar <dewar@adacore.com>
3214 * exp_ch4.adb: Minor code cleanup.
3216 2011-08-03 Thomas Quinot <quinot@adacore.com>
3218 * exp_dist.adb: Do not generate distribution stubs if serious errors
3219 have been diagnosed.
3221 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3223 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3224 the first formal of a primitive operation, go to the base type to
3225 handle properly an access to a derived type with constrained
3227 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3228 user-defined function that is only use-visible.
3230 2011-08-03 Robert Dewar <dewar@adacore.com>
3232 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3233 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3234 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3235 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3236 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3237 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3238 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3239 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3241 2011-08-03 Robert Dewar <dewar@adacore.com>
3243 * repinfo.adb (List_Mechanism): Add handling of
3244 Convention_Ada_Pass_By_XXX.
3245 * sem_mech.adb (Set_Mechanism): Ditto.
3246 * sem_prag.adb (Process_Convention): Add entries for
3247 Convention_Ada_Pass_By_XXX.
3248 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3250 2011-08-03 Pascal Obry <obry@adacore.com>
3252 * makeutl.adb: Minor reformatting.
3254 2011-08-03 Vincent Celier <celier@adacore.com>
3257 (Get_File_Name) If the file cannot be found when there are no config
3258 pragmas file and May_Fail is True, return No_File instead of the file
3259 name, to be consistent.
3261 2011-08-03 Pascal Obry <obry@adacore.com>
3263 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3266 2011-08-03 Javier Miranda <miranda@adacore.com>
3269 (Same_Representation): In VM targets the representation of arrays with
3270 aliased components differs from arrays with non-aliased components.
3272 2011-08-03 Emmanuel Briot <briot@adacore.com>
3274 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3275 not systematically lower case attribute indexes that contain no "."
3276 Fix definition of several Naming attributes, which take
3277 a unit name as index and therefore should be case insensitive.
3278 Minor refactoring (reduce length of variable names).
3280 2011-08-03 Emmanuel Briot <briot@adacore.com>
3282 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3284 2011-08-03 Emmanuel Briot <briot@adacore.com>
3286 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3287 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3288 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3289 prj-tree.ads (Prj.Tree.Environment): new type.
3291 2011-08-03 Emmanuel Briot <briot@adacore.com>
3293 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3294 prj-tree.adb, prj-tree.ads (Environment): new type.
3296 2011-08-03 Emmanuel Briot <briot@adacore.com>
3298 * prj-tree.ads: Remove unused variable.
3300 2011-08-03 Yannick Moy <moy@adacore.com>
3302 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3303 issuing messages related to SPARK restriction violation.
3305 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3307 * sem_ch6.adb: guard against error nodes in return statements.
3309 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3311 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3312 a warning can only appear on a configuration file, so emit warning
3313 without further checks.
3315 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3317 * s-interr.ads: add overriding keyword.
3319 2011-08-03 Geert Bosch <bosch@adacore.com>
3321 * exp_attr.adb: Fix minor typo.
3323 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3325 * par-ch4.adb: improve error recovery.
3327 2011-08-03 Emmanuel Briot <briot@adacore.com>
3329 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3330 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3333 2011-08-03 Emmanuel Briot <briot@adacore.com>
3335 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3336 "external" as an attribute name in aggregate projects.
3338 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3340 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3341 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3342 from 0, so we need to adjust.
3344 2011-08-03 Emmanuel Briot <briot@adacore.com>
3346 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3347 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3349 2011-08-03 Yannick Moy <moy@adacore.com>
3351 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3352 restriction on overloaded entity if the entity is not an operator.
3354 2011-08-03 Yannick Moy <moy@adacore.com>
3356 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3357 restrict.ads: Rename remaining Check_Formal_Restriction* into
3358 Check_SPARK_Restriction*.
3360 2011-08-03 Emmanuel Briot <briot@adacore.com>
3362 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3363 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3365 (Project_Empty): removed
3366 (Empty_Project): new parameter Qualifier
3367 This is used to have fields specific to aggregate projects, cleaner
3368 New field to store the list of aggregated projects.
3369 (Check_Aggregate_Project): removed
3370 (Process_Aggregated_Projects, Free): new subprograms.
3372 2011-08-03 Olivier Hainque <hainque@adacore.com>
3374 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3376 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3378 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3379 explicit dereference of an unconstrained type, create a constrained
3380 subtype for it, as is done for function calls that return an
3383 2011-08-03 Thomas Quinot <quinot@adacore.com>
3385 * g-pehage.adb (Finalize): Avoid possible double-free.
3387 2011-08-03 Steve Baird <baird@adacore.com>
3389 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3390 Elab_Spec/Body attrs in CodePeer_Mode.
3392 2011-08-03 Javier Miranda <miranda@adacore.com>
3394 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3395 low bound is not known at compile time but they have no others choice.
3396 Done because in this case the bounds can be obtained directly from the
3399 2011-08-03 Ed Falis <falis@adacore.com>
3401 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3402 on VxWorks SMP. Remove unusable constant ANY_CPU.
3404 2011-08-03 Emmanuel Briot <briot@adacore.com>
3406 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3407 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3408 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3409 Prj.Env.Initialize_Empty): new subprograms
3410 (Get_Env, Find_Project): remove parameter Target_Name.
3412 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3414 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3415 as a condition for the delayed call to Derived_Subprograms done for the
3416 case of the rewriting of a derived type that constrains the
3417 discriminants of its parent type.
3418 Avoids redundant subprogram derivations for private subtype derivations.
3420 2011-08-03 Javier Miranda <miranda@adacore.com>
3422 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3423 Build_Record_Aggr_Code.
3424 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3425 discriminants in extension aggregates.
3427 2011-08-03 Emmanuel Briot <briot@adacore.com>
3429 * prj-pp.adb (Print): also output project qualifiers, since in
3430 particular "aggregate" is mandatory in an aggregate project.
3432 2011-08-03 Emmanuel Briot <briot@adacore.com>
3434 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3435 (Debug_Output): new function.
3437 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3439 * gnat_ugn.texi: Document -Wstack-usage.
3440 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3442 2011-08-03 Thomas Quinot <quinot@adacore.com>
3444 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3445 have keyword LIMITED.
3447 2011-08-03 Yannick Moy <moy@adacore.com>
3449 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3450 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3451 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3452 section (does not happen in compiler, only if code directly calls
3454 * get_alfa.adb, get_alfa.ads: New files.
3455 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3457 * lib-xref-alfa.adb: New file.
3458 * lib-xref.adb, lib-xref.ads
3459 (Xref_Entry): redefine information needed in cross-references for ALFA.
3460 Push ALFA treatments in separated local package.
3461 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3462 identifiers. Return entity of package body instead of spec. Return
3463 Empty for a scope with no location.
3464 (Generate_Reference): adapt to new components for ALFA information.
3465 Remove the need for D references on definitions.
3466 (Is_Local_Reference): moved to ALFA local package
3467 (Output_References): extract subfunction as Extract_Source_Name
3468 (Output_Local_References): remove procedure, replaced by filtering of
3469 cross-references in package ALFA and printing in Put_ALFA.
3470 (Write_Entity_Name): remove procedure
3471 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3472 print exact name of entity as it appears in source file
3473 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3474 * put_alfa.adb, put_alfa.ads: New files.
3475 * xref_lib.adb (Search_Xref): protect read of cross-references against
3476 reading other sections of the ALI file, in gnatxref
3477 (Search): protect read of cross-references against reading other
3478 sections of the ALI file, in gnatfind.
3479 * gcc-interface/Make-lang.in: Update dependencies.
3481 2011-08-03 Thomas Quinot <quinot@adacore.com>
3483 * sem_ch3.adb: Minor reformatting.
3485 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3487 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3488 raising an exception.
3490 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3492 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3493 type, always use 1 as the lower bound or string, even if lower bound of
3494 context is not static, to handle properly null strings in a non-static
3497 2011-08-03 Bob Duff <duff@adacore.com>
3499 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3500 always legal on the right-hand side of an assignment statement; there
3501 is always an applicable index constraint in this case. Therefore, the
3502 check for Pkind = N_Assignment_Statement is now unconditional -- it
3503 doesn't depend on whether Is_Constrained (Typ).
3505 2011-08-03 Robert Dewar <dewar@adacore.com>
3507 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3509 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3511 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3512 for an itype created within a generic unit.
3514 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3516 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3517 suppresses all inlining.
3519 2011-08-03 Robert Dewar <dewar@adacore.com>
3521 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3522 exp_aggr.adb: Minor reformatting.
3524 2011-08-03 Thomas Quinot <quinot@adacore.com>
3526 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3527 tagged assignment when discriminant checks are suppressed. This is
3528 useless and extremely costly in terms of static stack usage.
3530 2011-08-03 Bob Duff <duff@adacore.com>
3532 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3533 of generics, because this leads to the wrong entity in the wrong scope,
3534 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3536 (Process_Interface_Name): Follow Alias for instances of generics, to
3537 correct for the above change.
3539 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3541 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3542 is an integer literal it is always safe to replace the reference. In
3543 addition, if the reference appears in the generated code for an object
3544 declaration it is necessary to copy because otherwise the reference
3545 might be to the uninitilized value of the discriminant of the object
3548 2011-08-03 Pascal Obry <obry@adacore.com>
3550 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3551 ACL used, in this case we want to check for ending .exe, not .exe
3552 anywhere in the path.
3554 2011-08-03 Sergey Rybin <rybin@adacore.com>
3556 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3557 the tree structure (semantic decoration of references to record
3560 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3562 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3563 choices of a named array aggregate, bail out when any choices are
3564 marked as Errors_Posted.
3566 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3568 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3569 in which entity is frozen, to handle properly loop variables in
3572 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3574 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3575 subtype is not static, compute the upper bound using attributes, to
3576 handle properly index types that are not integer types.
3578 2011-08-03 Bob Duff <duff@adacore.com>
3580 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3581 Update copyright notice.
3583 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3585 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3586 Original_Discriminant if within an instance.
3587 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3589 2011-08-03 Thomas Quinot <quinot@adacore.com>
3591 * einfo.ads: Minor reformatting.
3593 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3595 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3596 composite type with an unfrozen subcomponent, in the profile of a
3597 primitive operation.
3599 2011-08-03 Robert Dewar <dewar@adacore.com>
3601 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3603 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3605 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3606 unconstrained type with discriminants is initialized with an aggregate,
3607 use the constrained subtype of the aggregate as the type of the object,
3608 because it is immutable, and this allows the back-end to generate no
3609 code for the object declaration.
3611 2011-08-03 Robert Dewar <dewar@adacore.com>
3613 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3614 comparison operand is variable, and turns out to be zero or negative.
3616 2011-08-03 Javier Miranda <miranda@adacore.com>
3619 (Expand_Dispatching_Constructor_Call): Disable expansion of
3620 code required for native targets. Done to avoid generating
3621 references to unavailable runtime entities in VM targets.
3623 (Expand_N_Object_Declaration): Add missing support to handle
3624 the explicit initialization of class-wide interface objects.
3627 2011-08-03 Matthew Heaney <heaney@adacore.com>
3629 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3631 2011-08-03 Matthew Heaney <heaney@adacore.com>
3633 * a-cbdlli.adb (Splice): move source items from first to last
3635 2011-08-03 Yannick Moy <moy@adacore.com>
3637 * sem_util.ads: comment added.
3639 2011-08-03 Javier Miranda <miranda@adacore.com>
3642 (Expand_Record_Aggregate): In VM targets disable the expansion into
3643 assignments of aggregates whose type is not known at compile time.
3645 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3647 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3648 protected entries and task entries, to build the proper renaming
3649 declaration for entry formals, used in debugging.
3650 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3651 parameters in the same way.
3653 2011-08-02 Robert Dewar <dewar@adacore.com>
3655 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3656 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3657 code reorganization.
3659 2011-08-02 Robert Dewar <dewar@adacore.com>
3661 * debug.adb: Debug flag d.P to suppress length comparison optimization
3662 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3663 comparison of Length by comparing First/Last instead.
3665 2011-08-02 Matthew Heaney <heaney@adacore.com>
3667 * a-cobove.ads: Code clean up.
3669 2011-08-02 Vincent Celier <celier@adacore.com>
3671 * adaint.c (file_names_case_sensitive_cache): New static int.
3672 (__gnat_get_file_names_case_sensitive): Cache the return value in
3673 file_names_case_sensitive_cache at the first invocation, to avoid
3674 multiple calls to getenv.
3676 2011-08-02 Bob Duff <duff@adacore.com>
3678 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3680 2011-08-02 Yannick Moy <moy@adacore.com>
3682 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3683 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3684 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3685 indicate that we are in a precondition or postcondition. This is used in
3686 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3687 decide whether to flag the spec or body of the current subprogram as
3690 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3692 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3694 * a-extiin.ads: New file.
3696 2011-08-02 Bob Duff <duff@adacore.com>
3698 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3699 now raises Name_Error instead of Use_Error in certain cases. The other
3700 parts of this AI were already implemented properly.
3702 2011-08-02 Vincent Celier <celier@adacore.com>
3704 * link.c: Only import "auto-host.h" when building the gnattools.
3706 2011-08-02 Yannick Moy <moy@adacore.com>
3708 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3709 which calls a local subprogram, so extract subprogram
3710 from Mark_Non_ALFA_Subprogram_Body.
3712 2011-08-02 Javier Miranda <miranda@adacore.com>
3715 (Extract_Dispatching_Call): If the type of the dispatching object is an
3716 access type then return an explicit dereference in the Object out-mode
3719 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3721 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3722 compatibility checks for all indexes of an array subtype, not just the
3723 first. Reset Has_Dynamic_Range_Check on the subtype before each
3724 potential check to ensure that Insert_Range_Checks will not elide any
3725 of the dynamic checks.
3727 2011-08-02 Yannick Moy <moy@adacore.com>
3729 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3730 SPARK restriction at parsing time.
3731 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3732 directive only if the SPARK restriction is set for this unit.
3734 2011-08-02 Yannick Moy <moy@adacore.com>
3736 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3737 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3738 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3739 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3740 Mark_Non_ALFA_Subprogram_Body.
3741 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3744 2011-08-02 Yannick Moy <moy@adacore.com>
3746 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3749 2011-08-02 Robert Dewar <dewar@adacore.com>
3751 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3752 exp_ch3.adb: Minor reformatting.
3754 2011-08-02 Emmanuel Briot <briot@adacore.com>
3756 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3757 files, not any regular file.
3758 (__gnat_locate_file_with_predicate): new subprogram.
3760 2011-08-02 Yannick Moy <moy@adacore.com>
3762 * sinfo.adb, sinfo.ads: Restrict the use of flags
3763 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3764 nodes, plus N_Subtype_Declaration for the 2nd one.
3766 2011-08-02 Sergey Rybin <rybin@adacore.com>
3768 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3769 - fix bugs in the description of Source_Trace;
3770 - get rid of UNIT_NAME;
3772 2011-08-02 Javier Miranda <miranda@adacore.com>
3775 (Build_Dispatching_Requeue): Adding support for VM targets
3776 since we cannot directly reference the Tag entity.
3777 * exp_sel.adb (Build_K): Adding support for VM targets.
3778 (Build_S_Assignment): Adding support for VM targets.
3780 (Default_Prim_Op_Position): In VM targets do not restrict availability
3781 of predefined interface primitives to compiling in Ada 2005 mode.
3782 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3783 restricted to compiling in Ada 2005 mode.
3784 (Make_VM_TSD): Generate code that declares and initializes the OSD
3785 record. Needed to support dispatching calls through synchronized
3788 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3789 primitives associated with synchronized interfaces.
3790 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3791 primitives associated with synchronized interfaces.
3793 2011-08-02 Yannick Moy <moy@adacore.com>
3795 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3796 statements hidden in SPARK if preceded by the HIDE directive
3797 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3798 exception handlers as hidden in SPARK if preceded by the HIDE directive
3799 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3800 if starting with the HIDE directive
3801 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3802 starting with the HIDE directive; mark the declarations in a private
3803 part as hidden in SPARK if the private part starts with the HIDE
3805 * restrict.adb, restrict.ads
3806 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3807 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3808 argument node belongs to a part which is hidden in SPARK
3809 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3810 parts in SPARK; protect the possibly costly call to
3811 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3812 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3813 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3814 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3816 (Scan): recognize special comment starting with '#' and followed by
3817 SPARK keyword "hide" as a HIDE directive.
3819 2011-08-02 Yannick Moy <moy@adacore.com>
3821 * types.ads, erroutc.ads: Minor reformatting.
3823 2011-08-02 Vincent Celier <celier@adacore.com>
3825 * link.c: Add response file support for cross platforms.
3827 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3829 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3830 in an association, set parent field of copy before partial analysis.
3831 * sem_res.adb (Resolve_Slice): create reference to itype only when
3832 expansion is enabled.
3834 2011-08-02 Yannick Moy <moy@adacore.com>
3836 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3837 for new flag denoting which subprogram bodies are in ALFA
3838 * restrict.adb, sem_ch7.adb: Update comment
3839 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3840 sem_ch9.adb, sem_res.adb: Add calls to
3841 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3842 * sem_ch6.adb (Analyze_Function_Return): add calls to
3843 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3844 middle of the body, and extended return.
3845 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3846 False when missing return.
3847 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3848 to True for subprograms whose spec is in ALFA. Remove later on the flag
3849 on the entity used for a subprogram body when there exists a separate
3851 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3852 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3853 False, otherwise do nothing.
3855 2011-08-02 Robert Dewar <dewar@adacore.com>
3857 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3859 2011-08-02 Yannick Moy <moy@adacore.com>
3861 * sem_ch4.ads: minor formatting.
3863 2011-08-02 Yannick Moy <moy@adacore.com>
3865 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3866 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3867 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3868 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3869 opt.ads: cleanup of SPARK mode
3871 2011-08-02 Yannick Moy <moy@adacore.com>
3873 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3875 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3876 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3878 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3879 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3880 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3881 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3883 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3885 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3886 functions whose return type is not in ALFA.
3887 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3889 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3890 parameter's type is not in ALFA.
3891 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3894 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3896 * sem_ch6 (Analyze_Expression_Function): treat the function as
3897 Inline_Always, and introduce a subprogram declaration for it when it is
3899 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3900 expression functions, so that the back-end can determine whether they
3901 can in fact be inlined.
3902 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3903 a function body comes from an expression function.
3905 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3907 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3908 null exclusions to test Can_Never_Be_Null on the anonymous access types
3909 of the formals rather than testing the formals themselves. Exclude this
3910 check in cases where the Old_Formal is marked as a controlling formal,
3911 to avoid issuing spurious errors for bodies completing dispatching
3912 operations (due to the flag not getting set on controlling access
3913 formals in body specs).
3914 (Find_Corresponding_Spec): When checking full and subtype conformance of
3915 subprogram bodies in instances, pass Designated and E in that order, for
3916 consistency with the expected order of the formals (New_Id followed by
3919 2011-08-02 Robert Dewar <dewar@adacore.com>
3921 * sem_ch8.adb: Minor reformatting.
3923 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3925 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3926 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3927 primitive operations of class-wide actuals.
3929 2011-08-02 Javier Miranda <miranda@adacore.com>
3931 * exp_atag.ads, exp_atag.adb
3932 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3933 since its value is implicitly passed in argument Typ.
3934 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3935 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3936 Build_Common_Dispatching_Select_Statements.
3938 2011-08-02 Robert Dewar <dewar@adacore.com>
3940 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3941 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3944 2011-08-02 Robert Dewar <dewar@adacore.com>
3946 * sem_res.adb: Minor reformatting.
3947 * sem_prag.adb: Minor reformatting.
3949 2011-08-02 Javier Miranda <miranda@adacore.com>
3951 * exp_atag.adb, exp_atags.ads
3952 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3953 by the tagged type Entity. Required to use this routine in the VM
3954 targets since we do not have available the Tag entity in the VM
3957 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3958 Ada.Tags has not been previously loaded.
3960 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3961 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3963 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3964 view of enclosing scopes. Required to handle enclosing scopes that
3965 are synchronized types whose full view is a task type.
3967 (Build_VM_TSDs): Minor code improvement to avoid generating and
3968 analyzing lists with empty nodes.
3969 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3970 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3971 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3972 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3973 (Make_Select_Specific_Data_Table): Add support for VM targets.
3974 (Make_VM_TSD): Generate code to initialize the SSD structure of
3977 2011-08-02 Yannick Moy <moy@adacore.com>
3979 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3980 cross-references section in ALI.
3981 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3982 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3984 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3985 subprogram or package entity of a node
3986 (Is_Local_Reference_Type): new function returns True for references
3987 selected in local cross-references.
3988 (Lt): function extracted from Lt in Output_References
3989 (Write_Entity_Name): function extracted from Output_References
3990 (Generate_Definition): generate reference with type 'D' for definition
3991 of objects (object declaration and parameter specification), with
3992 appropriate locations and units, for use in local cross-references.
3993 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3994 references of type 'I' for initialization in object definition.
3995 (Output_References): move part of function Lt and procedure
3996 Write_Entity_Name outside of the body. Ignore references of types 'D'
3997 and 'I' introduced for local cross-references.
3998 (Output_Local_References): new procedure to output the local
3999 cross-references sections.
4000 (Lref_Entity_Status): new array defining whether an entity is a local
4001 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4002 with 'I' type when initialization expression is present.
4003 * get_scos.adb, get_scos.ads: Correct comments and typos
4005 2011-08-02 Javier Miranda <miranda@adacore.com>
4007 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4009 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4011 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4014 2011-08-02 Vincent Celier <celier@adacore.com>
4016 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4017 (No_Space_Img): New function
4018 (Find_Excluded_Sources): When reading from a file, record the file name
4019 and the line number for each excluded source.
4020 (Mark_Excluded_Sources): When reporting an error, if the excluded
4021 sources were read from a file, include file name and line number in
4024 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4026 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4028 2011-08-02 Robert Dewar <dewar@adacore.com>
4030 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4032 2011-08-02 Javier Miranda <miranda@adacore.com>
4034 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4035 generation of TSDs to the DOTNET compiler.
4036 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4037 generation of TSDs to the DOTNET compiler.
4039 2011-08-02 Javier Miranda <miranda@adacore.com>
4041 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4042 record of all the tagged types declared inside library level package
4043 declarations, library level package bodies or library level subprograms.
4044 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4045 associated with a given tagged type.
4046 (Build_VM_TSDs): New subprogram.
4047 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4048 compilation units that are subprograms.
4049 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4050 compilation units that are package bodies.
4051 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4052 units that are a package declaration or a package instantiation.
4053 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4054 reorganization to improve the error generated by the frontend when the
4055 function Ada.Tags.Secondary_Tag is not available.
4056 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4057 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4059 2011-08-02 Javier Miranda <miranda@adacore.com>
4061 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4063 2011-08-02 Robert Dewar <dewar@adacore.com>
4065 * s-imenne.ads: Minor reformatting.
4067 2011-08-02 Robert Dewar <dewar@adacore.com>
4069 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4070 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4071 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4073 2011-08-02 Robert Dewar <dewar@adacore.com>
4075 * einfo.ads (Materialize_Entity): Document this is only for renamings
4076 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4077 required debug information in the case where we transform the object
4078 declaration into a renaming declaration.
4079 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4081 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4084 2011-08-02 Robert Dewar <dewar@adacore.com>
4086 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4087 Suppress_Init_Procs.
4088 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4089 Suppress_Initialization/Initialization_Suppressed.
4090 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4091 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4092 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4093 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4095 2011-08-02 Robert Dewar <dewar@adacore.com>
4097 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4100 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4102 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4103 only have inheritable classwide pre/postconditions.
4105 2011-08-02 Javier Miranda <miranda@adacore.com>
4107 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4108 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4109 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4110 checks if the external tag of a type is the same as the external tag
4111 of some other declaration.
4113 2011-08-02 Thomas Quinot <quinot@adacore.com>
4115 * s-taskin.ads: Minor reformatting.
4117 2011-08-02 Emmanuel Briot <briot@adacore.com>
4119 * g-comlin.adb (Display_Help): swap the order in which it prints the
4120 short help and the general usage.
4122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4124 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4125 the aspect declarations and attach them to the generic copy for
4126 subsequent analysis.
4127 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4128 declarations of the generic tree to the new subprogram declarations.
4129 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4130 conditions that apply to a subprogram instance.
4132 2011-08-02 Robert Dewar <dewar@adacore.com>
4134 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4136 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4138 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4139 private type with a tagged full view is not derived in the immediate
4140 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4142 2011-08-02 Robert Dewar <dewar@adacore.com>
4144 * exp_ch4.adb: Minor reformatting.
4146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4148 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4149 Ada2012 iterator, the loop will be rewritten during expansion into a
4150 while loop with a cursor and an element declaration. Do not analyze the
4151 body in this case, because if the container is for indefinite types the
4152 actual subtype of the elements will only be determined when the cursor
4153 declaration is analyzed.
4155 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4157 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4158 size/alignment related attributes in CodePeer_Mode.
4160 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4162 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4163 Prepend_Element, since this can result in the operation getting the
4164 wrong slot in the full type's dispatch table if the full type has
4165 inherited operations. The incomplete type's operation will get added
4166 to the proper position in the full type's primitives
4167 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4168 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4169 dispatching operations, since there are cases where nonprimitive
4170 subprograms can get added to the list of incomplete dependents (such
4171 as subprograms in nested packages).
4172 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4173 private part when determining whether to add a primitive with a
4174 parameter of a tagged incomplete type to the Private_Dependents list.
4175 Such primitives can also occur in the visible part, and should not have
4176 been excluded from being private dependents.
4177 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4178 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4179 list of a Taft-amendment incomplete type is a primitive before issuing
4180 an error that the full type must appear in the same unit. There are
4181 cases where nonprimitives can be in the list (such as subprograms in
4183 * sem_disp.adb (Derives_From): Use correct condition for checking that
4184 a formal's type is derived from the type of the corresponding formal in
4185 the parent subprogram (the condition was completely wrong). Add
4186 checking that was missing for controlling result types being derived
4187 from the result type of the parent operation.
4189 2011-08-02 Yannick Moy <moy@adacore.com>
4191 * errout.adb (First_Node): minor renaming
4192 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4195 2011-08-02 Yannick Moy <moy@adacore.com>
4197 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4198 before accessing operands.
4199 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4200 decide whether an initialization expression respects SPARK rules, as
4201 the plain node is the expanded one. This allows for more valid warnings
4203 * gnat_rm.texi: Minor update.
4205 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4207 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4210 2011-08-02 Robert Dewar <dewar@adacore.com>
4212 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4214 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4216 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4217 loop statements and the element renaming declaration with a block when
4218 the element type is controlled.
4220 2011-08-02 Yannick Moy <moy@adacore.com>
4222 * sinfo.ads: Minor formatting.
4224 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4226 * sem_aggr.adb (Add_Association): if the association has a box and no
4227 expression, use the Sloc of the aggregate itself for the new
4229 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4232 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4234 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4235 When a container is provided via a function call, generate a renaming
4236 of the function result. This avoids the creation of a transient scope
4237 and the premature finalization of the container.
4238 * exp_ch7.adb (Is_Container_Cursor): Removed.
4239 (Wrap_Transient_Declaration): Remove the supression of the finalization
4240 of the list controller when the declaration denotes a container cursor,
4243 2011-08-02 Yannick Moy <moy@adacore.com>
4245 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4246 node is from source, instead of the original node being from source.
4248 (Resolve_Array_Aggregate): refine the check for a static expression, to
4249 recognize also static ranges
4250 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4251 Array_Type_Declaration): postpone the test for the type being a subtype
4252 mark after the type has been resolved, so that component-selection and
4253 expanded-name are discriminated.
4254 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4255 to distinguish the case of an iteration scheme, so that an error is
4256 issed on a non-static range in SPARK except in an iteration scheme.
4257 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4258 In_Iter_Schm = True.
4259 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4260 user-defined operators so that they are allowed in renaming
4262 (Find_Selected_Component): refine the check for prefixing of operators
4263 so that they are allowed in renaming. Move the checks for restrictions
4264 on selector name after analysis discriminated between
4265 component-selection and expanded-name.
4266 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4267 concatenation argument of string type if it is static.
4268 * sem_util.adb, sem_util.ads
4269 (Check_Later_Vs_Basic_Declarations): add a new function
4270 Is_Later_Declarative_Item to decice which declarations are allowed as
4271 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4272 mode, add that renamings are considered as later items.
4273 (Enclosing_Package): new function to return the enclosing package
4274 (Enter_Name): correct the rule for homonyms in SPARK
4275 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4276 from source (result of expansion) to avoid issuing wrong warnings.
4278 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4280 * errout.adb: On anything but an expression First_Node returns its
4283 2011-08-02 Pascal Obry <obry@adacore.com>
4285 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4287 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4289 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4290 Set the associated loop as the related expression of internally
4292 * exp_ch7.adb (Is_Container_Cursor): New routine.
4293 (Wrap_Transient_Declaration): Supress the finalization of the list
4294 controller when the declaration denotes a container cursor.
4296 2011-08-02 Yannick Moy <moy@adacore.com>
4298 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4300 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4301 expression is a simple expression. This check cannot be performed in
4302 the semantics, so just drop it.
4303 (P_Index_Or_Discriminant_Constraint): move check that the index or
4304 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4305 semantics. Other cases were previously checked in the semantics.
4306 * par-ch4.adb (P_Name): move checks that a selector name is not
4307 character literal or an operator symbol to Find_Selected_Component in
4309 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4310 declarations are not placed after later declarations in a separate
4311 procedure in Sem_Util (possibly not the best choice?), to be used both
4312 during parsing, for Ada 83 mode, and during semantic analysis, for
4314 * par-endh.adb (Check_End): move check that end label is not missing
4315 to Process_End_Label in the semantics
4316 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4317 the special case for SPARK restriction
4318 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4319 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4320 parameter Force to issue the error message even on internal node (used
4321 for generated end label). Call Check_Restriction to check when an error
4322 must be issued. In SPARK mode, issue an error message even if the
4323 restriction is not set.
4324 (Check_Restriction): new procedure with an additional out parameter to
4325 inform the caller that a message has been issued
4326 * sem_aggr.adb: Minor modification of message
4327 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4328 instead of issuing an error message directly
4329 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4330 declarations are not placed after later declarations, by calling
4331 Check_Later_Vs_Basic_Declarations
4332 (Analyze_Subtype_Declaration): move here the check that an index or
4333 discriminant constraint must be a subtype mark. Change the check that
4334 a subtype of String must start at one so that it works on subtype marks.
4335 * sem_ch4.adb (Analyze_Call): move here the check that a named
4336 association cannot follow a positional one in a call
4337 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4338 instead of issuing an error message directly
4339 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4340 selector name is not a character literal or an operator symbol. Move
4341 here the check that the prefix of an expanded name cannot be a
4342 subprogram or a loop statement.
4343 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4344 procedure called from parsing and semantics to check that basic
4345 declarations are not placed after later declarations
4346 (Process_End_Label): move here the check that end label is not missing
4348 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4350 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4351 representation clause in codepeer mode, since it confuses CodePeer and
4352 does not bring useful info.
4354 2011-08-02 Ed Falis <falis@adacore.com>
4356 * init.c: initialize fp hw on MILS.
4358 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4360 * errout.adb (First_Node): for bodies, return the node itself (small
4361 optimization). For other nodes, do not check source_unit if the node
4362 comes from Standard.
4364 2011-08-02 Robert Dewar <dewar@adacore.com>
4366 * exp_ch3.adb: Minor comment additions.
4367 * sem_ch13.adb: Minor reformatting.
4369 2011-08-02 Pascal Obry <obry@adacore.com>
4371 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4373 2011-08-02 Robert Dewar <dewar@adacore.com>
4375 * sem_attr.adb: Minor reformatting.
4377 2011-08-02 Robert Dewar <dewar@adacore.com>
4379 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4380 (Has_Default_Component_Value): Removed
4381 * einfo.ads Comment updates
4382 (Has_Default_Aspect): Replaces Has_Default_Value
4383 (Has_Default_Component_Value): Removed
4385 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4387 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4388 (Get_Simple_Init_Val): Handle Default_Value aspect
4389 (Needs_Simple_Initialization): Handle Default_Value aspect
4390 * exp_ch3.ads: Needs_Simple_Initialization
4391 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4392 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4394 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4395 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4396 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4398 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4400 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4401 package containing iteration primitives.
4402 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4404 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4406 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4407 "of", pre-analyze expression in case it is a function call with
4408 finalization actions that must be placed ahead of the loop.
4409 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4410 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4412 2011-08-02 Geert Bosch <bosch@adacore.com>
4414 * cstand.adb (Create_Float_Types): Only consider C's long double for
4415 Long_Long_Float, in addition to double.
4417 2011-08-02 Robert Dewar <dewar@adacore.com>
4419 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4420 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4421 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4426 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4429 2011-08-02 Javier Miranda <miranda@adacore.com>
4431 * einfo.ads, einfo.adb
4432 (Original_Access_Type): Move this attribute to Node26 since there was
4433 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4434 which causes conflicts and breaks the generation of the .NET compiler.
4435 (Interface_Name): Add missing documentation on JGNAT only uses of
4438 2011-08-02 Geert Bosch <bosch@adacore.com>
4440 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4441 (Find_Back_End_Float_Type): Likewise
4442 (Create_Back_End_Float_Types): Likewise
4443 (Create_Float_Types): Likewise
4444 (Register_Float_Type): Likewise
4445 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4446 Nlist and split out type selection in new local Find_Base_Type function.
4447 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4449 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4451 2011-08-02 Robert Dewar <dewar@adacore.com>
4453 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4455 * opt.ads: Minor comment change.
4456 * sem_ch12.adb: Minor code reorganization.
4458 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4460 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4461 subtype's list of rep items to the list on the full subtype in the case
4462 where the lists are the same.
4464 2011-08-02 Geert Bosch <bosch@adacore.com>
4466 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4467 using the one from System.Strings, which also deallocates all strings.
4469 2011-08-02 Geert Bosch <bosch@adacore.com>
4471 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4473 * gcc-interface/Make-lang.in: Update dependencies.
4475 2011-08-02 Olivier Hainque <hainque@adacore.com>
4477 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4480 2011-08-02 Javier Miranda <miranda@adacore.com>
4482 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4483 associated with anonymous access to subprograms.
4485 2011-08-02 Geert Bosch <bosch@adacore.com>
4488 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4489 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4490 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4491 (Add_Symbol_Definition): Move to switch-c.adb
4492 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4493 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4494 (Add_Symbol_Definition): Move to switch-c.adb.
4495 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4497 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4499 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4500 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4502 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4503 (Add_Symbol_Definition): Moved from Prepcomp.
4504 * switch-c.ads: Update copyright notice. Use String_List instead of
4505 Argument_List, removing dependency on System.OS_Lib.
4507 2011-08-02 Yannick Moy <moy@adacore.com>
4509 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4510 mode on initialization expression which does not respect SPARK
4512 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4513 if the tree referenced by its argument represents an initialization
4514 expression in SPARK, suitable for initializing an object in an object
4517 2011-08-02 Javier Miranda <miranda@adacore.com>
4519 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4520 internally generated access to subprogram with its associated protected
4522 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4524 2011-08-02 Geert Bosch <bosch@adacore.com>
4526 * cstand.adb (Register_Float_Type): Print information about type to
4527 register, if the Debug_Flag_Dot_B is set.
4528 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4529 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4530 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4531 with a requested precision of more than Max_Digits digits and no more
4532 than Max_Base_Digits digits, if a range specification is present and the
4533 Predefined_Float_Types list has a suitable type to derive from.
4534 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4535 case of type completion with pragma Import
4537 (Process_Import_Predefined_Type): Processing to complete a type
4538 with pragma Import. Currently supports floating point types only.
4539 (Set_Convention_From_Pragma): Do nothing without underlying type.
4540 (Process_Convention): Guard against absence of underlying type,
4541 which may happen when importing incomplete types.
4542 (Process_Import_Or_Interface): Handle case of importing predefined
4543 types. Tweak error message.
4545 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4547 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4548 functions to previous change. Reorganize code slightly.
4550 2011-08-02 Geert Bosch <bosch@adacore.com>
4552 * back_end.ads (Register_Type_Proc): New call back procedure type for
4553 allowing the back end to provide information about available types.
4554 (Register_Back_End_Types): New procedure to register back end types.
4555 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4557 * cstand.adb (Back_End_Float_Types): New list for floating point types
4558 supported by the back end.
4559 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4560 (Copy_Float_Type): New procedure to make new copies of predefined types.
4561 (Register_Float_Type): New call back procedure to populate the BEFT list
4562 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4563 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4564 (Create_Float_Types): New procedure to create entities for floating
4565 point types predefined in Standard, and put these and any remaining
4566 BEFTs on the Predefined_Float_Types list.
4567 * stand.ads (Predefined_Float_Types): New list for predefined floating
4568 point types that do not have declarations in package Standard.
4570 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4572 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4573 entity node for the unit containing the parameter.
4574 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4575 (Add_Inlined_Subprogram): Likewise.
4576 * gcc-interface/Make-lang.in: Update dependencies.
4578 2011-08-02 Thomas Quinot <quinot@adacore.com>
4580 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4583 2011-08-02 Geert Bosch <bosch@adacore.com>
4585 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4587 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4589 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4590 computed value of Base_Type.
4592 2011-08-02 Yannick Moy <moy@adacore.com>
4594 * restrict.adb (Check_Restriction): issue an error for any use of
4595 class-wide, even if the No_Dispatch restriction is not set.
4596 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4597 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4598 when completing a private extension, the type named in the private part
4599 is not the same as that named in the visible part.
4600 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4601 of an inherited primitive operations of a tagged type or type extension
4602 that returns the tagged type.
4603 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4604 function which returns True for an implicit operation inherited by the
4605 derived type declaration for the argument type.
4606 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4609 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4611 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4612 Process_Bounds, to perform analysis with expansion of a range or an
4613 expression that is the iteration scheme for a loop.
4614 (Analyze_Iterator_Specification): If domain of iteration is given by a
4615 function call with a controlled result, as is the case if call returns
4616 a predefined container, ensure that finalization actions are properly
4618 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4620 2011-08-02 Javier Miranda <miranda@adacore.com>
4622 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4623 * gcc-interface/Make-lang.in: Update dependencies.
4625 2011-08-02 Javier Miranda <miranda@adacore.com>
4627 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4628 determine if the analysis is performed using N or Original_Node (N).
4629 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4630 functionality of routine Is_Variable avoids code duplication.
4631 * checks.adb (Determine_Range): Handle temporaries generated by
4632 Remove_Side_Effects.
4634 2011-08-02 Javier Miranda <miranda@adacore.com>
4636 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4637 expansion of the condition. Required since the previous analysis was
4638 done with expansion disabled (see Resolve_Quantified_Expression) and
4639 hence checks were not inserted and record comparisons have not been
4642 2011-08-02 Ed Falis <falis@adacore.com>
4644 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4647 2011-08-02 Bob Duff <duff@adacore.com>
4649 * opt.ads: Minor comment fix.
4651 2011-08-02 Bob Duff <duff@adacore.com>
4653 * sem_ch12.adb (Analyze_Package_Instantiation,
4654 Analyze_Subprogram_Instantiation): Turn off style checking while
4655 analyzing an instance. Whatever style checks that apply to the generic
4656 unit should apply, so it makes no sense to apply them in an instance.
4657 This was causing trouble when compiling an instance of a runtime
4658 unit that violates the -gnatyO switch.
4659 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4660 one of the two case statements, causing spurious errors.
4662 2011-08-02 Robert Dewar <dewar@adacore.com>
4664 * uname.adb: Minor reformatting.
4665 * gnatcmd.adb: Minor reformatting.
4666 * exp_attr.adb: Minor reformatting.
4668 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4670 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4671 No_Dispatching_Calls, do not look for the Assign primitive, because
4672 predefined primitives are not created in this case.
4674 2011-08-02 Bob Duff <duff@adacore.com>
4676 * stylesw.ads: Minor comment fixes.
4678 2011-08-02 Robert Dewar <dewar@adacore.com>
4680 * freeze.adb (Add_To_Result): New procedure.
4682 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4684 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4685 time, if the specific run-time routines for handling streams of strings
4686 are not available, use the default mechanism.
4688 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4690 * s-regpat.ads: Fix typo.
4692 2011-08-02 Vincent Celier <celier@adacore.com>
4694 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4695 not null, call it to create the in memory config project file without
4696 parsing an existing default config project file.
4698 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4700 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4702 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4704 * sem_elim.adb: an abstract subprogram does not need an eliminate
4705 pragma for its descendant to be eliminable.
4707 2011-08-02 Ed Falis <falis@adacore.com>
4709 * init.c: revert to handling before previous checkin for VxWorks
4710 * s-intman-vxworks.adb: delete unnecessary declarations related to
4711 using Ada interrupt facilities for handling signals.
4712 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4713 * s-intman-vxworks.ads: Import __gnat_install_handler as
4714 Initialize_Interrupts.
4715 * s-taprop-vxworks.adb: Delete Signal_Mask.
4716 (Abort_Handler): change construction of mask to unblock exception
4719 2011-08-02 Jerome Guitton <guitton@adacore.com>
4721 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4722 Debug_Raise_Exception before propagation starts.
4724 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4726 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4727 to Restriction_Check_Required.
4728 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4729 * sem_res.adb (Resolve_Call): Likewise.
4730 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4732 2011-08-02 Bob Duff <duff@adacore.com>
4734 * stylesw.ads: Update comment.
4735 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4736 * errout.ads: Remove obsolete comment.
4738 2011-08-02 Javier Miranda <miranda@adacore.com>
4740 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4741 (Set_Is_Safe_To_Reevaluate): new procedure.
4742 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4743 assignment is allowed on safe-to-reevaluate variables.
4744 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4745 temporary created to remove side effects in expressions that use
4746 the secondary stack as safe-to-reevaluate.
4747 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4748 variables that are not true constants.
4750 2011-08-02 Robert Dewar <dewar@adacore.com>
4752 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4753 sem_res.adb, sem_ch6.adb: Minor reformatting.
4755 2011-08-02 Jerome Guitton <guitton@adacore.com>
4757 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4759 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4761 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4762 not set Overridden_Operation if subprogram is an initialization
4765 2011-08-02 Yannick Moy <moy@adacore.com>
4767 * par-ch6.adb: Correct obsolete name in comments
4768 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4769 which takes two message arguments (existing function takes one), with
4770 second message used for continuation.
4771 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4772 block statements that originate from a source block statement, not
4773 generated block statements
4774 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4775 symmetry with procedure case
4776 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4777 function to issue an error in formal mode if a package specification
4778 contains more than one tagged type or type extension.
4779 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4780 parameters matching formals of tagged types are objects (or ancestor
4781 type conversions of objects), not general expressions. Issue an error
4782 on view conversions that are not involving ancestor conversion of an
4784 (Resolve_Type_Conversion): in formal mode, issue an error on the
4785 operand of an ancestor type conversion which is not an object
4786 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4787 procedure so that it works also for actuals of function calls
4788 (Is_Actual_Tagged_Parameter): new function which determines if its
4789 argument is an actual parameter of a formal of tagged type in a
4791 (Is_SPARK_Object_Reference): new function which determines if the tree
4792 referenced by its argument represents an object in SPARK
4794 2011-08-02 Robert Dewar <dewar@adacore.com>
4796 * sem_ch3.adb: Minor reformatting
4797 Minor comment addition
4798 Minor error msg text change
4800 2011-08-02 Javier Miranda <miranda@adacore.com>
4802 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4803 function. Used to be more precise when we generate a variable plus one
4804 assignment to remove side effects in the evaluation of the Bound
4806 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4807 of the bound expression to force its re-analysis and thus expand the
4808 associated transient scope (if required). Code cleanup replacing the
4809 previous code that declared the constant entity by an invocation to
4810 routine Force_Evaluation which centralizes this work in the frontend.
4812 2011-08-02 Robert Dewar <dewar@adacore.com>
4814 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4815 (Base_Type): Now uses improved Is_Base_Type function
4816 * einfo.ads (Base_Type): Inline this function
4818 2011-08-02 Robert Dewar <dewar@adacore.com>
4820 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4821 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4823 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4825 * gcc-interface/Make-lang.in: Update dependencies.
4826 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4829 2011-08-02 Yannick Moy <moy@adacore.com>
4831 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4832 non-simple expression used in delta constraint
4833 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4834 index constraint which is not a subtype mark
4835 * par.adb: With and use Restrict
4836 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4837 mode on component type which is not a subtype mark and default
4838 expression on component
4839 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4840 of string which does not have a lower index bound equal to 1
4841 (Array_Type_Declaration): issue an error in formal mode on index or
4842 component type which is not a subtype mark, and on aliased keyword on
4844 (Derived_Type_Declaration): issue an error in formal mode on interface,
4845 limited or abstract type
4846 (Record_Type_Declaration): issue an error in formal mode on interface
4847 (Record_Type_Definition): issue an error in formal mode on tagged types
4848 and type extensions not declared in the specification of a library unit
4849 package; on null non-tagged record; on variant part
4851 2011-08-02 Vincent Celier <celier@adacore.com>
4853 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4854 not declared for qualified library project when Library_Name is not
4855 declared, but Library_Dir is.
4857 2011-08-02 Robert Dewar <dewar@adacore.com>
4859 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4860 pragmas (affects aspects [Component_]Default_Value
4861 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4862 component type for the resolution
4864 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4866 * einfo.adb (Base_Type): Tune implementation for speed.
4868 2011-08-02 Robert Dewar <dewar@adacore.com>
4870 * freeze.adb: Minor reformatting.
4872 2011-08-02 Thomas Quinot <quinot@adacore.com>
4874 * scos.ads: Update comments.
4876 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4878 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4879 base type, because the parent may be a subtype of a private type whose
4880 convention is established in a private part.
4882 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4884 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4885 statement in a block when the expansion of the return expression has
4886 created a finalization chain.
4887 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4888 with the parent node.
4889 Add N_Extended_Return_Statement to handle the case where a transient
4890 object declaration appears in the Return_Object_Declarations list of
4891 an extended return statement.
4893 2011-08-02 Matthew Gingell <gingell@adacore.com>
4895 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4896 unused parameter 'name'.
4898 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4900 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4901 inherited operation, check whether its alias, which is the source
4902 operastion that it renames, has been marked eliminated.
4904 2011-08-02 Javier Miranda <miranda@adacore.com>
4906 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4907 in-mode parameter whose type is an access type since it can be used to
4908 modify its designated object. Enforce code that handles as safe an
4909 access type that is not access-to-constant but it is the result of a
4910 previous removal of side-effects.
4911 (Remove_Side_Effects): Minor code reorganization of cases which require
4912 no action. Done to incorporate documentation on new cases uncovered
4913 working in this ticket: no action needed if this routine was invoked
4914 too early and the nodes are not yet decorated.
4915 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4916 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4917 were issued with actuals that are implicitly provided by
4920 2011-08-02 Robert Dewar <dewar@adacore.com>
4922 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4924 2011-08-02 Yannick Moy <moy@adacore.com>
4926 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4927 to issue an error in formal mode on attribute not supported in this mode
4928 (Analyze_Attribute): issue errors on standard attributes not supported
4930 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4931 comment, and issue error in formal mode on modulus which is not a power
4933 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4935 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4937 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4938 operator on modular type (except 'not').
4940 2011-08-02 Robert Dewar <dewar@adacore.com>
4942 * gnat_rm.texi: Minor reformatting.
4944 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4946 * s-osinte-linux.ads: Minor comment update and reformatting.
4947 * i-cexten.ads: Make this unit pure, as for its parent.
4948 Will allow its usage in more contexts if needed.
4950 2011-08-02 Robert Dewar <dewar@adacore.com>
4952 * s-utf_32.ads: Minor comment fix.
4954 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4956 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4957 operation of a tagged synchronized type, handle the case where the
4958 controlling argument is overloaded.
4960 2011-08-02 Yannick Moy <moy@adacore.com>
4962 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4963 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4964 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4965 SPARK mode and formal verification mode on processing SPARK restriction
4966 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4967 requiring consistency checking.
4969 2011-08-02 Robert Dewar <dewar@adacore.com>
4971 * sem_res.adb: Minor reformatting.
4973 2011-08-02 Robert Dewar <dewar@adacore.com>
4975 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4976 a-cforse.ads: Remove unneeded with of Ada.Containers
4977 Remove commented out pragma Inline's
4978 Move specifications of new subprograms to the actual specs
4980 2011-08-02 Yannick Moy <moy@adacore.com>
4982 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4983 a-cforse.ads: Update comments.
4985 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4987 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4989 2011-08-02 Robert Dewar <dewar@adacore.com>
4991 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4992 a-cforse.ads, a-cofove.ads: Minor reformatting.
4994 2011-08-02 Claire Dross <dross@adacore.com>
4996 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4997 a-cofove.ads: Add comments.
4999 2011-08-02 Yannick Moy <moy@adacore.com>
5001 * gnat_rm.texi: Document formal containers.
5003 2011-08-02 Emmanuel Briot <briot@adacore.com>
5005 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5008 2011-08-02 Robert Dewar <dewar@adacore.com>
5010 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5013 2011-08-02 Robert Dewar <dewar@adacore.com>
5015 * aspects.adb: New aspects Default_Value and Default_Component_Value
5016 New format of Aspect_Names table checks for omitted entries
5017 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5018 handling of boolean aspects for derived types.
5019 New aspects Default_Value and Default_Component_Value
5020 New format of Aspect_Names table checks for omitted entries
5021 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5022 (Has_Default_Value): New flag
5023 (Has_Default_Component_Value): New flag
5024 (Has_Default_Value): New flag
5025 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5027 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5028 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5029 Default_Value and Default_Component_Value
5030 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5031 New aspects Default_Value and Default_Component_Value
5032 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5033 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5035 2011-08-02 Vincent Celier <celier@adacore.com>
5037 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5038 inherit library kind.
5040 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5042 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5045 2011-08-02 Robert Dewar <dewar@adacore.com>
5047 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5049 2011-08-02 Yannick Moy <moy@adacore.com>
5051 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5053 2011-08-02 Robert Dewar <dewar@adacore.com>
5055 * impunit.adb: Add comment.
5057 2011-08-02 Yannick Moy <moy@adacore.com>
5059 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5060 qualification of aggregates in formal mode
5061 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5063 (Resolve_Aggregate): complete the test that an aggregate is adequately
5064 qualified in formal mode
5066 2011-08-02 Pascal Obry <obry@adacore.com>
5068 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5069 * mlib-prj.adb: Supress warning when compiling binder generated file.
5070 (Build_Library): Supress all warnings when compiling the binder
5073 2011-08-02 Yannick Moy <moy@adacore.com>
5075 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5077 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5078 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5079 Add with/use clauses to make Check_Formal_Restriction visible
5081 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5083 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5084 in-parameters when type of the generic formal is private in the generic
5085 spec and non-private in the body.
5087 2011-08-02 Claire Dross <dross@adacore.com>
5089 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5090 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5091 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5092 * impunit.adb, Makefile.rtl: Take new files into account.
5094 2011-08-02 Robert Dewar <dewar@adacore.com>
5096 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5097 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5099 2011-08-02 Yannick Moy <moy@adacore.com>
5101 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5103 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5104 matching static array bounds, taking into account the special case of
5106 * sem_ch3.adb: Typo in comment.
5108 2011-08-02 Yannick Moy <moy@adacore.com>
5110 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5111 which issues an error in formal mode if its argument node is originally
5113 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5114 has a discriminant specification so that it does not include the case
5116 (Derived_Type_Declaration): move here the test that a derived type has a
5117 discriminant specification
5118 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5119 first element of a component association before accessing its choices
5120 (presence of component association is not enough)
5121 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5122 declaration is a library item before accessing the next element in a
5123 list, as library items are not member of lists
5124 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5125 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5126 Check_Formal_Restriction whenever possible.
5128 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5130 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5131 reference when needed.
5133 2011-08-02 Bob Duff <duff@adacore.com>
5135 * gnat_ugn.texi: Fix typo.
5137 2011-08-02 Vincent Celier <celier@adacore.com>
5139 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5140 archive file name. Do not use the full path name of archives for Open
5143 2011-08-02 Robert Dewar <dewar@adacore.com>
5145 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5146 Analyze_Aspect_Specifications
5148 (Analyze_Aspect_Specifications): New handling for boolean aspects
5149 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5150 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5151 sequence for Analyze_Aspect_Specifications
5152 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5153 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5155 2011-08-02 Robert Dewar <dewar@adacore.com>
5157 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5158 aspects, since these no longer exist.
5160 2011-08-02 Robert Dewar <dewar@adacore.com>
5162 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5163 semicolon, do not try to see if there are aspects following it.
5164 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5167 2011-08-02 Robert Dewar <dewar@adacore.com>
5169 * sem_ch8.adb, aspects.ads: Minor reformatting.
5171 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5173 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5174 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5176 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5178 2011-08-02 Yannick Moy <moy@adacore.com>
5180 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5181 mode on subprogram declaration outside of package specification, unless
5182 it is followed by a pragma Import
5183 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5184 Access_Type_Declaration): issue error in formal mode on access type
5185 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5187 (Analyze_Object_Declaration): issue error in formal mode on object
5188 declaration which does not respect SPARK restrictions
5189 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5190 declaration which does not respect SPARK restrictions
5191 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5192 error in formal mode on digits or delta constraint
5193 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5194 decimal fixed point type
5195 (Derived_Type_Declaration): issue error in formal mode on derived type
5196 other than type extensions of tagged record types
5197 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5198 with check on access definition
5199 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5200 mode on protected definition.
5201 (Analyze_Task_Definition): issue error in formal mode on task definition
5203 2011-08-02 Robert Dewar <dewar@adacore.com>
5205 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5207 2011-08-02 Javier Miranda <miranda@adacore.com>
5209 * sem_ch6.adb (Can_Override_Operator): New function.
5210 (Verify_Overriding_Indicator): Add missing code to check overriding
5211 indicator in operators. Fixes regression.
5212 (Check_Overriding_Indicator): Minor reformating after replacing the
5213 code that evaluates if the subprogram can override an operator by
5214 invocations to the above new function.
5216 (Write_Field26_Name): Add missing code to ensure that, following
5217 the documentation in einfo.ads, this field is not shown as attribute
5218 "Static_Initialization" on non-dispatching functions.
5220 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5222 * sem_res.adb (Resolve_Call): A call to
5223 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5224 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5225 i.e., when the second parameter is of type Time_Span.
5227 2011-08-02 Vincent Celier <celier@adacore.com>
5229 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5230 with an archive instead of -L<library dir> -l<library name>.
5232 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5234 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5235 mark the base types In_Use in addition to making the operations
5238 2011-08-02 Ed Falis <falis@adacore.com>
5240 * init.c: add and setup __gnat_signal_mask for the exception signals
5241 * s-inmaop-vxworks.adb: new file.
5242 * s-intman-vxworks.adb: remove unnecessary initializations and
5244 * s-intman-vxworks.ads: remove unnecessary variable
5245 * s-taprop-vxworks.adb: simplify signal initialization
5247 2011-08-02 Robert Dewar <dewar@adacore.com>
5249 * sem_ch8.adb: Minor code reorganization, comment updates.
5251 2011-08-02 Robert Dewar <dewar@adacore.com>
5253 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5254 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5256 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5257 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5259 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5261 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5262 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5263 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5264 use_type_clauses, to handle more efficiently use_type and use_all_type
5266 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5267 Ada2012 Use_All_Type clause.
5268 (Use_Class_Wide_Operations): new procedure.
5270 2011-08-02 Robert Dewar <dewar@adacore.com>
5272 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5273 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5274 expression to expression function.
5276 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5278 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5279 if types are compatible.
5281 2011-08-02 Yannick Moy <moy@adacore.com>
5283 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5284 returns True if its argument array types have same dimension and same
5285 static bounds at each index.
5286 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5287 OUT or IN OUT paramaters which are not view conversions in SPARK.
5288 (Resolve_Arithmetic_Op): issue an error in formal mode on
5289 multiplication or division with operands of fixed point types which are
5290 not qualified or explicitly converted.
5291 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5292 Boolean or array type (except String) operands.
5293 (Resolve_Equality_Op): issue an error in formal mode on equality
5294 operators for array types other than String with non-matching static
5296 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5297 for array types with non-matching static bounds. Factorize the code in
5298 Matching_Static_Array_Bounds.
5299 (Resolve_Qualified_Expression): issue an error in formal mode on
5300 qualified expressions for array types with non-matching static bounds.
5301 (Resolve_Type_Conversion): issue an error in formal mode on type
5302 conversion for array types with non-matching static bounds
5304 2011-08-02 Robert Dewar <dewar@adacore.com>
5306 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5308 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5310 * par-ch9.adb: save location of entry for proper error message.
5312 2011-08-02 Javier Miranda <miranda@adacore.com>
5314 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5315 (Use_Full_View) which permits this routine to climb through the
5316 ancestors using the full-view of private parents.
5317 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5318 Use_Full_View to true in calls to Is_Ancestor.
5319 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5320 true in call to Is_Ancestor.
5321 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5322 Use_Full_View to true in call to Is_Ancestor.
5323 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5324 call to Is_Ancestor.
5325 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5326 Use_Full_View to true in calls to Is_Ancestor.
5327 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5328 Make_Select_Specific_Data_Table, Register_Primitive,
5329 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5330 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5331 to true in call to Is_Ancestor.
5332 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5333 Use_Full_View to true in calls to Is_Ancestor.
5335 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5336 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5338 2011-08-02 Robert Dewar <dewar@adacore.com>
5340 * gnat_rm.texi: Minor reformatting.
5341 * sem_prag.adb: Minor reformatting.
5343 2011-08-02 Tristan Gingold <gingold@adacore.com>
5345 * vms_data.ads: Add VMS qualifier for -gnateP.
5347 2011-08-02 Robert Dewar <dewar@adacore.com>
5349 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5350 * par-ch7.adb (P_Package): Proper placement of aspects for package
5352 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5353 (End_Statements): Add Is_Sloc parameterr
5354 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5355 (Check_End): Ad Is_Sloc parameter
5356 (End_Statements): Add Is_Sloc parameterr
5358 2011-08-02 Vincent Celier <celier@adacore.com>
5360 * ug_words: Add VMS qualifier equivalent to -gnateP:
5361 /SYMBOL_PREPROCESSING.
5363 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5365 * gnat-style.texi: For hexadecimal numeric literals the typical
5366 grouping of digits is 4 to represent 2 bytes.
5367 A procedure spec which is split into several lines is indented two
5370 2011-08-02 Yannick Moy <moy@adacore.com>
5372 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5373 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5374 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5376 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5377 choice in array aggregate
5378 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5380 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5381 positional and named aggregate for record, or others in record
5382 aggregate, or multiple choice in record aggregate
5383 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5384 array operands to logical operations AND, OR and XOR do not have the
5385 same static lower and higher bounds
5386 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5388 2011-08-01 Robert Dewar <dewar@adacore.com>
5390 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5391 Replaces Last_Source_Node_In_Sequence.
5392 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5393 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5394 parens and blank in string (this was inconsistently implemented).
5396 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5397 blank in string (this was inconsistently implemented).
5399 (Set_Global_Switches): Set formal mode switches appropriately
5400 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5402 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5403 call Set_Error_Msg_Lang to set "spark" as language name.
5404 * par.adb: Remove unnecessary call to set formal language for errout
5405 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5406 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5408 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5409 calls to it, moved after resolution so that types are known
5410 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5411 result of concatenation is not of type String
5412 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5413 concatenation is not properly restricted
5414 * gnat_rm.texi: Add doc on pragma Spark_95.
5415 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5416 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5417 * gcc-interface/Make-lang.in: Update dependencies.
5419 2011-08-01 Javier Miranda <miranda@adacore.com>
5421 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5422 condition that detects if the overridden operation must replace an
5425 2011-08-01 Javier Miranda <miranda@adacore.com>
5427 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5428 code declarations inserted by Insert_Actions in each alternative of the
5429 N_Case_Expression node.
5431 2011-08-01 Robert Dewar <dewar@adacore.com>
5433 * sem_ch6.adb: Minor code reorganization.
5434 * sem_util.adb: Minor reformatting.
5436 2011-08-01 Pascal Obry <obry@adacore.com>
5438 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5439 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5441 2011-08-01 Yannick Moy <moy@adacore.com>
5443 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5444 literal or operator symbol which is prefixed
5445 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5446 mode on access attributes.
5447 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5448 that concatenation operands are properly restricted in formal mode
5449 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5450 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5451 result of the concatenation has a type different from String.
5452 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5453 Analyze_Quantified_Expression, Analyze_Slice,
5454 Analyze_Null): issue an error in formal mode on unsupported constructs
5456 (Analyze_Block_Statement): only issue error on source block statement
5457 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5458 function which returns the last node in a list of nodes for which
5459 Comes_From_Source returns True, if any
5460 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5461 Last_Source_Node_In_Sequence
5462 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5463 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5464 mode on unsupported constructs
5465 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5466 rest of the actions may be needed later on since the error is marked as
5468 * sinfo.ads: Typos in comments.
5470 2011-08-01 Pascal Obry <obry@adacore.com>
5472 * projects.texi: Minor editing.
5474 2011-08-01 Yannick Moy <moy@adacore.com>
5476 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5477 insertion character ~~
5478 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5479 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5480 with insertion character ~~
5481 (Set_Msg_Text): treat insertion character ~~
5482 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5483 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5484 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5485 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5486 errors related to the formal language restriction not serious
5487 (insertion character |).
5488 * par.adb (Par): set formal language for error messages if needed
5489 * sem_ch6.adb (Check_Missing_Return): take into account possible
5490 generated statements at the end of the function
5491 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5492 enumeration value to define a new pragma SPARK_95
5493 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5494 SPARK_Version): new type and variables to store the SPARK version
5496 (SPARK_Mode): return True when SPARK_Version is set
5497 * par-prag.adb: Correct indentation
5498 (Prag): take Pragma_SPARK_95 into account
5499 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5502 2011-08-01 Robert Dewar <dewar@adacore.com>
5504 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5505 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5506 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5508 2011-08-01 Pascal Obry <obry@adacore.com>
5510 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5511 Target_Name to Get_Path call.
5512 (Parse_Single_Project): Likewise.
5513 (Post_Parse_Context_Clause): Likewise.
5514 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5515 Call Initialise_Project_Path with the proper Target_Name.
5516 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5518 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5519 with the proper Target_Name.
5520 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5522 (Parse_Project_And_Apply_Config): Likewise.
5523 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5524 This is fine as this part of the code is supporting only native
5526 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5527 is fine as this part of the code is supporting only native compilation.
5529 2011-08-01 Yannick Moy <moy@adacore.com>
5531 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5532 of homonym, unless the homonym is one of the cases allowed in SPARK
5533 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5534 package declaration occurring after a body.
5536 2011-08-01 Robert Dewar <dewar@adacore.com>
5538 * checks.adb, exp_ch4.adb: Minor reformatting.
5540 2011-08-01 Javier Miranda <miranda@adacore.com>
5542 * einfo.ads (Access_Disp_Table): Fix documentation.
5543 (Dispatch_Table_Wrappers): Fix documentation.
5545 2011-08-01 Pascal Obry <obry@adacore.com>
5547 * prj-env.adb, prj-env.ads: Minor reformatting.
5549 2011-08-01 Yannick Moy <moy@adacore.com>
5551 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5552 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5553 procedures out of these packages.
5554 * errout.ads, errout.adb
5555 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5556 procedures in of this package
5557 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5558 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5559 on misplaced later vs initial declarations, like in Ada 83
5560 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5561 formal mode on attribute of private type whose full type declaration
5563 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5564 package declaration inside a package specification
5565 (Analyze_Full_Type_Declaration): issue error in formal mode on
5566 controlled type or discriminant type
5567 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5568 user-defined operator means that it should come from the source
5569 (New_Overloaded_Entity): issue error in formal mode on overloaded
5571 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5573 2011-08-01 Thomas Quinot <quinot@adacore.com>
5575 * atree.adb: Minor reformatting.
5576 * checks.adb: Minor reformatting.
5578 2011-08-01 Vincent Celier <celier@adacore.com>
5580 * s-parame-vms-ia64.ads: Fix typo in comment
5582 * s-parame-vms-restrict.ads: Removed, unused.
5584 2011-08-01 Javier Miranda <miranda@adacore.com>
5587 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5589 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5590 * sem_ch3.ads, sem_ch3.adb
5591 (Is_Constant_Bound): New extended version of the subprogram that was
5592 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5593 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5594 * sem_aux.ads (Constant_Value): Fix typo in comment.
5595 * checks.adb (Generate_Index_Checks): New implementation which, for
5596 array objects with constant bounds, generates the runtime check
5597 referencing the bounds of the array type. For other cases this routine
5598 provides its previous behavior obtaining such values from the array
5600 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5602 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5603 we cannot have semantic interpretations of the new node.
5605 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5607 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5610 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5612 * sem_ch8.adb: Minor code editing.
5613 * s-vxwext.adb: Remove trailing space.
5614 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5615 consistency with other files.
5617 2011-08-01 Thomas Quinot <quinot@adacore.com>
5619 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5621 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5623 * par-ch10.adb: reject parameterized expressions as compilation unit.
5624 * sem_ch4.adb: handle properly conditional expression with overloaded
5625 then_clause and no else_clause.
5627 2011-08-01 Tristan Gingold <gingold@adacore.com>
5629 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5630 like done by System.Aux_DEC.
5631 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5633 2011-08-01 Yannick Moy <moy@adacore.com>
5635 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5636 missing label at end of declaration (subprogram or package)
5637 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5638 of positional and named parameter association
5639 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5640 Error_Msg_SP which adds a prefix to the error message giving the name
5641 of the formal language analyzed
5642 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5643 access result type in subprogram, unconstrained array as result type,.
5644 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5646 * sem_ch8.adb: Code clean up.
5648 2011-08-01 Javier Miranda <miranda@adacore.com>
5650 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5651 * einfo.ads (Access_Disp_Table): Fix documentation.
5652 (Dispatch_Table_Wrappers): Fix documentation.
5653 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5654 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5655 to enforce the documentation of this attribute.
5656 (Set_Is_Interface): Cleanup the assertion.
5657 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5658 the Underlying_Type entity before reading attribute Access_Disp_Table.
5659 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5660 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5661 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5662 the Underlying_Type entity before reading attribute Access_Disp_Table.
5663 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5664 Locate the Underlying_Type entity before reading attribute
5667 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5669 * s-poosiz.ads: Additional overriding indicators.
5671 2011-08-01 Yannick Moy <moy@adacore.com>
5673 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5675 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5676 parameter specification does not include a subtype mark.
5677 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5678 formal mode on abstract subprogram.
5679 (Analyze_Subprogram_Specification): issue error in formal mode on
5680 user-defined operator.
5681 (Process_Formals): issue error in formal mode on access parameter and
5683 * sem_ch9.adb (Analyze_Abort_Statement,
5684 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5685 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5686 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5687 Analyze_Requeue, Analyze_Selective_Accept,
5688 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5689 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5690 issue error in formal mode on user-defined raise statement.
5692 2011-08-01 Thomas Quinot <quinot@adacore.com>
5694 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5695 declaration being hidden when overriding an implicit inherited
5697 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5698 (-gnats), do not complain about a source file that contains only a
5701 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5703 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5704 variable if already set.
5706 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5708 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5709 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5710 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5711 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5712 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5713 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5714 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5715 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5716 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5717 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5718 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5719 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5720 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5721 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5722 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5723 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5724 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5725 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5726 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5727 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5728 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5729 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5730 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5731 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5732 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5733 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5734 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5735 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5736 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5737 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5738 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5739 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5740 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5741 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5742 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5743 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5744 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5745 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5746 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5747 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5748 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5749 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5750 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5751 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5752 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5753 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5754 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5755 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5756 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5757 Use GNAT instead of GNARL.
5759 2011-08-01 Bob Duff <duff@adacore.com>
5761 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5762 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5763 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5766 2011-08-01 Yannick Moy <moy@adacore.com>
5768 * debug.adb (d.D) reverve flag for the SPARK mode
5769 (d.E) reverve flag for SPARK generation mode
5770 (d.F) reverve flag for Why generation mode
5771 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5772 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5773 functions which return True when the corresponding modes are set
5774 (Formal_Language): return "spark" or "alfa" when in formal verification
5776 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5777 Error_Msg to prefix the error message with a tag giving the formal
5779 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5780 message with a tag giving the formal language
5781 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5783 (Analyze_Case_Statement): issue error in formal mode on case statement
5784 with a single "others" case alternative
5785 (Analyze_Exit_Statement): issue errors in formal mode on exit
5786 statements which do not respect SPARK restrictions
5787 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5788 (Check_Unreachable_Code): always issue an error (not a warning) in
5789 formal mode on unreachable code (concerns both code after an infinite
5790 loop and after an unconditional jump, both not allowed in SPARK)
5791 * sem_ch6.adb (Analyze_Return_Statement): add call to
5792 Set_Return_Present for a procedure containing a return statement
5793 (already done for functions in Analyze_Function_Return)
5794 (Analyze_Function_Return): issue error in formal mode on extended
5795 return or if return is not last statement in function
5796 (Check_Missing_Return): issue error in formal mode if function does
5797 not end with return or if procedure contains a return
5798 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5799 function to detect if there is an inner scope of its parameter S which
5802 2011-08-01 Thomas Quinot <quinot@adacore.com>
5804 * sem_ch6.ads: Minor reformatting.
5806 2011-08-01 Javier Miranda <miranda@adacore.com>
5808 * sem_util.adb (Abstract_Interface_List): Complete condition when
5809 processing private type declarations to avoid reading unavailable
5811 (Is_Synchronized_Tagged_Type): Complete condition when processing
5812 private extension declaration nodes to avoid reading unavailable
5815 2011-08-01 Thomas Quinot <quinot@adacore.com>
5817 * sem_ch3.adb: Minor reformatting.
5819 2011-08-01 Thomas Quinot <quinot@adacore.com>
5821 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5822 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5823 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5824 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5825 for VMS, instead parametrize the common implementation with
5826 System.Parameters declarations.
5828 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5830 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5832 2011-08-01 Tristan Gingold <gingold@adacore.com>
5834 * seh_init.c: Fix SEH handler installation on win64.
5836 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5838 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5839 double analysis of an anonymous access to subprogram, because it can
5840 lead to improper sharing of profiles and a back-end crash.
5842 2011-08-01 Robert Dewar <dewar@adacore.com>
5844 * make.adb, sem_ch4.adb: Minor reformatting.
5845 * gcc-interface/Make-lang.in: Update dependencies.
5846 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5848 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5850 * gnat_rm.texi: Fix definition of Long_Integer.
5852 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5854 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5855 to prevent storage exhaustion.
5856 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5857 finalized is a function body, insert the cleanup code before the final
5858 return statement, to prevent spurious warnings.
5859 * s-pooglo.ads: add overriding indicator.
5861 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5863 * sem_ch4.adb (Operator_Check): improve error message when both a
5864 with_clause and a use_clause are needed to make operator usage legal.
5865 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5866 determine whether a compilation unit is visible within an other,
5867 either through a with_clause in the current unit, or a with_clause in
5868 its library unit or one one of its parents.
5870 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5872 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5873 over an arbitrary expression of an array or container type.
5874 * lib-xref.adb: clarify comment.
5876 2011-08-01 Bob Duff <duff@adacore.com>
5878 * einfo.ads: Minor reformatting.
5879 * debug.adb: Minor comment improvement.
5881 2011-08-01 Javier Miranda <miranda@adacore.com>
5883 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5884 consider hidden subprograms as valid candidates.
5886 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5888 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5890 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5892 * gnat_ugn.texi: Fix typo.
5894 2011-08-01 Robert Dewar <dewar@adacore.com>
5896 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5897 lib-xref.adb: Minor reformatting
5899 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5901 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5902 when to generate a call to Move_Final_List.
5903 (Has_Controlled_Parts): Remove this function.
5905 2011-08-01 Geert Bosch <bosch@adacore.com>
5907 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5910 2011-08-01 Thomas Quinot <quinot@adacore.com>
5912 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5913 explicit raise of a predefined exception as Comes_From_Source if the
5914 original N_Raise_Statement comes from source.
5916 2011-08-01 Robert Dewar <dewar@adacore.com>
5918 * sinfo.ads: Add comment.
5919 * sem_ch6.adb: Minor reformatting.
5921 2011-08-01 Robert Dewar <dewar@adacore.com>
5923 * freeze.adb (Freeze_Entity): Refine check for bad component size
5924 clause to avoid rejecting confirming clause when atomic/aliased present.
5926 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5928 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5929 better determine whether an entity reference is a write.
5930 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5932 * lib-xref.adb (Output_References): Do no suppress a read reference at
5933 the same location as an immediately preceeding modify-reference, to
5934 handle properly in-out actuals.
5936 2011-08-01 Tristan Gingold <gingold@adacore.com>
5938 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5940 2011-08-01 Quentin Ochem <ochem@adacore.com>
5942 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5943 heap to compute the result.
5945 2011-08-01 Robert Dewar <dewar@adacore.com>
5947 * atree.ads: Minor reformatting.
5949 2011-08-01 Emmanuel Briot <briot@adacore.com>
5951 * g-expect.adb (Get_Command_Output): Fix memory leak.
5953 2011-08-01 Geert Bosch <bosch@adacore.com>
5955 * cstand.adb (P_Float_Type): New procedure to print the definition of
5956 predefined fpt types.
5957 (P_Mixed_Name): New procedure to print a name using mixed case
5958 (Print_Standard): Use P_Float_Type for printing floating point types
5959 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5960 precision IEEE float.
5962 2011-08-01 Thomas Quinot <quinot@adacore.com>
5964 * sem_ch3.adb: Minor reformatting.
5966 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5968 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5969 the completion of a generic function, insert the new body rather than
5970 rewriting the original.
5972 2011-08-01 Yannick Moy <moy@adacore.com>
5974 * sinfo.ads, errout.ads: Typos in comments.
5976 2011-08-01 Robert Dewar <dewar@adacore.com>
5978 * par-endh.adb: Minor reformatting.
5980 2011-08-01 Robert Dewar <dewar@adacore.com>
5982 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5983 (Pre_Post_Aspects): New subtype.
5984 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5985 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5986 * par-ch7.adb (P_Package): Remove Decl parameter
5987 (P_Package): Handle new syntax for aspects (before IS)
5988 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5990 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5991 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5992 (P_Package): Remove Decl parameter
5993 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5995 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5997 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5998 * sinfo.ads: Document new syntax for aspects in packages etc.
5999 * sprint.adb: Handle new syntax of aspects before IS in package
6001 2011-08-01 Thomas Quinot <quinot@adacore.com>
6003 * atree.ads: Minor reformatting.
6004 * sem_prag.adb: Minor reformatting.
6006 2011-08-01 Robert Dewar <dewar@adacore.com>
6008 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6009 case expr alternative.
6011 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6013 * sem_ch12.adb: Fix typo.
6015 2011-08-01 Geert Bosch <bosch@adacore.com>
6017 * sem_prag.adb (Check_No_Link_Name): New procedure.
6018 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6019 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6020 instead of Standard_Long_Long_Float_Size global. Preparation for
6021 eventual removal of per type constants.
6022 * exp_util.ads (Get_Stream_Size): New function returning the stream
6023 size value of subtype E.
6024 * exp_util.adb (Get_Stream_Size): Implement new function.
6025 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6027 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6029 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6031 2011-08-01 Geert Bosch <bosch@adacore.com>
6033 * cstand.adb: Fix comments.
6034 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6037 2011-08-01 Robert Dewar <dewar@adacore.com>
6039 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6041 2011-08-01 Geert Bosch <bosch@adacore.com>
6043 * atree.ads: Fix comment.
6045 2011-08-01 Robert Dewar <dewar@adacore.com>
6047 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6048 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6049 * par.adb: Add with for Namet.Sp.
6050 * par-tchk.adb: Minor reformatting.
6052 2011-08-01 Vincent Celier <celier@adacore.com>
6054 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6055 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6056 of the init procedure of a SAL.
6057 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6060 2011-08-01 Thomas Quinot <quinot@adacore.com>
6062 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6065 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6067 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6069 2011-08-01 Thomas Quinot <quinot@adacore.com>
6071 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6072 conformant with its spec (return True only for types that have
6073 an overriding Initialize primitive operation that prevents them from
6074 having preelaborable initialization).
6075 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6076 initialization for controlled types in Ada 2005 or later mode.
6078 2011-08-01 Robert Dewar <dewar@adacore.com>
6080 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6082 (Same_Aspect): New function.
6083 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6084 Type_Invariant, Precondition, Postcondition.
6085 * snames.ads-tmpl: Add Name_Type_Invariant.
6087 2011-08-01 Robert Dewar <dewar@adacore.com>
6089 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6091 (Freeze_All_Ent): Fix error in handling inherited aspects.
6092 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6093 already analyzed, but don't skip entire processing of a declaration,
6094 that's wrong in some cases of declarations being rewritten.
6095 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6096 Don't delay for integer, string literals
6097 Treat predicates in usual manner for delay, remove special case code,
6099 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6100 (Build_Predicate_Function): Update saved expression in aspect
6101 (Build_Invariant_Procedure): Update saved expression in aspect
6102 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6103 of replacement of discriminant references if the reference is simple.
6105 2011-08-01 Robert Dewar <dewar@adacore.com>
6107 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6108 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6109 Static_Predicate and Dynamic_Predicate.
6110 (Build_Predicate_Function): Add processing for Static_Predicate
6111 and Dynamic_Predicate.
6112 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6113 (From_Static_Predicate): New flag
6114 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6116 2011-08-01 Robert Dewar <dewar@adacore.com>
6118 * usage.adb: Documentation cleanup for Ada version modes in usage.
6119 * expander.adb: Minor reformatting.
6121 2011-08-01 Robert Dewar <dewar@adacore.com>
6123 * atree.ads: Minor comment fix.
6124 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6125 a-witeio.ads, sem_prag.adb: Minor reformatting.
6127 2011-08-01 Doug Rupp <rupp@adacore.com>
6129 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6130 pointers. Use descrip.h header file for convenience. Add some
6133 2011-08-01 Robert Dewar <dewar@adacore.com>
6135 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6136 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6137 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6139 (Check_Aspect_At_End_Of_Declarations): New procedure
6140 (Analye_Aspect_Specification): Minor changes for above procedures
6141 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6142 specification node as well.
6144 2011-08-01 Pascal Obry <obry@adacore.com>
6146 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6147 Windows files. Use GetFilesAttributes() in this case to check for file
6148 existence instead of returning with an error code.
6150 2011-08-01 Vincent Celier <celier@adacore.com>
6152 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6153 High is above Source length.
6155 2011-08-01 Robert Dewar <dewar@adacore.com>
6157 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6159 2011-08-01 Robert Dewar <dewar@adacore.com>
6161 * aspects.ads (Boolean_Aspects): New subtype.
6162 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6163 for derived types in cases where the parent type and derived type have
6165 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6166 with aspects when parent type also has aspects.
6167 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6168 boolean expression at this point).
6169 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6170 accordance with final decision on the Ada 2012 feature.
6171 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6173 2011-08-01 Matthew Heaney <heaney@adacore.com>
6175 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6177 2011-08-01 Pascal Obry <obry@adacore.com>
6179 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6180 Fix Replace_Slice when High is above current string size.
6181 (Replace_Slice): Fix DL computation when High is above current
6184 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6186 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6188 2011-08-01 Matthew Heaney <heaney@adacore.com>
6190 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6193 2011-08-01 Pascal Obry <obry@adacore.com>
6195 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6198 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6200 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6201 access to protected subprograms in generic bodies.
6202 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6203 protected type, indicate that the convention of the subprogram is
6204 Convention_Protected, because it may be used in subsequent declarations
6205 within the protected declaration.
6207 2011-08-01 Vincent Celier <celier@adacore.com>
6209 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6210 and "final" procedures when the name of the library is "ada", to avoid
6211 duplicate symbols "adainit" and "adafinal" in executables.
6213 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6215 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6216 quantified expression that appears within a postcondition and uses the
6217 Ada2012 'Result attribute.
6219 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6221 * init.c (__gnat_error_handler): Cast reason to int.
6222 (__gnat_install_handler): Explain sa_sigaction use.
6224 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6226 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6227 subprogram has copy-in copy-out parameters, try to promote the mode of
6228 the return type if it is passed in registers.
6230 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6232 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6233 left operand as addressable.
6235 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6237 * gcc-interface/gigi.h (build_function_stub): Remove.
6238 (build_return_expr): Likewise.
6239 (convert_vms_descriptor): Declare.
6240 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6241 (build_function_stub): Move to...
6242 * gcc-interface/utils2.c (build_return_expr): Move to...
6243 * gcc-interface/trans.c (build_function_stub): ...here.
6244 (build_return_expr): ...here.
6245 (Subprogram_Body_to_gnu): Add local variable for language_function.
6246 Disconnect the parameter attributes cache, if any, once done with it.
6247 Call end_subprog_body only after setting the end_locus.
6248 Build the stub associated with the function, if any, at the very end.
6249 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6250 variables and streamline control flow.
6252 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6255 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6258 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6261 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6262 Assign to act.sa_sigaction.
6263 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6264 current->return_address to char * before arithmetic.
6266 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6268 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6269 Correct argument types.
6270 Extract code from reason.
6271 (__gnat_install_handler): Assign to act.sa_sigaction.
6273 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6275 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6276 (GNAT1_OBJS): ...here.
6278 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6281 * g-socthi-mingw.adb (Fill): Fix formatting.
6283 * gcc-interface/gigi.h: Move around comment.
6285 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6288 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6290 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6293 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6295 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6297 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6298 range comparison if Pmode is SImode.
6300 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6301 Eric Botcazou <ebotcazou@adacore.com>
6303 * adadecode.c: Wrap up in extern "C" block.
6304 * adadecode.h: Likewise.
6305 * adaint.c: Likewise. Remove 'const' keyword.
6306 * adaint.h: Likewise.
6308 * atree.h: Likewise.
6310 * cstreams.c: Likewise.
6314 * final.c: Likewise.
6316 * initialize.c: Likewise.
6318 * namet.h: Likewise.
6319 * nlists.h: Likewise.
6320 * raise.c: Likewise.
6321 * raise.h: Likewise.
6322 * repinfo.h: Likewise.
6323 * seh_init.c: Likewise.
6324 * targext.c: Likewise.
6325 * tracebak.c: Likewise.
6326 * uintp.h: Likewise.
6327 * urealp.h: Likewise.
6328 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6329 * xsinfo.adb: Likewise.
6330 * xsnamest.adb: Likewise.
6331 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6332 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6333 * gcc-interface/misc.c: Likewise.
6334 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6335 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6336 ada/targext.o here...
6337 (GNAT_ADA_OBJS): ...and not here.
6338 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6339 (GNATBIND_OBJS): Reorder.
6341 2011-07-07 Richard Henderson <rth@redhat.com>
6343 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6344 dwarf2out_frame_init.
6346 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6348 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6350 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6353 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6355 2011-07-06 Richard Guenther <rguenther@suse.de>
6357 * gcc-interface/misc.c (gnat_init): Merge calls to
6358 build_common_tree_nodes and build_common_tree_nodes_2.
6359 Re-initialize boolean_false_node.
6361 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6362 Olivier Hainque <hainque@adacore.com>
6363 Nicolas Setton <setton@adacore.com>
6365 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6366 the type according to the ARTIFICIAL_P parameter.
6367 (create_type_decl): Likewise.
6368 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6370 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6372 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6373 (gnatbind): Likewise.
6375 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6377 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6379 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6381 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6382 local variable throughout. Remove useless call to Base_Type.
6383 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6384 Take it also into account for the volatileness of the field. Set the
6385 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6387 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6389 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6390 on a dereference built for a by-ref object if it has an address clause.
6392 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6394 * einfo.ads (Address_Taken): Document use for the second argument of
6395 Asm_Input and Asm_Output attributes.
6396 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6397 argument is an entity name, then set Address_Taken on it.
6398 <Attribute_Asm_Output>: Likewise.
6399 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6400 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6401 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6402 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6404 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6407 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6409 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6411 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6412 (ada/utils.o): Update dependencies.
6413 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6414 ../../../libcpp/libcpp.a.
6415 * gcc-interface/utils.c: Include common/common-target.h.
6416 (process_attributes): Use targetm_common.have_named_sections.
6418 2011-06-07 Richard Guenther <rguenther@suse.de>
6420 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6423 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6425 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6426 TREE_THIS_NOTRAP flag.
6428 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6430 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6433 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6435 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6436 constants whose full view has discriminants specially.
6438 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6440 * gcc-interface/utils.c: Include diagnostic.h.
6441 (gnat_write_global_declarations): Output debug information for all
6442 global type declarations before finalizing the compilation unit.
6443 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6445 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6447 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6449 2011-05-25 Kai Tietz <ktietz@redhat.com>
6451 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6452 initialization instead of const/none-const pointer assignment.
6454 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6456 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6457 $(EXTRA_GNAT1_OBJS).
6458 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6459 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6460 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6461 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6462 libcommon-target.a instead of prefix.o.
6464 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6467 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6469 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6471 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6472 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6473 instead of version.o.
6475 2011-05-18 Kai Tietz <ktietz@redhat.com>
6477 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6478 boolean_false_node instead of integer_zero_node.
6479 (convert_with_check): Likewise.
6480 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6482 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6484 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6485 type of the parameter is an unconstrained array, convert the actual to
6486 the type of the formal in the In Out and Out cases as well.
6488 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6490 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6491 call build_function_type_array or build_varargs_function_type_array
6493 (create_subprog_type): Don't call build_function_type; call
6494 build_function_type_vec instead.
6496 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6498 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6499 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6500 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6502 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6504 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6506 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6507 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6509 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6511 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6513 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6515 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6516 instead of accessing TYPE_ARG_TYPES directly.
6517 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6519 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6522 * gcc-interface/gigi.h (get_variant_part): Declare.
6523 * gcc-interface/decl.c (get_variant_part): Make global.
6524 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6525 types have the same constant size, are record types and T1 has a
6526 variant part while T2 doesn't.
6528 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6530 * gcc-interface/utils.c (begin_subprog_body): Do not call
6532 (end_subprog_body): Likewise.
6534 2011-05-04 Richard Guenther <rguenther@suse.de>
6536 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6538 (pos_to_constructor): Likewise.
6540 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6541 Eric Botcazou <ebotcazou@adacore.com>
6543 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6544 of build_function_type. Adjust calls to...
6545 (build_raise_check): ...this. Do not take a void_tree parameter.
6546 Call build_function_type_list instead of build_function_type.
6547 Fix head comment and swap couple of conditional blocks.
6549 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6551 * gnatvsn.ads (Library_Version): Bump to 4.7.
6552 (Current_Year): Bump to 2011.
6554 2011-04-29 Michael Matz <matz@suse.de>
6556 * gcc-interface/misc.c (gnat_handle_option): Set
6557 warn_maybe_uninitialized.
6559 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6561 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6562 the Watson/McCabe paper.
6564 2011-04-23 Jim Meyering <meyering@redhat.com>
6566 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6568 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6570 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6573 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6575 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6577 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6578 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6579 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6580 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6581 <all>: Do not set flags on the reused DECL node coming from an alias.
6582 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6583 don't need debug info here...
6584 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6585 (gigi): Adjust calls to create_subprog_decl.
6586 (build_raise_check): Likewise.
6587 (establish_gnat_vms_condition_handler): Likewise.
6588 (Compilation_Unit_to_gnu): Likewise.
6589 (gnat_to_gnu): Likewise.
6591 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6593 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6594 (NO_REORDER_ADAFLAGS): New variable.
6595 (EXTRA_GNATTOOLS): Always define.
6596 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6597 Clean up and adjust list of files compiled with special options.
6598 * gcc-interface/Make-lang.in: Likewise.
6599 (ada/decl.o): Cosmetical change.
6600 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6602 2011-04-20 Jim Meyering <meyering@redhat.com>
6604 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6606 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6608 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6609 $(CFLAGS) on the link line.
6611 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6613 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6614 padded type built for the return type if it is unconstrained.
6616 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6618 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6620 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6622 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6623 before calling TREE_CHAIN.
6624 * gcc-interface/misc.c (gnat_init_ts): New function.
6625 (LANG_HOOKS_INIT_TS): Define.
6627 2011-04-12 Martin Jambor <mjambor@suse.cz>
6629 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6630 instead of cgraph_node.
6632 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6635 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6638 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6640 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6641 of aggregate types that contain a placeholder.
6643 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6645 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6647 (handle_type_generic_attribute): Likewise.
6649 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6652 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6654 2011-04-04 Kai Tietz <ktietz@redhat.com>
6657 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6660 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6662 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6663 type case, do not strip a padding type around the array type.
6665 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6667 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6670 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6672 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6673 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6674 code for -feliminate-unused-debug-types.
6675 (gnat_post_options): Likewise.
6677 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6679 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6680 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6683 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6685 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6686 DECL_ARTIFICIAL flag on enumeration types.
6688 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6691 fat pointer types artificial unconditionally.
6692 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6695 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6697 * gcc-interface/gigi.h (get_dummy_type): Declare.
6698 (build_dummy_unc_pointer_types): Likewise.
6699 (finish_fat_pointer_type): Likewise.
6700 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6701 fat pointer type has been built, complete it in place.
6702 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6703 and thin pointers. Remove useless variable.
6704 (finish_fat_pointer_type): Make global and move to...
6705 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6706 (get_dummy_type): New function.
6707 (build_dummy_unc_pointer_types): Likewise.
6708 (gnat_pushdecl): Propage the name to the anonymous variants only.
6709 (update_pointer_to): Only adjust the pointer types in the unconstrained
6712 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6714 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6715 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6716 if this is a Taft amendment type and the full declaration is available.
6717 * gcc-interface/trans.c (process_type): Likewise.
6718 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6719 (process_freeze_entity): Likewise.
6720 * gcc-interface/utils.c (dummy_global): New static variable.
6721 (gnat_write_global_declarations): If there are types declared as used
6722 at the global level, insert them in the global hash table.
6724 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6726 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6727 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6728 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6730 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6731 flag of the type accordingly.
6732 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6734 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6736 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6737 finalizing types when updating the pointers to the designated type.
6738 <all>: Finalize the deferred types even if we didn't defer processing
6739 of incomplete types in this invocation.
6741 2011-04-01 Olivier Hainque <hainque@adacore.com>
6742 Nicolas Setton <setton@adacore.com>
6743 Eric Botcazou <ebotcazou@adacore.com>
6745 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6746 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6748 2011-03-28 Kai Tietz <ktietz@redhat.com>
6750 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6752 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6753 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6755 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6757 2011-03-28 Tristan Gingold <gingold@adacore.com>
6760 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6761 Use ada output of gnatbind.
6762 (ada/b_gnatb.adb): Ditto.
6763 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6764 (ada.mostlyclean, ada.stage1)
6765 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6766 (ada.stagefeedback): Adjust.
6767 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6768 Use ada output of gnatbind.
6769 (b_gnatm.adb): Ditto.
6770 (b_gnatl.o, b_gnatm.o): New rules.
6772 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6774 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6775 for the padded type built to support a specified size or alignment.
6777 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6779 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6780 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6781 unconditionally to the end of the unit when the designated type is
6783 <all>: Rename local variable. Attempt to un-defer types only and do it
6784 for limited_with'ed types as well.
6785 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6786 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6787 consistently and remove redundant call to finalize_from_with_types.
6789 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6791 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6792 subprograms without a previous spec declared in the same unit.
6793 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6794 subprograms at the end of the unit instead of at the beginning.
6795 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6796 isn't public for the special handling of non-inline functions nested
6797 inside inline external functions.
6799 2011-03-25 Jeff Law <law@redhat.com>
6801 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6803 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6805 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6806 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6807 to compute Set_Size_Depends_On_Discriminant.
6808 (Layout_Type): Call it on array types in back-end layout mode.
6809 * sem_util.adb (Requires_Transient_Scope): Return true for array
6810 types only if the size depends on the value of discriminants.
6811 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6812 type if the RHS is a call to a function that returns an unconstrained
6813 type with default discriminant.
6815 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6817 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6818 non-conversion to the nominal result type at the end.
6820 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6822 * gcc-interface/trans.c (create_temporary): New function taken from...
6823 (create_init_temporary): ...here. Call it.
6824 (call_to_gnu): Create the temporary for the return value early, if any.
6825 Create it for a function with copy-in/copy-out parameters if there is
6826 no target; in other cases of copy-in/copy-out, use another temporary.
6827 Push the new binding level lazily. Add and rename local variables.
6829 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6831 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6833 (set_rm_size): Likewise.
6835 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6837 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6838 for the padded type built in order to support a specified alignment.
6839 Fix incorrect formatting.
6841 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6844 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6846 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6848 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6849 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6850 to the end of the list. Adjust recursive call. Rename local variable.
6851 If REORDER is true, reorder components of the record type.
6852 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6853 components_to_record and adjust the parameter list.
6855 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6857 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6858 disabled, use the variable for bounds of loop iteration scheme.
6860 2011-03-21 Kai Tietz <ktietz@redhat.com>
6863 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6865 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6867 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6868 out whether the expression is read-only. Short-circuit placeholder
6869 case and rename a couple of local variables.
6871 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6873 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6874 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6875 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6876 (convert): Deal with conversions from a smaller form type specially.
6878 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6880 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6881 its argument, except for the special -I- switch.
6883 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6885 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6888 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6890 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6892 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6894 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6896 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6897 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6898 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6899 Do not generate the check directly, instead instantiate the template
6900 check present in the descriptor.
6901 (make_descriptor_field): Move around.
6902 (build_vms_descriptor32): Build a template check in the POINTER field.
6903 (build_vms_descriptor): Remove useless suffixes.
6904 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6906 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6909 * targext.c: Include target files if IN_RTS is defined.
6911 2011-01-26 Richard Guenther <rguenther@suse.de>
6914 * targext.c: Include config.h.
6915 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6918 2011-01-04 Pascal Obry <obry@adacore.com>
6919 Eric Botcazou <ebotcazou@adacore.com>
6921 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6923 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6925 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6926 end-of-case on the end label and its associated gotos, if any.
6928 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6930 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6931 expressions of the parameter cache within the statement group of
6934 2011-01-04 Olivier Hainque <hainque@adacore.com>
6935 Eric Botcazou <ebotcazou@adacore.com>
6937 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6938 (set_end_locus_from_node): New function.
6939 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6940 make and the function end_locus.
6941 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6942 for the elaboration subprogram.
6943 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6944 set the end_locus of the expression as well.
6946 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6949 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6950 variables that are referenced in exception handlers volatile.
6954 Copyright (C) 2011 Free Software Foundation, Inc.
6956 Copying and distribution of this file, with or without modification,
6957 are permitted in any medium without royalty provided the copyright
6958 notice and this notice are preserved.
6960 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6961 - fix bugs in the description of Source_Trace;
6962 - get rid of UNIT_NAME;
6964 2011-08-02 Javier Miranda <miranda@adacore.com>
6967 (Build_Dispatching_Requeue): Adding support for VM targets
6968 since we cannot directly reference the Tag entity.
6969 * exp_sel.adb (Build_K): Adding support for VM targets.
6970 (Build_S_Assignment): Adding support for VM targets.
6972 (Default_Prim_Op_Position): In VM targets do not restrict availability
6973 of predefined interface primitives to compiling in Ada 2005 mode.
6974 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6975 restricted to compiling in Ada 2005 mode.
6976 (Make_VM_TSD): Generate code that declares and initializes the OSD
6977 record. Needed to support dispatching calls through synchronized
6980 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6981 primitives associated with synchronized interfaces.
6982 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6983 primitives associated with synchronized interfaces.
6985 2011-08-02 Yannick Moy <moy@adacore.com>
6987 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6988 statements hidden in SPARK if preceded by the HIDE directive
6989 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6990 exception handlers as hidden in SPARK if preceded by the HIDE directive
6991 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6992 if starting with the HIDE directive
6993 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6994 starting with the HIDE directive; mark the declarations in a private
6995 part as hidden in SPARK if the private part starts with the HIDE
6997 * restrict.adb, restrict.ads
6998 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6999 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7000 argument node belongs to a part which is hidden in SPARK
7001 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7002 parts in SPARK; protect the possibly costly call to
7003 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7004 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7005 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7006 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7008 (Scan): recognize special comment starting with '#' and followed by
7009 SPARK keyword "hide" as a HIDE directive.
7011 2011-08-02 Yannick Moy <moy@adacore.com>
7013 * types.ads, erroutc.ads: Minor reformatting.
7015 2011-08-02 Vincent Celier <celier@adacore.com>
7017 * link.c: Add response file support for cross platforms.
7019 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7021 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7022 in an association, set parent field of copy before partial analysis.
7023 * sem_res.adb (Resolve_Slice): create reference to itype only when
7024 expansion is enabled.
7026 2011-08-02 Yannick Moy <moy@adacore.com>
7028 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7029 for new flag denoting which subprogram bodies are in ALFA
7030 * restrict.adb, sem_ch7.adb: Update comment
7031 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7032 sem_ch9.adb, sem_res.adb: Add calls to
7033 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7034 * sem_ch6.adb (Analyze_Function_Return): add calls to
7035 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7036 middle of the body, and extended return.
7037 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7038 False when missing return.
7039 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7040 to True for subprograms whose spec is in ALFA. Remove later on the flag
7041 on the entity used for a subprogram body when there exists a separate
7043 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7044 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7045 False, otherwise do nothing.
7047 2011-08-02 Robert Dewar <dewar@adacore.com>
7049 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7051 2011-08-02 Yannick Moy <moy@adacore.com>
7053 * sem_ch4.ads: minor formatting.
7055 2011-08-02 Yannick Moy <moy@adacore.com>
7057 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7058 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7059 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7060 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7061 opt.ads: cleanup of SPARK mode
7063 2011-08-02 Yannick Moy <moy@adacore.com>
7065 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7067 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7068 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7070 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7071 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7072 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7073 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7075 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7077 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7078 functions whose return type is not in ALFA.
7079 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7081 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7082 parameter's type is not in ALFA.
7083 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7086 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7088 * sem_ch6 (Analyze_Expression_Function): treat the function as
7089 Inline_Always, and introduce a subprogram declaration for it when it is
7091 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7092 expression functions, so that the back-end can determine whether they
7093 can in fact be inlined.
7094 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7095 a function body comes from an expression function.
7097 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7099 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7100 null exclusions to test Can_Never_Be_Null on the anonymous access types
7101 of the formals rather than testing the formals themselves. Exclude this
7102 check in cases where the Old_Formal is marked as a controlling formal,
7103 to avoid issuing spurious errors for bodies completing dispatching
7104 operations (due to the flag not getting set on controlling access
7105 formals in body specs).
7106 (Find_Corresponding_Spec): When checking full and subtype conformance of
7107 subprogram bodies in instances, pass Designated and E in that order, for
7108 consistency with the expected order of the formals (New_Id followed by
7111 2011-08-02 Robert Dewar <dewar@adacore.com>
7113 * sem_ch8.adb: Minor reformatting.
7115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7117 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7118 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7119 primitive operations of class-wide actuals.
7121 2011-08-02 Javier Miranda <miranda@adacore.com>
7123 * exp_atag.ads, exp_atag.adb
7124 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7125 since its value is implicitly passed in argument Typ.
7126 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7127 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7128 Build_Common_Dispatching_Select_Statements.
7130 2011-08-02 Robert Dewar <dewar@adacore.com>
7132 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7133 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7136 2011-08-02 Robert Dewar <dewar@adacore.com>
7138 * sem_res.adb: Minor reformatting.
7139 * sem_prag.adb: Minor reformatting.
7141 2011-08-02 Javier Miranda <miranda@adacore.com>
7143 * exp_atag.adb, exp_atags.ads
7144 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7145 by the tagged type Entity. Required to use this routine in the VM
7146 targets since we do not have available the Tag entity in the VM
7149 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7150 Ada.Tags has not been previously loaded.
7152 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7153 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7155 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7156 view of enclosing scopes. Required to handle enclosing scopes that
7157 are synchronized types whose full view is a task type.
7159 (Build_VM_TSDs): Minor code improvement to avoid generating and
7160 analyzing lists with empty nodes.
7161 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7162 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7163 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7164 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7165 (Make_Select_Specific_Data_Table): Add support for VM targets.
7166 (Make_VM_TSD): Generate code to initialize the SSD structure of
7169 2011-08-02 Yannick Moy <moy@adacore.com>
7171 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7172 cross-references section in ALI.
7173 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7174 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7176 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7177 subprogram or package entity of a node
7178 (Is_Local_Reference_Type): new function returns True for references
7179 selected in local cross-references.
7180 (Lt): function extracted from Lt in Output_References
7181 (Write_Entity_Name): function extracted from Output_References
7182 (Generate_Definition): generate reference with type 'D' for definition
7183 of objects (object declaration and parameter specification), with
7184 appropriate locations and units, for use in local cross-references.
7185 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7186 references of type 'I' for initialization in object definition.
7187 (Output_References): move part of function Lt and procedure
7188 Write_Entity_Name outside of the body. Ignore references of types 'D'
7189 and 'I' introduced for local cross-references.
7190 (Output_Local_References): new procedure to output the local
7191 cross-references sections.
7192 (Lref_Entity_Status): new array defining whether an entity is a local
7193 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7194 with 'I' type when initialization expression is present.
7195 * get_scos.adb, get_scos.ads: Correct comments and typos
7197 2011-08-02 Javier Miranda <miranda@adacore.com>
7199 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7201 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7203 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7206 2011-08-02 Vincent Celier <celier@adacore.com>
7208 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7209 (No_Space_Img): New function
7210 (Find_Excluded_Sources): When reading from a file, record the file name
7211 and the line number for each excluded source.
7212 (Mark_Excluded_Sources): When reporting an error, if the excluded
7213 sources were read from a file, include file name and line number in
7216 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7218 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7220 2011-08-02 Robert Dewar <dewar@adacore.com>
7222 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7224 2011-08-02 Javier Miranda <miranda@adacore.com>
7226 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7227 generation of TSDs to the DOTNET compiler.
7228 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7229 generation of TSDs to the DOTNET compiler.
7231 2011-08-02 Javier Miranda <miranda@adacore.com>
7233 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7234 record of all the tagged types declared inside library level package
7235 declarations, library level package bodies or library level subprograms.
7236 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7237 associated with a given tagged type.
7238 (Build_VM_TSDs): New subprogram.
7239 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7240 compilation units that are subprograms.
7241 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7242 compilation units that are package bodies.
7243 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7244 units that are a package declaration or a package instantiation.
7245 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7246 reorganization to improve the error generated by the frontend when the
7247 function Ada.Tags.Secondary_Tag is not available.
7248 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7249 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7251 2011-08-02 Javier Miranda <miranda@adacore.com>
7253 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7255 2011-08-02 Robert Dewar <dewar@adacore.com>
7257 * s-imenne.ads: Minor reformatting.
7259 2011-08-02 Robert Dewar <dewar@adacore.com>
7261 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7262 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7263 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7265 2011-08-02 Robert Dewar <dewar@adacore.com>
7267 * einfo.ads (Materialize_Entity): Document this is only for renamings
7268 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7269 required debug information in the case where we transform the object
7270 declaration into a renaming declaration.
7271 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7273 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7276 2011-08-02 Robert Dewar <dewar@adacore.com>
7278 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7279 Suppress_Init_Procs.
7280 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7281 Suppress_Initialization/Initialization_Suppressed.
7282 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7283 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7284 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7285 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7287 2011-08-02 Robert Dewar <dewar@adacore.com>
7289 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7292 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7294 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7295 only have inheritable classwide pre/postconditions.
7297 2011-08-02 Javier Miranda <miranda@adacore.com>
7299 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7300 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7301 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7302 checks if the external tag of a type is the same as the external tag
7303 of some other declaration.
7305 2011-08-02 Thomas Quinot <quinot@adacore.com>
7307 * s-taskin.ads: Minor reformatting.
7309 2011-08-02 Emmanuel Briot <briot@adacore.com>
7311 * g-comlin.adb (Display_Help): swap the order in which it prints the
7312 short help and the general usage.
7314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7316 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7317 the aspect declarations and attach them to the generic copy for
7318 subsequent analysis.
7319 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7320 declarations of the generic tree to the new subprogram declarations.
7321 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7322 conditions that apply to a subprogram instance.
7324 2011-08-02 Robert Dewar <dewar@adacore.com>
7326 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7328 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7330 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7331 private type with a tagged full view is not derived in the immediate
7332 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7334 2011-08-02 Robert Dewar <dewar@adacore.com>
7336 * exp_ch4.adb: Minor reformatting.
7338 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7340 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7341 Ada2012 iterator, the loop will be rewritten during expansion into a
7342 while loop with a cursor and an element declaration. Do not analyze the
7343 body in this case, because if the container is for indefinite types the
7344 actual subtype of the elements will only be determined when the cursor
7345 declaration is analyzed.
7347 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7349 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7350 size/alignment related attributes in CodePeer_Mode.
7352 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7354 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7355 Prepend_Element, since this can result in the operation getting the
7356 wrong slot in the full type's dispatch table if the full type has
7357 inherited operations. The incomplete type's operation will get added
7358 to the proper position in the full type's primitives
7359 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7360 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7361 dispatching operations, since there are cases where nonprimitive
7362 subprograms can get added to the list of incomplete dependents (such
7363 as subprograms in nested packages).
7364 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7365 private part when determining whether to add a primitive with a
7366 parameter of a tagged incomplete type to the Private_Dependents list.
7367 Such primitives can also occur in the visible part, and should not have
7368 been excluded from being private dependents.
7369 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7370 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7371 list of a Taft-amendment incomplete type is a primitive before issuing
7372 an error that the full type must appear in the same unit. There are
7373 cases where nonprimitives can be in the list (such as subprograms in
7375 * sem_disp.adb (Derives_From): Use correct condition for checking that
7376 a formal's type is derived from the type of the corresponding formal in
7377 the parent subprogram (the condition was completely wrong). Add
7378 checking that was missing for controlling result types being derived
7379 from the result type of the parent operation.
7381 2011-08-02 Yannick Moy <moy@adacore.com>
7383 * errout.adb (First_Node): minor renaming
7384 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7387 2011-08-02 Yannick Moy <moy@adacore.com>
7389 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7390 before accessing operands.
7391 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7392 decide whether an initialization expression respects SPARK rules, as
7393 the plain node is the expanded one. This allows for more valid warnings
7395 * gnat_rm.texi: Minor update.
7397 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7399 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7402 2011-08-02 Robert Dewar <dewar@adacore.com>
7404 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7406 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7408 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7409 loop statements and the element renaming declaration with a block when
7410 the element type is controlled.
7412 2011-08-02 Yannick Moy <moy@adacore.com>
7414 * sinfo.ads: Minor formatting.
7416 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7418 * sem_aggr.adb (Add_Association): if the association has a box and no
7419 expression, use the Sloc of the aggregate itself for the new
7421 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7424 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7426 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7427 When a container is provided via a function call, generate a renaming
7428 of the function result. This avoids the creation of a transient scope
7429 and the premature finalization of the container.
7430 * exp_ch7.adb (Is_Container_Cursor): Removed.
7431 (Wrap_Transient_Declaration): Remove the supression of the finalization
7432 of the list controller when the declaration denotes a container cursor,
7435 2011-08-02 Yannick Moy <moy@adacore.com>
7437 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7438 node is from source, instead of the original node being from source.
7440 (Resolve_Array_Aggregate): refine the check for a static expression, to
7441 recognize also static ranges
7442 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7443 Array_Type_Declaration): postpone the test for the type being a subtype
7444 mark after the type has been resolved, so that component-selection and
7445 expanded-name are discriminated.
7446 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7447 to distinguish the case of an iteration scheme, so that an error is
7448 issed on a non-static range in SPARK except in an iteration scheme.
7449 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7450 In_Iter_Schm = True.
7451 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7452 user-defined operators so that they are allowed in renaming
7454 (Find_Selected_Component): refine the check for prefixing of operators
7455 so that they are allowed in renaming. Move the checks for restrictions
7456 on selector name after analysis discriminated between
7457 component-selection and expanded-name.
7458 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7459 concatenation argument of string type if it is static.
7460 * sem_util.adb, sem_util.ads
7461 (Check_Later_Vs_Basic_Declarations): add a new function
7462 Is_Later_Declarative_Item to decice which declarations are allowed as
7463 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7464 mode, add that renamings are considered as later items.
7465 (Enclosing_Package): new function to return the enclosing package
7466 (Enter_Name): correct the rule for homonyms in SPARK
7467 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7468 from source (result of expansion) to avoid issuing wrong warnings.
7470 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7472 * errout.adb: On anything but an expression First_Node returns its
7475 2011-08-02 Pascal Obry <obry@adacore.com>
7477 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7479 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7481 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7482 Set the associated loop as the related expression of internally
7484 * exp_ch7.adb (Is_Container_Cursor): New routine.
7485 (Wrap_Transient_Declaration): Supress the finalization of the list
7486 controller when the declaration denotes a container cursor.
7488 2011-08-02 Yannick Moy <moy@adacore.com>
7490 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7492 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7493 expression is a simple expression. This check cannot be performed in
7494 the semantics, so just drop it.
7495 (P_Index_Or_Discriminant_Constraint): move check that the index or
7496 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7497 semantics. Other cases were previously checked in the semantics.
7498 * par-ch4.adb (P_Name): move checks that a selector name is not
7499 character literal or an operator symbol to Find_Selected_Component in
7501 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7502 declarations are not placed after later declarations in a separate
7503 procedure in Sem_Util (possibly not the best choice?), to be used both
7504 during parsing, for Ada 83 mode, and during semantic analysis, for
7506 * par-endh.adb (Check_End): move check that end label is not missing
7507 to Process_End_Label in the semantics
7508 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7509 the special case for SPARK restriction
7510 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7511 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7512 parameter Force to issue the error message even on internal node (used
7513 for generated end label). Call Check_Restriction to check when an error
7514 must be issued. In SPARK mode, issue an error message even if the
7515 restriction is not set.
7516 (Check_Restriction): new procedure with an additional out parameter to
7517 inform the caller that a message has been issued
7518 * sem_aggr.adb: Minor modification of message
7519 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7520 instead of issuing an error message directly
7521 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7522 declarations are not placed after later declarations, by calling
7523 Check_Later_Vs_Basic_Declarations
7524 (Analyze_Subtype_Declaration): move here the check that an index or
7525 discriminant constraint must be a subtype mark. Change the check that
7526 a subtype of String must start at one so that it works on subtype marks.
7527 * sem_ch4.adb (Analyze_Call): move here the check that a named
7528 association cannot follow a positional one in a call
7529 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7530 instead of issuing an error message directly
7531 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7532 selector name is not a character literal or an operator symbol. Move
7533 here the check that the prefix of an expanded name cannot be a
7534 subprogram or a loop statement.
7535 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7536 procedure called from parsing and semantics to check that basic
7537 declarations are not placed after later declarations
7538 (Process_End_Label): move here the check that end label is not missing
7540 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7542 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7543 representation clause in codepeer mode, since it confuses CodePeer and
7544 does not bring useful info.
7546 2011-08-02 Ed Falis <falis@adacore.com>
7548 * init.c: initialize fp hw on MILS.
7550 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7552 * errout.adb (First_Node): for bodies, return the node itself (small
7553 optimization). For other nodes, do not check source_unit if the node
7554 comes from Standard.
7556 2011-08-02 Robert Dewar <dewar@adacore.com>
7558 * exp_ch3.adb: Minor comment additions.
7559 * sem_ch13.adb: Minor reformatting.
7561 2011-08-02 Pascal Obry <obry@adacore.com>
7563 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7565 2011-08-02 Robert Dewar <dewar@adacore.com>
7567 * sem_attr.adb: Minor reformatting.
7569 2011-08-02 Robert Dewar <dewar@adacore.com>
7571 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7572 (Has_Default_Component_Value): Removed
7573 * einfo.ads Comment updates
7574 (Has_Default_Aspect): Replaces Has_Default_Value
7575 (Has_Default_Component_Value): Removed
7577 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7579 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7580 (Get_Simple_Init_Val): Handle Default_Value aspect
7581 (Needs_Simple_Initialization): Handle Default_Value aspect
7582 * exp_ch3.ads: Needs_Simple_Initialization
7583 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7584 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7586 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7587 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7588 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7590 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7592 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7593 package containing iteration primitives.
7594 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7596 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7598 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7599 "of", pre-analyze expression in case it is a function call with
7600 finalization actions that must be placed ahead of the loop.
7601 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7602 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7604 2011-08-02 Geert Bosch <bosch@adacore.com>
7606 * cstand.adb (Create_Float_Types): Only consider C's long double for
7607 Long_Long_Float, in addition to double.
7609 2011-08-02 Robert Dewar <dewar@adacore.com>
7611 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7612 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7613 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7616 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7618 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7621 2011-08-02 Javier Miranda <miranda@adacore.com>
7623 * einfo.ads, einfo.adb
7624 (Original_Access_Type): Move this attribute to Node26 since there was
7625 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7626 which causes conflicts and breaks the generation of the .NET compiler.
7627 (Interface_Name): Add missing documentation on JGNAT only uses of
7630 2011-08-02 Geert Bosch <bosch@adacore.com>
7632 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7633 (Find_Back_End_Float_Type): Likewise
7634 (Create_Back_End_Float_Types): Likewise
7635 (Create_Float_Types): Likewise
7636 (Register_Float_Type): Likewise
7637 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7638 Nlist and split out type selection in new local Find_Base_Type function.
7639 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7641 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7643 2011-08-02 Robert Dewar <dewar@adacore.com>
7645 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7647 * opt.ads: Minor comment change.
7648 * sem_ch12.adb: Minor code reorganization.
7650 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7652 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7653 subtype's list of rep items to the list on the full subtype in the case
7654 where the lists are the same.
7656 2011-08-02 Geert Bosch <bosch@adacore.com>
7658 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7659 using the one from System.Strings, which also deallocates all strings.
7661 2011-08-02 Geert Bosch <bosch@adacore.com>
7663 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7665 * gcc-interface/Make-lang.in: Update dependencies.
7667 2011-08-02 Olivier Hainque <hainque@adacore.com>
7669 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7672 2011-08-02 Javier Miranda <miranda@adacore.com>
7674 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7675 associated with anonymous access to subprograms.
7677 2011-08-02 Geert Bosch <bosch@adacore.com>
7680 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7681 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7682 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7683 (Add_Symbol_Definition): Move to switch-c.adb
7684 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7685 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7686 (Add_Symbol_Definition): Move to switch-c.adb.
7687 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7689 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7691 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7692 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7694 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7695 (Add_Symbol_Definition): Moved from Prepcomp.
7696 * switch-c.ads: Update copyright notice. Use String_List instead of
7697 Argument_List, removing dependency on System.OS_Lib.
7699 2011-08-02 Yannick Moy <moy@adacore.com>
7701 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7702 mode on initialization expression which does not respect SPARK
7704 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7705 if the tree referenced by its argument represents an initialization
7706 expression in SPARK, suitable for initializing an object in an object
7709 2011-08-02 Javier Miranda <miranda@adacore.com>
7711 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7712 internally generated access to subprogram with its associated protected
7714 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7716 2011-08-02 Geert Bosch <bosch@adacore.com>
7718 * cstand.adb (Register_Float_Type): Print information about type to
7719 register, if the Debug_Flag_Dot_B is set.
7720 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7721 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7722 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7723 with a requested precision of more than Max_Digits digits and no more
7724 than Max_Base_Digits digits, if a range specification is present and the
7725 Predefined_Float_Types list has a suitable type to derive from.
7726 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7727 case of type completion with pragma Import
7729 (Process_Import_Predefined_Type): Processing to complete a type
7730 with pragma Import. Currently supports floating point types only.
7731 (Set_Convention_From_Pragma): Do nothing without underlying type.
7732 (Process_Convention): Guard against absence of underlying type,
7733 which may happen when importing incomplete types.
7734 (Process_Import_Or_Interface): Handle case of importing predefined
7735 types. Tweak error message.
7737 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7739 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7740 functions to previous change. Reorganize code slightly.
7742 2011-08-02 Geert Bosch <bosch@adacore.com>
7744 * back_end.ads (Register_Type_Proc): New call back procedure type for
7745 allowing the back end to provide information about available types.
7746 (Register_Back_End_Types): New procedure to register back end types.
7747 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7749 * cstand.adb (Back_End_Float_Types): New list for floating point types
7750 supported by the back end.
7751 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7752 (Copy_Float_Type): New procedure to make new copies of predefined types.
7753 (Register_Float_Type): New call back procedure to populate the BEFT list
7754 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7755 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7756 (Create_Float_Types): New procedure to create entities for floating
7757 point types predefined in Standard, and put these and any remaining
7758 BEFTs on the Predefined_Float_Types list.
7759 * stand.ads (Predefined_Float_Types): New list for predefined floating
7760 point types that do not have declarations in package Standard.
7762 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7764 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7765 entity node for the unit containing the parameter.
7766 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7767 (Add_Inlined_Subprogram): Likewise.
7768 * gcc-interface/Make-lang.in: Update dependencies.
7770 2011-08-02 Thomas Quinot <quinot@adacore.com>
7772 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7775 2011-08-02 Geert Bosch <bosch@adacore.com>
7777 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7779 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7781 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7782 computed value of Base_Type.
7784 2011-08-02 Yannick Moy <moy@adacore.com>
7786 * restrict.adb (Check_Restriction): issue an error for any use of
7787 class-wide, even if the No_Dispatch restriction is not set.
7788 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7789 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7790 when completing a private extension, the type named in the private part
7791 is not the same as that named in the visible part.
7792 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7793 of an inherited primitive operations of a tagged type or type extension
7794 that returns the tagged type.
7795 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7796 function which returns True for an implicit operation inherited by the
7797 derived type declaration for the argument type.
7798 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7801 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7803 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7804 Process_Bounds, to perform analysis with expansion of a range or an
7805 expression that is the iteration scheme for a loop.
7806 (Analyze_Iterator_Specification): If domain of iteration is given by a
7807 function call with a controlled result, as is the case if call returns
7808 a predefined container, ensure that finalization actions are properly
7810 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7812 2011-08-02 Javier Miranda <miranda@adacore.com>
7814 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7815 * gcc-interface/Make-lang.in: Update dependencies.
7817 2011-08-02 Javier Miranda <miranda@adacore.com>
7819 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7820 determine if the analysis is performed using N or Original_Node (N).
7821 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7822 functionality of routine Is_Variable avoids code duplication.
7823 * checks.adb (Determine_Range): Handle temporaries generated by
7824 Remove_Side_Effects.
7826 2011-08-02 Javier Miranda <miranda@adacore.com>
7828 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7829 expansion of the condition. Required since the previous analysis was
7830 done with expansion disabled (see Resolve_Quantified_Expression) and
7831 hence checks were not inserted and record comparisons have not been
7834 2011-08-02 Ed Falis <falis@adacore.com>
7836 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7839 2011-08-02 Bob Duff <duff@adacore.com>
7841 * opt.ads: Minor comment fix.
7843 2011-08-02 Bob Duff <duff@adacore.com>
7845 * sem_ch12.adb (Analyze_Package_Instantiation,
7846 Analyze_Subprogram_Instantiation): Turn off style checking while
7847 analyzing an instance. Whatever style checks that apply to the generic
7848 unit should apply, so it makes no sense to apply them in an instance.
7849 This was causing trouble when compiling an instance of a runtime
7850 unit that violates the -gnatyO switch.
7851 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7852 one of the two case statements, causing spurious errors.
7854 2011-08-02 Robert Dewar <dewar@adacore.com>
7856 * uname.adb: Minor reformatting.
7857 * gnatcmd.adb: Minor reformatting.
7858 * exp_attr.adb: Minor reformatting.
7860 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7862 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7863 No_Dispatching_Calls, do not look for the Assign primitive, because
7864 predefined primitives are not created in this case.
7866 2011-08-02 Bob Duff <duff@adacore.com>
7868 * stylesw.ads: Minor comment fixes.
7870 2011-08-02 Robert Dewar <dewar@adacore.com>
7872 * freeze.adb (Add_To_Result): New procedure.
7874 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7876 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7877 time, if the specific run-time routines for handling streams of strings
7878 are not available, use the default mechanism.
7880 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7882 * s-regpat.ads: Fix typo.
7884 2011-08-02 Vincent Celier <celier@adacore.com>
7886 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7887 not null, call it to create the in memory config project file without
7888 parsing an existing default config project file.
7890 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7892 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7894 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7896 * sem_elim.adb: an abstract subprogram does not need an eliminate
7897 pragma for its descendant to be eliminable.
7899 2011-08-02 Ed Falis <falis@adacore.com>
7901 * init.c: revert to handling before previous checkin for VxWorks
7902 * s-intman-vxworks.adb: delete unnecessary declarations related to
7903 using Ada interrupt facilities for handling signals.
7904 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7905 * s-intman-vxworks.ads: Import __gnat_install_handler as
7906 Initialize_Interrupts.
7907 * s-taprop-vxworks.adb: Delete Signal_Mask.
7908 (Abort_Handler): change construction of mask to unblock exception
7911 2011-08-02 Jerome Guitton <guitton@adacore.com>
7913 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7914 Debug_Raise_Exception before propagation starts.
7916 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7918 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7919 to Restriction_Check_Required.
7920 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7921 * sem_res.adb (Resolve_Call): Likewise.
7922 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7924 2011-08-02 Bob Duff <duff@adacore.com>
7926 * stylesw.ads: Update comment.
7927 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7928 * errout.ads: Remove obsolete comment.
7930 2011-08-02 Javier Miranda <miranda@adacore.com>
7932 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7933 (Set_Is_Safe_To_Reevaluate): new procedure.
7934 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7935 assignment is allowed on safe-to-reevaluate variables.
7936 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7937 temporary created to remove side effects in expressions that use
7938 the secondary stack as safe-to-reevaluate.
7939 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7940 variables that are not true constants.
7942 2011-08-02 Robert Dewar <dewar@adacore.com>
7944 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7945 sem_res.adb, sem_ch6.adb: Minor reformatting.
7947 2011-08-02 Jerome Guitton <guitton@adacore.com>
7949 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7951 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7953 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7954 not set Overridden_Operation if subprogram is an initialization
7957 2011-08-02 Yannick Moy <moy@adacore.com>
7959 * par-ch6.adb: Correct obsolete name in comments
7960 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7961 which takes two message arguments (existing function takes one), with
7962 second message used for continuation.
7963 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7964 block statements that originate from a source block statement, not
7965 generated block statements
7966 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7967 symmetry with procedure case
7968 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7969 function to issue an error in formal mode if a package specification
7970 contains more than one tagged type or type extension.
7971 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7972 parameters matching formals of tagged types are objects (or ancestor
7973 type conversions of objects), not general expressions. Issue an error
7974 on view conversions that are not involving ancestor conversion of an
7976 (Resolve_Type_Conversion): in formal mode, issue an error on the
7977 operand of an ancestor type conversion which is not an object
7978 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7979 procedure so that it works also for actuals of function calls
7980 (Is_Actual_Tagged_Parameter): new function which determines if its
7981 argument is an actual parameter of a formal of tagged type in a
7983 (Is_SPARK_Object_Reference): new function which determines if the tree
7984 referenced by its argument represents an object in SPARK
7986 2011-08-02 Robert Dewar <dewar@adacore.com>
7988 * sem_ch3.adb: Minor reformatting
7989 Minor comment addition
7990 Minor error msg text change
7992 2011-08-02 Javier Miranda <miranda@adacore.com>
7994 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7995 function. Used to be more precise when we generate a variable plus one
7996 assignment to remove side effects in the evaluation of the Bound
7998 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7999 of the bound expression to force its re-analysis and thus expand the
8000 associated transient scope (if required). Code cleanup replacing the
8001 previous code that declared the constant entity by an invocation to
8002 routine Force_Evaluation which centralizes this work in the frontend.
8004 2011-08-02 Robert Dewar <dewar@adacore.com>
8006 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8007 (Base_Type): Now uses improved Is_Base_Type function
8008 * einfo.ads (Base_Type): Inline this function
8010 2011-08-02 Robert Dewar <dewar@adacore.com>
8012 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8013 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8015 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8017 * gcc-interface/Make-lang.in: Update dependencies.
8018 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8021 2011-08-02 Yannick Moy <moy@adacore.com>
8023 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8024 non-simple expression used in delta constraint
8025 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8026 index constraint which is not a subtype mark
8027 * par.adb: With and use Restrict
8028 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8029 mode on component type which is not a subtype mark and default
8030 expression on component
8031 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8032 of string which does not have a lower index bound equal to 1
8033 (Array_Type_Declaration): issue an error in formal mode on index or
8034 component type which is not a subtype mark, and on aliased keyword on
8036 (Derived_Type_Declaration): issue an error in formal mode on interface,
8037 limited or abstract type
8038 (Record_Type_Declaration): issue an error in formal mode on interface
8039 (Record_Type_Definition): issue an error in formal mode on tagged types
8040 and type extensions not declared in the specification of a library unit
8041 package; on null non-tagged record; on variant part
8043 2011-08-02 Vincent Celier <celier@adacore.com>
8045 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8046 not declared for qualified library project when Library_Name is not
8047 declared, but Library_Dir is.
8049 2011-08-02 Robert Dewar <dewar@adacore.com>
8051 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8052 pragmas (affects aspects [Component_]Default_Value
8053 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8054 component type for the resolution
8056 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8058 * einfo.adb (Base_Type): Tune implementation for speed.
8060 2011-08-02 Robert Dewar <dewar@adacore.com>
8062 * freeze.adb: Minor reformatting.
8064 2011-08-02 Thomas Quinot <quinot@adacore.com>
8066 * scos.ads: Update comments.
8068 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8070 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8071 base type, because the parent may be a subtype of a private type whose
8072 convention is established in a private part.
8074 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8076 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8077 statement in a block when the expansion of the return expression has
8078 created a finalization chain.
8079 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8080 with the parent node.
8081 Add N_Extended_Return_Statement to handle the case where a transient
8082 object declaration appears in the Return_Object_Declarations list of
8083 an extended return statement.
8085 2011-08-02 Matthew Gingell <gingell@adacore.com>
8087 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8088 unused parameter 'name'.
8090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8092 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8093 inherited operation, check whether its alias, which is the source
8094 operastion that it renames, has been marked eliminated.
8096 2011-08-02 Javier Miranda <miranda@adacore.com>
8098 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8099 in-mode parameter whose type is an access type since it can be used to
8100 modify its designated object. Enforce code that handles as safe an
8101 access type that is not access-to-constant but it is the result of a
8102 previous removal of side-effects.
8103 (Remove_Side_Effects): Minor code reorganization of cases which require
8104 no action. Done to incorporate documentation on new cases uncovered
8105 working in this ticket: no action needed if this routine was invoked
8106 too early and the nodes are not yet decorated.
8107 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8108 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8109 were issued with actuals that are implicitly provided by
8112 2011-08-02 Robert Dewar <dewar@adacore.com>
8114 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8116 2011-08-02 Yannick Moy <moy@adacore.com>
8118 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8119 to issue an error in formal mode on attribute not supported in this mode
8120 (Analyze_Attribute): issue errors on standard attributes not supported
8122 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8123 comment, and issue error in formal mode on modulus which is not a power
8125 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8127 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8129 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8130 operator on modular type (except 'not').
8132 2011-08-02 Robert Dewar <dewar@adacore.com>
8134 * gnat_rm.texi: Minor reformatting.
8136 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8138 * s-osinte-linux.ads: Minor comment update and reformatting.
8139 * i-cexten.ads: Make this unit pure, as for its parent.
8140 Will allow its usage in more contexts if needed.
8142 2011-08-02 Robert Dewar <dewar@adacore.com>
8144 * s-utf_32.ads: Minor comment fix.
8146 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8148 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8149 operation of a tagged synchronized type, handle the case where the
8150 controlling argument is overloaded.
8152 2011-08-02 Yannick Moy <moy@adacore.com>
8154 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8155 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8156 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8157 SPARK mode and formal verification mode on processing SPARK restriction
8158 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8159 requiring consistency checking.
8161 2011-08-02 Robert Dewar <dewar@adacore.com>
8163 * sem_res.adb: Minor reformatting.
8165 2011-08-02 Robert Dewar <dewar@adacore.com>
8167 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8168 a-cforse.ads: Remove unneeded with of Ada.Containers
8169 Remove commented out pragma Inline's
8170 Move specifications of new subprograms to the actual specs
8172 2011-08-02 Yannick Moy <moy@adacore.com>
8174 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8175 a-cforse.ads: Update comments.
8177 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8179 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8181 2011-08-02 Robert Dewar <dewar@adacore.com>
8183 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8184 a-cforse.ads, a-cofove.ads: Minor reformatting.
8186 2011-08-02 Claire Dross <dross@adacore.com>
8188 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8189 a-cofove.ads: Add comments.
8191 2011-08-02 Yannick Moy <moy@adacore.com>
8193 * gnat_rm.texi: Document formal containers.
8195 2011-08-02 Emmanuel Briot <briot@adacore.com>
8197 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8200 2011-08-02 Robert Dewar <dewar@adacore.com>
8202 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8205 2011-08-02 Robert Dewar <dewar@adacore.com>
8207 * aspects.adb: New aspects Default_Value and Default_Component_Value
8208 New format of Aspect_Names table checks for omitted entries
8209 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8210 handling of boolean aspects for derived types.
8211 New aspects Default_Value and Default_Component_Value
8212 New format of Aspect_Names table checks for omitted entries
8213 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8214 (Has_Default_Value): New flag
8215 (Has_Default_Component_Value): New flag
8216 (Has_Default_Value): New flag
8217 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8219 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8220 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8221 Default_Value and Default_Component_Value
8222 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8223 New aspects Default_Value and Default_Component_Value
8224 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8225 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8227 2011-08-02 Vincent Celier <celier@adacore.com>
8229 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8230 inherit library kind.
8232 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8234 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8237 2011-08-02 Robert Dewar <dewar@adacore.com>
8239 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8241 2011-08-02 Yannick Moy <moy@adacore.com>
8243 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8245 2011-08-02 Robert Dewar <dewar@adacore.com>
8247 * impunit.adb: Add comment.
8249 2011-08-02 Yannick Moy <moy@adacore.com>
8251 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8252 qualification of aggregates in formal mode
8253 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8255 (Resolve_Aggregate): complete the test that an aggregate is adequately
8256 qualified in formal mode
8258 2011-08-02 Pascal Obry <obry@adacore.com>
8260 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8261 * mlib-prj.adb: Supress warning when compiling binder generated file.
8262 (Build_Library): Supress all warnings when compiling the binder
8265 2011-08-02 Yannick Moy <moy@adacore.com>
8267 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8269 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8270 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8271 Add with/use clauses to make Check_Formal_Restriction visible
8273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8275 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8276 in-parameters when type of the generic formal is private in the generic
8277 spec and non-private in the body.
8279 2011-08-02 Claire Dross <dross@adacore.com>
8281 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8282 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8283 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8284 * impunit.adb, Makefile.rtl: Take new files into account.
8286 2011-08-02 Robert Dewar <dewar@adacore.com>
8288 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8289 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8291 2011-08-02 Yannick Moy <moy@adacore.com>
8293 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8295 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8296 matching static array bounds, taking into account the special case of
8298 * sem_ch3.adb: Typo in comment.
8300 2011-08-02 Yannick Moy <moy@adacore.com>
8302 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8303 which issues an error in formal mode if its argument node is originally
8305 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8306 has a discriminant specification so that it does not include the case
8308 (Derived_Type_Declaration): move here the test that a derived type has a
8309 discriminant specification
8310 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8311 first element of a component association before accessing its choices
8312 (presence of component association is not enough)
8313 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8314 declaration is a library item before accessing the next element in a
8315 list, as library items are not member of lists
8316 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8317 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8318 Check_Formal_Restriction whenever possible.
8320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8322 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8323 reference when needed.
8325 2011-08-02 Bob Duff <duff@adacore.com>
8327 * gnat_ugn.texi: Fix typo.
8329 2011-08-02 Vincent Celier <celier@adacore.com>
8331 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8332 archive file name. Do not use the full path name of archives for Open
8335 2011-08-02 Robert Dewar <dewar@adacore.com>
8337 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8338 Analyze_Aspect_Specifications
8340 (Analyze_Aspect_Specifications): New handling for boolean aspects
8341 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8342 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8343 sequence for Analyze_Aspect_Specifications
8344 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8345 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8347 2011-08-02 Robert Dewar <dewar@adacore.com>
8349 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8350 aspects, since these no longer exist.
8352 2011-08-02 Robert Dewar <dewar@adacore.com>
8354 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8355 semicolon, do not try to see if there are aspects following it.
8356 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8359 2011-08-02 Robert Dewar <dewar@adacore.com>
8361 * sem_ch8.adb, aspects.ads: Minor reformatting.
8363 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8365 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8366 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8368 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8370 2011-08-02 Yannick Moy <moy@adacore.com>
8372 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8373 mode on subprogram declaration outside of package specification, unless
8374 it is followed by a pragma Import
8375 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8376 Access_Type_Declaration): issue error in formal mode on access type
8377 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8379 (Analyze_Object_Declaration): issue error in formal mode on object
8380 declaration which does not respect SPARK restrictions
8381 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8382 declaration which does not respect SPARK restrictions
8383 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8384 error in formal mode on digits or delta constraint
8385 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8386 decimal fixed point type
8387 (Derived_Type_Declaration): issue error in formal mode on derived type
8388 other than type extensions of tagged record types
8389 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8390 with check on access definition
8391 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8392 mode on protected definition.
8393 (Analyze_Task_Definition): issue error in formal mode on task definition
8395 2011-08-02 Robert Dewar <dewar@adacore.com>
8397 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8399 2011-08-02 Javier Miranda <miranda@adacore.com>
8401 * sem_ch6.adb (Can_Override_Operator): New function.
8402 (Verify_Overriding_Indicator): Add missing code to check overriding
8403 indicator in operators. Fixes regression.
8404 (Check_Overriding_Indicator): Minor reformating after replacing the
8405 code that evaluates if the subprogram can override an operator by
8406 invocations to the above new function.
8408 (Write_Field26_Name): Add missing code to ensure that, following
8409 the documentation in einfo.ads, this field is not shown as attribute
8410 "Static_Initialization" on non-dispatching functions.
8412 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8414 * sem_res.adb (Resolve_Call): A call to
8415 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8416 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8417 i.e., when the second parameter is of type Time_Span.
8419 2011-08-02 Vincent Celier <celier@adacore.com>
8421 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8422 with an archive instead of -L<library dir> -l<library name>.
8424 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8426 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8427 mark the base types In_Use in addition to making the operations
8430 2011-08-02 Ed Falis <falis@adacore.com>
8432 * init.c: add and setup __gnat_signal_mask for the exception signals
8433 * s-inmaop-vxworks.adb: new file.
8434 * s-intman-vxworks.adb: remove unnecessary initializations and
8436 * s-intman-vxworks.ads: remove unnecessary variable
8437 * s-taprop-vxworks.adb: simplify signal initialization
8439 2011-08-02 Robert Dewar <dewar@adacore.com>
8441 * sem_ch8.adb: Minor code reorganization, comment updates.
8443 2011-08-02 Robert Dewar <dewar@adacore.com>
8445 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8446 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8448 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8449 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8451 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8453 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8454 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8455 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8456 use_type_clauses, to handle more efficiently use_type and use_all_type
8458 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8459 Ada2012 Use_All_Type clause.
8460 (Use_Class_Wide_Operations): new procedure.
8462 2011-08-02 Robert Dewar <dewar@adacore.com>
8464 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8465 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8466 expression to expression function.
8468 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8470 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8471 if types are compatible.
8473 2011-08-02 Yannick Moy <moy@adacore.com>
8475 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8476 returns True if its argument array types have same dimension and same
8477 static bounds at each index.
8478 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8479 OUT or IN OUT paramaters which are not view conversions in SPARK.
8480 (Resolve_Arithmetic_Op): issue an error in formal mode on
8481 multiplication or division with operands of fixed point types which are
8482 not qualified or explicitly converted.
8483 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8484 Boolean or array type (except String) operands.
8485 (Resolve_Equality_Op): issue an error in formal mode on equality
8486 operators for array types other than String with non-matching static
8488 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8489 for array types with non-matching static bounds. Factorize the code in
8490 Matching_Static_Array_Bounds.
8491 (Resolve_Qualified_Expression): issue an error in formal mode on
8492 qualified expressions for array types with non-matching static bounds.
8493 (Resolve_Type_Conversion): issue an error in formal mode on type
8494 conversion for array types with non-matching static bounds
8496 2011-08-02 Robert Dewar <dewar@adacore.com>
8498 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8500 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8502 * par-ch9.adb: save location of entry for proper error message.
8504 2011-08-02 Javier Miranda <miranda@adacore.com>
8506 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8507 (Use_Full_View) which permits this routine to climb through the
8508 ancestors using the full-view of private parents.
8509 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8510 Use_Full_View to true in calls to Is_Ancestor.
8511 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8512 true in call to Is_Ancestor.
8513 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8514 Use_Full_View to true in call to Is_Ancestor.
8515 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8516 call to Is_Ancestor.
8517 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8518 Use_Full_View to true in calls to Is_Ancestor.
8519 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8520 Make_Select_Specific_Data_Table, Register_Primitive,
8521 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8522 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8523 to true in call to Is_Ancestor.
8524 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8525 Use_Full_View to true in calls to Is_Ancestor.
8527 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8528 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8530 2011-08-02 Robert Dewar <dewar@adacore.com>
8532 * gnat_rm.texi: Minor reformatting.
8533 * sem_prag.adb: Minor reformatting.
8535 2011-08-02 Tristan Gingold <gingold@adacore.com>
8537 * vms_data.ads: Add VMS qualifier for -gnateP.
8539 2011-08-02 Robert Dewar <dewar@adacore.com>
8541 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8542 * par-ch7.adb (P_Package): Proper placement of aspects for package
8544 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8545 (End_Statements): Add Is_Sloc parameterr
8546 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8547 (Check_End): Ad Is_Sloc parameter
8548 (End_Statements): Add Is_Sloc parameterr
8550 2011-08-02 Vincent Celier <celier@adacore.com>
8552 * ug_words: Add VMS qualifier equivalent to -gnateP:
8553 /SYMBOL_PREPROCESSING.
8555 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8557 * gnat-style.texi: For hexadecimal numeric literals the typical
8558 grouping of digits is 4 to represent 2 bytes.
8559 A procedure spec which is split into several lines is indented two
8562 2011-08-02 Yannick Moy <moy@adacore.com>
8564 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8565 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8566 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8568 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8569 choice in array aggregate
8570 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8572 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8573 positional and named aggregate for record, or others in record
8574 aggregate, or multiple choice in record aggregate
8575 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8576 array operands to logical operations AND, OR and XOR do not have the
8577 same static lower and higher bounds
8578 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8580 2011-08-01 Robert Dewar <dewar@adacore.com>
8582 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8583 Replaces Last_Source_Node_In_Sequence.
8584 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8585 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8586 parens and blank in string (this was inconsistently implemented).
8588 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8589 blank in string (this was inconsistently implemented).
8591 (Set_Global_Switches): Set formal mode switches appropriately
8592 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8594 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8595 call Set_Error_Msg_Lang to set "spark" as language name.
8596 * par.adb: Remove unnecessary call to set formal language for errout
8597 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8598 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8600 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8601 calls to it, moved after resolution so that types are known
8602 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8603 result of concatenation is not of type String
8604 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8605 concatenation is not properly restricted
8606 * gnat_rm.texi: Add doc on pragma Spark_95.
8607 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8608 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8609 * gcc-interface/Make-lang.in: Update dependencies.
8611 2011-08-01 Javier Miranda <miranda@adacore.com>
8613 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8614 condition that detects if the overridden operation must replace an
8617 2011-08-01 Javier Miranda <miranda@adacore.com>
8619 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8620 code declarations inserted by Insert_Actions in each alternative of the
8621 N_Case_Expression node.
8623 2011-08-01 Robert Dewar <dewar@adacore.com>
8625 * sem_ch6.adb: Minor code reorganization.
8626 * sem_util.adb: Minor reformatting.
8628 2011-08-01 Pascal Obry <obry@adacore.com>
8630 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8631 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8633 2011-08-01 Yannick Moy <moy@adacore.com>
8635 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8636 literal or operator symbol which is prefixed
8637 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8638 mode on access attributes.
8639 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8640 that concatenation operands are properly restricted in formal mode
8641 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8642 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8643 result of the concatenation has a type different from String.
8644 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8645 Analyze_Quantified_Expression, Analyze_Slice,
8646 Analyze_Null): issue an error in formal mode on unsupported constructs
8648 (Analyze_Block_Statement): only issue error on source block statement
8649 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8650 function which returns the last node in a list of nodes for which
8651 Comes_From_Source returns True, if any
8652 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8653 Last_Source_Node_In_Sequence
8654 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8655 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8656 mode on unsupported constructs
8657 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8658 rest of the actions may be needed later on since the error is marked as
8660 * sinfo.ads: Typos in comments.
8662 2011-08-01 Pascal Obry <obry@adacore.com>
8664 * projects.texi: Minor editing.
8666 2011-08-01 Yannick Moy <moy@adacore.com>
8668 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8669 insertion character ~~
8670 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8671 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8672 with insertion character ~~
8673 (Set_Msg_Text): treat insertion character ~~
8674 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8675 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8676 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8677 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8678 errors related to the formal language restriction not serious
8679 (insertion character |).
8680 * par.adb (Par): set formal language for error messages if needed
8681 * sem_ch6.adb (Check_Missing_Return): take into account possible
8682 generated statements at the end of the function
8683 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8684 enumeration value to define a new pragma SPARK_95
8685 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8686 SPARK_Version): new type and variables to store the SPARK version
8688 (SPARK_Mode): return True when SPARK_Version is set
8689 * par-prag.adb: Correct indentation
8690 (Prag): take Pragma_SPARK_95 into account
8691 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8694 2011-08-01 Robert Dewar <dewar@adacore.com>
8696 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8697 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8698 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8700 2011-08-01 Pascal Obry <obry@adacore.com>
8702 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8703 Target_Name to Get_Path call.
8704 (Parse_Single_Project): Likewise.
8705 (Post_Parse_Context_Clause): Likewise.
8706 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8707 Call Initialise_Project_Path with the proper Target_Name.
8708 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8710 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8711 with the proper Target_Name.
8712 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8714 (Parse_Project_And_Apply_Config): Likewise.
8715 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8716 This is fine as this part of the code is supporting only native
8718 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8719 is fine as this part of the code is supporting only native compilation.
8721 2011-08-01 Yannick Moy <moy@adacore.com>
8723 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8724 of homonym, unless the homonym is one of the cases allowed in SPARK
8725 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8726 package declaration occurring after a body.
8728 2011-08-01 Robert Dewar <dewar@adacore.com>
8730 * checks.adb, exp_ch4.adb: Minor reformatting.
8732 2011-08-01 Javier Miranda <miranda@adacore.com>
8734 * einfo.ads (Access_Disp_Table): Fix documentation.
8735 (Dispatch_Table_Wrappers): Fix documentation.
8737 2011-08-01 Pascal Obry <obry@adacore.com>
8739 * prj-env.adb, prj-env.ads: Minor reformatting.
8741 2011-08-01 Yannick Moy <moy@adacore.com>
8743 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8744 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8745 procedures out of these packages.
8746 * errout.ads, errout.adb
8747 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8748 procedures in of this package
8749 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8750 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8751 on misplaced later vs initial declarations, like in Ada 83
8752 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8753 formal mode on attribute of private type whose full type declaration
8755 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8756 package declaration inside a package specification
8757 (Analyze_Full_Type_Declaration): issue error in formal mode on
8758 controlled type or discriminant type
8759 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8760 user-defined operator means that it should come from the source
8761 (New_Overloaded_Entity): issue error in formal mode on overloaded
8763 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8765 2011-08-01 Thomas Quinot <quinot@adacore.com>
8767 * atree.adb: Minor reformatting.
8768 * checks.adb: Minor reformatting.
8770 2011-08-01 Vincent Celier <celier@adacore.com>
8772 * s-parame-vms-ia64.ads: Fix typo in comment
8774 * s-parame-vms-restrict.ads: Removed, unused.
8776 2011-08-01 Javier Miranda <miranda@adacore.com>
8779 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8781 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8782 * sem_ch3.ads, sem_ch3.adb
8783 (Is_Constant_Bound): New extended version of the subprogram that was
8784 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8785 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8786 * sem_aux.ads (Constant_Value): Fix typo in comment.
8787 * checks.adb (Generate_Index_Checks): New implementation which, for
8788 array objects with constant bounds, generates the runtime check
8789 referencing the bounds of the array type. For other cases this routine
8790 provides its previous behavior obtaining such values from the array
8792 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8794 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8795 we cannot have semantic interpretations of the new node.
8797 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8799 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8802 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8804 * sem_ch8.adb: Minor code editing.
8805 * s-vxwext.adb: Remove trailing space.
8806 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8807 consistency with other files.
8809 2011-08-01 Thomas Quinot <quinot@adacore.com>
8811 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8813 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8815 * par-ch10.adb: reject parameterized expressions as compilation unit.
8816 * sem_ch4.adb: handle properly conditional expression with overloaded
8817 then_clause and no else_clause.
8819 2011-08-01 Tristan Gingold <gingold@adacore.com>
8821 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8822 like done by System.Aux_DEC.
8823 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8825 2011-08-01 Yannick Moy <moy@adacore.com>
8827 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8828 missing label at end of declaration (subprogram or package)
8829 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8830 of positional and named parameter association
8831 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8832 Error_Msg_SP which adds a prefix to the error message giving the name
8833 of the formal language analyzed
8834 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8835 access result type in subprogram, unconstrained array as result type,.
8836 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8838 * sem_ch8.adb: Code clean up.
8840 2011-08-01 Javier Miranda <miranda@adacore.com>
8842 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8843 * einfo.ads (Access_Disp_Table): Fix documentation.
8844 (Dispatch_Table_Wrappers): Fix documentation.
8845 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8846 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8847 to enforce the documentation of this attribute.
8848 (Set_Is_Interface): Cleanup the assertion.
8849 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8850 the Underlying_Type entity before reading attribute Access_Disp_Table.
8851 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8852 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8853 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8854 the Underlying_Type entity before reading attribute Access_Disp_Table.
8855 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8856 Locate the Underlying_Type entity before reading attribute
8859 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8861 * s-poosiz.ads: Additional overriding indicators.
8863 2011-08-01 Yannick Moy <moy@adacore.com>
8865 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8867 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8868 parameter specification does not include a subtype mark.
8869 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8870 formal mode on abstract subprogram.
8871 (Analyze_Subprogram_Specification): issue error in formal mode on
8872 user-defined operator.
8873 (Process_Formals): issue error in formal mode on access parameter and
8875 * sem_ch9.adb (Analyze_Abort_Statement,
8876 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8877 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8878 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8879 Analyze_Requeue, Analyze_Selective_Accept,
8880 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8881 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8882 issue error in formal mode on user-defined raise statement.
8884 2011-08-01 Thomas Quinot <quinot@adacore.com>
8886 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8887 declaration being hidden when overriding an implicit inherited
8889 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8890 (-gnats), do not complain about a source file that contains only a
8893 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8895 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8896 variable if already set.
8898 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8900 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8901 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8902 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8903 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8904 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8905 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8906 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8907 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8908 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8909 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8910 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8911 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8912 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8913 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8914 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8915 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8916 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8917 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8918 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8919 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8920 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8921 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8922 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8923 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8924 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8925 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8926 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8927 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8928 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8929 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8930 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8931 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8932 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8933 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8934 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8935 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8936 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8937 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8938 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8939 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8940 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8941 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8942 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8943 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8944 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8945 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8946 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8947 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8948 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8949 Use GNAT instead of GNARL.
8951 2011-08-01 Bob Duff <duff@adacore.com>
8953 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8954 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8955 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8958 2011-08-01 Yannick Moy <moy@adacore.com>
8960 * debug.adb (d.D) reverve flag for the SPARK mode
8961 (d.E) reverve flag for SPARK generation mode
8962 (d.F) reverve flag for Why generation mode
8963 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8964 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8965 functions which return True when the corresponding modes are set
8966 (Formal_Language): return "spark" or "alfa" when in formal verification
8968 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8969 Error_Msg to prefix the error message with a tag giving the formal
8971 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8972 message with a tag giving the formal language
8973 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8975 (Analyze_Case_Statement): issue error in formal mode on case statement
8976 with a single "others" case alternative
8977 (Analyze_Exit_Statement): issue errors in formal mode on exit
8978 statements which do not respect SPARK restrictions
8979 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8980 (Check_Unreachable_Code): always issue an error (not a warning) in
8981 formal mode on unreachable code (concerns both code after an infinite
8982 loop and after an unconditional jump, both not allowed in SPARK)
8983 * sem_ch6.adb (Analyze_Return_Statement): add call to
8984 Set_Return_Present for a procedure containing a return statement
8985 (already done for functions in Analyze_Function_Return)
8986 (Analyze_Function_Return): issue error in formal mode on extended
8987 return or if return is not last statement in function
8988 (Check_Missing_Return): issue error in formal mode if function does
8989 not end with return or if procedure contains a return
8990 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8991 function to detect if there is an inner scope of its parameter S which
8994 2011-08-01 Thomas Quinot <quinot@adacore.com>
8996 * sem_ch6.ads: Minor reformatting.
8998 2011-08-01 Javier Miranda <miranda@adacore.com>
9000 * sem_util.adb (Abstract_Interface_List): Complete condition when
9001 processing private type declarations to avoid reading unavailable
9003 (Is_Synchronized_Tagged_Type): Complete condition when processing
9004 private extension declaration nodes to avoid reading unavailable
9007 2011-08-01 Thomas Quinot <quinot@adacore.com>
9009 * sem_ch3.adb: Minor reformatting.
9011 2011-08-01 Thomas Quinot <quinot@adacore.com>
9013 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9014 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9015 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9016 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9017 for VMS, instead parametrize the common implementation with
9018 System.Parameters declarations.
9020 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9022 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9024 2011-08-01 Tristan Gingold <gingold@adacore.com>
9026 * seh_init.c: Fix SEH handler installation on win64.
9028 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9030 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9031 double analysis of an anonymous access to subprogram, because it can
9032 lead to improper sharing of profiles and a back-end crash.
9034 2011-08-01 Robert Dewar <dewar@adacore.com>
9036 * make.adb, sem_ch4.adb: Minor reformatting.
9037 * gcc-interface/Make-lang.in: Update dependencies.
9038 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9040 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9042 * gnat_rm.texi: Fix definition of Long_Integer.
9044 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9046 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9047 to prevent storage exhaustion.
9048 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9049 finalized is a function body, insert the cleanup code before the final
9050 return statement, to prevent spurious warnings.
9051 * s-pooglo.ads: add overriding indicator.
9053 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9055 * sem_ch4.adb (Operator_Check): improve error message when both a
9056 with_clause and a use_clause are needed to make operator usage legal.
9057 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9058 determine whether a compilation unit is visible within an other,
9059 either through a with_clause in the current unit, or a with_clause in
9060 its library unit or one one of its parents.
9062 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9064 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9065 over an arbitrary expression of an array or container type.
9066 * lib-xref.adb: clarify comment.
9068 2011-08-01 Bob Duff <duff@adacore.com>
9070 * einfo.ads: Minor reformatting.
9071 * debug.adb: Minor comment improvement.
9073 2011-08-01 Javier Miranda <miranda@adacore.com>
9075 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9076 consider hidden subprograms as valid candidates.
9078 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9080 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9082 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9084 * gnat_ugn.texi: Fix typo.
9086 2011-08-01 Robert Dewar <dewar@adacore.com>
9088 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9089 lib-xref.adb: Minor reformatting
9091 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9093 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9094 when to generate a call to Move_Final_List.
9095 (Has_Controlled_Parts): Remove this function.
9097 2011-08-01 Geert Bosch <bosch@adacore.com>
9099 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9102 2011-08-01 Thomas Quinot <quinot@adacore.com>
9104 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9105 explicit raise of a predefined exception as Comes_From_Source if the
9106 original N_Raise_Statement comes from source.
9108 2011-08-01 Robert Dewar <dewar@adacore.com>
9110 * sinfo.ads: Add comment.
9111 * sem_ch6.adb: Minor reformatting.
9113 2011-08-01 Robert Dewar <dewar@adacore.com>
9115 * freeze.adb (Freeze_Entity): Refine check for bad component size
9116 clause to avoid rejecting confirming clause when atomic/aliased present.
9118 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9120 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9121 better determine whether an entity reference is a write.
9122 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9124 * lib-xref.adb (Output_References): Do no suppress a read reference at
9125 the same location as an immediately preceeding modify-reference, to
9126 handle properly in-out actuals.
9128 2011-08-01 Tristan Gingold <gingold@adacore.com>
9130 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9132 2011-08-01 Quentin Ochem <ochem@adacore.com>
9134 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9135 heap to compute the result.
9137 2011-08-01 Robert Dewar <dewar@adacore.com>
9139 * atree.ads: Minor reformatting.
9141 2011-08-01 Emmanuel Briot <briot@adacore.com>
9143 * g-expect.adb (Get_Command_Output): Fix memory leak.
9145 2011-08-01 Geert Bosch <bosch@adacore.com>
9147 * cstand.adb (P_Float_Type): New procedure to print the definition of
9148 predefined fpt types.
9149 (P_Mixed_Name): New procedure to print a name using mixed case
9150 (Print_Standard): Use P_Float_Type for printing floating point types
9151 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9152 precision IEEE float.
9154 2011-08-01 Thomas Quinot <quinot@adacore.com>
9156 * sem_ch3.adb: Minor reformatting.
9158 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9160 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9161 the completion of a generic function, insert the new body rather than
9162 rewriting the original.
9164 2011-08-01 Yannick Moy <moy@adacore.com>
9166 * sinfo.ads, errout.ads: Typos in comments.
9168 2011-08-01 Robert Dewar <dewar@adacore.com>
9170 * par-endh.adb: Minor reformatting.
9172 2011-08-01 Robert Dewar <dewar@adacore.com>
9174 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9175 (Pre_Post_Aspects): New subtype.
9176 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9177 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9178 * par-ch7.adb (P_Package): Remove Decl parameter
9179 (P_Package): Handle new syntax for aspects (before IS)
9180 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9182 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9183 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9184 (P_Package): Remove Decl parameter
9185 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9187 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9189 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9190 * sinfo.ads: Document new syntax for aspects in packages etc.
9191 * sprint.adb: Handle new syntax of aspects before IS in package
9193 2011-08-01 Thomas Quinot <quinot@adacore.com>
9195 * atree.ads: Minor reformatting.
9196 * sem_prag.adb: Minor reformatting.
9198 2011-08-01 Robert Dewar <dewar@adacore.com>
9200 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9201 case expr alternative.
9203 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9205 * sem_ch12.adb: Fix typo.
9207 2011-08-01 Geert Bosch <bosch@adacore.com>
9209 * sem_prag.adb (Check_No_Link_Name): New procedure.
9210 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9211 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9212 instead of Standard_Long_Long_Float_Size global. Preparation for
9213 eventual removal of per type constants.
9214 * exp_util.ads (Get_Stream_Size): New function returning the stream
9215 size value of subtype E.
9216 * exp_util.adb (Get_Stream_Size): Implement new function.
9217 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9219 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9221 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9223 2011-08-01 Geert Bosch <bosch@adacore.com>
9225 * cstand.adb: Fix comments.
9226 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9229 2011-08-01 Robert Dewar <dewar@adacore.com>
9231 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9233 2011-08-01 Geert Bosch <bosch@adacore.com>
9235 * atree.ads: Fix comment.
9237 2011-08-01 Robert Dewar <dewar@adacore.com>
9239 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9240 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9241 * par.adb: Add with for Namet.Sp.
9242 * par-tchk.adb: Minor reformatting.
9244 2011-08-01 Vincent Celier <celier@adacore.com>
9246 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9247 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9248 of the init procedure of a SAL.
9249 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9252 2011-08-01 Thomas Quinot <quinot@adacore.com>
9254 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9257 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9259 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9261 2011-08-01 Thomas Quinot <quinot@adacore.com>
9263 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9264 conformant with its spec (return True only for types that have
9265 an overriding Initialize primitive operation that prevents them from
9266 having preelaborable initialization).
9267 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9268 initialization for controlled types in Ada 2005 or later mode.
9270 2011-08-01 Robert Dewar <dewar@adacore.com>
9272 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9274 (Same_Aspect): New function.
9275 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9276 Type_Invariant, Precondition, Postcondition.
9277 * snames.ads-tmpl: Add Name_Type_Invariant.
9279 2011-08-01 Robert Dewar <dewar@adacore.com>
9281 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9283 (Freeze_All_Ent): Fix error in handling inherited aspects.
9284 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9285 already analyzed, but don't skip entire processing of a declaration,
9286 that's wrong in some cases of declarations being rewritten.
9287 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9288 Don't delay for integer, string literals
9289 Treat predicates in usual manner for delay, remove special case code,
9291 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9292 (Build_Predicate_Function): Update saved expression in aspect
9293 (Build_Invariant_Procedure): Update saved expression in aspect
9294 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9295 of replacement of discriminant references if the reference is simple.
9297 2011-08-01 Robert Dewar <dewar@adacore.com>
9299 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9300 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9301 Static_Predicate and Dynamic_Predicate.
9302 (Build_Predicate_Function): Add processing for Static_Predicate
9303 and Dynamic_Predicate.
9304 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9305 (From_Static_Predicate): New flag
9306 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9308 2011-08-01 Robert Dewar <dewar@adacore.com>
9310 * usage.adb: Documentation cleanup for Ada version modes in usage.
9311 * expander.adb: Minor reformatting.
9313 2011-08-01 Robert Dewar <dewar@adacore.com>
9315 * atree.ads: Minor comment fix.
9316 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9317 a-witeio.ads, sem_prag.adb: Minor reformatting.
9319 2011-08-01 Doug Rupp <rupp@adacore.com>
9321 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9322 pointers. Use descrip.h header file for convenience. Add some
9325 2011-08-01 Robert Dewar <dewar@adacore.com>
9327 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9328 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9329 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9331 (Check_Aspect_At_End_Of_Declarations): New procedure
9332 (Analye_Aspect_Specification): Minor changes for above procedures
9333 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9334 specification node as well.
9336 2011-08-01 Pascal Obry <obry@adacore.com>
9338 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9339 Windows files. Use GetFilesAttributes() in this case to check for file
9340 existence instead of returning with an error code.
9342 2011-08-01 Vincent Celier <celier@adacore.com>
9344 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9345 High is above Source length.
9347 2011-08-01 Robert Dewar <dewar@adacore.com>
9349 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9351 2011-08-01 Robert Dewar <dewar@adacore.com>
9353 * aspects.ads (Boolean_Aspects): New subtype.
9354 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9355 for derived types in cases where the parent type and derived type have
9357 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9358 with aspects when parent type also has aspects.
9359 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9360 boolean expression at this point).
9361 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9362 accordance with final decision on the Ada 2012 feature.
9363 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9365 2011-08-01 Matthew Heaney <heaney@adacore.com>
9367 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9369 2011-08-01 Pascal Obry <obry@adacore.com>
9371 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9372 Fix Replace_Slice when High is above current string size.
9373 (Replace_Slice): Fix DL computation when High is above current
9376 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9378 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9380 2011-08-01 Matthew Heaney <heaney@adacore.com>
9382 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9385 2011-08-01 Pascal Obry <obry@adacore.com>
9387 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9390 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9392 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9393 access to protected subprograms in generic bodies.
9394 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9395 protected type, indicate that the convention of the subprogram is
9396 Convention_Protected, because it may be used in subsequent declarations
9397 within the protected declaration.
9399 2011-08-01 Vincent Celier <celier@adacore.com>
9401 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9402 and "final" procedures when the name of the library is "ada", to avoid
9403 duplicate symbols "adainit" and "adafinal" in executables.
9405 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9407 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9408 quantified expression that appears within a postcondition and uses the
9409 Ada2012 'Result attribute.
9411 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9413 * init.c (__gnat_error_handler): Cast reason to int.
9414 (__gnat_install_handler): Explain sa_sigaction use.
9416 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9418 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9419 subprogram has copy-in copy-out parameters, try to promote the mode of
9420 the return type if it is passed in registers.
9422 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9424 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9425 left operand as addressable.
9427 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9429 * gcc-interface/gigi.h (build_function_stub): Remove.
9430 (build_return_expr): Likewise.
9431 (convert_vms_descriptor): Declare.
9432 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9433 (build_function_stub): Move to...
9434 * gcc-interface/utils2.c (build_return_expr): Move to...
9435 * gcc-interface/trans.c (build_function_stub): ...here.
9436 (build_return_expr): ...here.
9437 (Subprogram_Body_to_gnu): Add local variable for language_function.
9438 Disconnect the parameter attributes cache, if any, once done with it.
9439 Call end_subprog_body only after setting the end_locus.
9440 Build the stub associated with the function, if any, at the very end.
9441 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9442 variables and streamline control flow.
9444 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9447 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9450 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9453 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9454 Assign to act.sa_sigaction.
9455 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9456 current->return_address to char * before arithmetic.
9458 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9460 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9461 Correct argument types.
9462 Extract code from reason.
9463 (__gnat_install_handler): Assign to act.sa_sigaction.
9465 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9467 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9468 (GNAT1_OBJS): ...here.
9470 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9473 * g-socthi-mingw.adb (Fill): Fix formatting.
9475 * gcc-interface/gigi.h: Move around comment.
9477 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9480 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9482 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9485 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9487 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9489 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9490 range comparison if Pmode is SImode.
9492 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9493 Eric Botcazou <ebotcazou@adacore.com>
9495 * adadecode.c: Wrap up in extern "C" block.
9496 * adadecode.h: Likewise.
9497 * adaint.c: Likewise. Remove 'const' keyword.
9498 * adaint.h: Likewise.
9500 * atree.h: Likewise.
9502 * cstreams.c: Likewise.
9506 * final.c: Likewise.
9508 * initialize.c: Likewise.
9510 * namet.h: Likewise.
9511 * nlists.h: Likewise.
9512 * raise.c: Likewise.
9513 * raise.h: Likewise.
9514 * repinfo.h: Likewise.
9515 * seh_init.c: Likewise.
9516 * targext.c: Likewise.
9517 * tracebak.c: Likewise.
9518 * uintp.h: Likewise.
9519 * urealp.h: Likewise.
9520 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9521 * xsinfo.adb: Likewise.
9522 * xsnamest.adb: Likewise.
9523 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9524 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9525 * gcc-interface/misc.c: Likewise.
9526 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9527 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9528 ada/targext.o here...
9529 (GNAT_ADA_OBJS): ...and not here.
9530 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9531 (GNATBIND_OBJS): Reorder.
9533 2011-07-07 Richard Henderson <rth@redhat.com>
9535 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9536 dwarf2out_frame_init.
9538 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9540 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9542 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9545 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9547 2011-07-06 Richard Guenther <rguenther@suse.de>
9549 * gcc-interface/misc.c (gnat_init): Merge calls to
9550 build_common_tree_nodes and build_common_tree_nodes_2.
9551 Re-initialize boolean_false_node.
9553 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9554 Olivier Hainque <hainque@adacore.com>
9555 Nicolas Setton <setton@adacore.com>
9557 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9558 the type according to the ARTIFICIAL_P parameter.
9559 (create_type_decl): Likewise.
9560 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9562 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9564 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9565 (gnatbind): Likewise.
9567 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9569 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9571 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9573 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9574 local variable throughout. Remove useless call to Base_Type.
9575 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9576 Take it also into account for the volatileness of the field. Set the
9577 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9579 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9581 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9582 on a dereference built for a by-ref object if it has an address clause.
9584 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9586 * einfo.ads (Address_Taken): Document use for the second argument of
9587 Asm_Input and Asm_Output attributes.
9588 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9589 argument is an entity name, then set Address_Taken on it.
9590 <Attribute_Asm_Output>: Likewise.
9591 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9592 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9593 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9594 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9596 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9599 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9601 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9603 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9604 (ada/utils.o): Update dependencies.
9605 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9606 ../../../libcpp/libcpp.a.
9607 * gcc-interface/utils.c: Include common/common-target.h.
9608 (process_attributes): Use targetm_common.have_named_sections.
9610 2011-06-07 Richard Guenther <rguenther@suse.de>
9612 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9615 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9617 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9618 TREE_THIS_NOTRAP flag.
9620 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9622 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9625 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9627 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9628 constants whose full view has discriminants specially.
9630 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9632 * gcc-interface/utils.c: Include diagnostic.h.
9633 (gnat_write_global_declarations): Output debug information for all
9634 global type declarations before finalizing the compilation unit.
9635 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9637 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9639 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9641 2011-05-25 Kai Tietz <ktietz@redhat.com>
9643 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9644 initialization instead of const/none-const pointer assignment.
9646 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9648 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9649 $(EXTRA_GNAT1_OBJS).
9650 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9651 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9652 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9653 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9654 libcommon-target.a instead of prefix.o.
9656 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9659 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9661 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9663 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9664 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9665 instead of version.o.
9667 2011-05-18 Kai Tietz <ktietz@redhat.com>
9669 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9670 boolean_false_node instead of integer_zero_node.
9671 (convert_with_check): Likewise.
9672 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9674 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9676 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9677 type of the parameter is an unconstrained array, convert the actual to
9678 the type of the formal in the In Out and Out cases as well.
9680 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9682 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9683 call build_function_type_array or build_varargs_function_type_array
9685 (create_subprog_type): Don't call build_function_type; call
9686 build_function_type_vec instead.
9688 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9690 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9691 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9692 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9694 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9696 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9698 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9699 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9701 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9703 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9705 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9707 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9708 instead of accessing TYPE_ARG_TYPES directly.
9709 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9711 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9714 * gcc-interface/gigi.h (get_variant_part): Declare.
9715 * gcc-interface/decl.c (get_variant_part): Make global.
9716 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9717 types have the same constant size, are record types and T1 has a
9718 variant part while T2 doesn't.
9720 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9722 * gcc-interface/utils.c (begin_subprog_body): Do not call
9724 (end_subprog_body): Likewise.
9726 2011-05-04 Richard Guenther <rguenther@suse.de>
9728 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9730 (pos_to_constructor): Likewise.
9732 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9733 Eric Botcazou <ebotcazou@adacore.com>
9735 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9736 of build_function_type. Adjust calls to...
9737 (build_raise_check): ...this. Do not take a void_tree parameter.
9738 Call build_function_type_list instead of build_function_type.
9739 Fix head comment and swap couple of conditional blocks.
9741 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9743 * gnatvsn.ads (Library_Version): Bump to 4.7.
9744 (Current_Year): Bump to 2011.
9746 2011-04-29 Michael Matz <matz@suse.de>
9748 * gcc-interface/misc.c (gnat_handle_option): Set
9749 warn_maybe_uninitialized.
9751 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9753 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9754 the Watson/McCabe paper.
9756 2011-04-23 Jim Meyering <meyering@redhat.com>
9758 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9760 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9762 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9765 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9767 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9769 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9770 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9771 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9772 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9773 <all>: Do not set flags on the reused DECL node coming from an alias.
9774 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9775 don't need debug info here...
9776 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9777 (gigi): Adjust calls to create_subprog_decl.
9778 (build_raise_check): Likewise.
9779 (establish_gnat_vms_condition_handler): Likewise.
9780 (Compilation_Unit_to_gnu): Likewise.
9781 (gnat_to_gnu): Likewise.
9783 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9785 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9786 (NO_REORDER_ADAFLAGS): New variable.
9787 (EXTRA_GNATTOOLS): Always define.
9788 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9789 Clean up and adjust list of files compiled with special options.
9790 * gcc-interface/Make-lang.in: Likewise.
9791 (ada/decl.o): Cosmetical change.
9792 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9794 2011-04-20 Jim Meyering <meyering@redhat.com>
9796 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9798 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9800 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9801 $(CFLAGS) on the link line.
9803 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9805 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9806 padded type built for the return type if it is unconstrained.
9808 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9810 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9812 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9814 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9815 before calling TREE_CHAIN.
9816 * gcc-interface/misc.c (gnat_init_ts): New function.
9817 (LANG_HOOKS_INIT_TS): Define.
9819 2011-04-12 Martin Jambor <mjambor@suse.cz>
9821 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9822 instead of cgraph_node.
9824 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9827 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9830 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9832 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9833 of aggregate types that contain a placeholder.
9835 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9837 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9839 (handle_type_generic_attribute): Likewise.
9841 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9844 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9846 2011-04-04 Kai Tietz <ktietz@redhat.com>
9849 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9852 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9854 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9855 type case, do not strip a padding type around the array type.
9857 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9859 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9862 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9864 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9865 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9866 code for -feliminate-unused-debug-types.
9867 (gnat_post_options): Likewise.
9869 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9871 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9872 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9875 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9877 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9878 DECL_ARTIFICIAL flag on enumeration types.
9880 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9882 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9883 fat pointer types artificial unconditionally.
9884 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9887 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9889 * gcc-interface/gigi.h (get_dummy_type): Declare.
9890 (build_dummy_unc_pointer_types): Likewise.
9891 (finish_fat_pointer_type): Likewise.
9892 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9893 fat pointer type has been built, complete it in place.
9894 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9895 and thin pointers. Remove useless variable.
9896 (finish_fat_pointer_type): Make global and move to...
9897 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9898 (get_dummy_type): New function.
9899 (build_dummy_unc_pointer_types): Likewise.
9900 (gnat_pushdecl): Propage the name to the anonymous variants only.
9901 (update_pointer_to): Only adjust the pointer types in the unconstrained
9904 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9906 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9907 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9908 if this is a Taft amendment type and the full declaration is available.
9909 * gcc-interface/trans.c (process_type): Likewise.
9910 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9911 (process_freeze_entity): Likewise.
9912 * gcc-interface/utils.c (dummy_global): New static variable.
9913 (gnat_write_global_declarations): If there are types declared as used
9914 at the global level, insert them in the global hash table.
9916 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9918 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9919 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9920 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9922 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9923 flag of the type accordingly.
9924 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9926 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9928 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9929 finalizing types when updating the pointers to the designated type.
9930 <all>: Finalize the deferred types even if we didn't defer processing
9931 of incomplete types in this invocation.
9933 2011-04-01 Olivier Hainque <hainque@adacore.com>
9934 Nicolas Setton <setton@adacore.com>
9935 Eric Botcazou <ebotcazou@adacore.com>
9937 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9938 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9940 2011-03-28 Kai Tietz <ktietz@redhat.com>
9942 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9944 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9945 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9947 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9949 2011-03-28 Tristan Gingold <gingold@adacore.com>
9952 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9953 Use ada output of gnatbind.
9954 (ada/b_gnatb.adb): Ditto.
9955 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9956 (ada.mostlyclean, ada.stage1)
9957 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9958 (ada.stagefeedback): Adjust.
9959 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9960 Use ada output of gnatbind.
9961 (b_gnatm.adb): Ditto.
9962 (b_gnatl.o, b_gnatm.o): New rules.
9964 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9966 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9967 for the padded type built to support a specified size or alignment.
9969 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9971 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9972 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9973 unconditionally to the end of the unit when the designated type is
9975 <all>: Rename local variable. Attempt to un-defer types only and do it
9976 for limited_with'ed types as well.
9977 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9978 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9979 consistently and remove redundant call to finalize_from_with_types.
9981 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9983 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9984 subprograms without a previous spec declared in the same unit.
9985 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9986 subprograms at the end of the unit instead of at the beginning.
9987 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9988 isn't public for the special handling of non-inline functions nested
9989 inside inline external functions.
9991 2011-03-25 Jeff Law <law@redhat.com>
9993 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9995 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9997 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9998 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9999 to compute Set_Size_Depends_On_Discriminant.
10000 (Layout_Type): Call it on array types in back-end layout mode.
10001 * sem_util.adb (Requires_Transient_Scope): Return true for array
10002 types only if the size depends on the value of discriminants.
10003 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10004 type if the RHS is a call to a function that returns an unconstrained
10005 type with default discriminant.
10007 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10009 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10010 non-conversion to the nominal result type at the end.
10012 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10014 * gcc-interface/trans.c (create_temporary): New function taken from...
10015 (create_init_temporary): ...here. Call it.
10016 (call_to_gnu): Create the temporary for the return value early, if any.
10017 Create it for a function with copy-in/copy-out parameters if there is
10018 no target; in other cases of copy-in/copy-out, use another temporary.
10019 Push the new binding level lazily. Add and rename local variables.
10021 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10023 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10025 (set_rm_size): Likewise.
10027 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10029 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10030 for the padded type built in order to support a specified alignment.
10031 Fix incorrect formatting.
10033 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10036 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10038 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10040 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10041 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10042 to the end of the list. Adjust recursive call. Rename local variable.
10043 If REORDER is true, reorder components of the record type.
10044 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10045 components_to_record and adjust the parameter list.
10047 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10049 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10050 disabled, use the variable for bounds of loop iteration scheme.
10052 2011-03-21 Kai Tietz <ktietz@redhat.com>
10055 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10057 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10059 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10060 out whether the expression is read-only. Short-circuit placeholder
10061 case and rename a couple of local variables.
10063 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10065 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10066 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10067 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10068 (convert): Deal with conversions from a smaller form type specially.
10070 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10072 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10073 its argument, except for the special -I- switch.
10075 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10077 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10080 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10082 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10084 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10086 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10088 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10089 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10090 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10091 Do not generate the check directly, instead instantiate the template
10092 check present in the descriptor.
10093 (make_descriptor_field): Move around.
10094 (build_vms_descriptor32): Build a template check in the POINTER field.
10095 (build_vms_descriptor): Remove useless suffixes.
10096 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10098 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10101 * targext.c: Include target files if IN_RTS is defined.
10103 2011-01-26 Richard Guenther <rguenther@suse.de>
10106 * targext.c: Include config.h.
10107 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10110 2011-01-04 Pascal Obry <obry@adacore.com>
10111 Eric Botcazou <ebotcazou@adacore.com>
10113 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10115 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10117 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10118 end-of-case on the end label and its associated gotos, if any.
10120 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10122 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10123 expressions of the parameter cache within the statement group of
10124 the CICO mechanism.
10126 2011-01-04 Olivier Hainque <hainque@adacore.com>
10127 Eric Botcazou <ebotcazou@adacore.com>
10129 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10130 (set_end_locus_from_node): New function.
10131 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10132 make and the function end_locus.
10133 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10134 for the elaboration subprogram.
10135 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10136 set the end_locus of the expression as well.
10138 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10141 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10142 variables that are referenced in exception handlers volatile.
10146 Copyright (C) 2011 Free Software Foundation, Inc.
10148 Copying and distribution of this file, with or without modification,
10149 are permitted in any medium without royalty provided the copyright
10150 notice and this notice are preserved.