1 2011-08-05 Ed Schonberg <schonberg@adacore.com>
3 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
4 package whose name is the same as that of the generic unit, or its
7 2011-08-05 Bob Duff <duff@adacore.com>
9 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
10 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
13 2011-08-05 Arnaud Charlet <charlet@adacore.com>
15 * make.adb (Linking_Phase): No longer need to set source search path
16 before calling gnatlink in CodePeer mode.
17 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
18 gcc in CodePeer mode, since the binder generated file no longer has a
20 * switch.ads, switch.adb (Is_Language_Switch): Removed.
21 * switch-c.adb: Update comment.
23 2011-08-05 Thomas Quinot <quinot@adacore.com>
25 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
27 2011-08-05 Nicolas Roche <roche@adacore.com>
29 * gnat_ugn.texi: Fix minor syntax error issue.
31 2011-08-05 Vincent Celier <celier@adacore.com>
33 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
34 delete or close the file when the call to gnatmake returns a non
35 successful return code.
37 2011-08-05 Ed Schonberg <schonberg@adacore.com>
39 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
40 check, indicate that the copy of the original node does not come from
41 source, to prevent an infinite recursion of the expansion.
43 2011-08-05 Johannes Kanig <kanig@adacore.com>
45 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
46 VC generation for subprogram bodies.
48 2011-08-05 Yannick Moy <moy@adacore.com>
51 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
52 the base type with the smallest allowed base type.
54 2011-08-05 Sergey Rybin <rybin@adacore.com>
56 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
59 2011-08-05 Ed Schonberg <schonberg@adacore.com>
61 * sem_ch12.ads: minor comment updates.
63 2011-08-05 Ed Schonberg <schonberg@adacore.com>
65 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
66 instantiation and a formal package the compiler generates a package
67 renaming declaration so that the generic name within the declaration
68 is interpreted as a renaming of the instance. At the end of a formal
69 package declaration, this renaming must become invisible.
71 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
73 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
74 comparison and rely on concrete entities instead.
76 2011-08-05 Ed Schonberg <schonberg@adacore.com>
78 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
79 and discriminants, to indicate that the type has an access discriminant
80 that supports implicit dereference.
81 * snames.ads-tmpl: Add names of aspects and attributes related to
82 Ada2012 iterators: constant_indexing, default_iterator,
83 iterator_element, implicit_dereference, variable_indexing.
84 * aspects.ads, aspects.adb: entries for iterator-related aspects.
85 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
86 iterator-related aspects.
87 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
89 2011-08-05 Sergey Rybin <rybin@adacore.com>
91 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
92 metrics in gnatmetric to cover new kinds of coupling mentrics.
94 2011-08-05 Steve Baird <baird@adacore.com>
96 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
97 of calling the user-defined main subprogram.
98 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
99 is set) Call_Main_Subprogram ahead of, as opposed to
101 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
102 generation of a "with" of the user-defined main subprogram.
103 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
104 (which is now called from Gen_Main instead).
106 2011-08-05 Emmanuel Briot <briot@adacore.com>
108 * projects.texi: Added reference to the Makefile package.
110 2011-08-05 Thomas Quinot <quinot@adacore.com>
112 * exp_ch7.adb: Minor comment rewording.
114 2011-08-05 Ed Falis <falis@adacore.com>
116 * env.c: Fix comment.
118 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
120 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
121 character comparison and rely on concrete entities instead.
123 2011-08-05 Ed Schonberg <schonberg@adacore.com>
125 * sem_ch3.adb: (Check_Private_Overriding): better error message,
126 suggested by AI95-0068.
128 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
130 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
131 the two potential initialization calls. This accounts for any
132 access-before-elaboration checks which may precede the initialization
134 (Next_Suitable_Statement): New routine. Returns the next real statement
135 after the input node while skipping generated checks.
136 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
137 with comment on usage.
138 Do not generate Elaborate_All when the trigger is a finalization call
139 coming from a type init proc.
140 (Check_Elab_Call): Propagate the initialization procedure context to
141 subsequent calls to Check_A_Call.
142 (Check_Internal_Call_Continue): Propagate the initialization procedure
143 context to subsequent calls to Check_Elab_Call.
144 (Is_Finalization_Procedure): New routine. Returns True if the input
145 entity denotes a [Deep_]Finalize routine.
146 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
147 along with comment on usage.
149 2011-08-05 Vadim Godunko <godunko@adacore.com>
151 * s-atocou.ads: Add list of supported platforms.
153 2011-08-05 Yannick Moy <moy@adacore.com>
155 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
157 * opt.ads (Disable_ALI_File): new Boolean flag
158 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
160 2011-08-05 Ed Falis <falis@adacore.com>
162 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
163 environ is properly defined.
165 2011-08-05 Vincent Celier <celier@adacore.com>
167 * make.adb (Compilation_Phase): Exit immediately when all objects have
168 been found up to date, to avoid multiple exit messages.
169 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
170 same project for languages with no compiler.
171 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
173 2011-08-05 Robert Dewar <dewar@adacore.com>
175 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
176 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
177 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
178 s-atocou-builtin.adb: Minor reformatting.
180 2011-08-05 Yannick Moy <moy@adacore.com>
182 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
183 if the node to wrap is a pragma check, this node and enclosed
184 expression are not expanded, so do not apply any transformations here.
185 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
186 introducing transient scopes.
188 2011-08-05 Jose Ruiz <ruiz@adacore.com>
190 * adaint.c (__gnat_set_writable, __gnat_set_readable,
191 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
192 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
193 routine is available, so we use the default implementation of these
195 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
196 support for copying attributes on VxWorks 6.
198 2011-08-05 Yannick Moy <moy@adacore.com>
200 * debug.adb: Remove use of -gnatd.D.
201 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
202 * opt.ads: Simplify variables for ALFA mode, to keep one only
203 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
206 2011-08-05 Vincent Celier <celier@adacore.com>
208 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
209 Builder'Default_Switches.
211 2011-08-05 Vincent Celier <celier@adacore.com>
213 * makeusg.adb: Add lines for --create-map-file switches.
215 2011-08-05 Ed Schonberg <schonberg@adacore.com>
217 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
218 profile is incomplete and the full view is available, replace it with
220 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
221 incomplete, freezing the subprogram is delayed until the full view is
223 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
224 fixed-point multiplication operator and the predefined operator is
225 resolved in favor of the user-defined one.
227 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
229 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
232 2011-08-04 Ed Schonberg <schonberg@adacore.com>
234 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
235 whether a type lacks user-defined Read or Write operations, or has a
236 component that lacks them.
237 * sem_attr.adb (Check_Stream_Attribute): if restriction
238 No_Default_Stream_Attributes is active, verify that all subcomponent
239 types of the target have user-defined stream operations, and report
241 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
242 * exp_strm.adb: Build_Elementary_Input_Call,
243 Build_Elementary_Write_Call): remove checks for restriction
244 No_Default_Stream_Attributes, now checked in semantics.
246 2011-08-04 Vincent Celier <celier@adacore.com>
248 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
249 switches on the command line, look for all valid --RTS switches in the
250 Builder switches and for each language use the first runtime name found
252 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
253 command line and there is no auto-configuration.
254 (Runtime_Name_Set_For): New function.
256 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
258 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
259 elaborate initialization expression for variable Abort when processing
260 a package body or a declaration.
261 (Create_Finalizer): Propagate the package context when creating the
262 exception-related variables.
263 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
264 For_Package along with usage comment.
266 2011-08-04 Arnaud Charlet <charlet@adacore.com>
268 * gcc-interface/Makefile.in: Clean up targets.
269 Enable new package for atomic counters and copy-on-write implementation
270 of unbounded strings on x86 platforms.
271 * gcc-interface/Make-lang.in: Update dependencies.
273 2011-08-04 Robert Dewar <dewar@adacore.com>
275 * exp_ch7.adb: Minor reformatting.
277 2011-08-04 Robert Dewar <dewar@adacore.com>
279 * exp_strm.adb: Minor reformatting.
281 2011-08-04 Vadim Godunko <godunko@adacore.com>
283 * s-atocou.adb: Replace by dummy version and use on targets where atomic
284 operations are not supported.
285 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
286 * s-atocou-x86.adb: New file.
287 * Makefile.rtl: Add s-atocou.o file
289 2011-08-04 Arnaud Charlet <charlet@adacore.com>
291 * make.adb (Compile): Move setting of CodePeer_Mode to ...
292 (Compilation_Phase): ... here.
293 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
295 2011-08-04 Thomas Quinot <quinot@adacore.com>
297 * Make-generated.in: Fix minor typo in comment.
299 2011-08-04 Thomas Quinot <quinot@adacore.com>
301 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
304 2011-08-04 Robert Dewar <dewar@adacore.com>
306 * a-coinho.adb: Minor reformatting.
308 2011-08-04 Robert Dewar <dewar@adacore.com>
310 * a-coinho.ads: Minor reformatting.
312 2011-08-04 Vadim Godunko <godunko@adacore.com>
314 * s-atocou.ads, s-atocou.adb: New files.
315 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
316 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
317 direct use of GCC's atomic builtins and replace them by use of new
318 atomic counter package.
320 2011-08-04 Ed Schonberg <schonberg@adacore.com>
322 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
324 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
326 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
327 with a call to Get_External_Tag.
328 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
329 subprogram usage. Remove the guard against package declarations and
330 bodies since Build_Cleanup_Statements is no longer invoked in that
332 (Build_Components): Initialize Tagged_Type_Stmts when the context
333 contains at least one library-level tagged type.
334 (Build_Finalizer): New local variables Has_Tagged_Types and
335 Tagged_Type_Stmts along with associated comments on usage. Update the
336 logic to include tagged type processing.
337 (Create_Finalizer): Insert all library-level tagged type unregistration
338 code before the jump block circuitry.
339 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
340 (Expand_N_Package_Declaration): Remove the call to
341 Build_Cleanup_Statements.
342 (Process_Tagged_Type_Declaration): New routine. Generate a call to
343 unregister the external tag of a tagged type.
344 (Processing_Actions): Reimplemented to handle tagged types.
345 (Process_Declarations): Detect the declaration of a library-level
346 tagged type and carry out the appropriate actions.
347 (Unregister_Tagged_Types): Removed. The machinery has been directly
348 merged with Build_Finalizer.
350 2011-08-04 Robert Dewar <dewar@adacore.com>
352 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
353 gnatls.adb, exp_ch3.adb: Minor reformatting.
355 2011-08-04 Marc Sango <sango@adacore.com>
357 * sem_attr.adb (Analyze_Attribute): Replace the message
358 "invisible attribute of}" of the spark restriction violation in
359 attribute reference by the simple message "invisible attribute of type".
360 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
361 two insertion characters: '&' and '}'.
363 2011-08-04 Vadim Godunko <godunko@adacore.com>
365 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
366 * a-coinho.ads, a-coinho.adb: New file.
367 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
369 2011-08-04 Nicolas Roche <roche@adacore.com>
371 * alfa_test.adb: Not all ali files are containing alfa information even
372 if compiled with -gnatd.F. So suppress warning about missing ALFA
375 2011-08-04 Yannick Moy <moy@adacore.com>
377 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
379 * put_alfa.adb: Check that scope name is not empty.
381 2011-08-04 Ed Schonberg <schonberg@adacore.com>
383 * exp_ch3.adb (Stream_Operation_Ok): new predicate
384 Needs_Elementary_Stream_Operation, to determine whether user-defined
385 Read and Write attributes are available for the elementary components
386 of the given type. If only the predefined attributes are available,
387 then when restriction No_Default_Stream_Attributes is active the
388 predefined stream attributes for the composite type cannot be created.
390 2011-08-04 Robert Dewar <dewar@adacore.com>
392 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
393 Put routines in alpha order
395 2011-08-04 Jose Ruiz <ruiz@adacore.com>
397 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
398 * gcc-interface/Make-lang.in: Update dependencies.
400 2011-08-04 Arnaud Charlet <charlet@adacore.com>
402 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
403 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
406 2011-08-04 Robert Dewar <dewar@adacore.com>
408 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
409 lib-xref-alfa.adb: Minor reformatting.
411 2011-08-04 Marc Sango <sango@adacore.com>
413 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
414 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
415 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
418 2011-08-04 Tristan Gingold <gingold@adacore.com>
420 * bindgen.adb (Gen_Adainit_C): Remove.
421 (Gen_Adafinal_C): Ditto.
422 (Gen_Elab_Externals_C): Ditto.
423 (Gen_Elab_Calls_C): Ditto.
424 (Gen_Elab_Order_C): Ditto.
425 (Gen_Elab_Defs_C): Ditto.
426 (Gen_Finalize_Library_C): Ditto.
427 (Gen_Finalize_Library_Defs_C): Ditto.
429 (Gen_Output_File_C): Ditto.
430 (Gen_Restrictions_C): Ditto.
431 (Gen_Versions_C): Ditto.
432 (Write_Info_Ada_C): Ditto.
433 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
434 (Gen_Output_File): Do not force Ada_Bind_File anymore.
435 Always call Gen_Output_File_Ada.
436 * gnatlink.adb (Begin_Info): Now a constant.
438 (Ada_Bind_File): Remove
439 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
440 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
441 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
442 * opt.ads (Ada_Bind_File): Remove.
444 2011-08-04 Thomas Quinot <quinot@adacore.com>
446 * projects.texi: Document target-specific directory in default project
449 2011-08-04 Thomas Quinot <quinot@adacore.com>
451 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
454 2011-08-04 Yannick Moy <moy@adacore.com>
456 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
457 opt.ads, lib-xref.ads: Code clean up.
459 2011-08-04 Yannick Moy <moy@adacore.com>
461 * gnat_rm.texi: Update description of Test_Case
462 * gnat_ugn.texi: Typo.
464 2011-08-04 Ed Falis <falis@adacore.com>
466 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
468 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
470 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
471 it is of type Root_Controlled. This action eliminates fields Prev and
472 Next from type equality.
474 2011-08-04 Yannick Moy <moy@adacore.com>
476 * lib-xref-alfa.adb: Correct typo.
478 2011-08-04 Matthew Heaney <heaney@adacore.com>
480 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
483 2011-08-04 Yannick Moy <moy@adacore.com>
485 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
486 (Analyze_Pragma): allow static string expression for name of Test_Case,
487 instead of simply string literals.
488 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
491 2011-08-04 Vincent Celier <celier@adacore.com>
493 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
494 case suffixes to find truncated main sources.
496 2011-08-04 Tristan Gingold <gingold@adacore.com>
498 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
499 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
500 (Compute_Current_Task): Ditto.
502 2011-08-04 Tristan Gingold <gingold@adacore.com>
504 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
506 2011-08-04 Yannick Moy <moy@adacore.com>
508 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
509 library-level constant.
510 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
511 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
512 used as selector of parameter association, in ALFA mode.
514 2011-08-04 Robert Dewar <dewar@adacore.com>
516 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
517 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
520 2011-08-04 Arnaud Charlet <charlet@adacore.com>
522 * make.adb (Linking_Phase): Set source search path before calling
523 gnatlink in CodePeer mode.
525 2011-08-04 Javier Miranda <miranda@adacore.com>
527 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
528 Remove code which takes care of building TSDs.
529 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
530 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
531 the accessibility check in VM targets.
532 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
533 (Building_Static_DT): Now returns false for VM targets.
534 (Build_VM_TSDs): Removed.
535 (Expand_Interface_Conversion): Generate missing runtime check for
536 conversions to interface types whose target type is unknown at compile
538 (Make_VM_TSD): Add missing code to disable the generation of calls to
539 Check_TSD if the tagged type is not defined at library level, or not
540 has a representation clause specifying its external tag, or -gnatdQ is
542 * exp_disp.ads (Build_VM_TSDs): Removed.
543 (Make_VM_TSDs): Spec relocated from exp_disp.adb
544 * sem_disp.adb (Check_Dispatching_Operation): No code required to
545 register primitives in the dispatch tables in VM targets.
546 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
547 initialization of class-wide interface objects in VM targets.
548 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
551 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
553 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
554 when dotnet-ld cannot be found.
556 2011-08-04 Arnaud Charlet <charlet@adacore.com>
558 * bindgen.adb: Simplify significantly generation of binder body file in
560 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
561 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
564 2011-08-04 Yannick Moy <moy@adacore.com>
566 * sem_prag.adb, sem.ads: Code cleanup.
568 2011-08-04 Tristan Gingold <gingold@adacore.com>
570 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
571 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
573 * s-stusta.adb (Print): Adjust after changes in s-stausa.
574 * gnat_ugn.texi: Update dynamic stack usage section.
576 2011-08-04 Steve Baird <baird@adacore.com>
578 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
579 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
580 contains only a call to the user-defined main subprogram.
581 (Gen_Main_Ada) - If CodePeer_Mode is set, then
582 call the "wrapper" subprogram instead of directly
583 calling the user-defined main subprogram.
585 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
587 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
588 alternatives of a case statement for controlled objects. Rename local
589 variable A to Dead_Alt.
590 (Expand_N_If_Statement): Check the then and else statements of an if
591 statement for controlled objects. Check the then statements of all
592 elsif parts of an if statement for controlled objects.
593 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
595 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
596 detects a loop associated with the expansion of an array object.
597 Augment the processing of the loop statements to account for a possible
598 wrap done by Process_Statements_For_Controlled_Objects.
599 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
600 statements and abortable part of an asynchronous select for controlled
602 (Expand_N_Conditional_Entry_Call): Check the else statements of a
603 conditional entry call for controlled objects.
604 (Expand_N_Selective_Accept): Check the alternatives of a selective
605 accept for controlled objects.
606 (Expand_N_Timed_Entry_Call): Check the entry call and delay
607 alternatives of a timed entry call for controlled objects.
608 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
609 exception handler for controlled objects.
610 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
611 Add formal parameter Nested_Constructs along with its associated
613 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
614 Requires_Cleanup_Actions.
615 (Process_Statements_For_Controlled_Objects): New routine.
616 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
617 routine. Inspect a node which contains a non-handled sequence of
618 statements for controlled objects. If such an object is found, the
619 statements are wrapped in a block.
621 2011-08-04 Bob Duff <duff@adacore.com>
623 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
624 need to compare with Class_Wide_Type (T2), in order to get at the
625 original class-wide type node.
626 * sem_type.ads (Covers): Improve the comment.
627 * einfo.ads (Class_Wide_Type): Improve the comment.
628 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
629 the type of the Deref.
631 2011-08-04 Yannick Moy <moy@adacore.com>
633 * gnat_rm.texi: Document that Test_Case pragma can only appear on
634 separate declarations.
635 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
636 check identifier of pragma argument.
637 (Chain_TC): check that no other test case associated to the same entity
639 (Check_Test_Case): disallow test case inside subprogram body
640 (Analyze_Pragma): correct call to check identifier and not argument
641 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
642 function gets name from test case pragma.
644 2011-08-04 Yannick Moy <moy@adacore.com>
646 * gnat_rm.texi: Document new pragma and aspect.
647 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
648 (No_Duplicates_Allowed): new constant array defining whether duplicates
649 aspects of each kind can appear on the same declaration.
650 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
651 field, which points to a node holding the previous Spec_PPC_List.
652 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
653 through the indirection with Contract.
654 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
655 * par-prag.adb (Prag): do nothing on Test_Case pragma
656 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
658 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
659 component Ensures of Test_Case.
660 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
661 (Analyze_Generic_Subprogram_Declaration,
662 Analyze_Subprogram_Instantiation,
663 Analyze_Abstract_Subprogram_Declaration,
664 Analyze_Subprogram_Body_Helper,
665 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
666 insert contract in subprogram node at point of definition
668 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
669 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
671 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
672 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
673 similar to the analysis of pre/post
674 (Derive_Subprogram): insert contract in subprogram node at point of
676 * sem_prag.adb, sem_prag.ads
677 (Check_Arg_Is_String_Literal, Check_Identifier):
678 new checking procedures to be called in treatment of pragmas
679 (Check_Test_Case): new procedure to check that a Test_Case aspect or
680 pragma is well-formed. This does not check currently that 'Result is
681 used only in the Ensures component of a Test_Case.
682 (Analyze_Pragma): add case for Test_Case
683 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
684 components of a Test_Case.
685 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
686 expressions in the 3rd (and 4th if present) arguments of a Test_Case
687 pragma, treated as spec expressions.
688 (Sig_Flags): add value -1 for Test_Case.
689 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
690 Get_Requires_From_Test_Case_Pragma): getters for both expression
691 components of a Test_Case.
692 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
693 indirection between an entry or [generic] subprogram entity and its
694 pre/post + test-cases.
695 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
696 get/set for fields of an N_Contract node.
697 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
698 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
699 names and pragma for Test_Case.
700 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
702 2011-08-04 Vincent Celier <celier@adacore.com>
704 * gnat_ugn.texi: Improve documentation of gnatmake switch
707 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
709 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
710 type). Initialize Atyp to the appropriate type which is later checked
711 for completion. Rewrite the assertion associated with private type
714 2011-08-04 Ed Falis <falis@adacore.com>
716 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
717 initialize the number of CPUs.
719 2011-08-04 Ed Schonberg <schonberg@adacore.com>
721 * sem_type.adb (Disambiguate): New subsidiary routine
722 In_Same_Declaration_List, to implement AI05-0020: a user-defined
723 equality on an anonymous access type whose designated type is private
724 does not lead to an ambiguity with the universal access equality
725 operator in the body or child units of the defining package. The same
726 is true for a multiplication operator on a private type completed with
729 2011-08-04 Javier Miranda <miranda@adacore.com>
731 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
732 (Normalize_Scalars_Config): Removed.
734 (Register_Opt_Config_Switches): Remove registering config values of
735 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
736 (Restore_Opt_Config_Switches): Remove code which restores the values of
737 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
738 Init_Or_Norm_Scalars.
739 (Save_Opt_Config_Switches): Remove code which saves values of
740 Init_Or_Norm_Scalars and Normalize_Scalars.
741 (Set_Opt_Config_Switches): Remove code which restores config values of
742 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
743 Init_Or_Norm_Scalars.
745 2011-08-04 Yannick Moy <moy@adacore.com>
747 * frontend.adb (Frontend): remove previous patch to avoid full
748 qualification in ALFA mode.
749 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
750 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
751 unique name for an entity, which could be used to identify the entity
752 across compilation units.
754 2011-08-04 Thomas Quinot <quinot@adacore.com>
757 (Initialize_Default_Project_Path): Add target specific directory
758 ($prefix/$target/lib/gnat) in front of project path in all cases
759 (making gnatmake's behaviour consistent with gprbuild).
760 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
761 Pass target name from Sdefault to project subsystem.
762 * gnatls.adb: Show new target specific default project directory.
764 2011-08-04 Johannes Kanig <kanig@adacore.com>
766 * cstand.adb: Add Information to Identifier in Standard
767 (Identifer_For): Set Entity to the corresponding entity
769 2011-08-04 Sergey Rybin <rybin@adacore.com>
771 * gnat_ugn.texi: Update doc on gnatcheck.
773 2011-08-04 Yannick Moy <moy@adacore.com>
775 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
778 2011-08-04 Yannick Moy <moy@adacore.com>
780 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
781 performing expansion.
782 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
783 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
784 it is not called in ALFA mode.
786 2011-08-04 Emmanuel Briot <briot@adacore.com>
788 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
789 after all, so removed.
791 2011-08-04 Sergey Rybin <rybin@adacore.com>
793 * vms_data.ads: Add missing VMS qualifiers.
795 2011-08-04 Emmanuel Briot <briot@adacore.com>
797 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
798 the list of files on the command line after processing it through
801 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
803 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
804 processing for .NET/JVM. These targets can now benefit from
805 Raise_From_Controlled_Operation and they share the same processing with
807 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
808 These targets need transient scopes in order to properly finalize short
809 lived controlled objects.
810 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
811 NET/JVM. These targets can now benefit from
812 Raise_From_Controlled_Operation and they share the same processing with
815 2011-08-04 Geert Bosch <bosch@adacore.com>
817 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
819 2011-08-04 Ed Schonberg <schonberg@adacore.com>
821 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
822 Expand_Record_Aggregate, to determine whether aggregate must be
823 expanded into assignments. This is the case if the ancestor part is
824 private, regarless of the setting of the flag Has_Private_Ancestor.
826 2011-08-04 Ed Falis <falis@adacore.com>
828 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
830 2011-08-04 Bob Duff <duff@adacore.com>
832 * sinfo.ads: Fix comment.
834 2011-08-04 Steve Baird <baird@adacore.com>
836 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
837 choose a package name in much the same way as is
838 done for JGNAT when VM_Target /= No_VM, except that
839 a slightly more distinctive prefix string is used.
841 2011-08-04 Emmanuel Briot <briot@adacore.com>
843 * makeutl.adb (Complete_Mains): no longer accept unit names on the
844 gnatmake command line.
845 This behavior was never documented (and was supported only because of
846 an early bug in the code). This case might lead to ambiguous cases
847 (between unit names and truncated base names without suffixes).
849 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
851 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
852 Remove the external tag of a tagged type from the internal hash table.
853 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
854 expanded usage of the routine. Strenghten the check for Is_Master. Add
855 processing for tagged types.
856 (Build_Finalizer): Create all the necessary lists used in finalizer
857 creation when the processed context is a package that may contain
859 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
860 Requires_Cleanup_Actions.
861 (Expand_N_Package_Body): Package bodies may need clean up code
862 depending on whether they contain tagged types.
863 (Expand_N_Package_Declaration): Package declarations may need clean up
864 code depending on whether they contain tagged types.
865 (Unregister_Tagged_Types): New routine. Search through a list of
866 declarations or statements, looking for non-abstract Ada tagged types.
867 For each such type, generate code to unregister the external tag.
868 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
869 Requires_Cleanup_Actions.
870 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
871 through a list of declarations or statements looking for non-abstract
872 Ada tagged types or controlled objects.
873 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
874 Requires_Cleanup_Actions.
875 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
876 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
879 2011-08-04 Vincent Celier <celier@adacore.com>
881 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
882 has Ada sources, not project Project, because if the root project
883 Project has no sources of its own, all projects will be deemed without
886 2011-08-04 Gary Dismukes <dismukes@adacore.com>
888 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
889 of the No_Param_Proc acc-to-subp type used for initialization of
890 __gnat_finalize_library_objects so that it's declared at library level
891 rather than nested inside of the adainit routine.
893 2011-08-04 Javier Miranda <miranda@adacore.com>
895 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
896 if the tagged type has a representation clause which specifies its
899 2011-08-04 Ed Schonberg <schonberg@adacore.com>
901 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
902 Remove previous procedure with that name.
903 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
905 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
906 subtype mark, the ancestor cannot have unknown discriminants.
907 (Resolve_Record_Aggregate): if the type has invisible components
908 because of a private ancestor, the aggregate is illegal.
910 2011-08-04 Vincent Celier <celier@adacore.com>
912 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
913 account switches -gnat2005, -gnat12 and -gnat2012.
915 2011-08-04 Bob Duff <duff@adacore.com>
917 * s-tasdeb.ads: Minor comment fix.
919 2011-08-04 Arnaud Charlet <charlet@adacore.com>
921 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
923 * switch.ads, switch.adb (Is_Language_Switch): New function.
925 2011-08-04 Vincent Celier <celier@adacore.com>
927 * switch-c.adb: Minor comment addition.
929 2011-08-04 Vincent Celier <celier@adacore.com>
931 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
932 ending with '=' is followed by a space (missing file name).
934 2011-08-04 Pascal Obry <obry@adacore.com>
936 * g-regist.ads: Fix size of HKEY on x86_64-windows.
938 2011-08-04 Ed Schonberg <schonberg@adacore.com>
940 * sem_ch12.adb (Analyze_Associations): New routine
941 Check_Overloaded_Formal_Subprogram to reject a formal package when
942 there is a named association or a box initialisation for an overloaded
943 formal subprogram of the corresponding generic.
945 2011-08-04 Yannick Moy <moy@adacore.com>
947 * alfa.ads (ALFA_Xref_Record): add component for type of entity
948 * get_alfa.adb, put_alfa.adb: Read and write new component of
950 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
952 2011-08-04 Pascal Obry <obry@adacore.com>
954 * urealp.adb: Minor reformatting.
956 2011-08-04 Tristan Gingold <gingold@adacore.com>
958 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
959 Handle the case when Cleanup_Protected_Object returns Empty.
961 2011-08-04 Yannick Moy <moy@adacore.com>
963 * frontend.adb (Frontend): only qualify names in non-ALFA mode
965 2011-08-04 Ed Schonberg <schonberg@adacore.com>
967 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
968 call, ignore functions.
970 2011-08-04 Geert Bosch <bosch@adacore.com>
972 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
975 2011-08-04 Emmanuel Briot <briot@adacore.com>
977 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
978 as an index for Builder'Switches. This conforms to the documentation.
979 * make.adb (Insert_Project_Sources): avoid duplicate code
981 2011-08-04 Emmanuel Briot <briot@adacore.com>
983 * makeutl.adb (Complete_Mains): if the user has passed a relative file
984 name on the command line (for instance "../dummy"), never assume it can
987 2011-08-04 Tristan Gingold <gingold@adacore.com>
989 * bindgen.adb: Remove code the reference or create the
990 Break_Start/__gnat_break_start procedure.
991 * s-stalib.adb (Break_Start): Removed.
993 2011-08-04 Emmanuel Briot <briot@adacore.com>
995 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
996 shared with gprbuild.
998 2011-08-04 Yannick Moy <moy@adacore.com>
1000 * par-ch4.adb (P_Primary): preferentially issue an error message about
1001 a missing parenthesis arount a conditional or case expression in Ada
1002 2012 mode, if we detect that the alignment is not correct for a
1005 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1007 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1008 tag-to-class-wide conversion as needing finalization actions.
1009 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1010 a tag-to-class-wide conversion as needing finalization actions.
1011 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1012 conversion does not need finalization actions.
1013 (Is_Tag_To_CW_Conversion): New routine.
1014 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1015 whether an object is the result of a tag-to-class-wide conversion.
1017 2011-08-04 Yannick Moy <moy@adacore.com>
1019 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1020 the left-hand-side and right-hand-side of a conjunct are inserted when
1021 translating a pre- or postcondition
1022 * sem_ch6.adb: Correct typo in comment
1024 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1026 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1027 Unchecked_Conversion and Unchecked_Deallocation.
1029 2011-08-04 Thomas Quinot <quinot@adacore.com>
1031 * make.adb: Minor reformatting.
1033 2011-08-04 Emmanuel Briot <briot@adacore.com>
1035 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1036 sources in the project and its imported projects, but not in the whole
1039 2011-08-04 Emmanuel Briot <briot@adacore.com>
1041 * make.adb: Remove debug trace.
1043 2011-08-04 Vincent Celier <celier@adacore.com>
1045 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1046 path in canonical form, to be able to compare path names on platforms
1047 such as Windows or Darwin.
1049 2011-08-04 Thomas Quinot <quinot@adacore.com>
1051 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1052 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1053 * scos.ads: Update documentation accordingly.
1054 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1057 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1059 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1060 attribute only if prefix type is scalar.
1062 2011-08-04 Emmanuel Briot <briot@adacore.com>
1064 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1065 in gnatmake for specifying mains on the command line that do not belong
1066 to the main project. These mains must currently all belong to the same
1068 (Ultimate_Extension_Of): removed, since duplicated
1069 Ultimate_Extending_Project.
1071 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1073 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1075 (CodePeer_Mode_String): New.
1076 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1078 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1079 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1080 mode, since no useful elaboration subprogram is needed by CodePeer.
1081 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1082 In this mode, compile binder file with -gnatC and do stop after this
1085 2011-08-04 Vincent Celier <celier@adacore.com>
1087 * exp_ch7.adb: Minor comment fix.
1089 2011-08-04 Robert Dewar <dewar@adacore.com>
1091 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1092 exp_ch4.adb, makeutl.adb: Minor reformatting.
1094 2011-08-04 Emmanuel Briot <briot@adacore.com>
1096 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1097 Create several new subprograms to move code out of Make. This makes the
1098 code more readable, removes code duplication, and is a preparation work
1099 for adding support for aggregate projects.
1101 2011-08-04 Tristan Gingold <gingold@adacore.com>
1103 * s-po32gl.ads, s-po32gl.adb: New files.
1104 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1105 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1106 (Build_Finalization_Collection): Use it.
1107 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1108 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1110 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1111 * gcc-interface/Make-lang.in: Update dependencies.
1113 2011-08-04 Emmanuel Briot <briot@adacore.com>
1115 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1118 2011-08-04 Emmanuel Briot <briot@adacore.com>
1120 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1121 command line is not a file name, also check whether it could be a unit
1124 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1126 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1127 the header of the finalization routine.
1128 If the unit has no finalizer but is a body whose spec has one, then
1129 generate the decrement of the elaboration entity only.
1130 If the unit has a finalizer and is a spec, then do not generate the
1131 decrement of the elaboration entity.
1132 (Gen_Finalize_Library_C): Likewise.
1134 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1136 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1137 (Bounds_Size_Expression): Removed.
1138 (Double_Alignment_Of): New subsidiary routine.
1139 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1140 for a hole in the dope vector of unconstrained arrays due to different
1141 index and element alignments.
1143 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1145 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1146 raise program_error because body has not been seen yet.
1148 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1150 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1153 2011-08-04 Vincent Celier <celier@adacore.com>
1155 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1157 2011-08-04 Yannick Moy <moy@adacore.com>
1159 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1160 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1162 2011-08-04 Thomas Quinot <quinot@adacore.com>
1164 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1165 instantiation in RCI.
1167 2011-08-04 Emmanuel Briot <briot@adacore.com>
1169 * make.adb: Share more code with gprbuild
1171 2011-08-04 Emmanuel Briot <briot@adacore.com>
1173 * projects.texi: Added documentation for the IDE'Gnat project file
1176 2011-08-04 Nicolas Roche <roche@adacore.com>
1178 * gnat_rm.texi: Minor editing.
1180 2011-08-04 Javier Miranda <miranda@adacore.com>
1182 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1183 and the library case for VM targets.
1184 (Gen_Adainit_Ada): Likewise.
1186 2011-08-04 Robert Dewar <dewar@adacore.com>
1188 * g-altive.ads: Minor comment updates.
1189 * prj-nmsc.adb: Minor reformatting.
1191 2011-08-04 Javier Miranda <miranda@adacore.com>
1194 (Normalize_Scalars_Config): Value of the configuration switch set by
1195 pragma Normalize_Scalars when it appears in the gnat.adc file.
1196 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1197 to save and restore settings of this pragma.
1199 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1200 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1202 2011-08-04 Vincent Celier <celier@adacore.com>
1204 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1206 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1208 * makeutl.adb: Minor reformatting.
1210 2011-08-04 Olivier Hainque <hainque@adacore.com>
1212 * g-altive.ads: Update comments to reflect that only the soft
1213 binding is available today.
1215 2011-08-04 Robert Dewar <dewar@adacore.com>
1217 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1218 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1219 * gcc-interface/Make-lang.in: Update dependencies.
1221 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1223 * prj-env.adb: Remove local debug traces.
1225 2011-08-04 Yannick Moy <moy@adacore.com>
1227 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1228 was used instead of Hi_OK, which could cause a read of an uninitialized
1229 value later on. Detected while working on the new warning.
1230 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1232 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1233 in more cases, in order to detect more unreferenced values.
1234 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1235 object for expression, if any.
1237 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1239 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1240 the operand types instead of the Esize.
1242 2011-08-04 Steve Baird <baird@adacore.com>
1244 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1245 enable CodePeer_Mode.
1246 * bindusg.adb (Display): Add help message describing -P binder switch.
1247 * gnat_ugn.texi: Document -P binder switch.
1248 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1249 user-defined main program directly.
1250 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1251 user-defined main program in the context clause of the package body.
1253 2011-08-04 Yannick Moy <moy@adacore.com>
1255 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1256 duplicate of Defining_Entity
1257 (Get_Unique_Entity_For_Decl): rename function into
1258 Unique_Defining_Entity
1259 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1260 (Formal_Proof_On): remove synthesized flag
1261 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1262 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1263 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1264 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1265 Annotate (Formal_Proof)
1267 2011-08-04 Emmanuel Briot <briot@adacore.com>
1269 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1270 source files with non-standard naming schemes, in imported projects
1272 2011-08-04 Emmanuel Briot <briot@adacore.com>
1274 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1275 specified on the gprbuild command line, we need to compile all units
1276 within that file, not just the first one we find
1277 Fix error message for mains that are not found.
1279 2011-08-04 Thomas Quinot <quinot@adacore.com>
1281 * sem_ch6.adb: Update comment.
1282 * sem_ch12.adb: Minor reformatting.
1284 2011-08-04 Bob Duff <duff@adacore.com>
1286 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1287 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1288 race condition whose symptom is to fail to lock Parent. That, in turn,
1289 causes Parent.Awake_Count to be accessed without locking Parent, which
1290 causes another race condition whose symptom is that Parent.Awake_Count
1291 can be off by 1 (either too high or too low). The solution is to lock
1292 Parent unconditionally, and then lock Acceptor, before reading
1293 Acceptor.Terminate_Alternative.
1295 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1297 * debug.adb: Update comment.
1299 2011-08-04 Robert Dewar <dewar@adacore.com>
1301 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1302 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1303 exp_ch6.adb: Minor reformatting.
1305 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1307 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1310 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1312 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1314 2011-08-04 Thomas Quinot <quinot@adacore.com>
1316 * sinfo.ads: Minor reformatting.
1318 2011-08-04 Emmanuel Briot <briot@adacore.com>
1320 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1321 even if there is no location.
1323 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1325 * sem_res.adb, sem_ch4.adb: move check for restriction
1326 No_Task_Hierarchy to resolve_allocator.
1328 2011-08-04 Thomas Quinot <quinot@adacore.com>
1330 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1331 This flag of N_Pragma nodes is not used, remove it as well as all of
1332 the associated circuitry.
1334 2011-08-04 Javier Miranda <miranda@adacore.com>
1336 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1337 runtime check on duplicated externa tags
1338 * debug.adb Document switch -gnatdQ.
1340 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1342 * a-fihema.ads: Minor typo fix.
1344 2011-08-04 Yannick Moy <moy@adacore.com>
1346 * sem_ch10.adb: Minor comment update.
1348 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1350 * einfo.adb: Update the node field usage to reflect the renaming of
1351 Return_Flag to Return_ Flag_Or_Transient_Decl.
1352 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1353 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1354 (Write_Field15_Name): Change Return_Flag to
1355 Return_Flag_Or_Transient_Decl.
1356 * einfo.ads: Rename node field Return_Flag to
1357 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1358 occurrences in entities.
1359 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1360 associated Inline pragma.
1361 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1362 associated Inline pragma.
1363 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1365 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1366 Return_Flag and Set_Return_Flag.
1367 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1368 objects generated for controlled transients declared inside an
1369 Exception_With_Actions. Update the calls to Return_Flag.
1370 (Process_Object_Declaration): Add code to add a null guard for hook
1371 objects generated for controlled transients declared inside an
1372 Exception_With_Actions. Update related comment.
1373 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1374 objects generated for controlled transients declared inside an
1375 Exception_With_Actions. Update the calls to Return_Flag.
1376 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1378 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1380 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1381 positional aggregate.
1383 2011-08-04 Vincent Celier <celier@adacore.com>
1385 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1386 SLOC only for pragmas.
1388 2011-08-04 Emmanuel Briot <briot@adacore.com>
1390 * projects.texi: Minor typo fix.
1392 2011-08-04 Emmanuel Briot <briot@adacore.com>
1394 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1395 on case-sensitive file systems.
1397 2011-08-04 Thomas Quinot <quinot@adacore.com>
1399 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1400 nested in a disabled pragma.
1401 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1402 enclosing pragma, if any, for X decisions.
1404 2011-08-04 Thomas Quinot <quinot@adacore.com>
1406 * sem_prag.adb: Minor reformatting.
1408 2011-08-04 Vincent Celier <celier@adacore.com>
1410 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1411 allowed in no run time mode.
1413 2011-08-04 Vincent Celier <celier@adacore.com>
1415 * make.adb (Check): When -gnatc is used, check for the source file
1416 inside the ALI file with a canonical case file name.
1418 2011-08-04 Emmanuel Briot <briot@adacore.com>
1420 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1421 overriding the separator.
1423 2011-08-04 Robert Dewar <dewar@adacore.com>
1425 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1426 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1428 2011-08-04 Robert Dewar <dewar@adacore.com>
1430 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1432 2011-08-04 Yannick Moy <moy@adacore.com>
1434 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1435 'Result only appears in postcondition of function.
1437 2011-08-04 Thomas Quinot <quinot@adacore.com>
1439 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1440 external tag, include the value of the external tag in the exception
1443 2011-08-04 Yannick Moy <moy@adacore.com>
1445 * sem_attr.adb (Result): modify error message for misplaced 'Result
1447 2011-08-04 Sergey Rybin <rybin@adacore.com>
1449 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1450 clear that the second argument must be an identifier.
1452 2011-08-04 Thomas Quinot <quinot@adacore.com>
1454 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1455 -fpreserve-control-flow, insert an IF statement on the barrier
1456 condition to ensure that a conditional branch instruction is generated.
1458 2011-08-04 Emmanuel Briot <briot@adacore.com>
1460 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1461 (Processing_Flags.Ignore_Missing_With): new flag.
1463 2011-08-04 Emmanuel Briot <briot@adacore.com>
1465 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1466 Source_List_File on case-insensitive systems where the file is actually
1467 on a case-sensitive file system (NFS,...).
1469 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1471 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1472 function return contains a controlled [extension] aggregate and the
1473 return statement is not part of a handled sequence of statements, wrap
1474 the return in a block. This ensures that all controlled temporaries
1475 generated during aggregate resolution will be picked up by the
1476 finalization machinery.
1478 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1480 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1481 components, freeze type before resolution, to ensure that default
1482 initializations are present for all components.
1483 * sem_res.adb (Resolve_Actuals): the designated object of an
1484 accces-to-constant type is a legal actual in a call to an
1485 initialization procedure.
1487 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1489 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1490 N_Unchecked_Type_Conversion to the possible containers of a renamed
1493 2011-08-04 Yannick Moy <moy@adacore.com>
1495 * par-ch13.adb (Aspect_Specifications_Present): recognize
1496 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1497 is issued in Strict mode.
1498 * par.adb: Fix typos in comments.
1500 2011-08-04 Yannick Moy <moy@adacore.com>
1502 * sem_attr.adb (Result): modify error message to take into account Post
1503 aspect when compiling Ada 2012 (or newer) code.
1505 2011-08-04 Nicolas Roche <roche@adacore.com>
1507 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1508 remove need for GCC exceptions.
1510 2011-08-04 Vincent Celier <celier@adacore.com>
1512 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1513 project, not the source file name.
1514 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1515 excluded, continue looking. This excluded source will only be returned
1516 if there is no other source with the same base name that is not locally
1519 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1521 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1522 private and one of the operands is a real literal, use a qualified
1523 expression rather than a conversion which is not meaningful to the
1526 2011-08-04 Yannick Moy <moy@adacore.com>
1528 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1529 corresponding aspect X'Class are allowed, proceed with analysis of the
1530 aspect instead of skipping it.
1532 2011-08-04 Tristan Gingold <gingold@adacore.com>
1534 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1535 This will allow to have an Ada implementation for the subprogram.
1537 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1539 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1540 completion and aspects are present, apply them to the entity for the
1541 type which is currently the partial view, but which is the one that
1543 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1544 applies to a partial view, indicate that the full view has predicates
1545 and delayed aspects.
1546 (Replace_Type_Reference): Handle properly predicates that apply to the
1547 full view of a private completion.
1549 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1551 * layout.adb (Layout_Type): For composite types, do not set Esize.
1552 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1554 (Size_Known): Look at the RM size of components instead of the Esize.
1555 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1556 issue warning and activate Implicit_Packing.
1557 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1558 if the Esize is not known.
1559 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1560 for elementary types only.
1561 (Analyze_Record_Representation_Clause): Look at the RM size instead
1562 of the Esize to issue errors.
1563 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1565 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1567 Look at the RM size instead of the Esize for types if the latter is
1569 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1571 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1573 * sem_type.adb: proper handling of equality not involving anonymous
1576 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1578 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1579 Vis_Decls. When creating a library-level finalizer for a package spec,
1580 both the declaration and body of the finalizer are inserted either in
1581 the visible or private declarations of the package spec.
1583 2011-08-04 Javier Miranda <miranda@adacore.com>
1585 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1586 use of the full-view of a type when invoking Is_Ancestor.
1587 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1588 the full-view of private parents is requested, then use also the
1589 full-view of the parent of the first derivation.
1591 2011-08-04 Tristan Gingold <gingold@adacore.com>
1593 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1594 instead of the locally imported procedure.
1595 * s-taprop-mingw.adb (Enter_Task): Ditto.
1596 * s-valrea.adb (Scan_Real): Ditto.
1597 * s-imgrea.adb (Set_Image_Real): Ditto.
1598 * s-flocon.ads: Make the package pure.
1600 2011-08-04 Thomas Quinot <quinot@adacore.com>
1602 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1603 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1604 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1605 New subprogram, moved here from...
1606 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1607 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1608 rewriting of the last argument into a procedure call statement here...
1609 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1612 2011-08-04 Thomas Quinot <quinot@adacore.com>
1614 * par_sco.adb: Minor reformatting.
1616 2011-08-04 Robert Dewar <dewar@adacore.com>
1618 * erroutc.adb: Minor reformatting.
1620 2011-08-04 Thomas Quinot <quinot@adacore.com>
1622 * par_sco.adb: Comment update.
1624 2011-08-04 Tristan Gingold <gingold@adacore.com>
1626 * s-flocon.ads: New file.
1627 * g-flocon.ads: Now a renaming of s-flocon.
1628 * Makefile.rtl: Add s-flocon.o
1630 2011-08-04 Javier Miranda <miranda@adacore.com>
1632 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1633 constrained, do not attempt to build a subtype of it.
1635 2011-08-04 Yannick Moy <moy@adacore.com>
1637 * errout.ads Change comments: remove 'R'M as an example where quotes
1638 are needed; add ALFA as another case where quotes are not needed
1639 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1640 case where quotes are not needed.
1641 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1642 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1643 Remove all occurrences of 'A'L'F'A
1645 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1647 * sem_ch13.adb: check legality of invariant pragma.
1649 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1651 * bindgen.adb: Add comments.
1653 2011-08-04 Yannick Moy <moy@adacore.com>
1655 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1657 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1658 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1660 2011-08-04 Robert Dewar <dewar@adacore.com>
1662 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1663 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1664 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1666 2011-08-04 Thomas Quinot <quinot@adacore.com>
1668 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1670 2011-08-04 Thomas Quinot <quinot@adacore.com>
1673 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1676 2011-08-04 Robert Dewar <dewar@adacore.com>
1678 * einfo.ads, exp_ch4.adb: Minor reformatting.
1680 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1682 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1684 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1686 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1687 type in all cases to compute list of primitive operations, because full
1688 view may be an itype that is not attached to the list of declarations.
1690 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1692 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1693 library has already been finalized.
1694 (Gen_Adafinal_C): Likewise.
1695 (Gen_Adainit_Ada): Generate an early return if the library has
1696 already been elaborated.
1697 (Gen_Adainit_C): Likewise.
1698 (Gen_Output_File_Ada): Generate an elaboration flag.
1699 (Gen_Output_File_C): Likewise.
1701 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1703 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1704 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1705 built in the first place.
1706 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1707 for CodePeer because Finalize_Address was not built to begin with.
1708 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1710 2011-08-04 Pascal Obry <obry@adacore.com>
1712 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1713 filenames, this ensures unicity of filenames across processes.
1715 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1717 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1718 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1719 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1720 Add False as the actual to From_Abort in the generated call to
1721 Raise_From_Controlled_Operation.
1723 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1725 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1726 so that the ali file name can be retrieved from outside of this package.
1727 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1728 doing nothing in the general case, but used to update the object file
1729 timestamp if directly generated by the backend.
1730 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1731 to a later time than the ali file one.
1733 2011-08-04 Yannick Moy <moy@adacore.com>
1735 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1736 entities whose body contains an Annotate pragma which forces formal
1738 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1739 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1740 Mark_Non_ALFA_Subprogram to pass in a message and node.
1741 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1742 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1743 surrounding subprogram.
1744 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1745 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1746 as not in ALFA is annotated with Formal_Proof being On, then an error
1747 is issued based on the additional parameters for message and node.
1748 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1749 * gcc-interface/Make-lang.in: Update dependencies.
1751 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1753 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1754 Finalize_Address when CodePeer is enabled.
1756 2011-08-04 Pascal Obry <obry@adacore.com>
1758 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1759 the latter returns a pointer to a static buffer which is deallocated
1760 at the end of the routine.
1762 2011-08-04 Yannick Moy <moy@adacore.com>
1764 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1765 after index creation; mark unconstrained base array type generated as
1766 being in/not in ALFA as well
1767 (Make_Index): mark subtype created as in/not in ALFA
1768 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1769 over a loop as in/not in ALFA, depending on its type and form of loop
1772 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1774 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1775 directly to False on .NET and JVM.
1777 2011-08-04 Yannick Moy <moy@adacore.com>
1779 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1780 constraint that subtype must come from source code to be in ALFA, so
1781 that anonymous subtypes can be in ALFA too.
1783 2011-08-04 Yannick Moy <moy@adacore.com>
1785 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1786 reference for ALFA mode.
1787 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1788 procedure public so as to use it from formal verification back-end.
1790 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1792 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1793 invalid checks of the Parameter, making Remove_Switch not working
1796 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1798 * targparm.ads: Update header: no run-time exception is needed on this
1801 2011-08-04 Vincent Celier <celier@adacore.com>
1803 * a-fihema.adb: Use System.IO instead of GNAT.IO
1805 2011-08-04 Thomas Quinot <quinot@adacore.com>
1807 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1808 are forbidden in Compiler_Unit mode.
1810 2011-08-04 Robert Dewar <dewar@adacore.com>
1812 * sem_util.adb: Minor reformatting.
1814 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1816 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
1817 library-level finalizers.
1818 (Gen_Finalize_Library_C): Update the import string for library-level
1820 (Gen_Finalize_Library_Defs_C): Update the definition name of a
1821 library-level finalizer.
1822 * exp_ch7.adb: Remove with and use clauses for Stringt.
1823 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
1824 Spec_Decl. Add local variable Body_Id. The names of library-level
1825 finalizers are now manually fully qualified and are no longer external.
1826 A single name is now capable of servicing .NET, JVM and non-VM targets.
1827 Pragma Export is no longer required to provide visibility for the name.
1828 (Create_Finalizer_String): Removed.
1829 (New_Finalizer_Name): New routine which mimics New_..._Name.
1831 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1833 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
1834 elaboration counter to Standard_Short_Integer.
1835 * sem_util.adb (Build_Elaboration_Entity): Likewise.
1836 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
1837 (Gen_Elab_Externals_C): Likewise.
1839 2011-08-04 Ed Falis <falis@adacore.com>
1841 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1842 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1843 system-vxworks-mips.ads, system-vxworks-x86.ads
1844 (Always_Compatible_Rep): set to False for all VxWorks targets.
1846 2011-08-04 Robert Dewar <dewar@adacore.com>
1848 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
1849 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
1850 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
1851 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
1852 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
1853 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
1854 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
1855 Minor reformatting and code reorganization.
1857 2011-08-04 Emmanuel Briot <briot@adacore.com>
1859 * projects.texi: Added doc for aggregate projects.
1861 2011-08-04 Emmanuel Briot <briot@adacore.com>
1863 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
1864 Add support for overriding the Project_Path in aggregate projects.
1866 2011-08-04 Robert Dewar <dewar@adacore.com>
1868 * a-cofove.ads: Minor reformatting.
1870 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1872 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
1873 on the generated code.
1874 (Build_Finalize_Statements): Update the comment on the generated code.
1875 (Build_Initialize_Statements): Update the comment on the generated code.
1876 (Build_Object_Declarations): Add local variable Result. The object
1877 declarations are now built in sequence.
1878 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
1881 2011-08-04 Robert Dewar <dewar@adacore.com>
1883 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
1885 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1887 * einfo.ads (Elaboration_Entity): Document new definition and use.
1888 (Elaboration_Entity_Required): Adjust to above change.
1889 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
1890 * exp_ch12.adb: And with and use for Snames.
1891 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
1892 * exp_util.adb (Set_Elaboration_Flag): Likewise.
1893 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
1894 <Check_Unit_Name>: Deal with N_Expanded_Name.
1895 <Attribute_Elaborated>: Extend to all unit names.
1896 * sem_elab.adb: And with and use for Uintp.
1897 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
1898 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
1899 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
1900 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
1901 from Gen_Adainit_Ada.
1902 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
1903 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
1904 case, do not call System.Standard_Library.Adafinal; instead call
1905 finalize_library if needed.
1906 (Gen_Adafinal_C): Likewise.
1907 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
1908 non-main program case.
1909 (Gen_Adainit_C): Generate a couple of external declarations here.
1910 In the main program case, set SSL.Finalize_Library_Objects.
1911 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
1912 (Gen_Elab_Calls_C): Likewise.
1913 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
1914 (Gen_Finalize_Library_C): Likewise. Generate a full function.
1915 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
1917 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
1918 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
1920 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
1921 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
1922 of external declarations. Â Call Gen_Finalize_Library_C.
1924 2011-08-04 Emmanuel Briot <briot@adacore.com>
1926 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
1927 Compute_Compilation_Phases): new subprogram.
1928 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
1929 The number of mains as well as the various compilation phases that
1930 need to be run are now project tree specific, since various
1931 aggregated trees might have different requirements. In particular,
1932 they do not all require bind or link phases.
1934 2011-08-04 Emmanuel Briot <briot@adacore.com>
1936 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
1937 (Project_Tree_Appdata): New type.
1938 It is now possible to associate application-specific data to a project
1939 tree. In particular, this is used in the gprbuild builder to avoid a
1940 number of global tables and htables, especially now that there can be
1941 several project trees loaded at once because of aggregate projects.
1942 (Debug_Name): new procedure.
1943 * projects.texi: Clarify syntax of "**" for Source_Dirs
1945 2011-08-03 Emmanuel Briot <briot@adacore.com>
1947 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
1948 the "roots" for a main.
1949 (Fill_From_Project): add support for aggregate projects. Main units
1950 in aggregated projects are now automatically added in the list of
1951 files to build (although this fails later on in gprbuild, because
1952 these files are not using the root proejct tree, so this needs
1954 * gcc-interface/Make-lang.in: Update dependencies.
1956 2011-08-03 Yannick Moy <moy@adacore.com>
1958 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
1959 conditional expression in ALFA.
1960 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
1961 expressions as not in ALFA.
1963 2011-08-03 Robert Dewar <dewar@adacore.com>
1965 * a-cofove.adb: Minor reformatting.
1967 2011-08-03 Emmanuel Briot <briot@adacore.com>
1969 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
1970 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
1972 These packages are more logically placed in the Queue package, since
1973 they manipulate the queue. It is also likely that they can be adapted
1974 for gnatmake, thus sharing more code.
1975 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
1976 that we could move the above.
1978 2011-08-03 Emmanuel Briot <briot@adacore.com>
1980 * errutil.adb (Finalize): clean up the list of error messages on exit.
1981 Calling this subprogram multiple times will no longer show duplicate
1982 error messages on stderr.
1984 2011-08-03 Emmanuel Briot <briot@adacore.com>
1986 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
1987 Getopt_Switches when we have already define a command line
1990 2011-08-03 Yannick Moy <moy@adacore.com>
1992 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
1993 in ALFA. Instead, they are considered as assertions to prove.
1994 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
1995 nodes as not in ALFA. Instead, include conditional expressions in ALFA
1996 if they have no ELSE part, or if they occur in pre- and postconditions,
1997 where the Condition cannot have side-effects in ALFA
1998 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
1999 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2000 Instead, include type conversion between scalar types in ALFA.
2001 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2002 if-and-only-if its type is in ALFA.
2004 2011-08-03 Thomas Quinot <quinot@adacore.com>
2006 * scos.adb, get_scos.adb, put_scos.adb
2007 New code letter for decisions: G (entry guard)
2009 (Traverse_Subprogram_Body): Rename to...
2010 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2011 (Traverse_Protected_Body): New subprogram
2012 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2013 protected bodies and entry bodies.
2015 2011-08-03 Yannick Moy <moy@adacore.com>
2017 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2018 entities with get/set subprograms, which is set on procedure entities
2019 generated by the compiler for a postcondition.
2020 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2021 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2022 entity for a declaration
2023 (Get_Unique_Entity_For_Decl): new function returning an entity which
2024 represents a declaration, so that matching spec and body have the same
2027 2011-08-03 Robert Dewar <dewar@adacore.com>
2029 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2030 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2032 2011-08-03 Yannick Moy <moy@adacore.com>
2034 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2035 library-level because retriction No_Implicit_Dynamic_Code in the
2036 front-end prevents its definition as a local subprogram
2037 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2038 for reuse in other contexts
2039 (Traverse_Declarations_Or_Statements,
2040 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2041 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2042 procedures take a callback parameter to be called on all declarations
2044 (Traverse_All_Compilation_Units): new generic function to traverse a
2045 compilation unit and call a callback parameter on all declarations
2047 2011-08-03 Javier Miranda <miranda@adacore.com>
2049 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2050 in Java since they are always enclosed in a namespace that
2051 differentiates them, and overloaded entities are supported by the VM.
2053 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2055 * checks.adb (Determine_Range): If a computed bound of an operation is
2056 outside the range of the base type of the expression, and overflow
2057 checks are enabled, the result is unknown and cannot be used for any
2058 subsequent constant folding.
2059 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2060 unknown, so is the result of the comparison.
2062 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2064 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2065 From_Abort. When finalization was triggered by an abort, propagate
2066 Standard'Abort_Signal rather than Program_Error.
2067 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2069 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2070 From_Abort. When finalization was triggered by an abort, propagate
2071 Standard'Abort_Signal rather than Program_Error.
2072 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2074 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2075 Abort_Id. Update the calls to Build_Object_Declarations and
2076 Build_Raise_Statement to include Abort_Id.
2077 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2078 calls to Build_Object_Declarations and Build_Raise_Statement to include
2080 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2081 calls to Build_Object_Declarations and Build_Raise_Statement to include
2083 (Build_Components): Create an entity for Abort_Id when exceptions are
2084 allowed on the target.
2085 (Build_Finalizer): New local variable Abort_Id.
2086 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2087 calls to Build_Object_Declarations and Build_Raise_Statement to include
2089 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2090 declaration of flag Abort_Id to preserve the original abort status
2091 before finalization code is executed.
2092 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2093 runtime routine Raise_From_Controlled_Operation.
2094 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2095 Abort_Id. Update the call to Build_Object_Declarations to include
2096 Abort_Id. Update the layout of the finalizer body.
2097 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2098 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2099 clunky code to create all flags and objects related to
2100 exception propagation and replace it with a call to
2101 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2103 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2104 Add new formal Abort_Id and associated comment on its use.
2105 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2107 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2108 Remove the clunky code to create all flags and objects related to
2109 exception propagation and replace it with a call to
2110 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2112 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2114 * s-tassta.adb: Fix minor typos.
2116 2011-08-03 Robert Dewar <dewar@adacore.com>
2118 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2119 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2121 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2123 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2124 to packages. This ensures that the finalizer body will not end up
2125 inside the freeze node.
2126 (Process_Declarations): Add code to detect whether a freeze node has a
2127 nested finalization collection.
2129 2011-08-03 Pascal Obry <obry@adacore.com>
2131 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2132 (Current_Session): Return a not null access to Session_Type.
2133 (Default_Session): Likewise.
2135 2011-08-03 Robert Dewar <dewar@adacore.com>
2137 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2138 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2140 2011-08-03 Pascal Obry <obry@adacore.com>
2142 * g-awk.ads: Minor comment fix.
2144 2011-08-03 Sergey Rybin <rybin@adacore.com>
2146 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2147 the tree structure related to discriminant constraints.
2148 Original_Discriminant cannot be used any more for computing the
2149 defining name for the reference to a discriminant.
2151 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2153 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2154 function is not visibly tagged, this is not a dispatching call and
2155 therfore is not Tag_Indeterminate, even if the function is marked as
2156 dispatching on result.
2158 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2160 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2161 (Expand_N_Free_Statement): Add a guard to protect against run-times
2162 which do not support controlled types.
2163 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2164 against run-times which do not support controlled types.
2165 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2166 against run-times which do not support controlled types.
2167 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2168 against run-times which do not support controlled types.
2169 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2170 protect against run-times which do not support controlled types.
2172 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2174 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2175 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2177 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2179 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2180 modified in the source, to prevent spurious warnings when compiling
2183 2011-08-03 Thomas Quinot <quinot@adacore.com>
2185 * a-except-2005.adb: Minor reformatting.
2187 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2189 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2190 is a renaming declaration in the private part of a package, do not emit
2191 a warning that the with_clause could be moved because the renaming may
2192 be used in the body or in a child unit.
2194 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2196 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2197 Propagate the Comes_From_Source attribute from the original return
2198 object to the renaming.
2200 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2202 * exp_ch7.adb (Build_Raise_Statement): Do not call
2203 Raise_From_Controlled_Operation when this routine is not present in
2204 the run-time library.
2205 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2206 libraries (Ravenscar), tasks are non-terminating, and protected objects
2207 and tasks can only appear at library level, so we do not want
2208 finalization of protected objects nor tasks.
2209 * exp_intr.adb: Minor clarification in comment.
2210 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2211 Gen_Output_File_C): Remove references to finalization of library-level
2212 objects when using restricted run-time libraries.
2214 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2216 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2217 Original_Discriminant only if the parent type is a generic formal.
2219 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2221 * exp_ch13.adb: Add with and use clause for Targparm;
2222 (Expand_N_Free_Statement): Prevent the generation of a custom
2223 Deallocate on .NET/JVM targets since this requires pools and address
2225 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2226 .NET/JVM targets, attach the newly allocated object to the access
2227 type's finalization collection. Do not generate a call to
2228 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2229 exist in the runtime.
2230 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2231 create a custom Allocate for object that do not require initialization.
2232 Attach a newly allocated object to the access type's finalization
2233 collection on .NET/JVM.
2234 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2235 assignment of controlled types on .NET/JVM. The two hidden pointers
2236 Prev and Next and stored and later restored after the assignment takes
2238 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2239 kludge for .NET/JVM to recognize a particular piece of code coming from
2240 Heap_Management and change the call to Finalize into Deep_Finalize.
2241 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2242 finalization collections on .NET/JVM only for types derived from
2243 Controlled. Separate the association of storage pools with a collection
2244 and only allow it on non-.NET/JVM targets.
2245 (Make_Attach_Call): New routine.
2246 (Make_Detach_Call): New routine.
2247 (Process_Object_Declarations): Suppress the generation of
2248 build-in-place return object clean up code on .NET/JVM since it uses
2250 * exp_ch7.ads (Make_Attach_Call): New routine.
2251 (Make_Detach_Call): New routine.
2252 * exp_intr.adb Add with and use clause for Targparm.
2253 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2254 on .NET/JVM targets.
2255 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2256 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2257 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2258 names used in finalization.
2260 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2262 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2263 (Attach, Detach): Lock the current task when chaining an object onto a
2266 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2268 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2269 Rewritten to create the message strings when the exception is not
2270 raised by an abort during finalization.
2271 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2272 Raise_From_Controlled_Operation and update its associated comment.
2273 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2274 Ada.Finalization.Heap_Management provides key functionality
2275 associated with controlled objects on the heap, their creation,
2276 finalization and reclamation. Type Finalization_Collection is
2277 effectively a wrapper which sits ontop of a storage pool and performs
2278 all necessary bookkeeping for all the objects it contains. Each
2279 access-to-controlled or access-to-class-wide type receives a collection
2280 as part of its expansion. The compiler generates buffer code and
2281 invokes Allocate / Deallocate to create and destroy allocated
2283 * a-finali.adb ("="): Removed.
2284 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2285 fields Prev and Next.
2286 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2287 A library unit with at least one controlled object on the library level
2288 has a special finalizer which is invoked by the binder. To signal this,
2289 ali files carry field PF.
2290 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2291 associated comment on field usage.
2292 * a-tags.adb (Get_RC_Offset): Removed.
2293 (Needs_Finalization): New routine.
2294 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2295 Dispatch tables now carry field Needs_Finalization which provides
2296 runtime indication whether a type is controlled or has controlled
2297 components or both. Remove field RC_Offset.
2298 (Get_RC_Offset): Removed along with its associated pragma Export.
2299 Since tagged types with controlled components no longer carry hidden
2300 field _controller, the special mechanism to retrieve its location is no
2302 (Needs_Finalization): New routine.
2303 * atree.ads, atree.adb (Elist24): New routine.
2304 (Set_Elist24): New routine.
2305 * atree.h: Add a define clause for Elist24.
2306 * bindgen.adb New library-level variable Lib_Final_Built.
2307 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2308 presence of a VM target, the routine generates calls to the proper
2309 library finalization routine.
2310 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2311 targets. Set the correct library finalization routine depending on
2312 whether the library has controlled objects or this is a VM compilation.
2313 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2314 to library-level finalizers of compiled units in reverse order of
2315 elaboration. It also produces exception management code and reraises a
2316 potential exception after all units have been finalized.
2317 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2318 library-level finalizers of compiled units in reverse order of
2320 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2321 definitions of all library-level finalizers available to the compilation
2322 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2324 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2325 System.Standard_Library.Adafinal directly. If the library needs
2326 finalization actions, create the sequence of finalization calls.
2327 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2328 Generate a with clause for System.Soft_Links when compiling for a VM.
2329 Remove the code which imports System.Standard_Library.Adafinal as
2330 Do_Finalize. Generate the library finalization routine.
2331 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2332 If the library needs finalization actions, create all the definitions
2333 of library- level finalizers.
2334 (Has_Finalizer): New routine. Determines whether at least one compiled
2335 unit has a library-level finalizer.
2336 Add type Qualification_Mode.
2337 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2338 * einfo.adb: New usage of field 15 as Return_Flag.
2339 Remove Finalization_Chain_Entity from the usages of field 19.
2340 Remove Associated_Final_Chain from the usages of field 23.
2341 New usage of field 23 as Associated_Collection.
2342 New usage of field 24 as Finalizer.
2343 New usage of flag 252 as Is_Processed_Transient.
2344 (Associated_Final_Chain): Removed.
2345 (Associated_Collection): New routine.
2346 (Finalization_Chain_Entity): Removed.
2347 (Finalizer): New routine.
2348 (Is_Finalizer): New routine.
2349 (Is_Processed_Transient): New routine.
2350 (Return_Flag): New routine.
2351 (Set_Associated_Final_Chain): Removed.
2352 (Set_Associated_Collection): New routine.
2353 (Set_Finalization_Chain_Entity): Removed.
2354 (Set_Finalizer): New routine.
2355 (Set_Is_Processed_Transient): New routine.
2356 (Set_Return_Flag): New routine.
2357 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2359 (Write_Field8_Name): Alphabetize the output.
2360 (Write_Field11_Name): Alphabetize the output.
2361 (Write_Field12_Name): Alphabetize the output.
2362 (Write_Field13_Name): Alphabetize the output.
2363 (Write_Field14_Name): Alphabetize the output.
2364 (Write_Field15_Name): Alphabetize the output.
2365 (Write_Field16_Name): Alphabetize the output.
2366 (Write_Field17_Name): Alphabetize the output.
2367 (Write_Field18_Name): Alphabetize the output.
2368 (Write_Field19_Name): Alphabetize the output. Remove the output of
2369 Finalization_Chain_Entity.
2370 (Write_Field20_Name): Alphabetize the output.
2371 (Write_Field21_Name): Alphabetize the output.
2372 (Write_Field22_Name): Alphabetize the output.
2373 (Write_Field23_Name): Alphabetize the output. Remove the output of
2374 Associated_Final_Chain. Add output for Associated_Collection.
2375 (Write_Field24_Name): Alphabetize the output.
2376 (Write_Field25_Name): Add output for Finalizer.
2377 (Write_Field26_Name): Alphabetize the output.
2378 (Write_Field27_Name): Alphabetize the output.
2379 (Write_Field28_Name): Alphabetize the output.
2380 * einfo.ads: Add new field description for Associated_Collection and
2382 Remove Associated_Final_Chain and its uses in nodes.
2383 Remove Finalization_Chain_Entity and its uses in nodes.
2384 Add new field description for Finalizer and its uses in nodes.
2385 Add new synthesized attribute Is_Finalizer.
2386 Add new flag description for Is_Processed_Transient and its uses in
2388 Add new field description for Return_Flag and its uses in nodes.
2389 (Associated_Final_Chain): Removed along with its pragma Inline.
2390 (Associated_Collection): New routine and pragma Inline.
2391 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2392 (Finalizer): New routine and pragma Inline.
2393 (Is_Finalizer): New routine and pragma Inline.
2394 (Is_Processed_Transient): New routine and pragma Inline.
2395 (Return_Flag): New routine and pragma Inline.
2396 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2397 (Set_Associated_Collection): New routine and pragma Inline.
2398 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2399 (Set_Finalizer): New routine and pragma Inline.
2400 (Set_Is_Processed_Transient): New routine and pragma Inline.
2401 (Set_Return_Flag): New routine and pragma Inline.
2402 * exp_aggr.adb: Alphabetize subprograms.
2403 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2404 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2405 associated comments. Remove local variables External_Final_List and
2407 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2408 Ancestor. Remove the retrieval of finalization lists. Update the call to
2410 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2411 lists. Update the call to Late_Expansion.
2412 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2413 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2414 (Gen_Assign): Remove the retrieval of the finalization list used to
2415 build the assignment. Update the calls to Make_Init_Call and
2417 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2418 Remove the mechanism to determine attachment levels and finalization
2419 list retrieval. Remove the processing for coextensions.
2420 (Init_Controller): Removed. Controllers no longer exist.
2421 (Late_Expansion): Remove formals Flist and Obj along with their
2422 associated comments. Update the calls to Build_Record_Aggr_Code and
2423 Build_Array_Aggr_Code.
2424 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2425 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2426 appear in entry bodies, protected subprograms and task bodies.
2427 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2428 * exp_ch3.adb (Add_Final_Chain): Removed.
2429 (Build_Array_Init_Proc): Alphabetize local variables.
2430 (Build_Assignment): Alphabetize local variables. Update the call to
2432 (Build_Class_Wide_Master): Rename local variables to better reflect
2434 (Build_Discriminant_Assignments): Code reformatting.
2435 (Build_Init_Call_Thru): Code reformatting.
2436 (Build_Init_Procedure): Code reformatting. Generate a special version
2437 of Deep_Finalize which is capable of finalizing all initialized
2438 components and ignore the rest.
2439 (Build_Init_Statements): Rename local variables to better reflect their
2441 Reimplement the mechanism to include the creation and update of an index
2442 variable called a "counter". It is used as a bookmark for tracing
2443 initialized and non-initialized components.
2444 (Build_Initialization_Call): Remove local variable Controller_Typ.
2445 Alphabetize all local variables. Remove the initialization of the
2446 record controller and update the call to Make_Init_Call.
2447 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2448 New local variable Counter.
2449 (Constrain_Array): Alphabetize.
2450 (Expand_Freeze_Array_Type): Create a collection instead of a
2452 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2453 Finalize_Address which is used in conjunction with allocated controlled
2455 (Expand_N_Object_Declaration): Remove the creation of a finalization
2456 list for anonymous access types. Update the calls to Make_Init_Call and
2458 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2459 retrieval of finalization lists. Remove the expansion of the record
2460 controller. Create TSS primitive Finalize_Address used in conjunction
2461 with controlled objects on the heap. Create finalization collections
2462 for access-to-controlled record components.
2463 (Expand_Record_Controller): Removed.
2464 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2465 class-wide types now requires additional processing. Create
2466 finalization collections for access-to-controlled types.
2467 (Increment_Counter): New routine.
2468 (Make_Counter): New routine.
2469 (Make_Eq_If): Remove the mention of Name_uController.
2470 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2471 types coming from System.Finalization_Root.
2472 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2473 (Predefined_Primitive_Bodies): There is no longer need to skip types
2474 coming from System.Finalization_Root.
2475 (Stream_Operation_OK): Do not generate stream routines for
2476 type Ada.Finalization.Heap_Management.Finalization_Collection.
2477 * exp_ch3.ads: Alphabetize subprograms.
2478 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2479 Add with and use clause for Lib.
2480 (Complete_Coextension_Finalization): Removed.
2481 (Complete_Controlled_Allocation): New routine. Create a finalization
2482 collection for anonymous access-to-controlled types. Create a custom
2483 Allocate which interfaces with the back end and the machinery in
2485 (Expand_Allocator_Expression): Add necessary calls to
2486 Complete_Controlled_Allocation. Remove the retrieval of finalization
2487 lists. Update the calls to Make_Adjust_Call. Generate a call to
2488 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2489 the associated collection.
2490 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2491 Code clean up. Remove the retrieval of finalization lists and
2493 Update the call to Make_Init_Call. Generate a call to
2494 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2495 the associated collection.
2496 (Get_Allocator_Final_List): Removed. Finalization lists are not
2498 (Suitable_Element): Remove the mention of Name_uController.
2499 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2500 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2501 the left hand side, carry out the assignment and adjust the left hand
2503 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2504 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2505 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2506 BIP_Collection and BIPcollection.
2507 (Build_Heap_Allocator): New routine used to allocate the return object
2508 of a build-in-place function onto a collection.
2509 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2510 (Expand_Call): Do not replace direct calls to Deep routines with their
2512 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2513 and update their occurrences. Add a special return flag to monitor the
2514 [ab]normal execution of the function. The flag is set right before the
2516 Rewrite the mechanism used to allocate a build-in-place return object
2517 on the heap or on a storage pool.
2518 (Is_Direct_Deep_Call): New routine.
2519 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2520 build-in-place function call instead of a final list. Build a call to
2521 Set_Finalize_Address_Ptr to decorate the associated collection.
2522 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2523 order to name the build-in-place function call's result for later
2524 finalization. Add a collection to a build-in-place function call
2525 instead of a final list.
2526 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2527 build-in-place function call instead of a final list. Remove the code
2528 which moves one final list and transforms it into the actual in a
2529 nested build-in-place call.
2530 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2531 build-in-place function call instead of a final list.
2532 (Move_Final_List): Removed.
2533 (Needs_BIP_Collection): New routine.
2534 (Needs_BIP_Final_List): Removed.
2535 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2536 enumeration type BIP_Formal_Kind.
2537 Update the related comment.
2538 (Needs_BIP_Collection): New routine.
2539 (Needs_BIP_Final_List): Removed.
2540 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2541 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2542 majority of subprograms in this unit. Add Name_Finalize_Address to
2543 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2544 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2545 statements for an array type.
2546 (Build_Adjust_Statements): Create the adjust statements for a record
2548 (Build_Cleanup_Statements): New routine. A procedure which given any
2549 construct containing asynchronous calls, references to _master, or is a
2550 task body, a task allocation or a protected body produces the necessary
2551 runtime calls to clean up these constructs.
2552 (Build_Exception_Handler): New routine.
2553 (Build_Final_List): Removed.
2554 (Build_Finalization_Collection): New routine. A core procedure which
2555 creates a collection to service heap allocated controlled objects
2556 associated with an access-to-controlled type.
2557 (Build_Finalize_Statements): Create the finalization statements for a
2559 (Build_Finalizer): New routine. A core procedure which given any
2560 construct with declarations and/or statements detects all objects which
2561 need any type of clean up (controlled objects, protected objects) and
2562 generates all necessary code to clean up the said objects in the proper
2564 (Build_Finalizer_Call): New routine.
2565 (Build_Initialize_Statements): Create the initialization statements for
2566 an array type. The generated routine contains code to finalize partially
2568 (Build_Object_Declarations): New routine.
2569 (Build_Raise_Statement): New routine.
2570 (Clean_Simple_Protected_Objects): Removed.
2571 (Controller_Component): Removed.
2572 (Enclosing_Function): New routine.
2573 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2574 either declarations or statements or both.
2575 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2576 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2578 (Find_Final_List): Removed.
2579 (Global_Flist_Ref): Removed.
2580 (In_Finalization_Root): Removed.
2581 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2582 scope in terms of tree nodes. Process all transient variables within
2584 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2585 generated after the adjust.
2586 (Make_Attach_Call): Removed.
2587 (Make_Call): New routine.
2588 (Make_Clean): Removed.
2589 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2591 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2593 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2595 (Make_Final_Call): Modified to simply create a call to either
2596 Deep_Finalize or Finalize.
2597 (Make_Finalize_Address_Body): New routine.
2598 (Make_Finalize_Address_Stmts): New routine. A function which produces
2599 TSS primitive Finalize_Address used in conjunction with heap allocated
2601 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2602 (Make_Init_Call): Rewritten. There is no longer an attach call
2603 generated after initialization.
2604 (Make_Local_Deep_Finalize): New routine.
2605 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2606 (Make_Transient_Block): Remove the finalization list retrieval and
2608 (Needs_Finalization): Moved to Exp_Util.
2609 (Parent_Field_Type): New routine.
2610 (Preprocess_Components): New routine.
2611 (Process_Transient_Objects): New routine.
2612 (Wrap_HSS_In_Block): New routine.
2613 (Wrap_Transient_Declaration): Remove finalization list management and
2614 controller insertion.
2615 (Wrap_Transient_Expression): Code reformatting.
2616 (Wrap_Transient_Statement): Code reformatting.
2617 * exp_ch7.ads (Build_Final_List): Removed.
2618 (Build_Finalization_Collection): New routine.
2619 (Build_Raise_Statement): New routine.
2620 (Controller_Component): Removed.
2621 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2622 (Find_Final_List): Removed.
2623 (In_Finalization_Root): Removed.
2624 (Is_Simple_Protected_Type): Update related comment.
2625 (Make_Adjust_Call): New parameter profile and associated comments.
2626 (Make_Attach_Call): Removed.
2627 (Make_Final_Call): New parameter profile and associated comments.
2628 (Make_Finalize_Address_Body): New routine.
2629 (Make_Init_Call): New parameter profile and associated comments.
2630 (Make_Local_Deep_Finalize): New routine.
2631 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2632 (Needs_Finalization): Moved to Exp_Util.
2633 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2634 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2635 (Find_Protection_Type): Moved to Exp_Util.
2636 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2637 (Make_DT): Update sequence of dispatch table initialization. Remove the
2638 initialization of field RC_Offset. Add initialization of field Needs_
2640 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2641 Reimplement how an object is first finalized, then deallocated.
2642 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2644 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2645 Register TSS_Finalize_Address with type TSS_Names.
2646 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2647 procedure provides the interface between an allocation / deallocation
2648 and the support machinery in Ada.Finalization.Heap_Management.
2649 (Find_Init_Call): Code reformatting.
2650 (Find_Init_Call_In_List): Code reformatting.
2651 (Find_Protection_Type): Moved from Exp_Ch9.
2652 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2653 (Has_Controlled_Coextensions): Removed.
2654 (Has_Controlled_Objects): New routine.
2655 (In_Library_Level_Package_Body): New routine.
2656 (Insert_Action_After): New routine.
2657 (Is_Finalizable_Transient): New routine. This predicate determines
2658 whether an object declaration is one of the many variants of controlled
2660 (Is_Null_Access_BIP_Func_Call): New routine.
2661 (Is_Non_BIP_Func_Call): New routine.
2662 (Is_Related_To_Func_Return): New routine.
2663 (Needs_Finalization): Moved from Exp_Ch7.
2664 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2665 (Find_Protection_Type): Moved from Exp_Ch9.
2666 (Has_Controlled_Coextensions): Removed.
2667 (Has_Controlled_Objects): New routine.
2668 (In_Library_Level_Package_Body): New routine.
2669 (Insert_Action_After): New routine.
2670 (Is_Finalizable_Transient): New routine.
2671 (Is_Null_Access_BIP_Func_Call): New routine.
2672 (Is_Non_BIP_Func_Call): New routine.
2673 (Is_Related_To_Func_Return): New routine.
2674 (Needs_Finalization): Moved from Exp_ch7.
2675 * expander.adb (Expand): Add a case for N_Free_Statement.
2676 * freeze.adb (Freeze_All): Replace the generation of a finalization
2677 list with a collection for access-to-controlled types.
2678 (Freeze_Entity): Code reformatting.
2679 (Freeze_Record_Type): Remove the freezing of a record controller
2681 (Freeze_Subprogram): Code reformatting.
2682 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2684 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2685 has a library-level finalizer.
2686 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2687 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2688 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2689 files. Add a-fihema to the list of object files.
2691 Alphabetize the associations in type Is_Parameterless_Attribute.
2692 * rtsfind.ads: Ada.Finalization_List.Controller and
2693 System.Finalization_Implementation are no longer a GNAT unit.
2694 Update the range of type Ada_Finalization_Child. Remove the following
2695 recoverable entities:
2697 RE_Attach_To_Final_List
2701 RE_Finalizable_Ptr_Ptr
2702 RE_Global_Final_List
2703 RE_Limited_Record_Controller
2706 RE_Record_Controller
2707 RE_Simple_List_Controller
2709 Add the following recoverable entities:
2711 RE_Add_Offset_To_Address
2715 RE_Exception_Identity
2716 RE_Finalization_Collection
2717 RE_Finalization_Collection_Ptr
2718 RE_Needs_Finalization
2719 RE_Save_Library_Occurrence
2720 RE_Set_Finalize_Address_Ptr
2721 RE_Set_Storage_Pool_Ptr
2723 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2725 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2726 (First_Stored_Discriminant): Remove the mention of Name_uController.
2727 * sem_aux.ads: Comment reformatting.
2728 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2729 to redecorate an already existing class-wide type.
2730 (Decorate_Tagged_Type): New parameter profile and associated comment.
2731 Create a "shadow class-wide type" for a shadow entity.
2732 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2733 of the final chain along with the associated comment.
2734 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2735 Full_Desig and set it to the full view of the designated type.
2736 Initialize the finalization collection to empty.
2737 (Build_Derived_Record_Type): Alphabetize local variables. Code
2739 (Collect_Fixed_Components): Remove the mention of Name_uController.
2740 (Create_Constrained_Components): Remove the mention of Name_uController.
2741 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2742 class-wide type of a shadow entity.
2743 (Process_Full_View): Update the machinery which marks type
2744 Limited_Controlled's entity as limited.
2745 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2746 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2747 list, instead make a collection build-in-place formal.
2748 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2749 a designated type in order to establish a match between the renaming
2750 and the renamed entity.
2751 (Find_Selected_Component): Add guard to prevent spurious exceptions
2752 from being raised on .NET/JVM.
2753 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2754 to the list of primitive that need special processing. Update arrays
2755 C_Names and D_Names.
2756 (Replace_Types): Handle class-wide types.
2757 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2758 different parameter profile, look at the first formal.
2759 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2760 use clauses for Exp_Util.
2761 * sem_res.adb: Remove with and use clauses for Elists.
2762 (Propagate_Coextensions): Removed.
2763 (Resolve_Allocator): Do not propagate the list of coextensions from one
2764 allocator to another.
2765 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2766 Deaccessed_T to Desig_Typ.
2767 (Enter_Name): Remove the mention of Name_uController.
2768 (Gather_Components): Remove the mention of Name_uController.
2769 (Incomplete_Or_Private_View): New routine.
2770 (Is_Coextension_Root): Removed.
2771 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2772 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2773 (Is_Coextension_Root): Removed.
2774 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2775 Controlled types are now derived from a null tagged record. Remove
2776 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2777 * sinfo.adb (Coextensions): Removed.
2778 (Set_Coextensions): Removed.
2779 * sinfo.ads: Remove Coextensions from the explanation of node fields
2780 and its uses in nodes.
2781 Update the field usage of N_Allocator.
2782 (Coextensions): Removed along with its pragma Inline.
2783 (Set_Coextensions): Removed along with its pragma Inline.
2784 * snames.ads-tmpl: Remove names
2789 Name_uLocal_Final_List
2790 Name_Finalization_Root
2797 Name_Finalize_Address
2798 * s-pooglo.adb (Allocate): Add overriding indicator.
2799 (Deallocate): Add overriding indicator.
2800 (Storage_Size): Add overriding indicator.
2801 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2802 than Finalize_Global_List.
2803 (Null_Finalize_Global_List): Removed.
2804 (Save_Library_Occurrence): New routine.
2805 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2806 initialization. Add variable Finalize_Library_Objects along with its
2807 pragma Export. Add variables Library_Exception and
2808 Library_Exception_Set along with their pragma Export.
2809 (Null_Finalize_Global_List): Removed.
2810 (Save_Library_Occurrence): New routine.
2811 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2812 rather than Finalize_Global_List.
2813 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2814 of the constructed node.
2816 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2818 * link.c: Include "auto-host.h" before system headers.
2820 2011-08-03 Vincent Celier <celier@adacore.com>
2822 * make.adb (Gnatmake): Add to table Library_Projs only library projects
2823 that are not extended. Do not check if a library project that is
2824 extended should be regenerated. Do not add to table Library_Paths the
2825 libraries that are in extended projects. Link only with libraries that
2826 are in libray projects that are not extended.
2827 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
2828 for a library project that is extended.
2830 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2832 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
2833 conforming subprogram renamings that appear to be completions if they
2834 are not fully conformant.
2835 Such renamings are homographs but not completions.
2836 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
2837 names in a subprogram renaming that appears in an instance.
2839 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2841 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
2842 not immutably limited, build actual subtype from expression to provide
2843 proper bounds to caller.
2845 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2847 * sem_ch8.adb: Minor comment correction.
2849 2011-08-03 Thomas Quinot <quinot@adacore.com>
2851 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
2852 returning a limited array, use an extended return statement.
2854 2011-08-03 Vincent Celier <celier@adacore.com>
2856 * make.adb (Initialize): If --subdirs= is used, but no project file is
2857 specified, attempt to create the specify subdir if it does not already
2858 exist and use it as the object directory as if -D had been specified.
2860 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2862 * s-tpopsp-vms.adb: New file.
2863 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
2864 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
2866 2011-08-03 Emmanuel Briot <briot@adacore.com>
2868 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
2871 2011-08-03 Yannick Moy <moy@adacore.com>
2873 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
2874 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
2875 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
2876 detect that an array has static bounds.
2878 2011-08-03 Thomas Quinot <quinot@adacore.com>
2880 * exp_dist.adb: Minor reformatting.
2882 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2884 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
2885 (ATCB_Key): Removed, not always used.
2887 2011-08-03 Emmanuel Briot <briot@adacore.com>
2889 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
2890 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
2891 most remaining global variables.
2893 2011-08-03 Robert Dewar <dewar@adacore.com>
2895 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
2896 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
2899 2011-08-03 Javier Miranda <miranda@adacore.com>
2901 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
2902 that must be passed by copy in VM targets.
2904 2011-08-03 Emmanuel Briot <briot@adacore.com>
2906 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
2907 duplicates a similar htable now in the project tree.
2909 2011-08-03 Claire Dross <dross@adacore.com>
2911 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
2912 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
2913 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
2914 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
2915 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
2916 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
2917 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
2920 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2922 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
2923 (ATCB_Key): Removed, not always used.
2924 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
2926 * s-tpopsp-tls.adb: New file.
2927 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
2928 x86/x64/ia64/powerpc/sparc Linux.
2930 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2932 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
2933 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
2935 2011-08-03 Thomas Quinot <quinot@adacore.com>
2937 * rtsfind.ads, exp_dist.adb, exp_dist.ads
2938 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
2939 Fix type selection for mapping integer types to PolyORB types.
2941 2011-08-03 Bob Duff <duff@adacore.com>
2943 * sem_ch7.adb: Minor comment clarification.
2945 2011-08-03 Bob Duff <duff@adacore.com>
2947 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
2948 an error analyzing a choice, skip further processing. Further
2949 processing could cause a crash or cascade errors.
2951 2011-08-03 Emmanuel Briot <briot@adacore.com>
2953 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
2954 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
2955 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
2956 prj-env.ads (Shared_Project_Tree_Data): new type
2957 An aggregate project and its aggregated trees need to share the common
2958 data structures used for lists of strings, packages,... This makes the
2959 code simpler since otherwise we have to pass the root tree (also used
2960 for the configuration file data) in addition to the current project
2961 tree. This also avoids ambiguities as to which tree should be used.
2962 And finally this saves a bit of memory.
2963 (For_Every_Project_Imported): new parameter Tree.
2964 Since aggregated projects are using a different tree, we need to let
2965 the caller know which tree to use to manipulate the returned project.
2967 2011-08-03 Robert Dewar <dewar@adacore.com>
2969 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
2970 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
2971 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
2972 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
2974 2011-08-03 Javier Miranda <miranda@adacore.com>
2976 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
2977 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
2979 2011-08-03 Bob Duff <duff@adacore.com>
2981 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
2984 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
2986 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
2987 g-sehash.ads: Fix typo. Update header.
2989 2011-08-03 Thomas Quinot <quinot@adacore.com>
2991 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
2994 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2996 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
2997 prefixes of private types along with records, since the selector may be
2999 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3000 private types along with records, since the selector may be a
3003 2011-08-03 Emmanuel Briot <briot@adacore.com>
3005 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3007 2011-08-03 Javier Miranda <miranda@adacore.com>
3009 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3010 Tagged_Type_Expansion.
3012 2011-08-03 Yannick Moy <moy@adacore.com>
3015 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3016 concatenation is the name of a constant
3018 2011-08-03 Emmanuel Briot <briot@adacore.com>
3020 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3021 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3022 (Process_Declarative_Items): new parameter Child_Env.
3024 2011-08-03 Yannick Moy <moy@adacore.com>
3026 * alfa.ads Update format of ALFA section in ALI file in order to add a
3027 mapping from bodies to specs when both are present
3028 (ALFA_Scope_Record): add components for spec file/scope
3029 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3031 (Collect_ALFA): after all scopes have been collected, fill in the spec
3032 information when relevant
3033 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3036 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3038 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3039 code unit to decide whether to add internally generated subprograms.
3041 2011-08-03 Javier Miranda <miranda@adacore.com>
3043 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3045 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3048 2011-08-03 Emmanuel Briot <briot@adacore.com>
3050 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3051 code with Makeutl.Get_Switches.
3052 * prj-tree.adb: Update comment.
3054 2011-08-03 Thomas Quinot <quinot@adacore.com>
3056 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3057 subprogram with a limited formal that does not support external
3060 2011-08-03 Yannick Moy <moy@adacore.com>
3062 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3064 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3065 not from current unit in two phases, because it is not possible to
3066 change the table while iterating over its content.
3067 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3069 2011-08-03 Sergey Rybin <rybin@adacore.com>
3071 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3072 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3074 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3076 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3077 and the component type is composite, this is ambiguous for predefined
3078 concatenation, but if the node is not overloaded and the entity is a use
3079 -defined function its profile can be used to resolve that aggregate.
3081 2011-08-03 Robert Dewar <dewar@adacore.com>
3083 * exp_ch4.adb: Minor code cleanup.
3085 2011-08-03 Thomas Quinot <quinot@adacore.com>
3087 * exp_dist.adb: Do not generate distribution stubs if serious errors
3088 have been diagnosed.
3090 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3092 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3093 the first formal of a primitive operation, go to the base type to
3094 handle properly an access to a derived type with constrained
3096 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3097 user-defined function that is only use-visible.
3099 2011-08-03 Robert Dewar <dewar@adacore.com>
3101 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3102 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3103 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3104 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3105 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3106 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3107 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3108 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3110 2011-08-03 Robert Dewar <dewar@adacore.com>
3112 * repinfo.adb (List_Mechanism): Add handling of
3113 Convention_Ada_Pass_By_XXX.
3114 * sem_mech.adb (Set_Mechanism): Ditto.
3115 * sem_prag.adb (Process_Convention): Add entries for
3116 Convention_Ada_Pass_By_XXX.
3117 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3119 2011-08-03 Pascal Obry <obry@adacore.com>
3121 * makeutl.adb: Minor reformatting.
3123 2011-08-03 Vincent Celier <celier@adacore.com>
3126 (Get_File_Name) If the file cannot be found when there are no config
3127 pragmas file and May_Fail is True, return No_File instead of the file
3128 name, to be consistent.
3130 2011-08-03 Pascal Obry <obry@adacore.com>
3132 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3135 2011-08-03 Javier Miranda <miranda@adacore.com>
3138 (Same_Representation): In VM targets the representation of arrays with
3139 aliased components differs from arrays with non-aliased components.
3141 2011-08-03 Emmanuel Briot <briot@adacore.com>
3143 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3144 not systematically lower case attribute indexes that contain no "."
3145 Fix definition of several Naming attributes, which take
3146 a unit name as index and therefore should be case insensitive.
3147 Minor refactoring (reduce length of variable names).
3149 2011-08-03 Emmanuel Briot <briot@adacore.com>
3151 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3153 2011-08-03 Emmanuel Briot <briot@adacore.com>
3155 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3156 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3157 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3158 prj-tree.ads (Prj.Tree.Environment): new type.
3160 2011-08-03 Emmanuel Briot <briot@adacore.com>
3162 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3163 prj-tree.adb, prj-tree.ads (Environment): new type.
3165 2011-08-03 Emmanuel Briot <briot@adacore.com>
3167 * prj-tree.ads: Remove unused variable.
3169 2011-08-03 Yannick Moy <moy@adacore.com>
3171 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3172 issuing messages related to SPARK restriction violation.
3174 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3176 * sem_ch6.adb: guard against error nodes in return statements.
3178 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3180 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3181 a warning can only appear on a configuration file, so emit warning
3182 without further checks.
3184 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3186 * s-interr.ads: add overriding keyword.
3188 2011-08-03 Geert Bosch <bosch@adacore.com>
3190 * exp_attr.adb: Fix minor typo.
3192 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3194 * par-ch4.adb: improve error recovery.
3196 2011-08-03 Emmanuel Briot <briot@adacore.com>
3198 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3199 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3202 2011-08-03 Emmanuel Briot <briot@adacore.com>
3204 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3205 "external" as an attribute name in aggregate projects.
3207 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3209 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3210 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3211 from 0, so we need to adjust.
3213 2011-08-03 Emmanuel Briot <briot@adacore.com>
3215 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3216 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3218 2011-08-03 Yannick Moy <moy@adacore.com>
3220 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3221 restriction on overloaded entity if the entity is not an operator.
3223 2011-08-03 Yannick Moy <moy@adacore.com>
3225 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3226 restrict.ads: Rename remaining Check_Formal_Restriction* into
3227 Check_SPARK_Restriction*.
3229 2011-08-03 Emmanuel Briot <briot@adacore.com>
3231 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3232 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3234 (Project_Empty): removed
3235 (Empty_Project): new parameter Qualifier
3236 This is used to have fields specific to aggregate projects, cleaner
3237 New field to store the list of aggregated projects.
3238 (Check_Aggregate_Project): removed
3239 (Process_Aggregated_Projects, Free): new subprograms.
3241 2011-08-03 Olivier Hainque <hainque@adacore.com>
3243 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3245 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3247 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3248 explicit dereference of an unconstrained type, create a constrained
3249 subtype for it, as is done for function calls that return an
3252 2011-08-03 Thomas Quinot <quinot@adacore.com>
3254 * g-pehage.adb (Finalize): Avoid possible double-free.
3256 2011-08-03 Steve Baird <baird@adacore.com>
3258 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3259 Elab_Spec/Body attrs in CodePeer_Mode.
3261 2011-08-03 Javier Miranda <miranda@adacore.com>
3263 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3264 low bound is not known at compile time but they have no others choice.
3265 Done because in this case the bounds can be obtained directly from the
3268 2011-08-03 Ed Falis <falis@adacore.com>
3270 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3271 on VxWorks SMP. Remove unusable constant ANY_CPU.
3273 2011-08-03 Emmanuel Briot <briot@adacore.com>
3275 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3276 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3277 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3278 Prj.Env.Initialize_Empty): new subprograms
3279 (Get_Env, Find_Project): remove parameter Target_Name.
3281 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3283 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3284 as a condition for the delayed call to Derived_Subprograms done for the
3285 case of the rewriting of a derived type that constrains the
3286 discriminants of its parent type.
3287 Avoids redundant subprogram derivations for private subtype derivations.
3289 2011-08-03 Javier Miranda <miranda@adacore.com>
3291 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3292 Build_Record_Aggr_Code.
3293 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3294 discriminants in extension aggregates.
3296 2011-08-03 Emmanuel Briot <briot@adacore.com>
3298 * prj-pp.adb (Print): also output project qualifiers, since in
3299 particular "aggregate" is mandatory in an aggregate project.
3301 2011-08-03 Emmanuel Briot <briot@adacore.com>
3303 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3304 (Debug_Output): new function.
3306 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3308 * gnat_ugn.texi: Document -Wstack-usage.
3309 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3311 2011-08-03 Thomas Quinot <quinot@adacore.com>
3313 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3314 have keyword LIMITED.
3316 2011-08-03 Yannick Moy <moy@adacore.com>
3318 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3319 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3320 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3321 section (does not happen in compiler, only if code directly calls
3323 * get_alfa.adb, get_alfa.ads: New files.
3324 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3326 * lib-xref-alfa.adb: New file.
3327 * lib-xref.adb, lib-xref.ads
3328 (Xref_Entry): redefine information needed in cross-references for ALFA.
3329 Push ALFA treatments in separated local package.
3330 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3331 identifiers. Return entity of package body instead of spec. Return
3332 Empty for a scope with no location.
3333 (Generate_Reference): adapt to new components for ALFA information.
3334 Remove the need for D references on definitions.
3335 (Is_Local_Reference): moved to ALFA local package
3336 (Output_References): extract subfunction as Extract_Source_Name
3337 (Output_Local_References): remove procedure, replaced by filtering of
3338 cross-references in package ALFA and printing in Put_ALFA.
3339 (Write_Entity_Name): remove procedure
3340 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3341 print exact name of entity as it appears in source file
3342 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3343 * put_alfa.adb, put_alfa.ads: New files.
3344 * xref_lib.adb (Search_Xref): protect read of cross-references against
3345 reading other sections of the ALI file, in gnatxref
3346 (Search): protect read of cross-references against reading other
3347 sections of the ALI file, in gnatfind.
3348 * gcc-interface/Make-lang.in: Update dependencies.
3350 2011-08-03 Thomas Quinot <quinot@adacore.com>
3352 * sem_ch3.adb: Minor reformatting.
3354 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3356 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3357 raising an exception.
3359 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3361 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3362 type, always use 1 as the lower bound or string, even if lower bound of
3363 context is not static, to handle properly null strings in a non-static
3366 2011-08-03 Bob Duff <duff@adacore.com>
3368 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3369 always legal on the right-hand side of an assignment statement; there
3370 is always an applicable index constraint in this case. Therefore, the
3371 check for Pkind = N_Assignment_Statement is now unconditional -- it
3372 doesn't depend on whether Is_Constrained (Typ).
3374 2011-08-03 Robert Dewar <dewar@adacore.com>
3376 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3378 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3380 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3381 for an itype created within a generic unit.
3383 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3385 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3386 suppresses all inlining.
3388 2011-08-03 Robert Dewar <dewar@adacore.com>
3390 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3391 exp_aggr.adb: Minor reformatting.
3393 2011-08-03 Thomas Quinot <quinot@adacore.com>
3395 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3396 tagged assignment when discriminant checks are suppressed. This is
3397 useless and extremely costly in terms of static stack usage.
3399 2011-08-03 Bob Duff <duff@adacore.com>
3401 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3402 of generics, because this leads to the wrong entity in the wrong scope,
3403 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3405 (Process_Interface_Name): Follow Alias for instances of generics, to
3406 correct for the above change.
3408 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3410 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3411 is an integer literal it is always safe to replace the reference. In
3412 addition, if the reference appears in the generated code for an object
3413 declaration it is necessary to copy because otherwise the reference
3414 might be to the uninitilized value of the discriminant of the object
3417 2011-08-03 Pascal Obry <obry@adacore.com>
3419 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3420 ACL used, in this case we want to check for ending .exe, not .exe
3421 anywhere in the path.
3423 2011-08-03 Sergey Rybin <rybin@adacore.com>
3425 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3426 the tree structure (semantic decoration of references to record
3429 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3431 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3432 choices of a named array aggregate, bail out when any choices are
3433 marked as Errors_Posted.
3435 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3437 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3438 in which entity is frozen, to handle properly loop variables in
3441 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3443 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3444 subtype is not static, compute the upper bound using attributes, to
3445 handle properly index types that are not integer types.
3447 2011-08-03 Bob Duff <duff@adacore.com>
3449 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3450 Update copyright notice.
3452 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3454 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3455 Original_Discriminant if within an instance.
3456 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3458 2011-08-03 Thomas Quinot <quinot@adacore.com>
3460 * einfo.ads: Minor reformatting.
3462 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3464 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3465 composite type with an unfrozen subcomponent, in the profile of a
3466 primitive operation.
3468 2011-08-03 Robert Dewar <dewar@adacore.com>
3470 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3472 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3474 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3475 unconstrained type with discriminants is initialized with an aggregate,
3476 use the constrained subtype of the aggregate as the type of the object,
3477 because it is immutable, and this allows the back-end to generate no
3478 code for the object declaration.
3480 2011-08-03 Robert Dewar <dewar@adacore.com>
3482 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3483 comparison operand is variable, and turns out to be zero or negative.
3485 2011-08-03 Javier Miranda <miranda@adacore.com>
3488 (Expand_Dispatching_Constructor_Call): Disable expansion of
3489 code required for native targets. Done to avoid generating
3490 references to unavailable runtime entities in VM targets.
3492 (Expand_N_Object_Declaration): Add missing support to handle
3493 the explicit initialization of class-wide interface objects.
3496 2011-08-03 Matthew Heaney <heaney@adacore.com>
3498 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3500 2011-08-03 Matthew Heaney <heaney@adacore.com>
3502 * a-cbdlli.adb (Splice): move source items from first to last
3504 2011-08-03 Yannick Moy <moy@adacore.com>
3506 * sem_util.ads: comment added.
3508 2011-08-03 Javier Miranda <miranda@adacore.com>
3511 (Expand_Record_Aggregate): In VM targets disable the expansion into
3512 assignments of aggregates whose type is not known at compile time.
3514 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3516 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3517 protected entries and task entries, to build the proper renaming
3518 declaration for entry formals, used in debugging.
3519 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3520 parameters in the same way.
3522 2011-08-02 Robert Dewar <dewar@adacore.com>
3524 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3525 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3526 code reorganization.
3528 2011-08-02 Robert Dewar <dewar@adacore.com>
3530 * debug.adb: Debug flag d.P to suppress length comparison optimization
3531 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3532 comparison of Length by comparing First/Last instead.
3534 2011-08-02 Matthew Heaney <heaney@adacore.com>
3536 * a-cobove.ads: Code clean up.
3538 2011-08-02 Vincent Celier <celier@adacore.com>
3540 * adaint.c (file_names_case_sensitive_cache): New static int.
3541 (__gnat_get_file_names_case_sensitive): Cache the return value in
3542 file_names_case_sensitive_cache at the first invocation, to avoid
3543 multiple calls to getenv.
3545 2011-08-02 Bob Duff <duff@adacore.com>
3547 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3549 2011-08-02 Yannick Moy <moy@adacore.com>
3551 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3552 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3553 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3554 indicate that we are in a precondition or postcondition. This is used in
3555 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3556 decide whether to flag the spec or body of the current subprogram as
3559 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3561 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3563 * a-extiin.ads: New file.
3565 2011-08-02 Bob Duff <duff@adacore.com>
3567 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3568 now raises Name_Error instead of Use_Error in certain cases. The other
3569 parts of this AI were already implemented properly.
3571 2011-08-02 Vincent Celier <celier@adacore.com>
3573 * link.c: Only import "auto-host.h" when building the gnattools.
3575 2011-08-02 Yannick Moy <moy@adacore.com>
3577 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3578 which calls a local subprogram, so extract subprogram
3579 from Mark_Non_ALFA_Subprogram_Body.
3581 2011-08-02 Javier Miranda <miranda@adacore.com>
3584 (Extract_Dispatching_Call): If the type of the dispatching object is an
3585 access type then return an explicit dereference in the Object out-mode
3588 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3590 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3591 compatibility checks for all indexes of an array subtype, not just the
3592 first. Reset Has_Dynamic_Range_Check on the subtype before each
3593 potential check to ensure that Insert_Range_Checks will not elide any
3594 of the dynamic checks.
3596 2011-08-02 Yannick Moy <moy@adacore.com>
3598 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3599 SPARK restriction at parsing time.
3600 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3601 directive only if the SPARK restriction is set for this unit.
3603 2011-08-02 Yannick Moy <moy@adacore.com>
3605 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3606 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3607 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3608 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3609 Mark_Non_ALFA_Subprogram_Body.
3610 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3613 2011-08-02 Yannick Moy <moy@adacore.com>
3615 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3618 2011-08-02 Robert Dewar <dewar@adacore.com>
3620 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3621 exp_ch3.adb: Minor reformatting.
3623 2011-08-02 Emmanuel Briot <briot@adacore.com>
3625 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3626 files, not any regular file.
3627 (__gnat_locate_file_with_predicate): new subprogram.
3629 2011-08-02 Yannick Moy <moy@adacore.com>
3631 * sinfo.adb, sinfo.ads: Restrict the use of flags
3632 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3633 nodes, plus N_Subtype_Declaration for the 2nd one.
3635 2011-08-02 Sergey Rybin <rybin@adacore.com>
3637 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3638 - fix bugs in the description of Source_Trace;
3639 - get rid of UNIT_NAME;
3641 2011-08-02 Javier Miranda <miranda@adacore.com>
3644 (Build_Dispatching_Requeue): Adding support for VM targets
3645 since we cannot directly reference the Tag entity.
3646 * exp_sel.adb (Build_K): Adding support for VM targets.
3647 (Build_S_Assignment): Adding support for VM targets.
3649 (Default_Prim_Op_Position): In VM targets do not restrict availability
3650 of predefined interface primitives to compiling in Ada 2005 mode.
3651 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3652 restricted to compiling in Ada 2005 mode.
3653 (Make_VM_TSD): Generate code that declares and initializes the OSD
3654 record. Needed to support dispatching calls through synchronized
3657 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3658 primitives associated with synchronized interfaces.
3659 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3660 primitives associated with synchronized interfaces.
3662 2011-08-02 Yannick Moy <moy@adacore.com>
3664 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3665 statements hidden in SPARK if preceded by the HIDE directive
3666 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3667 exception handlers as hidden in SPARK if preceded by the HIDE directive
3668 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3669 if starting with the HIDE directive
3670 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3671 starting with the HIDE directive; mark the declarations in a private
3672 part as hidden in SPARK if the private part starts with the HIDE
3674 * restrict.adb, restrict.ads
3675 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3676 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3677 argument node belongs to a part which is hidden in SPARK
3678 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3679 parts in SPARK; protect the possibly costly call to
3680 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3681 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3682 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3683 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3685 (Scan): recognize special comment starting with '#' and followed by
3686 SPARK keyword "hide" as a HIDE directive.
3688 2011-08-02 Yannick Moy <moy@adacore.com>
3690 * types.ads, erroutc.ads: Minor reformatting.
3692 2011-08-02 Vincent Celier <celier@adacore.com>
3694 * link.c: Add response file support for cross platforms.
3696 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3698 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3699 in an association, set parent field of copy before partial analysis.
3700 * sem_res.adb (Resolve_Slice): create reference to itype only when
3701 expansion is enabled.
3703 2011-08-02 Yannick Moy <moy@adacore.com>
3705 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3706 for new flag denoting which subprogram bodies are in ALFA
3707 * restrict.adb, sem_ch7.adb: Update comment
3708 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3709 sem_ch9.adb, sem_res.adb: Add calls to
3710 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3711 * sem_ch6.adb (Analyze_Function_Return): add calls to
3712 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3713 middle of the body, and extended return.
3714 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3715 False when missing return.
3716 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3717 to True for subprograms whose spec is in ALFA. Remove later on the flag
3718 on the entity used for a subprogram body when there exists a separate
3720 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3721 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3722 False, otherwise do nothing.
3724 2011-08-02 Robert Dewar <dewar@adacore.com>
3726 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3728 2011-08-02 Yannick Moy <moy@adacore.com>
3730 * sem_ch4.ads: minor formatting.
3732 2011-08-02 Yannick Moy <moy@adacore.com>
3734 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3735 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3736 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3737 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3738 opt.ads: cleanup of SPARK mode
3740 2011-08-02 Yannick Moy <moy@adacore.com>
3742 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3744 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3745 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3747 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3748 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3749 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3750 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3752 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3754 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3755 functions whose return type is not in ALFA.
3756 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3758 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3759 parameter's type is not in ALFA.
3760 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3763 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3765 * sem_ch6 (Analyze_Expression_Function): treat the function as
3766 Inline_Always, and introduce a subprogram declaration for it when it is
3768 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3769 expression functions, so that the back-end can determine whether they
3770 can in fact be inlined.
3771 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3772 a function body comes from an expression function.
3774 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3776 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3777 null exclusions to test Can_Never_Be_Null on the anonymous access types
3778 of the formals rather than testing the formals themselves. Exclude this
3779 check in cases where the Old_Formal is marked as a controlling formal,
3780 to avoid issuing spurious errors for bodies completing dispatching
3781 operations (due to the flag not getting set on controlling access
3782 formals in body specs).
3783 (Find_Corresponding_Spec): When checking full and subtype conformance of
3784 subprogram bodies in instances, pass Designated and E in that order, for
3785 consistency with the expected order of the formals (New_Id followed by
3788 2011-08-02 Robert Dewar <dewar@adacore.com>
3790 * sem_ch8.adb: Minor reformatting.
3792 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3794 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3795 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3796 primitive operations of class-wide actuals.
3798 2011-08-02 Javier Miranda <miranda@adacore.com>
3800 * exp_atag.ads, exp_atag.adb
3801 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3802 since its value is implicitly passed in argument Typ.
3803 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3804 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3805 Build_Common_Dispatching_Select_Statements.
3807 2011-08-02 Robert Dewar <dewar@adacore.com>
3809 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3810 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3813 2011-08-02 Robert Dewar <dewar@adacore.com>
3815 * sem_res.adb: Minor reformatting.
3816 * sem_prag.adb: Minor reformatting.
3818 2011-08-02 Javier Miranda <miranda@adacore.com>
3820 * exp_atag.adb, exp_atags.ads
3821 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3822 by the tagged type Entity. Required to use this routine in the VM
3823 targets since we do not have available the Tag entity in the VM
3826 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3827 Ada.Tags has not been previously loaded.
3829 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3830 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3832 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3833 view of enclosing scopes. Required to handle enclosing scopes that
3834 are synchronized types whose full view is a task type.
3836 (Build_VM_TSDs): Minor code improvement to avoid generating and
3837 analyzing lists with empty nodes.
3838 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3839 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3840 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3841 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3842 (Make_Select_Specific_Data_Table): Add support for VM targets.
3843 (Make_VM_TSD): Generate code to initialize the SSD structure of
3846 2011-08-02 Yannick Moy <moy@adacore.com>
3848 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3849 cross-references section in ALI.
3850 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3851 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3853 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3854 subprogram or package entity of a node
3855 (Is_Local_Reference_Type): new function returns True for references
3856 selected in local cross-references.
3857 (Lt): function extracted from Lt in Output_References
3858 (Write_Entity_Name): function extracted from Output_References
3859 (Generate_Definition): generate reference with type 'D' for definition
3860 of objects (object declaration and parameter specification), with
3861 appropriate locations and units, for use in local cross-references.
3862 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3863 references of type 'I' for initialization in object definition.
3864 (Output_References): move part of function Lt and procedure
3865 Write_Entity_Name outside of the body. Ignore references of types 'D'
3866 and 'I' introduced for local cross-references.
3867 (Output_Local_References): new procedure to output the local
3868 cross-references sections.
3869 (Lref_Entity_Status): new array defining whether an entity is a local
3870 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3871 with 'I' type when initialization expression is present.
3872 * get_scos.adb, get_scos.ads: Correct comments and typos
3874 2011-08-02 Javier Miranda <miranda@adacore.com>
3876 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3878 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3880 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3883 2011-08-02 Vincent Celier <celier@adacore.com>
3885 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3886 (No_Space_Img): New function
3887 (Find_Excluded_Sources): When reading from a file, record the file name
3888 and the line number for each excluded source.
3889 (Mark_Excluded_Sources): When reporting an error, if the excluded
3890 sources were read from a file, include file name and line number in
3893 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3895 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
3897 2011-08-02 Robert Dewar <dewar@adacore.com>
3899 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
3901 2011-08-02 Javier Miranda <miranda@adacore.com>
3903 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
3904 generation of TSDs to the DOTNET compiler.
3905 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
3906 generation of TSDs to the DOTNET compiler.
3908 2011-08-02 Javier Miranda <miranda@adacore.com>
3910 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
3911 record of all the tagged types declared inside library level package
3912 declarations, library level package bodies or library level subprograms.
3913 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
3914 associated with a given tagged type.
3915 (Build_VM_TSDs): New subprogram.
3916 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
3917 compilation units that are subprograms.
3918 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
3919 compilation units that are package bodies.
3920 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
3921 units that are a package declaration or a package instantiation.
3922 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
3923 reorganization to improve the error generated by the frontend when the
3924 function Ada.Tags.Secondary_Tag is not available.
3925 * rtsfind.ads (RE_Register_TSD): New runtime entity.
3926 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
3928 2011-08-02 Javier Miranda <miranda@adacore.com>
3930 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
3932 2011-08-02 Robert Dewar <dewar@adacore.com>
3934 * s-imenne.ads: Minor reformatting.
3936 2011-08-02 Robert Dewar <dewar@adacore.com>
3938 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
3939 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
3940 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
3942 2011-08-02 Robert Dewar <dewar@adacore.com>
3944 * einfo.ads (Materialize_Entity): Document this is only for renamings
3945 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
3946 required debug information in the case where we transform the object
3947 declaration into a renaming declaration.
3948 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
3950 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
3953 2011-08-02 Robert Dewar <dewar@adacore.com>
3955 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
3956 Suppress_Init_Procs.
3957 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
3958 Suppress_Initialization/Initialization_Suppressed.
3959 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
3960 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
3961 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
3962 * sem_prag.adb: New processing for pragma Suppress_Initialization.
3964 2011-08-02 Robert Dewar <dewar@adacore.com>
3966 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
3969 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3971 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
3972 only have inheritable classwide pre/postconditions.
3974 2011-08-02 Javier Miranda <miranda@adacore.com>
3976 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
3977 * rtsfind.ads (RE_Check_TSD): New runtime entity.
3978 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
3979 checks if the external tag of a type is the same as the external tag
3980 of some other declaration.
3982 2011-08-02 Thomas Quinot <quinot@adacore.com>
3984 * s-taskin.ads: Minor reformatting.
3986 2011-08-02 Emmanuel Briot <briot@adacore.com>
3988 * g-comlin.adb (Display_Help): swap the order in which it prints the
3989 short help and the general usage.
3991 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3993 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
3994 the aspect declarations and attach them to the generic copy for
3995 subsequent analysis.
3996 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
3997 declarations of the generic tree to the new subprogram declarations.
3998 * sem_attr.adb (Check_Precondition_Postcondition): recognize
3999 conditions that apply to a subprogram instance.
4001 2011-08-02 Robert Dewar <dewar@adacore.com>
4003 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4007 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4008 private type with a tagged full view is not derived in the immediate
4009 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4011 2011-08-02 Robert Dewar <dewar@adacore.com>
4013 * exp_ch4.adb: Minor reformatting.
4015 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4017 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4018 Ada2012 iterator, the loop will be rewritten during expansion into a
4019 while loop with a cursor and an element declaration. Do not analyze the
4020 body in this case, because if the container is for indefinite types the
4021 actual subtype of the elements will only be determined when the cursor
4022 declaration is analyzed.
4024 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4026 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4027 size/alignment related attributes in CodePeer_Mode.
4029 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4031 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4032 Prepend_Element, since this can result in the operation getting the
4033 wrong slot in the full type's dispatch table if the full type has
4034 inherited operations. The incomplete type's operation will get added
4035 to the proper position in the full type's primitives
4036 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4037 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4038 dispatching operations, since there are cases where nonprimitive
4039 subprograms can get added to the list of incomplete dependents (such
4040 as subprograms in nested packages).
4041 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4042 private part when determining whether to add a primitive with a
4043 parameter of a tagged incomplete type to the Private_Dependents list.
4044 Such primitives can also occur in the visible part, and should not have
4045 been excluded from being private dependents.
4046 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4047 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4048 list of a Taft-amendment incomplete type is a primitive before issuing
4049 an error that the full type must appear in the same unit. There are
4050 cases where nonprimitives can be in the list (such as subprograms in
4052 * sem_disp.adb (Derives_From): Use correct condition for checking that
4053 a formal's type is derived from the type of the corresponding formal in
4054 the parent subprogram (the condition was completely wrong). Add
4055 checking that was missing for controlling result types being derived
4056 from the result type of the parent operation.
4058 2011-08-02 Yannick Moy <moy@adacore.com>
4060 * errout.adb (First_Node): minor renaming
4061 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4064 2011-08-02 Yannick Moy <moy@adacore.com>
4066 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4067 before accessing operands.
4068 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4069 decide whether an initialization expression respects SPARK rules, as
4070 the plain node is the expanded one. This allows for more valid warnings
4072 * gnat_rm.texi: Minor update.
4074 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4076 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4079 2011-08-02 Robert Dewar <dewar@adacore.com>
4081 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4083 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4085 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4086 loop statements and the element renaming declaration with a block when
4087 the element type is controlled.
4089 2011-08-02 Yannick Moy <moy@adacore.com>
4091 * sinfo.ads: Minor formatting.
4093 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4095 * sem_aggr.adb (Add_Association): if the association has a box and no
4096 expression, use the Sloc of the aggregate itself for the new
4098 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4101 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4103 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4104 When a container is provided via a function call, generate a renaming
4105 of the function result. This avoids the creation of a transient scope
4106 and the premature finalization of the container.
4107 * exp_ch7.adb (Is_Container_Cursor): Removed.
4108 (Wrap_Transient_Declaration): Remove the supression of the finalization
4109 of the list controller when the declaration denotes a container cursor,
4112 2011-08-02 Yannick Moy <moy@adacore.com>
4114 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4115 node is from source, instead of the original node being from source.
4117 (Resolve_Array_Aggregate): refine the check for a static expression, to
4118 recognize also static ranges
4119 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4120 Array_Type_Declaration): postpone the test for the type being a subtype
4121 mark after the type has been resolved, so that component-selection and
4122 expanded-name are discriminated.
4123 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4124 to distinguish the case of an iteration scheme, so that an error is
4125 issed on a non-static range in SPARK except in an iteration scheme.
4126 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4127 In_Iter_Schm = True.
4128 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4129 user-defined operators so that they are allowed in renaming
4131 (Find_Selected_Component): refine the check for prefixing of operators
4132 so that they are allowed in renaming. Move the checks for restrictions
4133 on selector name after analysis discriminated between
4134 component-selection and expanded-name.
4135 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4136 concatenation argument of string type if it is static.
4137 * sem_util.adb, sem_util.ads
4138 (Check_Later_Vs_Basic_Declarations): add a new function
4139 Is_Later_Declarative_Item to decice which declarations are allowed as
4140 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4141 mode, add that renamings are considered as later items.
4142 (Enclosing_Package): new function to return the enclosing package
4143 (Enter_Name): correct the rule for homonyms in SPARK
4144 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4145 from source (result of expansion) to avoid issuing wrong warnings.
4147 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4149 * errout.adb: On anything but an expression First_Node returns its
4152 2011-08-02 Pascal Obry <obry@adacore.com>
4154 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4156 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4158 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4159 Set the associated loop as the related expression of internally
4161 * exp_ch7.adb (Is_Container_Cursor): New routine.
4162 (Wrap_Transient_Declaration): Supress the finalization of the list
4163 controller when the declaration denotes a container cursor.
4165 2011-08-02 Yannick Moy <moy@adacore.com>
4167 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4169 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4170 expression is a simple expression. This check cannot be performed in
4171 the semantics, so just drop it.
4172 (P_Index_Or_Discriminant_Constraint): move check that the index or
4173 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4174 semantics. Other cases were previously checked in the semantics.
4175 * par-ch4.adb (P_Name): move checks that a selector name is not
4176 character literal or an operator symbol to Find_Selected_Component in
4178 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4179 declarations are not placed after later declarations in a separate
4180 procedure in Sem_Util (possibly not the best choice?), to be used both
4181 during parsing, for Ada 83 mode, and during semantic analysis, for
4183 * par-endh.adb (Check_End): move check that end label is not missing
4184 to Process_End_Label in the semantics
4185 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4186 the special case for SPARK restriction
4187 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4188 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4189 parameter Force to issue the error message even on internal node (used
4190 for generated end label). Call Check_Restriction to check when an error
4191 must be issued. In SPARK mode, issue an error message even if the
4192 restriction is not set.
4193 (Check_Restriction): new procedure with an additional out parameter to
4194 inform the caller that a message has been issued
4195 * sem_aggr.adb: Minor modification of message
4196 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4197 instead of issuing an error message directly
4198 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4199 declarations are not placed after later declarations, by calling
4200 Check_Later_Vs_Basic_Declarations
4201 (Analyze_Subtype_Declaration): move here the check that an index or
4202 discriminant constraint must be a subtype mark. Change the check that
4203 a subtype of String must start at one so that it works on subtype marks.
4204 * sem_ch4.adb (Analyze_Call): move here the check that a named
4205 association cannot follow a positional one in a call
4206 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4207 instead of issuing an error message directly
4208 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4209 selector name is not a character literal or an operator symbol. Move
4210 here the check that the prefix of an expanded name cannot be a
4211 subprogram or a loop statement.
4212 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4213 procedure called from parsing and semantics to check that basic
4214 declarations are not placed after later declarations
4215 (Process_End_Label): move here the check that end label is not missing
4217 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4219 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4220 representation clause in codepeer mode, since it confuses CodePeer and
4221 does not bring useful info.
4223 2011-08-02 Ed Falis <falis@adacore.com>
4225 * init.c: initialize fp hw on MILS.
4227 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4229 * errout.adb (First_Node): for bodies, return the node itself (small
4230 optimization). For other nodes, do not check source_unit if the node
4231 comes from Standard.
4233 2011-08-02 Robert Dewar <dewar@adacore.com>
4235 * exp_ch3.adb: Minor comment additions.
4236 * sem_ch13.adb: Minor reformatting.
4238 2011-08-02 Pascal Obry <obry@adacore.com>
4240 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4242 2011-08-02 Robert Dewar <dewar@adacore.com>
4244 * sem_attr.adb: Minor reformatting.
4246 2011-08-02 Robert Dewar <dewar@adacore.com>
4248 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4249 (Has_Default_Component_Value): Removed
4250 * einfo.ads Comment updates
4251 (Has_Default_Aspect): Replaces Has_Default_Value
4252 (Has_Default_Component_Value): Removed
4254 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4256 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4257 (Get_Simple_Init_Val): Handle Default_Value aspect
4258 (Needs_Simple_Initialization): Handle Default_Value aspect
4259 * exp_ch3.ads: Needs_Simple_Initialization
4260 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4261 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4263 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4264 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4265 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4267 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4269 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4270 package containing iteration primitives.
4271 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4273 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4275 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4276 "of", pre-analyze expression in case it is a function call with
4277 finalization actions that must be placed ahead of the loop.
4278 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4279 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4281 2011-08-02 Geert Bosch <bosch@adacore.com>
4283 * cstand.adb (Create_Float_Types): Only consider C's long double for
4284 Long_Long_Float, in addition to double.
4286 2011-08-02 Robert Dewar <dewar@adacore.com>
4288 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4289 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4290 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4293 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4295 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4298 2011-08-02 Javier Miranda <miranda@adacore.com>
4300 * einfo.ads, einfo.adb
4301 (Original_Access_Type): Move this attribute to Node26 since there was
4302 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4303 which causes conflicts and breaks the generation of the .NET compiler.
4304 (Interface_Name): Add missing documentation on JGNAT only uses of
4307 2011-08-02 Geert Bosch <bosch@adacore.com>
4309 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4310 (Find_Back_End_Float_Type): Likewise
4311 (Create_Back_End_Float_Types): Likewise
4312 (Create_Float_Types): Likewise
4313 (Register_Float_Type): Likewise
4314 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4315 Nlist and split out type selection in new local Find_Base_Type function.
4316 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4318 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4320 2011-08-02 Robert Dewar <dewar@adacore.com>
4322 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4324 * opt.ads: Minor comment change.
4325 * sem_ch12.adb: Minor code reorganization.
4327 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4329 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4330 subtype's list of rep items to the list on the full subtype in the case
4331 where the lists are the same.
4333 2011-08-02 Geert Bosch <bosch@adacore.com>
4335 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4336 using the one from System.Strings, which also deallocates all strings.
4338 2011-08-02 Geert Bosch <bosch@adacore.com>
4340 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4342 * gcc-interface/Make-lang.in: Update dependencies.
4344 2011-08-02 Olivier Hainque <hainque@adacore.com>
4346 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4349 2011-08-02 Javier Miranda <miranda@adacore.com>
4351 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4352 associated with anonymous access to subprograms.
4354 2011-08-02 Geert Bosch <bosch@adacore.com>
4357 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4358 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4359 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4360 (Add_Symbol_Definition): Move to switch-c.adb
4361 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4362 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4363 (Add_Symbol_Definition): Move to switch-c.adb.
4364 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4366 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4368 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4369 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4371 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4372 (Add_Symbol_Definition): Moved from Prepcomp.
4373 * switch-c.ads: Update copyright notice. Use String_List instead of
4374 Argument_List, removing dependency on System.OS_Lib.
4376 2011-08-02 Yannick Moy <moy@adacore.com>
4378 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4379 mode on initialization expression which does not respect SPARK
4381 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4382 if the tree referenced by its argument represents an initialization
4383 expression in SPARK, suitable for initializing an object in an object
4386 2011-08-02 Javier Miranda <miranda@adacore.com>
4388 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4389 internally generated access to subprogram with its associated protected
4391 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4393 2011-08-02 Geert Bosch <bosch@adacore.com>
4395 * cstand.adb (Register_Float_Type): Print information about type to
4396 register, if the Debug_Flag_Dot_B is set.
4397 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4398 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4399 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4400 with a requested precision of more than Max_Digits digits and no more
4401 than Max_Base_Digits digits, if a range specification is present and the
4402 Predefined_Float_Types list has a suitable type to derive from.
4403 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4404 case of type completion with pragma Import
4406 (Process_Import_Predefined_Type): Processing to complete a type
4407 with pragma Import. Currently supports floating point types only.
4408 (Set_Convention_From_Pragma): Do nothing without underlying type.
4409 (Process_Convention): Guard against absence of underlying type,
4410 which may happen when importing incomplete types.
4411 (Process_Import_Or_Interface): Handle case of importing predefined
4412 types. Tweak error message.
4414 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4416 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4417 functions to previous change. Reorganize code slightly.
4419 2011-08-02 Geert Bosch <bosch@adacore.com>
4421 * back_end.ads (Register_Type_Proc): New call back procedure type for
4422 allowing the back end to provide information about available types.
4423 (Register_Back_End_Types): New procedure to register back end types.
4424 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4426 * cstand.adb (Back_End_Float_Types): New list for floating point types
4427 supported by the back end.
4428 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4429 (Copy_Float_Type): New procedure to make new copies of predefined types.
4430 (Register_Float_Type): New call back procedure to populate the BEFT list
4431 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4432 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4433 (Create_Float_Types): New procedure to create entities for floating
4434 point types predefined in Standard, and put these and any remaining
4435 BEFTs on the Predefined_Float_Types list.
4436 * stand.ads (Predefined_Float_Types): New list for predefined floating
4437 point types that do not have declarations in package Standard.
4439 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4441 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4442 entity node for the unit containing the parameter.
4443 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4444 (Add_Inlined_Subprogram): Likewise.
4445 * gcc-interface/Make-lang.in: Update dependencies.
4447 2011-08-02 Thomas Quinot <quinot@adacore.com>
4449 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4452 2011-08-02 Geert Bosch <bosch@adacore.com>
4454 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4456 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4458 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4459 computed value of Base_Type.
4461 2011-08-02 Yannick Moy <moy@adacore.com>
4463 * restrict.adb (Check_Restriction): issue an error for any use of
4464 class-wide, even if the No_Dispatch restriction is not set.
4465 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4466 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4467 when completing a private extension, the type named in the private part
4468 is not the same as that named in the visible part.
4469 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4470 of an inherited primitive operations of a tagged type or type extension
4471 that returns the tagged type.
4472 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4473 function which returns True for an implicit operation inherited by the
4474 derived type declaration for the argument type.
4475 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4480 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4481 Process_Bounds, to perform analysis with expansion of a range or an
4482 expression that is the iteration scheme for a loop.
4483 (Analyze_Iterator_Specification): If domain of iteration is given by a
4484 function call with a controlled result, as is the case if call returns
4485 a predefined container, ensure that finalization actions are properly
4487 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4489 2011-08-02 Javier Miranda <miranda@adacore.com>
4491 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4492 * gcc-interface/Make-lang.in: Update dependencies.
4494 2011-08-02 Javier Miranda <miranda@adacore.com>
4496 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4497 determine if the analysis is performed using N or Original_Node (N).
4498 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4499 functionality of routine Is_Variable avoids code duplication.
4500 * checks.adb (Determine_Range): Handle temporaries generated by
4501 Remove_Side_Effects.
4503 2011-08-02 Javier Miranda <miranda@adacore.com>
4505 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4506 expansion of the condition. Required since the previous analysis was
4507 done with expansion disabled (see Resolve_Quantified_Expression) and
4508 hence checks were not inserted and record comparisons have not been
4511 2011-08-02 Ed Falis <falis@adacore.com>
4513 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4516 2011-08-02 Bob Duff <duff@adacore.com>
4518 * opt.ads: Minor comment fix.
4520 2011-08-02 Bob Duff <duff@adacore.com>
4522 * sem_ch12.adb (Analyze_Package_Instantiation,
4523 Analyze_Subprogram_Instantiation): Turn off style checking while
4524 analyzing an instance. Whatever style checks that apply to the generic
4525 unit should apply, so it makes no sense to apply them in an instance.
4526 This was causing trouble when compiling an instance of a runtime
4527 unit that violates the -gnatyO switch.
4528 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4529 one of the two case statements, causing spurious errors.
4531 2011-08-02 Robert Dewar <dewar@adacore.com>
4533 * uname.adb: Minor reformatting.
4534 * gnatcmd.adb: Minor reformatting.
4535 * exp_attr.adb: Minor reformatting.
4537 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4539 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4540 No_Dispatching_Calls, do not look for the Assign primitive, because
4541 predefined primitives are not created in this case.
4543 2011-08-02 Bob Duff <duff@adacore.com>
4545 * stylesw.ads: Minor comment fixes.
4547 2011-08-02 Robert Dewar <dewar@adacore.com>
4549 * freeze.adb (Add_To_Result): New procedure.
4551 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4553 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4554 time, if the specific run-time routines for handling streams of strings
4555 are not available, use the default mechanism.
4557 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4559 * s-regpat.ads: Fix typo.
4561 2011-08-02 Vincent Celier <celier@adacore.com>
4563 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4564 not null, call it to create the in memory config project file without
4565 parsing an existing default config project file.
4567 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4569 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4571 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4573 * sem_elim.adb: an abstract subprogram does not need an eliminate
4574 pragma for its descendant to be eliminable.
4576 2011-08-02 Ed Falis <falis@adacore.com>
4578 * init.c: revert to handling before previous checkin for VxWorks
4579 * s-intman-vxworks.adb: delete unnecessary declarations related to
4580 using Ada interrupt facilities for handling signals.
4581 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4582 * s-intman-vxworks.ads: Import __gnat_install_handler as
4583 Initialize_Interrupts.
4584 * s-taprop-vxworks.adb: Delete Signal_Mask.
4585 (Abort_Handler): change construction of mask to unblock exception
4588 2011-08-02 Jerome Guitton <guitton@adacore.com>
4590 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4591 Debug_Raise_Exception before propagation starts.
4593 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4595 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4596 to Restriction_Check_Required.
4597 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4598 * sem_res.adb (Resolve_Call): Likewise.
4599 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4601 2011-08-02 Bob Duff <duff@adacore.com>
4603 * stylesw.ads: Update comment.
4604 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4605 * errout.ads: Remove obsolete comment.
4607 2011-08-02 Javier Miranda <miranda@adacore.com>
4609 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4610 (Set_Is_Safe_To_Reevaluate): new procedure.
4611 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4612 assignment is allowed on safe-to-reevaluate variables.
4613 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4614 temporary created to remove side effects in expressions that use
4615 the secondary stack as safe-to-reevaluate.
4616 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4617 variables that are not true constants.
4619 2011-08-02 Robert Dewar <dewar@adacore.com>
4621 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4622 sem_res.adb, sem_ch6.adb: Minor reformatting.
4624 2011-08-02 Jerome Guitton <guitton@adacore.com>
4626 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4630 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4631 not set Overridden_Operation if subprogram is an initialization
4634 2011-08-02 Yannick Moy <moy@adacore.com>
4636 * par-ch6.adb: Correct obsolete name in comments
4637 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4638 which takes two message arguments (existing function takes one), with
4639 second message used for continuation.
4640 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4641 block statements that originate from a source block statement, not
4642 generated block statements
4643 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4644 symmetry with procedure case
4645 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4646 function to issue an error in formal mode if a package specification
4647 contains more than one tagged type or type extension.
4648 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4649 parameters matching formals of tagged types are objects (or ancestor
4650 type conversions of objects), not general expressions. Issue an error
4651 on view conversions that are not involving ancestor conversion of an
4653 (Resolve_Type_Conversion): in formal mode, issue an error on the
4654 operand of an ancestor type conversion which is not an object
4655 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4656 procedure so that it works also for actuals of function calls
4657 (Is_Actual_Tagged_Parameter): new function which determines if its
4658 argument is an actual parameter of a formal of tagged type in a
4660 (Is_SPARK_Object_Reference): new function which determines if the tree
4661 referenced by its argument represents an object in SPARK
4663 2011-08-02 Robert Dewar <dewar@adacore.com>
4665 * sem_ch3.adb: Minor reformatting
4666 Minor comment addition
4667 Minor error msg text change
4669 2011-08-02 Javier Miranda <miranda@adacore.com>
4671 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4672 function. Used to be more precise when we generate a variable plus one
4673 assignment to remove side effects in the evaluation of the Bound
4675 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4676 of the bound expression to force its re-analysis and thus expand the
4677 associated transient scope (if required). Code cleanup replacing the
4678 previous code that declared the constant entity by an invocation to
4679 routine Force_Evaluation which centralizes this work in the frontend.
4681 2011-08-02 Robert Dewar <dewar@adacore.com>
4683 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4684 (Base_Type): Now uses improved Is_Base_Type function
4685 * einfo.ads (Base_Type): Inline this function
4687 2011-08-02 Robert Dewar <dewar@adacore.com>
4689 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4690 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4692 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4694 * gcc-interface/Make-lang.in: Update dependencies.
4695 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4698 2011-08-02 Yannick Moy <moy@adacore.com>
4700 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4701 non-simple expression used in delta constraint
4702 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4703 index constraint which is not a subtype mark
4704 * par.adb: With and use Restrict
4705 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4706 mode on component type which is not a subtype mark and default
4707 expression on component
4708 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4709 of string which does not have a lower index bound equal to 1
4710 (Array_Type_Declaration): issue an error in formal mode on index or
4711 component type which is not a subtype mark, and on aliased keyword on
4713 (Derived_Type_Declaration): issue an error in formal mode on interface,
4714 limited or abstract type
4715 (Record_Type_Declaration): issue an error in formal mode on interface
4716 (Record_Type_Definition): issue an error in formal mode on tagged types
4717 and type extensions not declared in the specification of a library unit
4718 package; on null non-tagged record; on variant part
4720 2011-08-02 Vincent Celier <celier@adacore.com>
4722 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4723 not declared for qualified library project when Library_Name is not
4724 declared, but Library_Dir is.
4726 2011-08-02 Robert Dewar <dewar@adacore.com>
4728 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4729 pragmas (affects aspects [Component_]Default_Value
4730 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4731 component type for the resolution
4733 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4735 * einfo.adb (Base_Type): Tune implementation for speed.
4737 2011-08-02 Robert Dewar <dewar@adacore.com>
4739 * freeze.adb: Minor reformatting.
4741 2011-08-02 Thomas Quinot <quinot@adacore.com>
4743 * scos.ads: Update comments.
4745 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4747 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4748 base type, because the parent may be a subtype of a private type whose
4749 convention is established in a private part.
4751 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4753 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4754 statement in a block when the expansion of the return expression has
4755 created a finalization chain.
4756 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4757 with the parent node.
4758 Add N_Extended_Return_Statement to handle the case where a transient
4759 object declaration appears in the Return_Object_Declarations list of
4760 an extended return statement.
4762 2011-08-02 Matthew Gingell <gingell@adacore.com>
4764 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4765 unused parameter 'name'.
4767 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4769 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4770 inherited operation, check whether its alias, which is the source
4771 operastion that it renames, has been marked eliminated.
4773 2011-08-02 Javier Miranda <miranda@adacore.com>
4775 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4776 in-mode parameter whose type is an access type since it can be used to
4777 modify its designated object. Enforce code that handles as safe an
4778 access type that is not access-to-constant but it is the result of a
4779 previous removal of side-effects.
4780 (Remove_Side_Effects): Minor code reorganization of cases which require
4781 no action. Done to incorporate documentation on new cases uncovered
4782 working in this ticket: no action needed if this routine was invoked
4783 too early and the nodes are not yet decorated.
4784 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4785 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4786 were issued with actuals that are implicitly provided by
4789 2011-08-02 Robert Dewar <dewar@adacore.com>
4791 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4793 2011-08-02 Yannick Moy <moy@adacore.com>
4795 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4796 to issue an error in formal mode on attribute not supported in this mode
4797 (Analyze_Attribute): issue errors on standard attributes not supported
4799 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4800 comment, and issue error in formal mode on modulus which is not a power
4802 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4804 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4806 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4807 operator on modular type (except 'not').
4809 2011-08-02 Robert Dewar <dewar@adacore.com>
4811 * gnat_rm.texi: Minor reformatting.
4813 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4815 * s-osinte-linux.ads: Minor comment update and reformatting.
4816 * i-cexten.ads: Make this unit pure, as for its parent.
4817 Will allow its usage in more contexts if needed.
4819 2011-08-02 Robert Dewar <dewar@adacore.com>
4821 * s-utf_32.ads: Minor comment fix.
4823 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4825 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4826 operation of a tagged synchronized type, handle the case where the
4827 controlling argument is overloaded.
4829 2011-08-02 Yannick Moy <moy@adacore.com>
4831 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4832 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4833 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4834 SPARK mode and formal verification mode on processing SPARK restriction
4835 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4836 requiring consistency checking.
4838 2011-08-02 Robert Dewar <dewar@adacore.com>
4840 * sem_res.adb: Minor reformatting.
4842 2011-08-02 Robert Dewar <dewar@adacore.com>
4844 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4845 a-cforse.ads: Remove unneeded with of Ada.Containers
4846 Remove commented out pragma Inline's
4847 Move specifications of new subprograms to the actual specs
4849 2011-08-02 Yannick Moy <moy@adacore.com>
4851 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4852 a-cforse.ads: Update comments.
4854 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4856 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4858 2011-08-02 Robert Dewar <dewar@adacore.com>
4860 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4861 a-cforse.ads, a-cofove.ads: Minor reformatting.
4863 2011-08-02 Claire Dross <dross@adacore.com>
4865 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4866 a-cofove.ads: Add comments.
4868 2011-08-02 Yannick Moy <moy@adacore.com>
4870 * gnat_rm.texi: Document formal containers.
4872 2011-08-02 Emmanuel Briot <briot@adacore.com>
4874 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4877 2011-08-02 Robert Dewar <dewar@adacore.com>
4879 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4882 2011-08-02 Robert Dewar <dewar@adacore.com>
4884 * aspects.adb: New aspects Default_Value and Default_Component_Value
4885 New format of Aspect_Names table checks for omitted entries
4886 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4887 handling of boolean aspects for derived types.
4888 New aspects Default_Value and Default_Component_Value
4889 New format of Aspect_Names table checks for omitted entries
4890 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
4891 (Has_Default_Value): New flag
4892 (Has_Default_Component_Value): New flag
4893 (Has_Default_Value): New flag
4894 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
4896 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
4897 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
4898 Default_Value and Default_Component_Value
4899 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
4900 New aspects Default_Value and Default_Component_Value
4901 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
4902 * sprint.adb: Print N_Aspect_Specification node when called from gdb
4904 2011-08-02 Vincent Celier <celier@adacore.com>
4906 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
4907 inherit library kind.
4909 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4911 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
4914 2011-08-02 Robert Dewar <dewar@adacore.com>
4916 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
4918 2011-08-02 Yannick Moy <moy@adacore.com>
4920 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
4922 2011-08-02 Robert Dewar <dewar@adacore.com>
4924 * impunit.adb: Add comment.
4926 2011-08-02 Yannick Moy <moy@adacore.com>
4928 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
4929 qualification of aggregates in formal mode
4930 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
4932 (Resolve_Aggregate): complete the test that an aggregate is adequately
4933 qualified in formal mode
4935 2011-08-02 Pascal Obry <obry@adacore.com>
4937 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
4938 * mlib-prj.adb: Supress warning when compiling binder generated file.
4939 (Build_Library): Supress all warnings when compiling the binder
4942 2011-08-02 Yannick Moy <moy@adacore.com>
4944 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
4946 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
4947 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
4948 Add with/use clauses to make Check_Formal_Restriction visible
4950 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4952 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
4953 in-parameters when type of the generic formal is private in the generic
4954 spec and non-private in the body.
4956 2011-08-02 Claire Dross <dross@adacore.com>
4958 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
4959 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
4960 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
4961 * impunit.adb, Makefile.rtl: Take new files into account.
4963 2011-08-02 Robert Dewar <dewar@adacore.com>
4965 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
4966 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4968 2011-08-02 Yannick Moy <moy@adacore.com>
4970 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
4972 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
4973 matching static array bounds, taking into account the special case of
4975 * sem_ch3.adb: Typo in comment.
4977 2011-08-02 Yannick Moy <moy@adacore.com>
4979 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
4980 which issues an error in formal mode if its argument node is originally
4982 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
4983 has a discriminant specification so that it does not include the case
4985 (Derived_Type_Declaration): move here the test that a derived type has a
4986 discriminant specification
4987 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
4988 first element of a component association before accessing its choices
4989 (presence of component association is not enough)
4990 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
4991 declaration is a library item before accessing the next element in a
4992 list, as library items are not member of lists
4993 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
4994 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
4995 Check_Formal_Restriction whenever possible.
4997 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4999 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5000 reference when needed.
5002 2011-08-02 Bob Duff <duff@adacore.com>
5004 * gnat_ugn.texi: Fix typo.
5006 2011-08-02 Vincent Celier <celier@adacore.com>
5008 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5009 archive file name. Do not use the full path name of archives for Open
5012 2011-08-02 Robert Dewar <dewar@adacore.com>
5014 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5015 Analyze_Aspect_Specifications
5017 (Analyze_Aspect_Specifications): New handling for boolean aspects
5018 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5019 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5020 sequence for Analyze_Aspect_Specifications
5021 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5022 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5024 2011-08-02 Robert Dewar <dewar@adacore.com>
5026 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5027 aspects, since these no longer exist.
5029 2011-08-02 Robert Dewar <dewar@adacore.com>
5031 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5032 semicolon, do not try to see if there are aspects following it.
5033 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5036 2011-08-02 Robert Dewar <dewar@adacore.com>
5038 * sem_ch8.adb, aspects.ads: Minor reformatting.
5040 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5042 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5043 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5045 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5047 2011-08-02 Yannick Moy <moy@adacore.com>
5049 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5050 mode on subprogram declaration outside of package specification, unless
5051 it is followed by a pragma Import
5052 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5053 Access_Type_Declaration): issue error in formal mode on access type
5054 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5056 (Analyze_Object_Declaration): issue error in formal mode on object
5057 declaration which does not respect SPARK restrictions
5058 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5059 declaration which does not respect SPARK restrictions
5060 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5061 error in formal mode on digits or delta constraint
5062 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5063 decimal fixed point type
5064 (Derived_Type_Declaration): issue error in formal mode on derived type
5065 other than type extensions of tagged record types
5066 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5067 with check on access definition
5068 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5069 mode on protected definition.
5070 (Analyze_Task_Definition): issue error in formal mode on task definition
5072 2011-08-02 Robert Dewar <dewar@adacore.com>
5074 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5076 2011-08-02 Javier Miranda <miranda@adacore.com>
5078 * sem_ch6.adb (Can_Override_Operator): New function.
5079 (Verify_Overriding_Indicator): Add missing code to check overriding
5080 indicator in operators. Fixes regression.
5081 (Check_Overriding_Indicator): Minor reformating after replacing the
5082 code that evaluates if the subprogram can override an operator by
5083 invocations to the above new function.
5085 (Write_Field26_Name): Add missing code to ensure that, following
5086 the documentation in einfo.ads, this field is not shown as attribute
5087 "Static_Initialization" on non-dispatching functions.
5089 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5091 * sem_res.adb (Resolve_Call): A call to
5092 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5093 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5094 i.e., when the second parameter is of type Time_Span.
5096 2011-08-02 Vincent Celier <celier@adacore.com>
5098 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5099 with an archive instead of -L<library dir> -l<library name>.
5101 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5103 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5104 mark the base types In_Use in addition to making the operations
5107 2011-08-02 Ed Falis <falis@adacore.com>
5109 * init.c: add and setup __gnat_signal_mask for the exception signals
5110 * s-inmaop-vxworks.adb: new file.
5111 * s-intman-vxworks.adb: remove unnecessary initializations and
5113 * s-intman-vxworks.ads: remove unnecessary variable
5114 * s-taprop-vxworks.adb: simplify signal initialization
5116 2011-08-02 Robert Dewar <dewar@adacore.com>
5118 * sem_ch8.adb: Minor code reorganization, comment updates.
5120 2011-08-02 Robert Dewar <dewar@adacore.com>
5122 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5123 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5125 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5126 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5128 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5130 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5131 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5132 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5133 use_type_clauses, to handle more efficiently use_type and use_all_type
5135 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5136 Ada2012 Use_All_Type clause.
5137 (Use_Class_Wide_Operations): new procedure.
5139 2011-08-02 Robert Dewar <dewar@adacore.com>
5141 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5142 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5143 expression to expression function.
5145 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5147 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5148 if types are compatible.
5150 2011-08-02 Yannick Moy <moy@adacore.com>
5152 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5153 returns True if its argument array types have same dimension and same
5154 static bounds at each index.
5155 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5156 OUT or IN OUT paramaters which are not view conversions in SPARK.
5157 (Resolve_Arithmetic_Op): issue an error in formal mode on
5158 multiplication or division with operands of fixed point types which are
5159 not qualified or explicitly converted.
5160 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5161 Boolean or array type (except String) operands.
5162 (Resolve_Equality_Op): issue an error in formal mode on equality
5163 operators for array types other than String with non-matching static
5165 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5166 for array types with non-matching static bounds. Factorize the code in
5167 Matching_Static_Array_Bounds.
5168 (Resolve_Qualified_Expression): issue an error in formal mode on
5169 qualified expressions for array types with non-matching static bounds.
5170 (Resolve_Type_Conversion): issue an error in formal mode on type
5171 conversion for array types with non-matching static bounds
5173 2011-08-02 Robert Dewar <dewar@adacore.com>
5175 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5177 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5179 * par-ch9.adb: save location of entry for proper error message.
5181 2011-08-02 Javier Miranda <miranda@adacore.com>
5183 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5184 (Use_Full_View) which permits this routine to climb through the
5185 ancestors using the full-view of private parents.
5186 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5187 Use_Full_View to true in calls to Is_Ancestor.
5188 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5189 true in call to Is_Ancestor.
5190 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5191 Use_Full_View to true in call to Is_Ancestor.
5192 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5193 call to Is_Ancestor.
5194 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5195 Use_Full_View to true in calls to Is_Ancestor.
5196 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5197 Make_Select_Specific_Data_Table, Register_Primitive,
5198 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5199 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5200 to true in call to Is_Ancestor.
5201 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5202 Use_Full_View to true in calls to Is_Ancestor.
5204 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5205 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5207 2011-08-02 Robert Dewar <dewar@adacore.com>
5209 * gnat_rm.texi: Minor reformatting.
5210 * sem_prag.adb: Minor reformatting.
5212 2011-08-02 Tristan Gingold <gingold@adacore.com>
5214 * vms_data.ads: Add VMS qualifier for -gnateP.
5216 2011-08-02 Robert Dewar <dewar@adacore.com>
5218 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5219 * par-ch7.adb (P_Package): Proper placement of aspects for package
5221 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5222 (End_Statements): Add Is_Sloc parameterr
5223 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5224 (Check_End): Ad Is_Sloc parameter
5225 (End_Statements): Add Is_Sloc parameterr
5227 2011-08-02 Vincent Celier <celier@adacore.com>
5229 * ug_words: Add VMS qualifier equivalent to -gnateP:
5230 /SYMBOL_PREPROCESSING.
5232 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5234 * gnat-style.texi: For hexadecimal numeric literals the typical
5235 grouping of digits is 4 to represent 2 bytes.
5236 A procedure spec which is split into several lines is indented two
5239 2011-08-02 Yannick Moy <moy@adacore.com>
5241 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5242 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5243 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5245 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5246 choice in array aggregate
5247 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5249 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5250 positional and named aggregate for record, or others in record
5251 aggregate, or multiple choice in record aggregate
5252 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5253 array operands to logical operations AND, OR and XOR do not have the
5254 same static lower and higher bounds
5255 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5257 2011-08-01 Robert Dewar <dewar@adacore.com>
5259 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5260 Replaces Last_Source_Node_In_Sequence.
5261 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5262 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5263 parens and blank in string (this was inconsistently implemented).
5265 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5266 blank in string (this was inconsistently implemented).
5268 (Set_Global_Switches): Set formal mode switches appropriately
5269 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5271 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5272 call Set_Error_Msg_Lang to set "spark" as language name.
5273 * par.adb: Remove unnecessary call to set formal language for errout
5274 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5275 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5277 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5278 calls to it, moved after resolution so that types are known
5279 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5280 result of concatenation is not of type String
5281 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5282 concatenation is not properly restricted
5283 * gnat_rm.texi: Add doc on pragma Spark_95.
5284 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5285 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5286 * gcc-interface/Make-lang.in: Update dependencies.
5288 2011-08-01 Javier Miranda <miranda@adacore.com>
5290 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5291 condition that detects if the overridden operation must replace an
5294 2011-08-01 Javier Miranda <miranda@adacore.com>
5296 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5297 code declarations inserted by Insert_Actions in each alternative of the
5298 N_Case_Expression node.
5300 2011-08-01 Robert Dewar <dewar@adacore.com>
5302 * sem_ch6.adb: Minor code reorganization.
5303 * sem_util.adb: Minor reformatting.
5305 2011-08-01 Pascal Obry <obry@adacore.com>
5307 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5308 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5310 2011-08-01 Yannick Moy <moy@adacore.com>
5312 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5313 literal or operator symbol which is prefixed
5314 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5315 mode on access attributes.
5316 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5317 that concatenation operands are properly restricted in formal mode
5318 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5319 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5320 result of the concatenation has a type different from String.
5321 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5322 Analyze_Quantified_Expression, Analyze_Slice,
5323 Analyze_Null): issue an error in formal mode on unsupported constructs
5325 (Analyze_Block_Statement): only issue error on source block statement
5326 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5327 function which returns the last node in a list of nodes for which
5328 Comes_From_Source returns True, if any
5329 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5330 Last_Source_Node_In_Sequence
5331 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5332 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5333 mode on unsupported constructs
5334 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5335 rest of the actions may be needed later on since the error is marked as
5337 * sinfo.ads: Typos in comments.
5339 2011-08-01 Pascal Obry <obry@adacore.com>
5341 * projects.texi: Minor editing.
5343 2011-08-01 Yannick Moy <moy@adacore.com>
5345 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5346 insertion character ~~
5347 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5348 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5349 with insertion character ~~
5350 (Set_Msg_Text): treat insertion character ~~
5351 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5352 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5353 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5354 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5355 errors related to the formal language restriction not serious
5356 (insertion character |).
5357 * par.adb (Par): set formal language for error messages if needed
5358 * sem_ch6.adb (Check_Missing_Return): take into account possible
5359 generated statements at the end of the function
5360 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5361 enumeration value to define a new pragma SPARK_95
5362 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5363 SPARK_Version): new type and variables to store the SPARK version
5365 (SPARK_Mode): return True when SPARK_Version is set
5366 * par-prag.adb: Correct indentation
5367 (Prag): take Pragma_SPARK_95 into account
5368 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5371 2011-08-01 Robert Dewar <dewar@adacore.com>
5373 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5374 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5375 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5377 2011-08-01 Pascal Obry <obry@adacore.com>
5379 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5380 Target_Name to Get_Path call.
5381 (Parse_Single_Project): Likewise.
5382 (Post_Parse_Context_Clause): Likewise.
5383 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5384 Call Initialise_Project_Path with the proper Target_Name.
5385 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5387 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5388 with the proper Target_Name.
5389 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5391 (Parse_Project_And_Apply_Config): Likewise.
5392 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5393 This is fine as this part of the code is supporting only native
5395 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5396 is fine as this part of the code is supporting only native compilation.
5398 2011-08-01 Yannick Moy <moy@adacore.com>
5400 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5401 of homonym, unless the homonym is one of the cases allowed in SPARK
5402 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5403 package declaration occurring after a body.
5405 2011-08-01 Robert Dewar <dewar@adacore.com>
5407 * checks.adb, exp_ch4.adb: Minor reformatting.
5409 2011-08-01 Javier Miranda <miranda@adacore.com>
5411 * einfo.ads (Access_Disp_Table): Fix documentation.
5412 (Dispatch_Table_Wrappers): Fix documentation.
5414 2011-08-01 Pascal Obry <obry@adacore.com>
5416 * prj-env.adb, prj-env.ads: Minor reformatting.
5418 2011-08-01 Yannick Moy <moy@adacore.com>
5420 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5421 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5422 procedures out of these packages.
5423 * errout.ads, errout.adb
5424 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5425 procedures in of this package
5426 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5427 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5428 on misplaced later vs initial declarations, like in Ada 83
5429 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5430 formal mode on attribute of private type whose full type declaration
5432 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5433 package declaration inside a package specification
5434 (Analyze_Full_Type_Declaration): issue error in formal mode on
5435 controlled type or discriminant type
5436 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5437 user-defined operator means that it should come from the source
5438 (New_Overloaded_Entity): issue error in formal mode on overloaded
5440 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5442 2011-08-01 Thomas Quinot <quinot@adacore.com>
5444 * atree.adb: Minor reformatting.
5445 * checks.adb: Minor reformatting.
5447 2011-08-01 Vincent Celier <celier@adacore.com>
5449 * s-parame-vms-ia64.ads: Fix typo in comment
5451 * s-parame-vms-restrict.ads: Removed, unused.
5453 2011-08-01 Javier Miranda <miranda@adacore.com>
5456 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5458 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5459 * sem_ch3.ads, sem_ch3.adb
5460 (Is_Constant_Bound): New extended version of the subprogram that was
5461 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5462 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5463 * sem_aux.ads (Constant_Value): Fix typo in comment.
5464 * checks.adb (Generate_Index_Checks): New implementation which, for
5465 array objects with constant bounds, generates the runtime check
5466 referencing the bounds of the array type. For other cases this routine
5467 provides its previous behavior obtaining such values from the array
5469 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5471 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5472 we cannot have semantic interpretations of the new node.
5474 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5476 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5479 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5481 * sem_ch8.adb: Minor code editing.
5482 * s-vxwext.adb: Remove trailing space.
5483 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5484 consistency with other files.
5486 2011-08-01 Thomas Quinot <quinot@adacore.com>
5488 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5490 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5492 * par-ch10.adb: reject parameterized expressions as compilation unit.
5493 * sem_ch4.adb: handle properly conditional expression with overloaded
5494 then_clause and no else_clause.
5496 2011-08-01 Tristan Gingold <gingold@adacore.com>
5498 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5499 like done by System.Aux_DEC.
5500 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5502 2011-08-01 Yannick Moy <moy@adacore.com>
5504 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5505 missing label at end of declaration (subprogram or package)
5506 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5507 of positional and named parameter association
5508 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5509 Error_Msg_SP which adds a prefix to the error message giving the name
5510 of the formal language analyzed
5511 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5512 access result type in subprogram, unconstrained array as result type,.
5513 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5515 * sem_ch8.adb: Code clean up.
5517 2011-08-01 Javier Miranda <miranda@adacore.com>
5519 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5520 * einfo.ads (Access_Disp_Table): Fix documentation.
5521 (Dispatch_Table_Wrappers): Fix documentation.
5522 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5523 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5524 to enforce the documentation of this attribute.
5525 (Set_Is_Interface): Cleanup the assertion.
5526 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5527 the Underlying_Type entity before reading attribute Access_Disp_Table.
5528 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5529 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5530 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5531 the Underlying_Type entity before reading attribute Access_Disp_Table.
5532 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5533 Locate the Underlying_Type entity before reading attribute
5536 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5538 * s-poosiz.ads: Additional overriding indicators.
5540 2011-08-01 Yannick Moy <moy@adacore.com>
5542 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5544 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5545 parameter specification does not include a subtype mark.
5546 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5547 formal mode on abstract subprogram.
5548 (Analyze_Subprogram_Specification): issue error in formal mode on
5549 user-defined operator.
5550 (Process_Formals): issue error in formal mode on access parameter and
5552 * sem_ch9.adb (Analyze_Abort_Statement,
5553 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5554 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5555 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5556 Analyze_Requeue, Analyze_Selective_Accept,
5557 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5558 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5559 issue error in formal mode on user-defined raise statement.
5561 2011-08-01 Thomas Quinot <quinot@adacore.com>
5563 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5564 declaration being hidden when overriding an implicit inherited
5566 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5567 (-gnats), do not complain about a source file that contains only a
5570 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5572 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5573 variable if already set.
5575 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5577 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5578 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5579 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5580 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5581 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5582 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5583 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5584 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5585 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5586 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5587 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5588 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5589 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5590 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5591 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5592 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5593 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5594 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5595 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5596 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5597 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5598 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5599 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5600 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5601 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5602 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5603 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5604 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5605 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5606 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5607 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5608 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5609 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5610 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5611 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5612 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5613 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5614 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5615 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5616 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5617 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5618 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5619 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5620 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5621 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5622 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5623 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5624 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5625 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5626 Use GNAT instead of GNARL.
5628 2011-08-01 Bob Duff <duff@adacore.com>
5630 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5631 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5632 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5635 2011-08-01 Yannick Moy <moy@adacore.com>
5637 * debug.adb (d.D) reverve flag for the SPARK mode
5638 (d.E) reverve flag for SPARK generation mode
5639 (d.F) reverve flag for Why generation mode
5640 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5641 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5642 functions which return True when the corresponding modes are set
5643 (Formal_Language): return "spark" or "alfa" when in formal verification
5645 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5646 Error_Msg to prefix the error message with a tag giving the formal
5648 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5649 message with a tag giving the formal language
5650 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5652 (Analyze_Case_Statement): issue error in formal mode on case statement
5653 with a single "others" case alternative
5654 (Analyze_Exit_Statement): issue errors in formal mode on exit
5655 statements which do not respect SPARK restrictions
5656 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5657 (Check_Unreachable_Code): always issue an error (not a warning) in
5658 formal mode on unreachable code (concerns both code after an infinite
5659 loop and after an unconditional jump, both not allowed in SPARK)
5660 * sem_ch6.adb (Analyze_Return_Statement): add call to
5661 Set_Return_Present for a procedure containing a return statement
5662 (already done for functions in Analyze_Function_Return)
5663 (Analyze_Function_Return): issue error in formal mode on extended
5664 return or if return is not last statement in function
5665 (Check_Missing_Return): issue error in formal mode if function does
5666 not end with return or if procedure contains a return
5667 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5668 function to detect if there is an inner scope of its parameter S which
5671 2011-08-01 Thomas Quinot <quinot@adacore.com>
5673 * sem_ch6.ads: Minor reformatting.
5675 2011-08-01 Javier Miranda <miranda@adacore.com>
5677 * sem_util.adb (Abstract_Interface_List): Complete condition when
5678 processing private type declarations to avoid reading unavailable
5680 (Is_Synchronized_Tagged_Type): Complete condition when processing
5681 private extension declaration nodes to avoid reading unavailable
5684 2011-08-01 Thomas Quinot <quinot@adacore.com>
5686 * sem_ch3.adb: Minor reformatting.
5688 2011-08-01 Thomas Quinot <quinot@adacore.com>
5690 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5691 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5692 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5693 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5694 for VMS, instead parametrize the common implementation with
5695 System.Parameters declarations.
5697 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5699 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5701 2011-08-01 Tristan Gingold <gingold@adacore.com>
5703 * seh_init.c: Fix SEH handler installation on win64.
5705 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5707 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5708 double analysis of an anonymous access to subprogram, because it can
5709 lead to improper sharing of profiles and a back-end crash.
5711 2011-08-01 Robert Dewar <dewar@adacore.com>
5713 * make.adb, sem_ch4.adb: Minor reformatting.
5714 * gcc-interface/Make-lang.in: Update dependencies.
5715 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5717 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5719 * gnat_rm.texi: Fix definition of Long_Integer.
5721 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5723 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5724 to prevent storage exhaustion.
5725 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5726 finalized is a function body, insert the cleanup code before the final
5727 return statement, to prevent spurious warnings.
5728 * s-pooglo.ads: add overriding indicator.
5730 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5732 * sem_ch4.adb (Operator_Check): improve error message when both a
5733 with_clause and a use_clause are needed to make operator usage legal.
5734 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5735 determine whether a compilation unit is visible within an other,
5736 either through a with_clause in the current unit, or a with_clause in
5737 its library unit or one one of its parents.
5739 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5741 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5742 over an arbitrary expression of an array or container type.
5743 * lib-xref.adb: clarify comment.
5745 2011-08-01 Bob Duff <duff@adacore.com>
5747 * einfo.ads: Minor reformatting.
5748 * debug.adb: Minor comment improvement.
5750 2011-08-01 Javier Miranda <miranda@adacore.com>
5752 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5753 consider hidden subprograms as valid candidates.
5755 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5757 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5759 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5761 * gnat_ugn.texi: Fix typo.
5763 2011-08-01 Robert Dewar <dewar@adacore.com>
5765 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5766 lib-xref.adb: Minor reformatting
5768 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5770 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5771 when to generate a call to Move_Final_List.
5772 (Has_Controlled_Parts): Remove this function.
5774 2011-08-01 Geert Bosch <bosch@adacore.com>
5776 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5779 2011-08-01 Thomas Quinot <quinot@adacore.com>
5781 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5782 explicit raise of a predefined exception as Comes_From_Source if the
5783 original N_Raise_Statement comes from source.
5785 2011-08-01 Robert Dewar <dewar@adacore.com>
5787 * sinfo.ads: Add comment.
5788 * sem_ch6.adb: Minor reformatting.
5790 2011-08-01 Robert Dewar <dewar@adacore.com>
5792 * freeze.adb (Freeze_Entity): Refine check for bad component size
5793 clause to avoid rejecting confirming clause when atomic/aliased present.
5795 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5797 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5798 better determine whether an entity reference is a write.
5799 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5801 * lib-xref.adb (Output_References): Do no suppress a read reference at
5802 the same location as an immediately preceeding modify-reference, to
5803 handle properly in-out actuals.
5805 2011-08-01 Tristan Gingold <gingold@adacore.com>
5807 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5809 2011-08-01 Quentin Ochem <ochem@adacore.com>
5811 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5812 heap to compute the result.
5814 2011-08-01 Robert Dewar <dewar@adacore.com>
5816 * atree.ads: Minor reformatting.
5818 2011-08-01 Emmanuel Briot <briot@adacore.com>
5820 * g-expect.adb (Get_Command_Output): Fix memory leak.
5822 2011-08-01 Geert Bosch <bosch@adacore.com>
5824 * cstand.adb (P_Float_Type): New procedure to print the definition of
5825 predefined fpt types.
5826 (P_Mixed_Name): New procedure to print a name using mixed case
5827 (Print_Standard): Use P_Float_Type for printing floating point types
5828 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5829 precision IEEE float.
5831 2011-08-01 Thomas Quinot <quinot@adacore.com>
5833 * sem_ch3.adb: Minor reformatting.
5835 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5837 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5838 the completion of a generic function, insert the new body rather than
5839 rewriting the original.
5841 2011-08-01 Yannick Moy <moy@adacore.com>
5843 * sinfo.ads, errout.ads: Typos in comments.
5845 2011-08-01 Robert Dewar <dewar@adacore.com>
5847 * par-endh.adb: Minor reformatting.
5849 2011-08-01 Robert Dewar <dewar@adacore.com>
5851 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5852 (Pre_Post_Aspects): New subtype.
5853 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5854 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5855 * par-ch7.adb (P_Package): Remove Decl parameter
5856 (P_Package): Handle new syntax for aspects (before IS)
5857 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5859 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5860 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5861 (P_Package): Remove Decl parameter
5862 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5864 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5866 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5867 * sinfo.ads: Document new syntax for aspects in packages etc.
5868 * sprint.adb: Handle new syntax of aspects before IS in package
5870 2011-08-01 Thomas Quinot <quinot@adacore.com>
5872 * atree.ads: Minor reformatting.
5873 * sem_prag.adb: Minor reformatting.
5875 2011-08-01 Robert Dewar <dewar@adacore.com>
5877 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5878 case expr alternative.
5880 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5882 * sem_ch12.adb: Fix typo.
5884 2011-08-01 Geert Bosch <bosch@adacore.com>
5886 * sem_prag.adb (Check_No_Link_Name): New procedure.
5887 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5888 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5889 instead of Standard_Long_Long_Float_Size global. Preparation for
5890 eventual removal of per type constants.
5891 * exp_util.ads (Get_Stream_Size): New function returning the stream
5892 size value of subtype E.
5893 * exp_util.adb (Get_Stream_Size): Implement new function.
5894 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
5896 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
5898 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
5900 2011-08-01 Geert Bosch <bosch@adacore.com>
5902 * cstand.adb: Fix comments.
5903 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
5906 2011-08-01 Robert Dewar <dewar@adacore.com>
5908 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
5910 2011-08-01 Geert Bosch <bosch@adacore.com>
5912 * atree.ads: Fix comment.
5914 2011-08-01 Robert Dewar <dewar@adacore.com>
5916 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
5917 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
5918 * par.adb: Add with for Namet.Sp.
5919 * par-tchk.adb: Minor reformatting.
5921 2011-08-01 Vincent Celier <celier@adacore.com>
5923 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
5924 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
5925 of the init procedure of a SAL.
5926 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
5929 2011-08-01 Thomas Quinot <quinot@adacore.com>
5931 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
5934 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5936 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
5938 2011-08-01 Thomas Quinot <quinot@adacore.com>
5940 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
5941 conformant with its spec (return True only for types that have
5942 an overriding Initialize primitive operation that prevents them from
5943 having preelaborable initialization).
5944 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
5945 initialization for controlled types in Ada 2005 or later mode.
5947 2011-08-01 Robert Dewar <dewar@adacore.com>
5949 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
5951 (Same_Aspect): New function.
5952 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
5953 Type_Invariant, Precondition, Postcondition.
5954 * snames.ads-tmpl: Add Name_Type_Invariant.
5956 2011-08-01 Robert Dewar <dewar@adacore.com>
5958 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
5960 (Freeze_All_Ent): Fix error in handling inherited aspects.
5961 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
5962 already analyzed, but don't skip entire processing of a declaration,
5963 that's wrong in some cases of declarations being rewritten.
5964 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
5965 Don't delay for integer, string literals
5966 Treat predicates in usual manner for delay, remove special case code,
5968 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
5969 (Build_Predicate_Function): Update saved expression in aspect
5970 (Build_Invariant_Procedure): Update saved expression in aspect
5971 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
5972 of replacement of discriminant references if the reference is simple.
5974 2011-08-01 Robert Dewar <dewar@adacore.com>
5976 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
5977 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
5978 Static_Predicate and Dynamic_Predicate.
5979 (Build_Predicate_Function): Add processing for Static_Predicate
5980 and Dynamic_Predicate.
5981 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
5982 (From_Static_Predicate): New flag
5983 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
5985 2011-08-01 Robert Dewar <dewar@adacore.com>
5987 * usage.adb: Documentation cleanup for Ada version modes in usage.
5988 * expander.adb: Minor reformatting.
5990 2011-08-01 Robert Dewar <dewar@adacore.com>
5992 * atree.ads: Minor comment fix.
5993 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
5994 a-witeio.ads, sem_prag.adb: Minor reformatting.
5996 2011-08-01 Doug Rupp <rupp@adacore.com>
5998 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
5999 pointers. Use descrip.h header file for convenience. Add some
6002 2011-08-01 Robert Dewar <dewar@adacore.com>
6004 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6005 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6006 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6008 (Check_Aspect_At_End_Of_Declarations): New procedure
6009 (Analye_Aspect_Specification): Minor changes for above procedures
6010 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6011 specification node as well.
6013 2011-08-01 Pascal Obry <obry@adacore.com>
6015 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6016 Windows files. Use GetFilesAttributes() in this case to check for file
6017 existence instead of returning with an error code.
6019 2011-08-01 Vincent Celier <celier@adacore.com>
6021 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6022 High is above Source length.
6024 2011-08-01 Robert Dewar <dewar@adacore.com>
6026 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6028 2011-08-01 Robert Dewar <dewar@adacore.com>
6030 * aspects.ads (Boolean_Aspects): New subtype.
6031 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6032 for derived types in cases where the parent type and derived type have
6034 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6035 with aspects when parent type also has aspects.
6036 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6037 boolean expression at this point).
6038 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6039 accordance with final decision on the Ada 2012 feature.
6040 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6042 2011-08-01 Matthew Heaney <heaney@adacore.com>
6044 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6046 2011-08-01 Pascal Obry <obry@adacore.com>
6048 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6049 Fix Replace_Slice when High is above current string size.
6050 (Replace_Slice): Fix DL computation when High is above current
6053 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6055 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6057 2011-08-01 Matthew Heaney <heaney@adacore.com>
6059 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6062 2011-08-01 Pascal Obry <obry@adacore.com>
6064 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6067 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6069 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6070 access to protected subprograms in generic bodies.
6071 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6072 protected type, indicate that the convention of the subprogram is
6073 Convention_Protected, because it may be used in subsequent declarations
6074 within the protected declaration.
6076 2011-08-01 Vincent Celier <celier@adacore.com>
6078 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6079 and "final" procedures when the name of the library is "ada", to avoid
6080 duplicate symbols "adainit" and "adafinal" in executables.
6082 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6084 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6085 quantified expression that appears within a postcondition and uses the
6086 Ada2012 'Result attribute.
6088 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6090 * init.c (__gnat_error_handler): Cast reason to int.
6091 (__gnat_install_handler): Explain sa_sigaction use.
6093 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6095 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6096 subprogram has copy-in copy-out parameters, try to promote the mode of
6097 the return type if it is passed in registers.
6099 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6101 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6102 left operand as addressable.
6104 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6106 * gcc-interface/gigi.h (build_function_stub): Remove.
6107 (build_return_expr): Likewise.
6108 (convert_vms_descriptor): Declare.
6109 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6110 (build_function_stub): Move to...
6111 * gcc-interface/utils2.c (build_return_expr): Move to...
6112 * gcc-interface/trans.c (build_function_stub): ...here.
6113 (build_return_expr): ...here.
6114 (Subprogram_Body_to_gnu): Add local variable for language_function.
6115 Disconnect the parameter attributes cache, if any, once done with it.
6116 Call end_subprog_body only after setting the end_locus.
6117 Build the stub associated with the function, if any, at the very end.
6118 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6119 variables and streamline control flow.
6121 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6124 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6127 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6130 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6131 Assign to act.sa_sigaction.
6132 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6133 current->return_address to char * before arithmetic.
6135 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6137 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6138 Correct argument types.
6139 Extract code from reason.
6140 (__gnat_install_handler): Assign to act.sa_sigaction.
6142 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6144 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6145 (GNAT1_OBJS): ...here.
6147 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6150 * g-socthi-mingw.adb (Fill): Fix formatting.
6152 * gcc-interface/gigi.h: Move around comment.
6154 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6157 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6159 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6162 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6164 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6166 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6167 range comparison if Pmode is SImode.
6169 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6170 Eric Botcazou <ebotcazou@adacore.com>
6172 * adadecode.c: Wrap up in extern "C" block.
6173 * adadecode.h: Likewise.
6174 * adaint.c: Likewise. Remove 'const' keyword.
6175 * adaint.h: Likewise.
6177 * atree.h: Likewise.
6179 * cstreams.c: Likewise.
6183 * final.c: Likewise.
6185 * initialize.c: Likewise.
6187 * namet.h: Likewise.
6188 * nlists.h: Likewise.
6189 * raise.c: Likewise.
6190 * raise.h: Likewise.
6191 * repinfo.h: Likewise.
6192 * seh_init.c: Likewise.
6193 * targext.c: Likewise.
6194 * tracebak.c: Likewise.
6195 * uintp.h: Likewise.
6196 * urealp.h: Likewise.
6197 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6198 * xsinfo.adb: Likewise.
6199 * xsnamest.adb: Likewise.
6200 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6201 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6202 * gcc-interface/misc.c: Likewise.
6203 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6204 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6205 ada/targext.o here...
6206 (GNAT_ADA_OBJS): ...and not here.
6207 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6208 (GNATBIND_OBJS): Reorder.
6210 2011-07-07 Richard Henderson <rth@redhat.com>
6212 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6213 dwarf2out_frame_init.
6215 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6217 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6219 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6222 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6224 2011-07-06 Richard Guenther <rguenther@suse.de>
6226 * gcc-interface/misc.c (gnat_init): Merge calls to
6227 build_common_tree_nodes and build_common_tree_nodes_2.
6228 Re-initialize boolean_false_node.
6230 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6231 Olivier Hainque <hainque@adacore.com>
6232 Nicolas Setton <setton@adacore.com>
6234 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6235 the type according to the ARTIFICIAL_P parameter.
6236 (create_type_decl): Likewise.
6237 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6239 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6241 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6242 (gnatbind): Likewise.
6244 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6246 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6248 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6250 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6251 local variable throughout. Remove useless call to Base_Type.
6252 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6253 Take it also into account for the volatileness of the field. Set the
6254 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6256 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6258 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6259 on a dereference built for a by-ref object if it has an address clause.
6261 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6263 * einfo.ads (Address_Taken): Document use for the second argument of
6264 Asm_Input and Asm_Output attributes.
6265 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6266 argument is an entity name, then set Address_Taken on it.
6267 <Attribute_Asm_Output>: Likewise.
6268 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6269 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6270 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6271 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6273 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6276 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6278 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6280 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6281 (ada/utils.o): Update dependencies.
6282 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6283 ../../../libcpp/libcpp.a.
6284 * gcc-interface/utils.c: Include common/common-target.h.
6285 (process_attributes): Use targetm_common.have_named_sections.
6287 2011-06-07 Richard Guenther <rguenther@suse.de>
6289 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6292 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6294 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6295 TREE_THIS_NOTRAP flag.
6297 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6299 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6302 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6304 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6305 constants whose full view has discriminants specially.
6307 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6309 * gcc-interface/utils.c: Include diagnostic.h.
6310 (gnat_write_global_declarations): Output debug information for all
6311 global type declarations before finalizing the compilation unit.
6312 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6314 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6316 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6318 2011-05-25 Kai Tietz <ktietz@redhat.com>
6320 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6321 initialization instead of const/none-const pointer assignment.
6323 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6325 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6326 $(EXTRA_GNAT1_OBJS).
6327 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6328 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6329 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6330 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6331 libcommon-target.a instead of prefix.o.
6333 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6336 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6338 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6340 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6341 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6342 instead of version.o.
6344 2011-05-18 Kai Tietz <ktietz@redhat.com>
6346 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6347 boolean_false_node instead of integer_zero_node.
6348 (convert_with_check): Likewise.
6349 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6351 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6353 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6354 type of the parameter is an unconstrained array, convert the actual to
6355 the type of the formal in the In Out and Out cases as well.
6357 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6359 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6360 call build_function_type_array or build_varargs_function_type_array
6362 (create_subprog_type): Don't call build_function_type; call
6363 build_function_type_vec instead.
6365 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6367 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6368 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6369 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6371 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6373 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6375 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6376 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6378 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6380 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6382 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6384 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6385 instead of accessing TYPE_ARG_TYPES directly.
6386 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6388 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6391 * gcc-interface/gigi.h (get_variant_part): Declare.
6392 * gcc-interface/decl.c (get_variant_part): Make global.
6393 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6394 types have the same constant size, are record types and T1 has a
6395 variant part while T2 doesn't.
6397 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6399 * gcc-interface/utils.c (begin_subprog_body): Do not call
6401 (end_subprog_body): Likewise.
6403 2011-05-04 Richard Guenther <rguenther@suse.de>
6405 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6407 (pos_to_constructor): Likewise.
6409 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6410 Eric Botcazou <ebotcazou@adacore.com>
6412 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6413 of build_function_type. Adjust calls to...
6414 (build_raise_check): ...this. Do not take a void_tree parameter.
6415 Call build_function_type_list instead of build_function_type.
6416 Fix head comment and swap couple of conditional blocks.
6418 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6420 * gnatvsn.ads (Library_Version): Bump to 4.7.
6421 (Current_Year): Bump to 2011.
6423 2011-04-29 Michael Matz <matz@suse.de>
6425 * gcc-interface/misc.c (gnat_handle_option): Set
6426 warn_maybe_uninitialized.
6428 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6430 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6431 the Watson/McCabe paper.
6433 2011-04-23 Jim Meyering <meyering@redhat.com>
6435 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6437 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6439 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6442 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6444 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6446 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6447 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6448 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6449 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6450 <all>: Do not set flags on the reused DECL node coming from an alias.
6451 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6452 don't need debug info here...
6453 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6454 (gigi): Adjust calls to create_subprog_decl.
6455 (build_raise_check): Likewise.
6456 (establish_gnat_vms_condition_handler): Likewise.
6457 (Compilation_Unit_to_gnu): Likewise.
6458 (gnat_to_gnu): Likewise.
6460 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6462 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6463 (NO_REORDER_ADAFLAGS): New variable.
6464 (EXTRA_GNATTOOLS): Always define.
6465 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6466 Clean up and adjust list of files compiled with special options.
6467 * gcc-interface/Make-lang.in: Likewise.
6468 (ada/decl.o): Cosmetical change.
6469 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6471 2011-04-20 Jim Meyering <meyering@redhat.com>
6473 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6475 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6477 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6478 $(CFLAGS) on the link line.
6480 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6482 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6483 padded type built for the return type if it is unconstrained.
6485 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6487 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6489 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6491 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6492 before calling TREE_CHAIN.
6493 * gcc-interface/misc.c (gnat_init_ts): New function.
6494 (LANG_HOOKS_INIT_TS): Define.
6496 2011-04-12 Martin Jambor <mjambor@suse.cz>
6498 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6499 instead of cgraph_node.
6501 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6503 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6504 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6507 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6509 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6510 of aggregate types that contain a placeholder.
6512 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6514 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6516 (handle_type_generic_attribute): Likewise.
6518 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6521 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6523 2011-04-04 Kai Tietz <ktietz@redhat.com>
6526 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6529 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6531 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6532 type case, do not strip a padding type around the array type.
6534 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6536 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6539 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6541 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6542 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6543 code for -feliminate-unused-debug-types.
6544 (gnat_post_options): Likewise.
6546 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6548 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6549 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6552 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6554 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6555 DECL_ARTIFICIAL flag on enumeration types.
6557 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6559 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6560 fat pointer types artificial unconditionally.
6561 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6564 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6566 * gcc-interface/gigi.h (get_dummy_type): Declare.
6567 (build_dummy_unc_pointer_types): Likewise.
6568 (finish_fat_pointer_type): Likewise.
6569 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6570 fat pointer type has been built, complete it in place.
6571 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6572 and thin pointers. Remove useless variable.
6573 (finish_fat_pointer_type): Make global and move to...
6574 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6575 (get_dummy_type): New function.
6576 (build_dummy_unc_pointer_types): Likewise.
6577 (gnat_pushdecl): Propage the name to the anonymous variants only.
6578 (update_pointer_to): Only adjust the pointer types in the unconstrained
6581 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6583 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6584 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6585 if this is a Taft amendment type and the full declaration is available.
6586 * gcc-interface/trans.c (process_type): Likewise.
6587 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6588 (process_freeze_entity): Likewise.
6589 * gcc-interface/utils.c (dummy_global): New static variable.
6590 (gnat_write_global_declarations): If there are types declared as used
6591 at the global level, insert them in the global hash table.
6593 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6595 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6596 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6597 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6599 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6600 flag of the type accordingly.
6601 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6603 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6605 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6606 finalizing types when updating the pointers to the designated type.
6607 <all>: Finalize the deferred types even if we didn't defer processing
6608 of incomplete types in this invocation.
6610 2011-04-01 Olivier Hainque <hainque@adacore.com>
6611 Nicolas Setton <setton@adacore.com>
6612 Eric Botcazou <ebotcazou@adacore.com>
6614 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6615 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6617 2011-03-28 Kai Tietz <ktietz@redhat.com>
6619 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6621 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6622 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6624 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6626 2011-03-28 Tristan Gingold <gingold@adacore.com>
6629 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6630 Use ada output of gnatbind.
6631 (ada/b_gnatb.adb): Ditto.
6632 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6633 (ada.mostlyclean, ada.stage1)
6634 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6635 (ada.stagefeedback): Adjust.
6636 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6637 Use ada output of gnatbind.
6638 (b_gnatm.adb): Ditto.
6639 (b_gnatl.o, b_gnatm.o): New rules.
6641 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6643 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6644 for the padded type built to support a specified size or alignment.
6646 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6648 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6649 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6650 unconditionally to the end of the unit when the designated type is
6652 <all>: Rename local variable. Attempt to un-defer types only and do it
6653 for limited_with'ed types as well.
6654 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6655 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6656 consistently and remove redundant call to finalize_from_with_types.
6658 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6660 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6661 subprograms without a previous spec declared in the same unit.
6662 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6663 subprograms at the end of the unit instead of at the beginning.
6664 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6665 isn't public for the special handling of non-inline functions nested
6666 inside inline external functions.
6668 2011-03-25 Jeff Law <law@redhat.com>
6670 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6672 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6674 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6675 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6676 to compute Set_Size_Depends_On_Discriminant.
6677 (Layout_Type): Call it on array types in back-end layout mode.
6678 * sem_util.adb (Requires_Transient_Scope): Return true for array
6679 types only if the size depends on the value of discriminants.
6680 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6681 type if the RHS is a call to a function that returns an unconstrained
6682 type with default discriminant.
6684 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6686 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6687 non-conversion to the nominal result type at the end.
6689 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6691 * gcc-interface/trans.c (create_temporary): New function taken from...
6692 (create_init_temporary): ...here. Call it.
6693 (call_to_gnu): Create the temporary for the return value early, if any.
6694 Create it for a function with copy-in/copy-out parameters if there is
6695 no target; in other cases of copy-in/copy-out, use another temporary.
6696 Push the new binding level lazily. Add and rename local variables.
6698 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6700 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6702 (set_rm_size): Likewise.
6704 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6706 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6707 for the padded type built in order to support a specified alignment.
6708 Fix incorrect formatting.
6710 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6713 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6715 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6717 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6718 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6719 to the end of the list. Adjust recursive call. Rename local variable.
6720 If REORDER is true, reorder components of the record type.
6721 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6722 components_to_record and adjust the parameter list.
6724 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6726 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6727 disabled, use the variable for bounds of loop iteration scheme.
6729 2011-03-21 Kai Tietz <ktietz@redhat.com>
6732 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6734 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6736 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6737 out whether the expression is read-only. Short-circuit placeholder
6738 case and rename a couple of local variables.
6740 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6742 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6743 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6744 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6745 (convert): Deal with conversions from a smaller form type specially.
6747 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6749 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6750 its argument, except for the special -I- switch.
6752 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6754 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6757 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6759 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6761 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6763 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6765 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6766 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6767 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6768 Do not generate the check directly, instead instantiate the template
6769 check present in the descriptor.
6770 (make_descriptor_field): Move around.
6771 (build_vms_descriptor32): Build a template check in the POINTER field.
6772 (build_vms_descriptor): Remove useless suffixes.
6773 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6775 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6778 * targext.c: Include target files if IN_RTS is defined.
6780 2011-01-26 Richard Guenther <rguenther@suse.de>
6783 * targext.c: Include config.h.
6784 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6787 2011-01-04 Pascal Obry <obry@adacore.com>
6788 Eric Botcazou <ebotcazou@adacore.com>
6790 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6792 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6794 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6795 end-of-case on the end label and its associated gotos, if any.
6797 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6799 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6800 expressions of the parameter cache within the statement group of
6803 2011-01-04 Olivier Hainque <hainque@adacore.com>
6804 Eric Botcazou <ebotcazou@adacore.com>
6806 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6807 (set_end_locus_from_node): New function.
6808 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6809 make and the function end_locus.
6810 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6811 for the elaboration subprogram.
6812 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6813 set the end_locus of the expression as well.
6815 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6818 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6819 variables that are referenced in exception handlers volatile.
6823 Copyright (C) 2011 Free Software Foundation, Inc.
6825 Copying and distribution of this file, with or without modification,
6826 are permitted in any medium without royalty provided the copyright
6827 notice and this notice are preserved.
6829 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6830 - fix bugs in the description of Source_Trace;
6831 - get rid of UNIT_NAME;
6833 2011-08-02 Javier Miranda <miranda@adacore.com>
6836 (Build_Dispatching_Requeue): Adding support for VM targets
6837 since we cannot directly reference the Tag entity.
6838 * exp_sel.adb (Build_K): Adding support for VM targets.
6839 (Build_S_Assignment): Adding support for VM targets.
6841 (Default_Prim_Op_Position): In VM targets do not restrict availability
6842 of predefined interface primitives to compiling in Ada 2005 mode.
6843 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6844 restricted to compiling in Ada 2005 mode.
6845 (Make_VM_TSD): Generate code that declares and initializes the OSD
6846 record. Needed to support dispatching calls through synchronized
6849 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6850 primitives associated with synchronized interfaces.
6851 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6852 primitives associated with synchronized interfaces.
6854 2011-08-02 Yannick Moy <moy@adacore.com>
6856 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6857 statements hidden in SPARK if preceded by the HIDE directive
6858 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6859 exception handlers as hidden in SPARK if preceded by the HIDE directive
6860 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6861 if starting with the HIDE directive
6862 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6863 starting with the HIDE directive; mark the declarations in a private
6864 part as hidden in SPARK if the private part starts with the HIDE
6866 * restrict.adb, restrict.ads
6867 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6868 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6869 argument node belongs to a part which is hidden in SPARK
6870 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6871 parts in SPARK; protect the possibly costly call to
6872 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6873 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6874 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6875 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6877 (Scan): recognize special comment starting with '#' and followed by
6878 SPARK keyword "hide" as a HIDE directive.
6880 2011-08-02 Yannick Moy <moy@adacore.com>
6882 * types.ads, erroutc.ads: Minor reformatting.
6884 2011-08-02 Vincent Celier <celier@adacore.com>
6886 * link.c: Add response file support for cross platforms.
6888 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6890 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6891 in an association, set parent field of copy before partial analysis.
6892 * sem_res.adb (Resolve_Slice): create reference to itype only when
6893 expansion is enabled.
6895 2011-08-02 Yannick Moy <moy@adacore.com>
6897 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6898 for new flag denoting which subprogram bodies are in ALFA
6899 * restrict.adb, sem_ch7.adb: Update comment
6900 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6901 sem_ch9.adb, sem_res.adb: Add calls to
6902 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6903 * sem_ch6.adb (Analyze_Function_Return): add calls to
6904 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6905 middle of the body, and extended return.
6906 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6907 False when missing return.
6908 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6909 to True for subprograms whose spec is in ALFA. Remove later on the flag
6910 on the entity used for a subprogram body when there exists a separate
6912 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6913 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6914 False, otherwise do nothing.
6916 2011-08-02 Robert Dewar <dewar@adacore.com>
6918 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6920 2011-08-02 Yannick Moy <moy@adacore.com>
6922 * sem_ch4.ads: minor formatting.
6924 2011-08-02 Yannick Moy <moy@adacore.com>
6926 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6927 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6928 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6929 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6930 opt.ads: cleanup of SPARK mode
6932 2011-08-02 Yannick Moy <moy@adacore.com>
6934 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6936 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6937 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6939 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6940 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6941 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6942 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6944 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6946 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6947 functions whose return type is not in ALFA.
6948 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6950 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6951 parameter's type is not in ALFA.
6952 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6955 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6957 * sem_ch6 (Analyze_Expression_Function): treat the function as
6958 Inline_Always, and introduce a subprogram declaration for it when it is
6960 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6961 expression functions, so that the back-end can determine whether they
6962 can in fact be inlined.
6963 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6964 a function body comes from an expression function.
6966 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6968 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6969 null exclusions to test Can_Never_Be_Null on the anonymous access types
6970 of the formals rather than testing the formals themselves. Exclude this
6971 check in cases where the Old_Formal is marked as a controlling formal,
6972 to avoid issuing spurious errors for bodies completing dispatching
6973 operations (due to the flag not getting set on controlling access
6974 formals in body specs).
6975 (Find_Corresponding_Spec): When checking full and subtype conformance of
6976 subprogram bodies in instances, pass Designated and E in that order, for
6977 consistency with the expected order of the formals (New_Id followed by
6980 2011-08-02 Robert Dewar <dewar@adacore.com>
6982 * sem_ch8.adb: Minor reformatting.
6984 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6986 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6987 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6988 primitive operations of class-wide actuals.
6990 2011-08-02 Javier Miranda <miranda@adacore.com>
6992 * exp_atag.ads, exp_atag.adb
6993 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
6994 since its value is implicitly passed in argument Typ.
6995 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
6996 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
6997 Build_Common_Dispatching_Select_Statements.
6999 2011-08-02 Robert Dewar <dewar@adacore.com>
7001 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7002 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7005 2011-08-02 Robert Dewar <dewar@adacore.com>
7007 * sem_res.adb: Minor reformatting.
7008 * sem_prag.adb: Minor reformatting.
7010 2011-08-02 Javier Miranda <miranda@adacore.com>
7012 * exp_atag.adb, exp_atags.ads
7013 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7014 by the tagged type Entity. Required to use this routine in the VM
7015 targets since we do not have available the Tag entity in the VM
7018 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7019 Ada.Tags has not been previously loaded.
7021 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7022 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7024 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7025 view of enclosing scopes. Required to handle enclosing scopes that
7026 are synchronized types whose full view is a task type.
7028 (Build_VM_TSDs): Minor code improvement to avoid generating and
7029 analyzing lists with empty nodes.
7030 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7031 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7032 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7033 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7034 (Make_Select_Specific_Data_Table): Add support for VM targets.
7035 (Make_VM_TSD): Generate code to initialize the SSD structure of
7038 2011-08-02 Yannick Moy <moy@adacore.com>
7040 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7041 cross-references section in ALI.
7042 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7043 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7045 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7046 subprogram or package entity of a node
7047 (Is_Local_Reference_Type): new function returns True for references
7048 selected in local cross-references.
7049 (Lt): function extracted from Lt in Output_References
7050 (Write_Entity_Name): function extracted from Output_References
7051 (Generate_Definition): generate reference with type 'D' for definition
7052 of objects (object declaration and parameter specification), with
7053 appropriate locations and units, for use in local cross-references.
7054 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7055 references of type 'I' for initialization in object definition.
7056 (Output_References): move part of function Lt and procedure
7057 Write_Entity_Name outside of the body. Ignore references of types 'D'
7058 and 'I' introduced for local cross-references.
7059 (Output_Local_References): new procedure to output the local
7060 cross-references sections.
7061 (Lref_Entity_Status): new array defining whether an entity is a local
7062 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7063 with 'I' type when initialization expression is present.
7064 * get_scos.adb, get_scos.ads: Correct comments and typos
7066 2011-08-02 Javier Miranda <miranda@adacore.com>
7068 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7070 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7072 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7075 2011-08-02 Vincent Celier <celier@adacore.com>
7077 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7078 (No_Space_Img): New function
7079 (Find_Excluded_Sources): When reading from a file, record the file name
7080 and the line number for each excluded source.
7081 (Mark_Excluded_Sources): When reporting an error, if the excluded
7082 sources were read from a file, include file name and line number in
7085 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7087 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7089 2011-08-02 Robert Dewar <dewar@adacore.com>
7091 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7093 2011-08-02 Javier Miranda <miranda@adacore.com>
7095 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7096 generation of TSDs to the DOTNET compiler.
7097 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7098 generation of TSDs to the DOTNET compiler.
7100 2011-08-02 Javier Miranda <miranda@adacore.com>
7102 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7103 record of all the tagged types declared inside library level package
7104 declarations, library level package bodies or library level subprograms.
7105 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7106 associated with a given tagged type.
7107 (Build_VM_TSDs): New subprogram.
7108 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7109 compilation units that are subprograms.
7110 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7111 compilation units that are package bodies.
7112 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7113 units that are a package declaration or a package instantiation.
7114 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7115 reorganization to improve the error generated by the frontend when the
7116 function Ada.Tags.Secondary_Tag is not available.
7117 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7118 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7120 2011-08-02 Javier Miranda <miranda@adacore.com>
7122 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7124 2011-08-02 Robert Dewar <dewar@adacore.com>
7126 * s-imenne.ads: Minor reformatting.
7128 2011-08-02 Robert Dewar <dewar@adacore.com>
7130 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7131 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7132 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7134 2011-08-02 Robert Dewar <dewar@adacore.com>
7136 * einfo.ads (Materialize_Entity): Document this is only for renamings
7137 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7138 required debug information in the case where we transform the object
7139 declaration into a renaming declaration.
7140 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7142 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7145 2011-08-02 Robert Dewar <dewar@adacore.com>
7147 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7148 Suppress_Init_Procs.
7149 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7150 Suppress_Initialization/Initialization_Suppressed.
7151 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7152 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7153 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7154 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7156 2011-08-02 Robert Dewar <dewar@adacore.com>
7158 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7161 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7163 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7164 only have inheritable classwide pre/postconditions.
7166 2011-08-02 Javier Miranda <miranda@adacore.com>
7168 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7169 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7170 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7171 checks if the external tag of a type is the same as the external tag
7172 of some other declaration.
7174 2011-08-02 Thomas Quinot <quinot@adacore.com>
7176 * s-taskin.ads: Minor reformatting.
7178 2011-08-02 Emmanuel Briot <briot@adacore.com>
7180 * g-comlin.adb (Display_Help): swap the order in which it prints the
7181 short help and the general usage.
7183 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7185 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7186 the aspect declarations and attach them to the generic copy for
7187 subsequent analysis.
7188 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7189 declarations of the generic tree to the new subprogram declarations.
7190 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7191 conditions that apply to a subprogram instance.
7193 2011-08-02 Robert Dewar <dewar@adacore.com>
7195 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7197 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7199 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7200 private type with a tagged full view is not derived in the immediate
7201 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7203 2011-08-02 Robert Dewar <dewar@adacore.com>
7205 * exp_ch4.adb: Minor reformatting.
7207 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7209 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7210 Ada2012 iterator, the loop will be rewritten during expansion into a
7211 while loop with a cursor and an element declaration. Do not analyze the
7212 body in this case, because if the container is for indefinite types the
7213 actual subtype of the elements will only be determined when the cursor
7214 declaration is analyzed.
7216 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7218 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7219 size/alignment related attributes in CodePeer_Mode.
7221 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7223 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7224 Prepend_Element, since this can result in the operation getting the
7225 wrong slot in the full type's dispatch table if the full type has
7226 inherited operations. The incomplete type's operation will get added
7227 to the proper position in the full type's primitives
7228 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7229 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7230 dispatching operations, since there are cases where nonprimitive
7231 subprograms can get added to the list of incomplete dependents (such
7232 as subprograms in nested packages).
7233 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7234 private part when determining whether to add a primitive with a
7235 parameter of a tagged incomplete type to the Private_Dependents list.
7236 Such primitives can also occur in the visible part, and should not have
7237 been excluded from being private dependents.
7238 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7239 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7240 list of a Taft-amendment incomplete type is a primitive before issuing
7241 an error that the full type must appear in the same unit. There are
7242 cases where nonprimitives can be in the list (such as subprograms in
7244 * sem_disp.adb (Derives_From): Use correct condition for checking that
7245 a formal's type is derived from the type of the corresponding formal in
7246 the parent subprogram (the condition was completely wrong). Add
7247 checking that was missing for controlling result types being derived
7248 from the result type of the parent operation.
7250 2011-08-02 Yannick Moy <moy@adacore.com>
7252 * errout.adb (First_Node): minor renaming
7253 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7256 2011-08-02 Yannick Moy <moy@adacore.com>
7258 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7259 before accessing operands.
7260 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7261 decide whether an initialization expression respects SPARK rules, as
7262 the plain node is the expanded one. This allows for more valid warnings
7264 * gnat_rm.texi: Minor update.
7266 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7268 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7271 2011-08-02 Robert Dewar <dewar@adacore.com>
7273 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7275 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7277 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7278 loop statements and the element renaming declaration with a block when
7279 the element type is controlled.
7281 2011-08-02 Yannick Moy <moy@adacore.com>
7283 * sinfo.ads: Minor formatting.
7285 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7287 * sem_aggr.adb (Add_Association): if the association has a box and no
7288 expression, use the Sloc of the aggregate itself for the new
7290 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7293 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7295 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7296 When a container is provided via a function call, generate a renaming
7297 of the function result. This avoids the creation of a transient scope
7298 and the premature finalization of the container.
7299 * exp_ch7.adb (Is_Container_Cursor): Removed.
7300 (Wrap_Transient_Declaration): Remove the supression of the finalization
7301 of the list controller when the declaration denotes a container cursor,
7304 2011-08-02 Yannick Moy <moy@adacore.com>
7306 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7307 node is from source, instead of the original node being from source.
7309 (Resolve_Array_Aggregate): refine the check for a static expression, to
7310 recognize also static ranges
7311 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7312 Array_Type_Declaration): postpone the test for the type being a subtype
7313 mark after the type has been resolved, so that component-selection and
7314 expanded-name are discriminated.
7315 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7316 to distinguish the case of an iteration scheme, so that an error is
7317 issed on a non-static range in SPARK except in an iteration scheme.
7318 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7319 In_Iter_Schm = True.
7320 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7321 user-defined operators so that they are allowed in renaming
7323 (Find_Selected_Component): refine the check for prefixing of operators
7324 so that they are allowed in renaming. Move the checks for restrictions
7325 on selector name after analysis discriminated between
7326 component-selection and expanded-name.
7327 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7328 concatenation argument of string type if it is static.
7329 * sem_util.adb, sem_util.ads
7330 (Check_Later_Vs_Basic_Declarations): add a new function
7331 Is_Later_Declarative_Item to decice which declarations are allowed as
7332 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7333 mode, add that renamings are considered as later items.
7334 (Enclosing_Package): new function to return the enclosing package
7335 (Enter_Name): correct the rule for homonyms in SPARK
7336 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7337 from source (result of expansion) to avoid issuing wrong warnings.
7339 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7341 * errout.adb: On anything but an expression First_Node returns its
7344 2011-08-02 Pascal Obry <obry@adacore.com>
7346 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7348 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7350 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7351 Set the associated loop as the related expression of internally
7353 * exp_ch7.adb (Is_Container_Cursor): New routine.
7354 (Wrap_Transient_Declaration): Supress the finalization of the list
7355 controller when the declaration denotes a container cursor.
7357 2011-08-02 Yannick Moy <moy@adacore.com>
7359 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7361 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7362 expression is a simple expression. This check cannot be performed in
7363 the semantics, so just drop it.
7364 (P_Index_Or_Discriminant_Constraint): move check that the index or
7365 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7366 semantics. Other cases were previously checked in the semantics.
7367 * par-ch4.adb (P_Name): move checks that a selector name is not
7368 character literal or an operator symbol to Find_Selected_Component in
7370 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7371 declarations are not placed after later declarations in a separate
7372 procedure in Sem_Util (possibly not the best choice?), to be used both
7373 during parsing, for Ada 83 mode, and during semantic analysis, for
7375 * par-endh.adb (Check_End): move check that end label is not missing
7376 to Process_End_Label in the semantics
7377 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7378 the special case for SPARK restriction
7379 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7380 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7381 parameter Force to issue the error message even on internal node (used
7382 for generated end label). Call Check_Restriction to check when an error
7383 must be issued. In SPARK mode, issue an error message even if the
7384 restriction is not set.
7385 (Check_Restriction): new procedure with an additional out parameter to
7386 inform the caller that a message has been issued
7387 * sem_aggr.adb: Minor modification of message
7388 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7389 instead of issuing an error message directly
7390 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7391 declarations are not placed after later declarations, by calling
7392 Check_Later_Vs_Basic_Declarations
7393 (Analyze_Subtype_Declaration): move here the check that an index or
7394 discriminant constraint must be a subtype mark. Change the check that
7395 a subtype of String must start at one so that it works on subtype marks.
7396 * sem_ch4.adb (Analyze_Call): move here the check that a named
7397 association cannot follow a positional one in a call
7398 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7399 instead of issuing an error message directly
7400 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7401 selector name is not a character literal or an operator symbol. Move
7402 here the check that the prefix of an expanded name cannot be a
7403 subprogram or a loop statement.
7404 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7405 procedure called from parsing and semantics to check that basic
7406 declarations are not placed after later declarations
7407 (Process_End_Label): move here the check that end label is not missing
7409 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7411 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7412 representation clause in codepeer mode, since it confuses CodePeer and
7413 does not bring useful info.
7415 2011-08-02 Ed Falis <falis@adacore.com>
7417 * init.c: initialize fp hw on MILS.
7419 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7421 * errout.adb (First_Node): for bodies, return the node itself (small
7422 optimization). For other nodes, do not check source_unit if the node
7423 comes from Standard.
7425 2011-08-02 Robert Dewar <dewar@adacore.com>
7427 * exp_ch3.adb: Minor comment additions.
7428 * sem_ch13.adb: Minor reformatting.
7430 2011-08-02 Pascal Obry <obry@adacore.com>
7432 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7434 2011-08-02 Robert Dewar <dewar@adacore.com>
7436 * sem_attr.adb: Minor reformatting.
7438 2011-08-02 Robert Dewar <dewar@adacore.com>
7440 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7441 (Has_Default_Component_Value): Removed
7442 * einfo.ads Comment updates
7443 (Has_Default_Aspect): Replaces Has_Default_Value
7444 (Has_Default_Component_Value): Removed
7446 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7448 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7449 (Get_Simple_Init_Val): Handle Default_Value aspect
7450 (Needs_Simple_Initialization): Handle Default_Value aspect
7451 * exp_ch3.ads: Needs_Simple_Initialization
7452 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7453 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7455 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7456 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7457 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7459 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7461 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7462 package containing iteration primitives.
7463 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7465 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7467 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7468 "of", pre-analyze expression in case it is a function call with
7469 finalization actions that must be placed ahead of the loop.
7470 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7471 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7473 2011-08-02 Geert Bosch <bosch@adacore.com>
7475 * cstand.adb (Create_Float_Types): Only consider C's long double for
7476 Long_Long_Float, in addition to double.
7478 2011-08-02 Robert Dewar <dewar@adacore.com>
7480 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7481 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7482 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7485 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7487 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7490 2011-08-02 Javier Miranda <miranda@adacore.com>
7492 * einfo.ads, einfo.adb
7493 (Original_Access_Type): Move this attribute to Node26 since there was
7494 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7495 which causes conflicts and breaks the generation of the .NET compiler.
7496 (Interface_Name): Add missing documentation on JGNAT only uses of
7499 2011-08-02 Geert Bosch <bosch@adacore.com>
7501 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7502 (Find_Back_End_Float_Type): Likewise
7503 (Create_Back_End_Float_Types): Likewise
7504 (Create_Float_Types): Likewise
7505 (Register_Float_Type): Likewise
7506 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7507 Nlist and split out type selection in new local Find_Base_Type function.
7508 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7510 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7512 2011-08-02 Robert Dewar <dewar@adacore.com>
7514 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7516 * opt.ads: Minor comment change.
7517 * sem_ch12.adb: Minor code reorganization.
7519 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7521 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7522 subtype's list of rep items to the list on the full subtype in the case
7523 where the lists are the same.
7525 2011-08-02 Geert Bosch <bosch@adacore.com>
7527 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7528 using the one from System.Strings, which also deallocates all strings.
7530 2011-08-02 Geert Bosch <bosch@adacore.com>
7532 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7534 * gcc-interface/Make-lang.in: Update dependencies.
7536 2011-08-02 Olivier Hainque <hainque@adacore.com>
7538 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7541 2011-08-02 Javier Miranda <miranda@adacore.com>
7543 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7544 associated with anonymous access to subprograms.
7546 2011-08-02 Geert Bosch <bosch@adacore.com>
7549 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7550 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7551 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7552 (Add_Symbol_Definition): Move to switch-c.adb
7553 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7554 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7555 (Add_Symbol_Definition): Move to switch-c.adb.
7556 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7558 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7560 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7561 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7563 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7564 (Add_Symbol_Definition): Moved from Prepcomp.
7565 * switch-c.ads: Update copyright notice. Use String_List instead of
7566 Argument_List, removing dependency on System.OS_Lib.
7568 2011-08-02 Yannick Moy <moy@adacore.com>
7570 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7571 mode on initialization expression which does not respect SPARK
7573 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7574 if the tree referenced by its argument represents an initialization
7575 expression in SPARK, suitable for initializing an object in an object
7578 2011-08-02 Javier Miranda <miranda@adacore.com>
7580 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7581 internally generated access to subprogram with its associated protected
7583 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7585 2011-08-02 Geert Bosch <bosch@adacore.com>
7587 * cstand.adb (Register_Float_Type): Print information about type to
7588 register, if the Debug_Flag_Dot_B is set.
7589 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7590 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7591 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7592 with a requested precision of more than Max_Digits digits and no more
7593 than Max_Base_Digits digits, if a range specification is present and the
7594 Predefined_Float_Types list has a suitable type to derive from.
7595 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7596 case of type completion with pragma Import
7598 (Process_Import_Predefined_Type): Processing to complete a type
7599 with pragma Import. Currently supports floating point types only.
7600 (Set_Convention_From_Pragma): Do nothing without underlying type.
7601 (Process_Convention): Guard against absence of underlying type,
7602 which may happen when importing incomplete types.
7603 (Process_Import_Or_Interface): Handle case of importing predefined
7604 types. Tweak error message.
7606 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7608 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7609 functions to previous change. Reorganize code slightly.
7611 2011-08-02 Geert Bosch <bosch@adacore.com>
7613 * back_end.ads (Register_Type_Proc): New call back procedure type for
7614 allowing the back end to provide information about available types.
7615 (Register_Back_End_Types): New procedure to register back end types.
7616 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7618 * cstand.adb (Back_End_Float_Types): New list for floating point types
7619 supported by the back end.
7620 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7621 (Copy_Float_Type): New procedure to make new copies of predefined types.
7622 (Register_Float_Type): New call back procedure to populate the BEFT list
7623 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7624 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7625 (Create_Float_Types): New procedure to create entities for floating
7626 point types predefined in Standard, and put these and any remaining
7627 BEFTs on the Predefined_Float_Types list.
7628 * stand.ads (Predefined_Float_Types): New list for predefined floating
7629 point types that do not have declarations in package Standard.
7631 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7633 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7634 entity node for the unit containing the parameter.
7635 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7636 (Add_Inlined_Subprogram): Likewise.
7637 * gcc-interface/Make-lang.in: Update dependencies.
7639 2011-08-02 Thomas Quinot <quinot@adacore.com>
7641 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7644 2011-08-02 Geert Bosch <bosch@adacore.com>
7646 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7648 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7650 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7651 computed value of Base_Type.
7653 2011-08-02 Yannick Moy <moy@adacore.com>
7655 * restrict.adb (Check_Restriction): issue an error for any use of
7656 class-wide, even if the No_Dispatch restriction is not set.
7657 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7658 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7659 when completing a private extension, the type named in the private part
7660 is not the same as that named in the visible part.
7661 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7662 of an inherited primitive operations of a tagged type or type extension
7663 that returns the tagged type.
7664 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7665 function which returns True for an implicit operation inherited by the
7666 derived type declaration for the argument type.
7667 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7672 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7673 Process_Bounds, to perform analysis with expansion of a range or an
7674 expression that is the iteration scheme for a loop.
7675 (Analyze_Iterator_Specification): If domain of iteration is given by a
7676 function call with a controlled result, as is the case if call returns
7677 a predefined container, ensure that finalization actions are properly
7679 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7681 2011-08-02 Javier Miranda <miranda@adacore.com>
7683 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7684 * gcc-interface/Make-lang.in: Update dependencies.
7686 2011-08-02 Javier Miranda <miranda@adacore.com>
7688 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7689 determine if the analysis is performed using N or Original_Node (N).
7690 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7691 functionality of routine Is_Variable avoids code duplication.
7692 * checks.adb (Determine_Range): Handle temporaries generated by
7693 Remove_Side_Effects.
7695 2011-08-02 Javier Miranda <miranda@adacore.com>
7697 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7698 expansion of the condition. Required since the previous analysis was
7699 done with expansion disabled (see Resolve_Quantified_Expression) and
7700 hence checks were not inserted and record comparisons have not been
7703 2011-08-02 Ed Falis <falis@adacore.com>
7705 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7708 2011-08-02 Bob Duff <duff@adacore.com>
7710 * opt.ads: Minor comment fix.
7712 2011-08-02 Bob Duff <duff@adacore.com>
7714 * sem_ch12.adb (Analyze_Package_Instantiation,
7715 Analyze_Subprogram_Instantiation): Turn off style checking while
7716 analyzing an instance. Whatever style checks that apply to the generic
7717 unit should apply, so it makes no sense to apply them in an instance.
7718 This was causing trouble when compiling an instance of a runtime
7719 unit that violates the -gnatyO switch.
7720 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7721 one of the two case statements, causing spurious errors.
7723 2011-08-02 Robert Dewar <dewar@adacore.com>
7725 * uname.adb: Minor reformatting.
7726 * gnatcmd.adb: Minor reformatting.
7727 * exp_attr.adb: Minor reformatting.
7729 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7731 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7732 No_Dispatching_Calls, do not look for the Assign primitive, because
7733 predefined primitives are not created in this case.
7735 2011-08-02 Bob Duff <duff@adacore.com>
7737 * stylesw.ads: Minor comment fixes.
7739 2011-08-02 Robert Dewar <dewar@adacore.com>
7741 * freeze.adb (Add_To_Result): New procedure.
7743 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7745 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7746 time, if the specific run-time routines for handling streams of strings
7747 are not available, use the default mechanism.
7749 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7751 * s-regpat.ads: Fix typo.
7753 2011-08-02 Vincent Celier <celier@adacore.com>
7755 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7756 not null, call it to create the in memory config project file without
7757 parsing an existing default config project file.
7759 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7761 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7763 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7765 * sem_elim.adb: an abstract subprogram does not need an eliminate
7766 pragma for its descendant to be eliminable.
7768 2011-08-02 Ed Falis <falis@adacore.com>
7770 * init.c: revert to handling before previous checkin for VxWorks
7771 * s-intman-vxworks.adb: delete unnecessary declarations related to
7772 using Ada interrupt facilities for handling signals.
7773 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7774 * s-intman-vxworks.ads: Import __gnat_install_handler as
7775 Initialize_Interrupts.
7776 * s-taprop-vxworks.adb: Delete Signal_Mask.
7777 (Abort_Handler): change construction of mask to unblock exception
7780 2011-08-02 Jerome Guitton <guitton@adacore.com>
7782 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7783 Debug_Raise_Exception before propagation starts.
7785 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7787 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7788 to Restriction_Check_Required.
7789 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7790 * sem_res.adb (Resolve_Call): Likewise.
7791 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7793 2011-08-02 Bob Duff <duff@adacore.com>
7795 * stylesw.ads: Update comment.
7796 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7797 * errout.ads: Remove obsolete comment.
7799 2011-08-02 Javier Miranda <miranda@adacore.com>
7801 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7802 (Set_Is_Safe_To_Reevaluate): new procedure.
7803 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7804 assignment is allowed on safe-to-reevaluate variables.
7805 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7806 temporary created to remove side effects in expressions that use
7807 the secondary stack as safe-to-reevaluate.
7808 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7809 variables that are not true constants.
7811 2011-08-02 Robert Dewar <dewar@adacore.com>
7813 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7814 sem_res.adb, sem_ch6.adb: Minor reformatting.
7816 2011-08-02 Jerome Guitton <guitton@adacore.com>
7818 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7822 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7823 not set Overridden_Operation if subprogram is an initialization
7826 2011-08-02 Yannick Moy <moy@adacore.com>
7828 * par-ch6.adb: Correct obsolete name in comments
7829 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7830 which takes two message arguments (existing function takes one), with
7831 second message used for continuation.
7832 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7833 block statements that originate from a source block statement, not
7834 generated block statements
7835 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7836 symmetry with procedure case
7837 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7838 function to issue an error in formal mode if a package specification
7839 contains more than one tagged type or type extension.
7840 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7841 parameters matching formals of tagged types are objects (or ancestor
7842 type conversions of objects), not general expressions. Issue an error
7843 on view conversions that are not involving ancestor conversion of an
7845 (Resolve_Type_Conversion): in formal mode, issue an error on the
7846 operand of an ancestor type conversion which is not an object
7847 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7848 procedure so that it works also for actuals of function calls
7849 (Is_Actual_Tagged_Parameter): new function which determines if its
7850 argument is an actual parameter of a formal of tagged type in a
7852 (Is_SPARK_Object_Reference): new function which determines if the tree
7853 referenced by its argument represents an object in SPARK
7855 2011-08-02 Robert Dewar <dewar@adacore.com>
7857 * sem_ch3.adb: Minor reformatting
7858 Minor comment addition
7859 Minor error msg text change
7861 2011-08-02 Javier Miranda <miranda@adacore.com>
7863 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7864 function. Used to be more precise when we generate a variable plus one
7865 assignment to remove side effects in the evaluation of the Bound
7867 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7868 of the bound expression to force its re-analysis and thus expand the
7869 associated transient scope (if required). Code cleanup replacing the
7870 previous code that declared the constant entity by an invocation to
7871 routine Force_Evaluation which centralizes this work in the frontend.
7873 2011-08-02 Robert Dewar <dewar@adacore.com>
7875 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7876 (Base_Type): Now uses improved Is_Base_Type function
7877 * einfo.ads (Base_Type): Inline this function
7879 2011-08-02 Robert Dewar <dewar@adacore.com>
7881 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7882 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7884 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7886 * gcc-interface/Make-lang.in: Update dependencies.
7887 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7890 2011-08-02 Yannick Moy <moy@adacore.com>
7892 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7893 non-simple expression used in delta constraint
7894 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7895 index constraint which is not a subtype mark
7896 * par.adb: With and use Restrict
7897 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7898 mode on component type which is not a subtype mark and default
7899 expression on component
7900 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7901 of string which does not have a lower index bound equal to 1
7902 (Array_Type_Declaration): issue an error in formal mode on index or
7903 component type which is not a subtype mark, and on aliased keyword on
7905 (Derived_Type_Declaration): issue an error in formal mode on interface,
7906 limited or abstract type
7907 (Record_Type_Declaration): issue an error in formal mode on interface
7908 (Record_Type_Definition): issue an error in formal mode on tagged types
7909 and type extensions not declared in the specification of a library unit
7910 package; on null non-tagged record; on variant part
7912 2011-08-02 Vincent Celier <celier@adacore.com>
7914 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7915 not declared for qualified library project when Library_Name is not
7916 declared, but Library_Dir is.
7918 2011-08-02 Robert Dewar <dewar@adacore.com>
7920 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7921 pragmas (affects aspects [Component_]Default_Value
7922 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7923 component type for the resolution
7925 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7927 * einfo.adb (Base_Type): Tune implementation for speed.
7929 2011-08-02 Robert Dewar <dewar@adacore.com>
7931 * freeze.adb: Minor reformatting.
7933 2011-08-02 Thomas Quinot <quinot@adacore.com>
7935 * scos.ads: Update comments.
7937 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7939 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7940 base type, because the parent may be a subtype of a private type whose
7941 convention is established in a private part.
7943 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7945 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7946 statement in a block when the expansion of the return expression has
7947 created a finalization chain.
7948 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7949 with the parent node.
7950 Add N_Extended_Return_Statement to handle the case where a transient
7951 object declaration appears in the Return_Object_Declarations list of
7952 an extended return statement.
7954 2011-08-02 Matthew Gingell <gingell@adacore.com>
7956 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7957 unused parameter 'name'.
7959 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7961 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7962 inherited operation, check whether its alias, which is the source
7963 operastion that it renames, has been marked eliminated.
7965 2011-08-02 Javier Miranda <miranda@adacore.com>
7967 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7968 in-mode parameter whose type is an access type since it can be used to
7969 modify its designated object. Enforce code that handles as safe an
7970 access type that is not access-to-constant but it is the result of a
7971 previous removal of side-effects.
7972 (Remove_Side_Effects): Minor code reorganization of cases which require
7973 no action. Done to incorporate documentation on new cases uncovered
7974 working in this ticket: no action needed if this routine was invoked
7975 too early and the nodes are not yet decorated.
7976 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7977 to routine Remove_Side_Effects by calls to Force_Evaluation since they
7978 were issued with actuals that are implicitly provided by
7981 2011-08-02 Robert Dewar <dewar@adacore.com>
7983 * sem_ch3.adb, sem_res.adb: Minor reformatting.
7985 2011-08-02 Yannick Moy <moy@adacore.com>
7987 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7988 to issue an error in formal mode on attribute not supported in this mode
7989 (Analyze_Attribute): issue errors on standard attributes not supported
7991 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
7992 comment, and issue error in formal mode on modulus which is not a power
7994 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
7996 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
7998 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
7999 operator on modular type (except 'not').
8001 2011-08-02 Robert Dewar <dewar@adacore.com>
8003 * gnat_rm.texi: Minor reformatting.
8005 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8007 * s-osinte-linux.ads: Minor comment update and reformatting.
8008 * i-cexten.ads: Make this unit pure, as for its parent.
8009 Will allow its usage in more contexts if needed.
8011 2011-08-02 Robert Dewar <dewar@adacore.com>
8013 * s-utf_32.ads: Minor comment fix.
8015 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8017 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8018 operation of a tagged synchronized type, handle the case where the
8019 controlling argument is overloaded.
8021 2011-08-02 Yannick Moy <moy@adacore.com>
8023 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8024 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8025 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8026 SPARK mode and formal verification mode on processing SPARK restriction
8027 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8028 requiring consistency checking.
8030 2011-08-02 Robert Dewar <dewar@adacore.com>
8032 * sem_res.adb: Minor reformatting.
8034 2011-08-02 Robert Dewar <dewar@adacore.com>
8036 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8037 a-cforse.ads: Remove unneeded with of Ada.Containers
8038 Remove commented out pragma Inline's
8039 Move specifications of new subprograms to the actual specs
8041 2011-08-02 Yannick Moy <moy@adacore.com>
8043 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8044 a-cforse.ads: Update comments.
8046 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8048 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8050 2011-08-02 Robert Dewar <dewar@adacore.com>
8052 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8053 a-cforse.ads, a-cofove.ads: Minor reformatting.
8055 2011-08-02 Claire Dross <dross@adacore.com>
8057 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8058 a-cofove.ads: Add comments.
8060 2011-08-02 Yannick Moy <moy@adacore.com>
8062 * gnat_rm.texi: Document formal containers.
8064 2011-08-02 Emmanuel Briot <briot@adacore.com>
8066 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8069 2011-08-02 Robert Dewar <dewar@adacore.com>
8071 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8074 2011-08-02 Robert Dewar <dewar@adacore.com>
8076 * aspects.adb: New aspects Default_Value and Default_Component_Value
8077 New format of Aspect_Names table checks for omitted entries
8078 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8079 handling of boolean aspects for derived types.
8080 New aspects Default_Value and Default_Component_Value
8081 New format of Aspect_Names table checks for omitted entries
8082 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8083 (Has_Default_Value): New flag
8084 (Has_Default_Component_Value): New flag
8085 (Has_Default_Value): New flag
8086 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8088 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8089 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8090 Default_Value and Default_Component_Value
8091 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8092 New aspects Default_Value and Default_Component_Value
8093 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8094 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8096 2011-08-02 Vincent Celier <celier@adacore.com>
8098 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8099 inherit library kind.
8101 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8103 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8106 2011-08-02 Robert Dewar <dewar@adacore.com>
8108 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8110 2011-08-02 Yannick Moy <moy@adacore.com>
8112 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8114 2011-08-02 Robert Dewar <dewar@adacore.com>
8116 * impunit.adb: Add comment.
8118 2011-08-02 Yannick Moy <moy@adacore.com>
8120 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8121 qualification of aggregates in formal mode
8122 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8124 (Resolve_Aggregate): complete the test that an aggregate is adequately
8125 qualified in formal mode
8127 2011-08-02 Pascal Obry <obry@adacore.com>
8129 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8130 * mlib-prj.adb: Supress warning when compiling binder generated file.
8131 (Build_Library): Supress all warnings when compiling the binder
8134 2011-08-02 Yannick Moy <moy@adacore.com>
8136 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8138 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8139 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8140 Add with/use clauses to make Check_Formal_Restriction visible
8142 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8144 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8145 in-parameters when type of the generic formal is private in the generic
8146 spec and non-private in the body.
8148 2011-08-02 Claire Dross <dross@adacore.com>
8150 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8151 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8152 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8153 * impunit.adb, Makefile.rtl: Take new files into account.
8155 2011-08-02 Robert Dewar <dewar@adacore.com>
8157 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8158 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8160 2011-08-02 Yannick Moy <moy@adacore.com>
8162 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8164 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8165 matching static array bounds, taking into account the special case of
8167 * sem_ch3.adb: Typo in comment.
8169 2011-08-02 Yannick Moy <moy@adacore.com>
8171 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8172 which issues an error in formal mode if its argument node is originally
8174 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8175 has a discriminant specification so that it does not include the case
8177 (Derived_Type_Declaration): move here the test that a derived type has a
8178 discriminant specification
8179 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8180 first element of a component association before accessing its choices
8181 (presence of component association is not enough)
8182 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8183 declaration is a library item before accessing the next element in a
8184 list, as library items are not member of lists
8185 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8186 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8187 Check_Formal_Restriction whenever possible.
8189 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8191 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8192 reference when needed.
8194 2011-08-02 Bob Duff <duff@adacore.com>
8196 * gnat_ugn.texi: Fix typo.
8198 2011-08-02 Vincent Celier <celier@adacore.com>
8200 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8201 archive file name. Do not use the full path name of archives for Open
8204 2011-08-02 Robert Dewar <dewar@adacore.com>
8206 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8207 Analyze_Aspect_Specifications
8209 (Analyze_Aspect_Specifications): New handling for boolean aspects
8210 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8211 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8212 sequence for Analyze_Aspect_Specifications
8213 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8214 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8216 2011-08-02 Robert Dewar <dewar@adacore.com>
8218 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8219 aspects, since these no longer exist.
8221 2011-08-02 Robert Dewar <dewar@adacore.com>
8223 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8224 semicolon, do not try to see if there are aspects following it.
8225 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8228 2011-08-02 Robert Dewar <dewar@adacore.com>
8230 * sem_ch8.adb, aspects.ads: Minor reformatting.
8232 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8234 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8235 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8237 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8239 2011-08-02 Yannick Moy <moy@adacore.com>
8241 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8242 mode on subprogram declaration outside of package specification, unless
8243 it is followed by a pragma Import
8244 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8245 Access_Type_Declaration): issue error in formal mode on access type
8246 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8248 (Analyze_Object_Declaration): issue error in formal mode on object
8249 declaration which does not respect SPARK restrictions
8250 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8251 declaration which does not respect SPARK restrictions
8252 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8253 error in formal mode on digits or delta constraint
8254 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8255 decimal fixed point type
8256 (Derived_Type_Declaration): issue error in formal mode on derived type
8257 other than type extensions of tagged record types
8258 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8259 with check on access definition
8260 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8261 mode on protected definition.
8262 (Analyze_Task_Definition): issue error in formal mode on task definition
8264 2011-08-02 Robert Dewar <dewar@adacore.com>
8266 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8268 2011-08-02 Javier Miranda <miranda@adacore.com>
8270 * sem_ch6.adb (Can_Override_Operator): New function.
8271 (Verify_Overriding_Indicator): Add missing code to check overriding
8272 indicator in operators. Fixes regression.
8273 (Check_Overriding_Indicator): Minor reformating after replacing the
8274 code that evaluates if the subprogram can override an operator by
8275 invocations to the above new function.
8277 (Write_Field26_Name): Add missing code to ensure that, following
8278 the documentation in einfo.ads, this field is not shown as attribute
8279 "Static_Initialization" on non-dispatching functions.
8281 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8283 * sem_res.adb (Resolve_Call): A call to
8284 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8285 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8286 i.e., when the second parameter is of type Time_Span.
8288 2011-08-02 Vincent Celier <celier@adacore.com>
8290 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8291 with an archive instead of -L<library dir> -l<library name>.
8293 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8295 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8296 mark the base types In_Use in addition to making the operations
8299 2011-08-02 Ed Falis <falis@adacore.com>
8301 * init.c: add and setup __gnat_signal_mask for the exception signals
8302 * s-inmaop-vxworks.adb: new file.
8303 * s-intman-vxworks.adb: remove unnecessary initializations and
8305 * s-intman-vxworks.ads: remove unnecessary variable
8306 * s-taprop-vxworks.adb: simplify signal initialization
8308 2011-08-02 Robert Dewar <dewar@adacore.com>
8310 * sem_ch8.adb: Minor code reorganization, comment updates.
8312 2011-08-02 Robert Dewar <dewar@adacore.com>
8314 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8315 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8317 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8318 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8320 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8322 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8323 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8324 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8325 use_type_clauses, to handle more efficiently use_type and use_all_type
8327 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8328 Ada2012 Use_All_Type clause.
8329 (Use_Class_Wide_Operations): new procedure.
8331 2011-08-02 Robert Dewar <dewar@adacore.com>
8333 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8334 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8335 expression to expression function.
8337 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8339 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8340 if types are compatible.
8342 2011-08-02 Yannick Moy <moy@adacore.com>
8344 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8345 returns True if its argument array types have same dimension and same
8346 static bounds at each index.
8347 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8348 OUT or IN OUT paramaters which are not view conversions in SPARK.
8349 (Resolve_Arithmetic_Op): issue an error in formal mode on
8350 multiplication or division with operands of fixed point types which are
8351 not qualified or explicitly converted.
8352 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8353 Boolean or array type (except String) operands.
8354 (Resolve_Equality_Op): issue an error in formal mode on equality
8355 operators for array types other than String with non-matching static
8357 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8358 for array types with non-matching static bounds. Factorize the code in
8359 Matching_Static_Array_Bounds.
8360 (Resolve_Qualified_Expression): issue an error in formal mode on
8361 qualified expressions for array types with non-matching static bounds.
8362 (Resolve_Type_Conversion): issue an error in formal mode on type
8363 conversion for array types with non-matching static bounds
8365 2011-08-02 Robert Dewar <dewar@adacore.com>
8367 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8369 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8371 * par-ch9.adb: save location of entry for proper error message.
8373 2011-08-02 Javier Miranda <miranda@adacore.com>
8375 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8376 (Use_Full_View) which permits this routine to climb through the
8377 ancestors using the full-view of private parents.
8378 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8379 Use_Full_View to true in calls to Is_Ancestor.
8380 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8381 true in call to Is_Ancestor.
8382 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8383 Use_Full_View to true in call to Is_Ancestor.
8384 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8385 call to Is_Ancestor.
8386 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8387 Use_Full_View to true in calls to Is_Ancestor.
8388 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8389 Make_Select_Specific_Data_Table, Register_Primitive,
8390 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8391 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8392 to true in call to Is_Ancestor.
8393 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8394 Use_Full_View to true in calls to Is_Ancestor.
8396 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8397 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8399 2011-08-02 Robert Dewar <dewar@adacore.com>
8401 * gnat_rm.texi: Minor reformatting.
8402 * sem_prag.adb: Minor reformatting.
8404 2011-08-02 Tristan Gingold <gingold@adacore.com>
8406 * vms_data.ads: Add VMS qualifier for -gnateP.
8408 2011-08-02 Robert Dewar <dewar@adacore.com>
8410 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8411 * par-ch7.adb (P_Package): Proper placement of aspects for package
8413 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8414 (End_Statements): Add Is_Sloc parameterr
8415 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8416 (Check_End): Ad Is_Sloc parameter
8417 (End_Statements): Add Is_Sloc parameterr
8419 2011-08-02 Vincent Celier <celier@adacore.com>
8421 * ug_words: Add VMS qualifier equivalent to -gnateP:
8422 /SYMBOL_PREPROCESSING.
8424 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8426 * gnat-style.texi: For hexadecimal numeric literals the typical
8427 grouping of digits is 4 to represent 2 bytes.
8428 A procedure spec which is split into several lines is indented two
8431 2011-08-02 Yannick Moy <moy@adacore.com>
8433 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8434 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8435 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8437 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8438 choice in array aggregate
8439 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8441 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8442 positional and named aggregate for record, or others in record
8443 aggregate, or multiple choice in record aggregate
8444 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8445 array operands to logical operations AND, OR and XOR do not have the
8446 same static lower and higher bounds
8447 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8449 2011-08-01 Robert Dewar <dewar@adacore.com>
8451 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8452 Replaces Last_Source_Node_In_Sequence.
8453 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8454 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8455 parens and blank in string (this was inconsistently implemented).
8457 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8458 blank in string (this was inconsistently implemented).
8460 (Set_Global_Switches): Set formal mode switches appropriately
8461 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8463 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8464 call Set_Error_Msg_Lang to set "spark" as language name.
8465 * par.adb: Remove unnecessary call to set formal language for errout
8466 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8467 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8469 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8470 calls to it, moved after resolution so that types are known
8471 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8472 result of concatenation is not of type String
8473 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8474 concatenation is not properly restricted
8475 * gnat_rm.texi: Add doc on pragma Spark_95.
8476 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8477 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8478 * gcc-interface/Make-lang.in: Update dependencies.
8480 2011-08-01 Javier Miranda <miranda@adacore.com>
8482 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8483 condition that detects if the overridden operation must replace an
8486 2011-08-01 Javier Miranda <miranda@adacore.com>
8488 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8489 code declarations inserted by Insert_Actions in each alternative of the
8490 N_Case_Expression node.
8492 2011-08-01 Robert Dewar <dewar@adacore.com>
8494 * sem_ch6.adb: Minor code reorganization.
8495 * sem_util.adb: Minor reformatting.
8497 2011-08-01 Pascal Obry <obry@adacore.com>
8499 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8500 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8502 2011-08-01 Yannick Moy <moy@adacore.com>
8504 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8505 literal or operator symbol which is prefixed
8506 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8507 mode on access attributes.
8508 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8509 that concatenation operands are properly restricted in formal mode
8510 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8511 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8512 result of the concatenation has a type different from String.
8513 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8514 Analyze_Quantified_Expression, Analyze_Slice,
8515 Analyze_Null): issue an error in formal mode on unsupported constructs
8517 (Analyze_Block_Statement): only issue error on source block statement
8518 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8519 function which returns the last node in a list of nodes for which
8520 Comes_From_Source returns True, if any
8521 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8522 Last_Source_Node_In_Sequence
8523 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8524 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8525 mode on unsupported constructs
8526 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8527 rest of the actions may be needed later on since the error is marked as
8529 * sinfo.ads: Typos in comments.
8531 2011-08-01 Pascal Obry <obry@adacore.com>
8533 * projects.texi: Minor editing.
8535 2011-08-01 Yannick Moy <moy@adacore.com>
8537 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8538 insertion character ~~
8539 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8540 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8541 with insertion character ~~
8542 (Set_Msg_Text): treat insertion character ~~
8543 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8544 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8545 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8546 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8547 errors related to the formal language restriction not serious
8548 (insertion character |).
8549 * par.adb (Par): set formal language for error messages if needed
8550 * sem_ch6.adb (Check_Missing_Return): take into account possible
8551 generated statements at the end of the function
8552 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8553 enumeration value to define a new pragma SPARK_95
8554 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8555 SPARK_Version): new type and variables to store the SPARK version
8557 (SPARK_Mode): return True when SPARK_Version is set
8558 * par-prag.adb: Correct indentation
8559 (Prag): take Pragma_SPARK_95 into account
8560 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8563 2011-08-01 Robert Dewar <dewar@adacore.com>
8565 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8566 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8567 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8569 2011-08-01 Pascal Obry <obry@adacore.com>
8571 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8572 Target_Name to Get_Path call.
8573 (Parse_Single_Project): Likewise.
8574 (Post_Parse_Context_Clause): Likewise.
8575 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8576 Call Initialise_Project_Path with the proper Target_Name.
8577 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8579 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8580 with the proper Target_Name.
8581 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8583 (Parse_Project_And_Apply_Config): Likewise.
8584 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8585 This is fine as this part of the code is supporting only native
8587 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8588 is fine as this part of the code is supporting only native compilation.
8590 2011-08-01 Yannick Moy <moy@adacore.com>
8592 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8593 of homonym, unless the homonym is one of the cases allowed in SPARK
8594 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8595 package declaration occurring after a body.
8597 2011-08-01 Robert Dewar <dewar@adacore.com>
8599 * checks.adb, exp_ch4.adb: Minor reformatting.
8601 2011-08-01 Javier Miranda <miranda@adacore.com>
8603 * einfo.ads (Access_Disp_Table): Fix documentation.
8604 (Dispatch_Table_Wrappers): Fix documentation.
8606 2011-08-01 Pascal Obry <obry@adacore.com>
8608 * prj-env.adb, prj-env.ads: Minor reformatting.
8610 2011-08-01 Yannick Moy <moy@adacore.com>
8612 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8613 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8614 procedures out of these packages.
8615 * errout.ads, errout.adb
8616 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8617 procedures in of this package
8618 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8619 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8620 on misplaced later vs initial declarations, like in Ada 83
8621 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8622 formal mode on attribute of private type whose full type declaration
8624 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8625 package declaration inside a package specification
8626 (Analyze_Full_Type_Declaration): issue error in formal mode on
8627 controlled type or discriminant type
8628 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8629 user-defined operator means that it should come from the source
8630 (New_Overloaded_Entity): issue error in formal mode on overloaded
8632 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8634 2011-08-01 Thomas Quinot <quinot@adacore.com>
8636 * atree.adb: Minor reformatting.
8637 * checks.adb: Minor reformatting.
8639 2011-08-01 Vincent Celier <celier@adacore.com>
8641 * s-parame-vms-ia64.ads: Fix typo in comment
8643 * s-parame-vms-restrict.ads: Removed, unused.
8645 2011-08-01 Javier Miranda <miranda@adacore.com>
8648 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8650 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8651 * sem_ch3.ads, sem_ch3.adb
8652 (Is_Constant_Bound): New extended version of the subprogram that was
8653 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8654 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8655 * sem_aux.ads (Constant_Value): Fix typo in comment.
8656 * checks.adb (Generate_Index_Checks): New implementation which, for
8657 array objects with constant bounds, generates the runtime check
8658 referencing the bounds of the array type. For other cases this routine
8659 provides its previous behavior obtaining such values from the array
8661 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8663 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8664 we cannot have semantic interpretations of the new node.
8666 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8668 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8671 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8673 * sem_ch8.adb: Minor code editing.
8674 * s-vxwext.adb: Remove trailing space.
8675 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8676 consistency with other files.
8678 2011-08-01 Thomas Quinot <quinot@adacore.com>
8680 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8682 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8684 * par-ch10.adb: reject parameterized expressions as compilation unit.
8685 * sem_ch4.adb: handle properly conditional expression with overloaded
8686 then_clause and no else_clause.
8688 2011-08-01 Tristan Gingold <gingold@adacore.com>
8690 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8691 like done by System.Aux_DEC.
8692 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8694 2011-08-01 Yannick Moy <moy@adacore.com>
8696 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8697 missing label at end of declaration (subprogram or package)
8698 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8699 of positional and named parameter association
8700 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8701 Error_Msg_SP which adds a prefix to the error message giving the name
8702 of the formal language analyzed
8703 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8704 access result type in subprogram, unconstrained array as result type,.
8705 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8707 * sem_ch8.adb: Code clean up.
8709 2011-08-01 Javier Miranda <miranda@adacore.com>
8711 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8712 * einfo.ads (Access_Disp_Table): Fix documentation.
8713 (Dispatch_Table_Wrappers): Fix documentation.
8714 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8715 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8716 to enforce the documentation of this attribute.
8717 (Set_Is_Interface): Cleanup the assertion.
8718 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8719 the Underlying_Type entity before reading attribute Access_Disp_Table.
8720 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8721 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8722 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8723 the Underlying_Type entity before reading attribute Access_Disp_Table.
8724 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8725 Locate the Underlying_Type entity before reading attribute
8728 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8730 * s-poosiz.ads: Additional overriding indicators.
8732 2011-08-01 Yannick Moy <moy@adacore.com>
8734 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8736 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8737 parameter specification does not include a subtype mark.
8738 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8739 formal mode on abstract subprogram.
8740 (Analyze_Subprogram_Specification): issue error in formal mode on
8741 user-defined operator.
8742 (Process_Formals): issue error in formal mode on access parameter and
8744 * sem_ch9.adb (Analyze_Abort_Statement,
8745 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8746 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8747 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8748 Analyze_Requeue, Analyze_Selective_Accept,
8749 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8750 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8751 issue error in formal mode on user-defined raise statement.
8753 2011-08-01 Thomas Quinot <quinot@adacore.com>
8755 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8756 declaration being hidden when overriding an implicit inherited
8758 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8759 (-gnats), do not complain about a source file that contains only a
8762 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8764 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8765 variable if already set.
8767 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8769 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8770 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8771 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8772 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8773 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8774 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8775 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8776 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8777 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8778 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8779 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8780 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8781 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8782 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8783 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8784 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8785 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8786 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8787 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8788 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8789 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8790 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8791 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8792 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8793 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8794 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8795 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8796 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8797 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8798 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8799 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8800 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8801 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8802 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8803 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8804 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8805 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8806 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8807 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8808 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8809 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8810 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8811 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8812 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8813 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8814 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8815 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8816 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8817 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8818 Use GNAT instead of GNARL.
8820 2011-08-01 Bob Duff <duff@adacore.com>
8822 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8823 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8824 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8827 2011-08-01 Yannick Moy <moy@adacore.com>
8829 * debug.adb (d.D) reverve flag for the SPARK mode
8830 (d.E) reverve flag for SPARK generation mode
8831 (d.F) reverve flag for Why generation mode
8832 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8833 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8834 functions which return True when the corresponding modes are set
8835 (Formal_Language): return "spark" or "alfa" when in formal verification
8837 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8838 Error_Msg to prefix the error message with a tag giving the formal
8840 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8841 message with a tag giving the formal language
8842 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8844 (Analyze_Case_Statement): issue error in formal mode on case statement
8845 with a single "others" case alternative
8846 (Analyze_Exit_Statement): issue errors in formal mode on exit
8847 statements which do not respect SPARK restrictions
8848 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8849 (Check_Unreachable_Code): always issue an error (not a warning) in
8850 formal mode on unreachable code (concerns both code after an infinite
8851 loop and after an unconditional jump, both not allowed in SPARK)
8852 * sem_ch6.adb (Analyze_Return_Statement): add call to
8853 Set_Return_Present for a procedure containing a return statement
8854 (already done for functions in Analyze_Function_Return)
8855 (Analyze_Function_Return): issue error in formal mode on extended
8856 return or if return is not last statement in function
8857 (Check_Missing_Return): issue error in formal mode if function does
8858 not end with return or if procedure contains a return
8859 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8860 function to detect if there is an inner scope of its parameter S which
8863 2011-08-01 Thomas Quinot <quinot@adacore.com>
8865 * sem_ch6.ads: Minor reformatting.
8867 2011-08-01 Javier Miranda <miranda@adacore.com>
8869 * sem_util.adb (Abstract_Interface_List): Complete condition when
8870 processing private type declarations to avoid reading unavailable
8872 (Is_Synchronized_Tagged_Type): Complete condition when processing
8873 private extension declaration nodes to avoid reading unavailable
8876 2011-08-01 Thomas Quinot <quinot@adacore.com>
8878 * sem_ch3.adb: Minor reformatting.
8880 2011-08-01 Thomas Quinot <quinot@adacore.com>
8882 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8883 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8884 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8885 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8886 for VMS, instead parametrize the common implementation with
8887 System.Parameters declarations.
8889 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8891 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8893 2011-08-01 Tristan Gingold <gingold@adacore.com>
8895 * seh_init.c: Fix SEH handler installation on win64.
8897 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8899 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8900 double analysis of an anonymous access to subprogram, because it can
8901 lead to improper sharing of profiles and a back-end crash.
8903 2011-08-01 Robert Dewar <dewar@adacore.com>
8905 * make.adb, sem_ch4.adb: Minor reformatting.
8906 * gcc-interface/Make-lang.in: Update dependencies.
8907 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8909 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8911 * gnat_rm.texi: Fix definition of Long_Integer.
8913 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8915 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8916 to prevent storage exhaustion.
8917 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8918 finalized is a function body, insert the cleanup code before the final
8919 return statement, to prevent spurious warnings.
8920 * s-pooglo.ads: add overriding indicator.
8922 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8924 * sem_ch4.adb (Operator_Check): improve error message when both a
8925 with_clause and a use_clause are needed to make operator usage legal.
8926 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8927 determine whether a compilation unit is visible within an other,
8928 either through a with_clause in the current unit, or a with_clause in
8929 its library unit or one one of its parents.
8931 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8933 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8934 over an arbitrary expression of an array or container type.
8935 * lib-xref.adb: clarify comment.
8937 2011-08-01 Bob Duff <duff@adacore.com>
8939 * einfo.ads: Minor reformatting.
8940 * debug.adb: Minor comment improvement.
8942 2011-08-01 Javier Miranda <miranda@adacore.com>
8944 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8945 consider hidden subprograms as valid candidates.
8947 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8949 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8951 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8953 * gnat_ugn.texi: Fix typo.
8955 2011-08-01 Robert Dewar <dewar@adacore.com>
8957 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8958 lib-xref.adb: Minor reformatting
8960 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8962 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8963 when to generate a call to Move_Final_List.
8964 (Has_Controlled_Parts): Remove this function.
8966 2011-08-01 Geert Bosch <bosch@adacore.com>
8968 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8971 2011-08-01 Thomas Quinot <quinot@adacore.com>
8973 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8974 explicit raise of a predefined exception as Comes_From_Source if the
8975 original N_Raise_Statement comes from source.
8977 2011-08-01 Robert Dewar <dewar@adacore.com>
8979 * sinfo.ads: Add comment.
8980 * sem_ch6.adb: Minor reformatting.
8982 2011-08-01 Robert Dewar <dewar@adacore.com>
8984 * freeze.adb (Freeze_Entity): Refine check for bad component size
8985 clause to avoid rejecting confirming clause when atomic/aliased present.
8987 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8989 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
8990 better determine whether an entity reference is a write.
8991 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
8993 * lib-xref.adb (Output_References): Do no suppress a read reference at
8994 the same location as an immediately preceeding modify-reference, to
8995 handle properly in-out actuals.
8997 2011-08-01 Tristan Gingold <gingold@adacore.com>
8999 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9001 2011-08-01 Quentin Ochem <ochem@adacore.com>
9003 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9004 heap to compute the result.
9006 2011-08-01 Robert Dewar <dewar@adacore.com>
9008 * atree.ads: Minor reformatting.
9010 2011-08-01 Emmanuel Briot <briot@adacore.com>
9012 * g-expect.adb (Get_Command_Output): Fix memory leak.
9014 2011-08-01 Geert Bosch <bosch@adacore.com>
9016 * cstand.adb (P_Float_Type): New procedure to print the definition of
9017 predefined fpt types.
9018 (P_Mixed_Name): New procedure to print a name using mixed case
9019 (Print_Standard): Use P_Float_Type for printing floating point types
9020 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9021 precision IEEE float.
9023 2011-08-01 Thomas Quinot <quinot@adacore.com>
9025 * sem_ch3.adb: Minor reformatting.
9027 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9029 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9030 the completion of a generic function, insert the new body rather than
9031 rewriting the original.
9033 2011-08-01 Yannick Moy <moy@adacore.com>
9035 * sinfo.ads, errout.ads: Typos in comments.
9037 2011-08-01 Robert Dewar <dewar@adacore.com>
9039 * par-endh.adb: Minor reformatting.
9041 2011-08-01 Robert Dewar <dewar@adacore.com>
9043 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9044 (Pre_Post_Aspects): New subtype.
9045 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9046 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9047 * par-ch7.adb (P_Package): Remove Decl parameter
9048 (P_Package): Handle new syntax for aspects (before IS)
9049 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9051 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9052 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9053 (P_Package): Remove Decl parameter
9054 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9056 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9058 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9059 * sinfo.ads: Document new syntax for aspects in packages etc.
9060 * sprint.adb: Handle new syntax of aspects before IS in package
9062 2011-08-01 Thomas Quinot <quinot@adacore.com>
9064 * atree.ads: Minor reformatting.
9065 * sem_prag.adb: Minor reformatting.
9067 2011-08-01 Robert Dewar <dewar@adacore.com>
9069 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9070 case expr alternative.
9072 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9074 * sem_ch12.adb: Fix typo.
9076 2011-08-01 Geert Bosch <bosch@adacore.com>
9078 * sem_prag.adb (Check_No_Link_Name): New procedure.
9079 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9080 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9081 instead of Standard_Long_Long_Float_Size global. Preparation for
9082 eventual removal of per type constants.
9083 * exp_util.ads (Get_Stream_Size): New function returning the stream
9084 size value of subtype E.
9085 * exp_util.adb (Get_Stream_Size): Implement new function.
9086 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9088 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9090 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9092 2011-08-01 Geert Bosch <bosch@adacore.com>
9094 * cstand.adb: Fix comments.
9095 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9098 2011-08-01 Robert Dewar <dewar@adacore.com>
9100 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9102 2011-08-01 Geert Bosch <bosch@adacore.com>
9104 * atree.ads: Fix comment.
9106 2011-08-01 Robert Dewar <dewar@adacore.com>
9108 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9109 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9110 * par.adb: Add with for Namet.Sp.
9111 * par-tchk.adb: Minor reformatting.
9113 2011-08-01 Vincent Celier <celier@adacore.com>
9115 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9116 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9117 of the init procedure of a SAL.
9118 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9121 2011-08-01 Thomas Quinot <quinot@adacore.com>
9123 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9126 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9128 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9130 2011-08-01 Thomas Quinot <quinot@adacore.com>
9132 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9133 conformant with its spec (return True only for types that have
9134 an overriding Initialize primitive operation that prevents them from
9135 having preelaborable initialization).
9136 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9137 initialization for controlled types in Ada 2005 or later mode.
9139 2011-08-01 Robert Dewar <dewar@adacore.com>
9141 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9143 (Same_Aspect): New function.
9144 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9145 Type_Invariant, Precondition, Postcondition.
9146 * snames.ads-tmpl: Add Name_Type_Invariant.
9148 2011-08-01 Robert Dewar <dewar@adacore.com>
9150 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9152 (Freeze_All_Ent): Fix error in handling inherited aspects.
9153 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9154 already analyzed, but don't skip entire processing of a declaration,
9155 that's wrong in some cases of declarations being rewritten.
9156 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9157 Don't delay for integer, string literals
9158 Treat predicates in usual manner for delay, remove special case code,
9160 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9161 (Build_Predicate_Function): Update saved expression in aspect
9162 (Build_Invariant_Procedure): Update saved expression in aspect
9163 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9164 of replacement of discriminant references if the reference is simple.
9166 2011-08-01 Robert Dewar <dewar@adacore.com>
9168 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9169 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9170 Static_Predicate and Dynamic_Predicate.
9171 (Build_Predicate_Function): Add processing for Static_Predicate
9172 and Dynamic_Predicate.
9173 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9174 (From_Static_Predicate): New flag
9175 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9177 2011-08-01 Robert Dewar <dewar@adacore.com>
9179 * usage.adb: Documentation cleanup for Ada version modes in usage.
9180 * expander.adb: Minor reformatting.
9182 2011-08-01 Robert Dewar <dewar@adacore.com>
9184 * atree.ads: Minor comment fix.
9185 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9186 a-witeio.ads, sem_prag.adb: Minor reformatting.
9188 2011-08-01 Doug Rupp <rupp@adacore.com>
9190 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9191 pointers. Use descrip.h header file for convenience. Add some
9194 2011-08-01 Robert Dewar <dewar@adacore.com>
9196 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9197 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9198 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9200 (Check_Aspect_At_End_Of_Declarations): New procedure
9201 (Analye_Aspect_Specification): Minor changes for above procedures
9202 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9203 specification node as well.
9205 2011-08-01 Pascal Obry <obry@adacore.com>
9207 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9208 Windows files. Use GetFilesAttributes() in this case to check for file
9209 existence instead of returning with an error code.
9211 2011-08-01 Vincent Celier <celier@adacore.com>
9213 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9214 High is above Source length.
9216 2011-08-01 Robert Dewar <dewar@adacore.com>
9218 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9220 2011-08-01 Robert Dewar <dewar@adacore.com>
9222 * aspects.ads (Boolean_Aspects): New subtype.
9223 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9224 for derived types in cases where the parent type and derived type have
9226 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9227 with aspects when parent type also has aspects.
9228 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9229 boolean expression at this point).
9230 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9231 accordance with final decision on the Ada 2012 feature.
9232 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9234 2011-08-01 Matthew Heaney <heaney@adacore.com>
9236 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9238 2011-08-01 Pascal Obry <obry@adacore.com>
9240 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9241 Fix Replace_Slice when High is above current string size.
9242 (Replace_Slice): Fix DL computation when High is above current
9245 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9247 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9249 2011-08-01 Matthew Heaney <heaney@adacore.com>
9251 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9254 2011-08-01 Pascal Obry <obry@adacore.com>
9256 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9259 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9261 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9262 access to protected subprograms in generic bodies.
9263 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9264 protected type, indicate that the convention of the subprogram is
9265 Convention_Protected, because it may be used in subsequent declarations
9266 within the protected declaration.
9268 2011-08-01 Vincent Celier <celier@adacore.com>
9270 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9271 and "final" procedures when the name of the library is "ada", to avoid
9272 duplicate symbols "adainit" and "adafinal" in executables.
9274 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9276 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9277 quantified expression that appears within a postcondition and uses the
9278 Ada2012 'Result attribute.
9280 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9282 * init.c (__gnat_error_handler): Cast reason to int.
9283 (__gnat_install_handler): Explain sa_sigaction use.
9285 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9287 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9288 subprogram has copy-in copy-out parameters, try to promote the mode of
9289 the return type if it is passed in registers.
9291 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9293 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9294 left operand as addressable.
9296 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9298 * gcc-interface/gigi.h (build_function_stub): Remove.
9299 (build_return_expr): Likewise.
9300 (convert_vms_descriptor): Declare.
9301 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9302 (build_function_stub): Move to...
9303 * gcc-interface/utils2.c (build_return_expr): Move to...
9304 * gcc-interface/trans.c (build_function_stub): ...here.
9305 (build_return_expr): ...here.
9306 (Subprogram_Body_to_gnu): Add local variable for language_function.
9307 Disconnect the parameter attributes cache, if any, once done with it.
9308 Call end_subprog_body only after setting the end_locus.
9309 Build the stub associated with the function, if any, at the very end.
9310 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9311 variables and streamline control flow.
9313 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9316 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9319 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9322 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9323 Assign to act.sa_sigaction.
9324 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9325 current->return_address to char * before arithmetic.
9327 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9329 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9330 Correct argument types.
9331 Extract code from reason.
9332 (__gnat_install_handler): Assign to act.sa_sigaction.
9334 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9336 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9337 (GNAT1_OBJS): ...here.
9339 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9342 * g-socthi-mingw.adb (Fill): Fix formatting.
9344 * gcc-interface/gigi.h: Move around comment.
9346 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9349 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9351 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9354 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9356 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9358 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9359 range comparison if Pmode is SImode.
9361 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9362 Eric Botcazou <ebotcazou@adacore.com>
9364 * adadecode.c: Wrap up in extern "C" block.
9365 * adadecode.h: Likewise.
9366 * adaint.c: Likewise. Remove 'const' keyword.
9367 * adaint.h: Likewise.
9369 * atree.h: Likewise.
9371 * cstreams.c: Likewise.
9375 * final.c: Likewise.
9377 * initialize.c: Likewise.
9379 * namet.h: Likewise.
9380 * nlists.h: Likewise.
9381 * raise.c: Likewise.
9382 * raise.h: Likewise.
9383 * repinfo.h: Likewise.
9384 * seh_init.c: Likewise.
9385 * targext.c: Likewise.
9386 * tracebak.c: Likewise.
9387 * uintp.h: Likewise.
9388 * urealp.h: Likewise.
9389 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9390 * xsinfo.adb: Likewise.
9391 * xsnamest.adb: Likewise.
9392 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9393 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9394 * gcc-interface/misc.c: Likewise.
9395 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9396 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9397 ada/targext.o here...
9398 (GNAT_ADA_OBJS): ...and not here.
9399 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9400 (GNATBIND_OBJS): Reorder.
9402 2011-07-07 Richard Henderson <rth@redhat.com>
9404 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9405 dwarf2out_frame_init.
9407 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9409 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9411 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9414 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9416 2011-07-06 Richard Guenther <rguenther@suse.de>
9418 * gcc-interface/misc.c (gnat_init): Merge calls to
9419 build_common_tree_nodes and build_common_tree_nodes_2.
9420 Re-initialize boolean_false_node.
9422 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9423 Olivier Hainque <hainque@adacore.com>
9424 Nicolas Setton <setton@adacore.com>
9426 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9427 the type according to the ARTIFICIAL_P parameter.
9428 (create_type_decl): Likewise.
9429 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9431 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9433 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9434 (gnatbind): Likewise.
9436 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9438 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9440 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9442 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9443 local variable throughout. Remove useless call to Base_Type.
9444 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9445 Take it also into account for the volatileness of the field. Set the
9446 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9448 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9450 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9451 on a dereference built for a by-ref object if it has an address clause.
9453 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9455 * einfo.ads (Address_Taken): Document use for the second argument of
9456 Asm_Input and Asm_Output attributes.
9457 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9458 argument is an entity name, then set Address_Taken on it.
9459 <Attribute_Asm_Output>: Likewise.
9460 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9461 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9462 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9463 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9465 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9468 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9470 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9472 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9473 (ada/utils.o): Update dependencies.
9474 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9475 ../../../libcpp/libcpp.a.
9476 * gcc-interface/utils.c: Include common/common-target.h.
9477 (process_attributes): Use targetm_common.have_named_sections.
9479 2011-06-07 Richard Guenther <rguenther@suse.de>
9481 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9484 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9486 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9487 TREE_THIS_NOTRAP flag.
9489 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9491 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9494 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9496 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9497 constants whose full view has discriminants specially.
9499 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9501 * gcc-interface/utils.c: Include diagnostic.h.
9502 (gnat_write_global_declarations): Output debug information for all
9503 global type declarations before finalizing the compilation unit.
9504 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9506 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9508 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9510 2011-05-25 Kai Tietz <ktietz@redhat.com>
9512 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9513 initialization instead of const/none-const pointer assignment.
9515 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9517 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9518 $(EXTRA_GNAT1_OBJS).
9519 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9520 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9521 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9522 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9523 libcommon-target.a instead of prefix.o.
9525 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9528 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9530 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9532 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9533 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9534 instead of version.o.
9536 2011-05-18 Kai Tietz <ktietz@redhat.com>
9538 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9539 boolean_false_node instead of integer_zero_node.
9540 (convert_with_check): Likewise.
9541 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9543 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9545 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9546 type of the parameter is an unconstrained array, convert the actual to
9547 the type of the formal in the In Out and Out cases as well.
9549 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9551 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9552 call build_function_type_array or build_varargs_function_type_array
9554 (create_subprog_type): Don't call build_function_type; call
9555 build_function_type_vec instead.
9557 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9559 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9560 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9561 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9563 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9565 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9567 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9568 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9570 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9572 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9574 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9576 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9577 instead of accessing TYPE_ARG_TYPES directly.
9578 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9580 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9583 * gcc-interface/gigi.h (get_variant_part): Declare.
9584 * gcc-interface/decl.c (get_variant_part): Make global.
9585 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9586 types have the same constant size, are record types and T1 has a
9587 variant part while T2 doesn't.
9589 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9591 * gcc-interface/utils.c (begin_subprog_body): Do not call
9593 (end_subprog_body): Likewise.
9595 2011-05-04 Richard Guenther <rguenther@suse.de>
9597 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9599 (pos_to_constructor): Likewise.
9601 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9602 Eric Botcazou <ebotcazou@adacore.com>
9604 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9605 of build_function_type. Adjust calls to...
9606 (build_raise_check): ...this. Do not take a void_tree parameter.
9607 Call build_function_type_list instead of build_function_type.
9608 Fix head comment and swap couple of conditional blocks.
9610 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9612 * gnatvsn.ads (Library_Version): Bump to 4.7.
9613 (Current_Year): Bump to 2011.
9615 2011-04-29 Michael Matz <matz@suse.de>
9617 * gcc-interface/misc.c (gnat_handle_option): Set
9618 warn_maybe_uninitialized.
9620 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9622 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9623 the Watson/McCabe paper.
9625 2011-04-23 Jim Meyering <meyering@redhat.com>
9627 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9629 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9631 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9634 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9636 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9638 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9639 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9640 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9641 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9642 <all>: Do not set flags on the reused DECL node coming from an alias.
9643 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9644 don't need debug info here...
9645 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9646 (gigi): Adjust calls to create_subprog_decl.
9647 (build_raise_check): Likewise.
9648 (establish_gnat_vms_condition_handler): Likewise.
9649 (Compilation_Unit_to_gnu): Likewise.
9650 (gnat_to_gnu): Likewise.
9652 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9654 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9655 (NO_REORDER_ADAFLAGS): New variable.
9656 (EXTRA_GNATTOOLS): Always define.
9657 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9658 Clean up and adjust list of files compiled with special options.
9659 * gcc-interface/Make-lang.in: Likewise.
9660 (ada/decl.o): Cosmetical change.
9661 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9663 2011-04-20 Jim Meyering <meyering@redhat.com>
9665 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9667 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9669 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9670 $(CFLAGS) on the link line.
9672 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9674 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9675 padded type built for the return type if it is unconstrained.
9677 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9679 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9681 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9683 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9684 before calling TREE_CHAIN.
9685 * gcc-interface/misc.c (gnat_init_ts): New function.
9686 (LANG_HOOKS_INIT_TS): Define.
9688 2011-04-12 Martin Jambor <mjambor@suse.cz>
9690 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9691 instead of cgraph_node.
9693 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9695 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9696 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9699 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9701 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9702 of aggregate types that contain a placeholder.
9704 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9706 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9708 (handle_type_generic_attribute): Likewise.
9710 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9713 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9715 2011-04-04 Kai Tietz <ktietz@redhat.com>
9718 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9721 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9723 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9724 type case, do not strip a padding type around the array type.
9726 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9728 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9731 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9733 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9734 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9735 code for -feliminate-unused-debug-types.
9736 (gnat_post_options): Likewise.
9738 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9740 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9741 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9744 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9746 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9747 DECL_ARTIFICIAL flag on enumeration types.
9749 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9751 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9752 fat pointer types artificial unconditionally.
9753 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9756 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9758 * gcc-interface/gigi.h (get_dummy_type): Declare.
9759 (build_dummy_unc_pointer_types): Likewise.
9760 (finish_fat_pointer_type): Likewise.
9761 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9762 fat pointer type has been built, complete it in place.
9763 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9764 and thin pointers. Remove useless variable.
9765 (finish_fat_pointer_type): Make global and move to...
9766 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9767 (get_dummy_type): New function.
9768 (build_dummy_unc_pointer_types): Likewise.
9769 (gnat_pushdecl): Propage the name to the anonymous variants only.
9770 (update_pointer_to): Only adjust the pointer types in the unconstrained
9773 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9775 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9776 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9777 if this is a Taft amendment type and the full declaration is available.
9778 * gcc-interface/trans.c (process_type): Likewise.
9779 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9780 (process_freeze_entity): Likewise.
9781 * gcc-interface/utils.c (dummy_global): New static variable.
9782 (gnat_write_global_declarations): If there are types declared as used
9783 at the global level, insert them in the global hash table.
9785 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9787 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9788 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9789 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9791 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9792 flag of the type accordingly.
9793 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9795 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9797 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9798 finalizing types when updating the pointers to the designated type.
9799 <all>: Finalize the deferred types even if we didn't defer processing
9800 of incomplete types in this invocation.
9802 2011-04-01 Olivier Hainque <hainque@adacore.com>
9803 Nicolas Setton <setton@adacore.com>
9804 Eric Botcazou <ebotcazou@adacore.com>
9806 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9807 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9809 2011-03-28 Kai Tietz <ktietz@redhat.com>
9811 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9813 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9814 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9816 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9818 2011-03-28 Tristan Gingold <gingold@adacore.com>
9821 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9822 Use ada output of gnatbind.
9823 (ada/b_gnatb.adb): Ditto.
9824 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9825 (ada.mostlyclean, ada.stage1)
9826 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9827 (ada.stagefeedback): Adjust.
9828 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9829 Use ada output of gnatbind.
9830 (b_gnatm.adb): Ditto.
9831 (b_gnatl.o, b_gnatm.o): New rules.
9833 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9835 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9836 for the padded type built to support a specified size or alignment.
9838 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9840 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9841 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9842 unconditionally to the end of the unit when the designated type is
9844 <all>: Rename local variable. Attempt to un-defer types only and do it
9845 for limited_with'ed types as well.
9846 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9847 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9848 consistently and remove redundant call to finalize_from_with_types.
9850 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9852 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9853 subprograms without a previous spec declared in the same unit.
9854 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9855 subprograms at the end of the unit instead of at the beginning.
9856 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9857 isn't public for the special handling of non-inline functions nested
9858 inside inline external functions.
9860 2011-03-25 Jeff Law <law@redhat.com>
9862 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9864 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9866 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9867 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9868 to compute Set_Size_Depends_On_Discriminant.
9869 (Layout_Type): Call it on array types in back-end layout mode.
9870 * sem_util.adb (Requires_Transient_Scope): Return true for array
9871 types only if the size depends on the value of discriminants.
9872 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9873 type if the RHS is a call to a function that returns an unconstrained
9874 type with default discriminant.
9876 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9878 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9879 non-conversion to the nominal result type at the end.
9881 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9883 * gcc-interface/trans.c (create_temporary): New function taken from...
9884 (create_init_temporary): ...here. Call it.
9885 (call_to_gnu): Create the temporary for the return value early, if any.
9886 Create it for a function with copy-in/copy-out parameters if there is
9887 no target; in other cases of copy-in/copy-out, use another temporary.
9888 Push the new binding level lazily. Add and rename local variables.
9890 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9892 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9894 (set_rm_size): Likewise.
9896 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9898 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9899 for the padded type built in order to support a specified alignment.
9900 Fix incorrect formatting.
9902 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9905 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9907 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9909 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9910 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9911 to the end of the list. Adjust recursive call. Rename local variable.
9912 If REORDER is true, reorder components of the record type.
9913 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9914 components_to_record and adjust the parameter list.
9916 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9918 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9919 disabled, use the variable for bounds of loop iteration scheme.
9921 2011-03-21 Kai Tietz <ktietz@redhat.com>
9924 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9926 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9928 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9929 out whether the expression is read-only. Short-circuit placeholder
9930 case and rename a couple of local variables.
9932 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9934 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9935 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9936 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9937 (convert): Deal with conversions from a smaller form type specially.
9939 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9941 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9942 its argument, except for the special -I- switch.
9944 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9946 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9949 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9951 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9953 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9955 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9957 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9958 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9959 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9960 Do not generate the check directly, instead instantiate the template
9961 check present in the descriptor.
9962 (make_descriptor_field): Move around.
9963 (build_vms_descriptor32): Build a template check in the POINTER field.
9964 (build_vms_descriptor): Remove useless suffixes.
9965 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9967 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9970 * targext.c: Include target files if IN_RTS is defined.
9972 2011-01-26 Richard Guenther <rguenther@suse.de>
9975 * targext.c: Include config.h.
9976 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9979 2011-01-04 Pascal Obry <obry@adacore.com>
9980 Eric Botcazou <ebotcazou@adacore.com>
9982 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9984 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9986 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9987 end-of-case on the end label and its associated gotos, if any.
9989 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9991 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
9992 expressions of the parameter cache within the statement group of
9995 2011-01-04 Olivier Hainque <hainque@adacore.com>
9996 Eric Botcazou <ebotcazou@adacore.com>
9998 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
9999 (set_end_locus_from_node): New function.
10000 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10001 make and the function end_locus.
10002 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10003 for the elaboration subprogram.
10004 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10005 set the end_locus of the expression as well.
10007 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10010 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10011 variables that are referenced in exception handlers volatile.
10015 Copyright (C) 2011 Free Software Foundation, Inc.
10017 Copying and distribution of this file, with or without modification,
10018 are permitted in any medium without royalty provided the copyright
10019 notice and this notice are preserved.