1 2011-08-05 Bob Duff <duff@adacore.com>
3 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
4 allocation for Objects component. This simplifies the code somewhat. It
5 is also a little more efficient in the not-so-unusual case where there
6 are no controlled objects allocated.
7 Make Finalization_Started flag atomic.
8 (Finalize): Avoid unnecessary detachment of items from the list.
11 2011-08-05 Ed Schonberg <schonberg@adacore.com>
13 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
14 package whose name is the same as that of the generic unit, or its
17 2011-08-05 Bob Duff <duff@adacore.com>
19 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
20 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
23 2011-08-05 Arnaud Charlet <charlet@adacore.com>
25 * make.adb (Linking_Phase): No longer need to set source search path
26 before calling gnatlink in CodePeer mode.
27 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
28 gcc in CodePeer mode, since the binder generated file no longer has a
30 * switch.ads, switch.adb (Is_Language_Switch): Removed.
31 * switch-c.adb: Update comment.
33 2011-08-05 Thomas Quinot <quinot@adacore.com>
35 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
37 2011-08-05 Nicolas Roche <roche@adacore.com>
39 * gnat_ugn.texi: Fix minor syntax error issue.
41 2011-08-05 Vincent Celier <celier@adacore.com>
43 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
44 delete or close the file when the call to gnatmake returns a non
45 successful return code.
47 2011-08-05 Ed Schonberg <schonberg@adacore.com>
49 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
50 check, indicate that the copy of the original node does not come from
51 source, to prevent an infinite recursion of the expansion.
53 2011-08-05 Johannes Kanig <kanig@adacore.com>
55 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
56 VC generation for subprogram bodies.
58 2011-08-05 Yannick Moy <moy@adacore.com>
61 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
62 the base type with the smallest allowed base type.
64 2011-08-05 Sergey Rybin <rybin@adacore.com>
66 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
69 2011-08-05 Ed Schonberg <schonberg@adacore.com>
71 * sem_ch12.ads: minor comment updates.
73 2011-08-05 Ed Schonberg <schonberg@adacore.com>
75 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
76 instantiation and a formal package the compiler generates a package
77 renaming declaration so that the generic name within the declaration
78 is interpreted as a renaming of the instance. At the end of a formal
79 package declaration, this renaming must become invisible.
81 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
83 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
84 comparison and rely on concrete entities instead.
86 2011-08-05 Ed Schonberg <schonberg@adacore.com>
88 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
89 and discriminants, to indicate that the type has an access discriminant
90 that supports implicit dereference.
91 * snames.ads-tmpl: Add names of aspects and attributes related to
92 Ada2012 iterators: constant_indexing, default_iterator,
93 iterator_element, implicit_dereference, variable_indexing.
94 * aspects.ads, aspects.adb: entries for iterator-related aspects.
95 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
96 iterator-related aspects.
97 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
99 2011-08-05 Sergey Rybin <rybin@adacore.com>
101 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
102 metrics in gnatmetric to cover new kinds of coupling mentrics.
104 2011-08-05 Steve Baird <baird@adacore.com>
106 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
107 of calling the user-defined main subprogram.
108 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
109 is set) Call_Main_Subprogram ahead of, as opposed to
111 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
112 generation of a "with" of the user-defined main subprogram.
113 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
114 (which is now called from Gen_Main instead).
116 2011-08-05 Emmanuel Briot <briot@adacore.com>
118 * projects.texi: Added reference to the Makefile package.
120 2011-08-05 Thomas Quinot <quinot@adacore.com>
122 * exp_ch7.adb: Minor comment rewording.
124 2011-08-05 Ed Falis <falis@adacore.com>
126 * env.c: Fix comment.
128 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
130 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
131 character comparison and rely on concrete entities instead.
133 2011-08-05 Ed Schonberg <schonberg@adacore.com>
135 * sem_ch3.adb: (Check_Private_Overriding): better error message,
136 suggested by AI95-0068.
138 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
140 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
141 the two potential initialization calls. This accounts for any
142 access-before-elaboration checks which may precede the initialization
144 (Next_Suitable_Statement): New routine. Returns the next real statement
145 after the input node while skipping generated checks.
146 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
147 with comment on usage.
148 Do not generate Elaborate_All when the trigger is a finalization call
149 coming from a type init proc.
150 (Check_Elab_Call): Propagate the initialization procedure context to
151 subsequent calls to Check_A_Call.
152 (Check_Internal_Call_Continue): Propagate the initialization procedure
153 context to subsequent calls to Check_Elab_Call.
154 (Is_Finalization_Procedure): New routine. Returns True if the input
155 entity denotes a [Deep_]Finalize routine.
156 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
157 along with comment on usage.
159 2011-08-05 Vadim Godunko <godunko@adacore.com>
161 * s-atocou.ads: Add list of supported platforms.
163 2011-08-05 Yannick Moy <moy@adacore.com>
165 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
167 * opt.ads (Disable_ALI_File): new Boolean flag
168 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
170 2011-08-05 Ed Falis <falis@adacore.com>
172 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
173 environ is properly defined.
175 2011-08-05 Vincent Celier <celier@adacore.com>
177 * make.adb (Compilation_Phase): Exit immediately when all objects have
178 been found up to date, to avoid multiple exit messages.
179 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
180 same project for languages with no compiler.
181 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
183 2011-08-05 Robert Dewar <dewar@adacore.com>
185 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
186 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
187 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
188 s-atocou-builtin.adb: Minor reformatting.
190 2011-08-05 Yannick Moy <moy@adacore.com>
192 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
193 if the node to wrap is a pragma check, this node and enclosed
194 expression are not expanded, so do not apply any transformations here.
195 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
196 introducing transient scopes.
198 2011-08-05 Jose Ruiz <ruiz@adacore.com>
200 * adaint.c (__gnat_set_writable, __gnat_set_readable,
201 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
202 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
203 routine is available, so we use the default implementation of these
205 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
206 support for copying attributes on VxWorks 6.
208 2011-08-05 Yannick Moy <moy@adacore.com>
210 * debug.adb: Remove use of -gnatd.D.
211 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
212 * opt.ads: Simplify variables for ALFA mode, to keep one only
213 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
216 2011-08-05 Vincent Celier <celier@adacore.com>
218 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
219 Builder'Default_Switches.
221 2011-08-05 Vincent Celier <celier@adacore.com>
223 * makeusg.adb: Add lines for --create-map-file switches.
225 2011-08-05 Ed Schonberg <schonberg@adacore.com>
227 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
228 profile is incomplete and the full view is available, replace it with
230 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
231 incomplete, freezing the subprogram is delayed until the full view is
233 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
234 fixed-point multiplication operator and the predefined operator is
235 resolved in favor of the user-defined one.
237 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
239 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
242 2011-08-04 Ed Schonberg <schonberg@adacore.com>
244 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
245 whether a type lacks user-defined Read or Write operations, or has a
246 component that lacks them.
247 * sem_attr.adb (Check_Stream_Attribute): if restriction
248 No_Default_Stream_Attributes is active, verify that all subcomponent
249 types of the target have user-defined stream operations, and report
251 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
252 * exp_strm.adb: Build_Elementary_Input_Call,
253 Build_Elementary_Write_Call): remove checks for restriction
254 No_Default_Stream_Attributes, now checked in semantics.
256 2011-08-04 Vincent Celier <celier@adacore.com>
258 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
259 switches on the command line, look for all valid --RTS switches in the
260 Builder switches and for each language use the first runtime name found
262 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
263 command line and there is no auto-configuration.
264 (Runtime_Name_Set_For): New function.
266 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
268 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
269 elaborate initialization expression for variable Abort when processing
270 a package body or a declaration.
271 (Create_Finalizer): Propagate the package context when creating the
272 exception-related variables.
273 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
274 For_Package along with usage comment.
276 2011-08-04 Arnaud Charlet <charlet@adacore.com>
278 * gcc-interface/Makefile.in: Clean up targets.
279 Enable new package for atomic counters and copy-on-write implementation
280 of unbounded strings on x86 platforms.
281 * gcc-interface/Make-lang.in: Update dependencies.
283 2011-08-04 Robert Dewar <dewar@adacore.com>
285 * exp_ch7.adb: Minor reformatting.
287 2011-08-04 Robert Dewar <dewar@adacore.com>
289 * exp_strm.adb: Minor reformatting.
291 2011-08-04 Vadim Godunko <godunko@adacore.com>
293 * s-atocou.adb: Replace by dummy version and use on targets where atomic
294 operations are not supported.
295 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
296 * s-atocou-x86.adb: New file.
297 * Makefile.rtl: Add s-atocou.o file
299 2011-08-04 Arnaud Charlet <charlet@adacore.com>
301 * make.adb (Compile): Move setting of CodePeer_Mode to ...
302 (Compilation_Phase): ... here.
303 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
305 2011-08-04 Thomas Quinot <quinot@adacore.com>
307 * Make-generated.in: Fix minor typo in comment.
309 2011-08-04 Thomas Quinot <quinot@adacore.com>
311 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
314 2011-08-04 Robert Dewar <dewar@adacore.com>
316 * a-coinho.adb: Minor reformatting.
318 2011-08-04 Robert Dewar <dewar@adacore.com>
320 * a-coinho.ads: Minor reformatting.
322 2011-08-04 Vadim Godunko <godunko@adacore.com>
324 * s-atocou.ads, s-atocou.adb: New files.
325 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
326 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
327 direct use of GCC's atomic builtins and replace them by use of new
328 atomic counter package.
330 2011-08-04 Ed Schonberg <schonberg@adacore.com>
332 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
334 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
336 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
337 with a call to Get_External_Tag.
338 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
339 subprogram usage. Remove the guard against package declarations and
340 bodies since Build_Cleanup_Statements is no longer invoked in that
342 (Build_Components): Initialize Tagged_Type_Stmts when the context
343 contains at least one library-level tagged type.
344 (Build_Finalizer): New local variables Has_Tagged_Types and
345 Tagged_Type_Stmts along with associated comments on usage. Update the
346 logic to include tagged type processing.
347 (Create_Finalizer): Insert all library-level tagged type unregistration
348 code before the jump block circuitry.
349 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
350 (Expand_N_Package_Declaration): Remove the call to
351 Build_Cleanup_Statements.
352 (Process_Tagged_Type_Declaration): New routine. Generate a call to
353 unregister the external tag of a tagged type.
354 (Processing_Actions): Reimplemented to handle tagged types.
355 (Process_Declarations): Detect the declaration of a library-level
356 tagged type and carry out the appropriate actions.
357 (Unregister_Tagged_Types): Removed. The machinery has been directly
358 merged with Build_Finalizer.
360 2011-08-04 Robert Dewar <dewar@adacore.com>
362 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
363 gnatls.adb, exp_ch3.adb: Minor reformatting.
365 2011-08-04 Marc Sango <sango@adacore.com>
367 * sem_attr.adb (Analyze_Attribute): Replace the message
368 "invisible attribute of}" of the spark restriction violation in
369 attribute reference by the simple message "invisible attribute of type".
370 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
371 two insertion characters: '&' and '}'.
373 2011-08-04 Vadim Godunko <godunko@adacore.com>
375 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
376 * a-coinho.ads, a-coinho.adb: New file.
377 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
379 2011-08-04 Nicolas Roche <roche@adacore.com>
381 * alfa_test.adb: Not all ali files are containing alfa information even
382 if compiled with -gnatd.F. So suppress warning about missing ALFA
385 2011-08-04 Yannick Moy <moy@adacore.com>
387 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
389 * put_alfa.adb: Check that scope name is not empty.
391 2011-08-04 Ed Schonberg <schonberg@adacore.com>
393 * exp_ch3.adb (Stream_Operation_Ok): new predicate
394 Needs_Elementary_Stream_Operation, to determine whether user-defined
395 Read and Write attributes are available for the elementary components
396 of the given type. If only the predefined attributes are available,
397 then when restriction No_Default_Stream_Attributes is active the
398 predefined stream attributes for the composite type cannot be created.
400 2011-08-04 Robert Dewar <dewar@adacore.com>
402 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
403 Put routines in alpha order
405 2011-08-04 Jose Ruiz <ruiz@adacore.com>
407 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
408 * gcc-interface/Make-lang.in: Update dependencies.
410 2011-08-04 Arnaud Charlet <charlet@adacore.com>
412 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
413 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
416 2011-08-04 Robert Dewar <dewar@adacore.com>
418 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
419 lib-xref-alfa.adb: Minor reformatting.
421 2011-08-04 Marc Sango <sango@adacore.com>
423 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
424 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
425 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
428 2011-08-04 Tristan Gingold <gingold@adacore.com>
430 * bindgen.adb (Gen_Adainit_C): Remove.
431 (Gen_Adafinal_C): Ditto.
432 (Gen_Elab_Externals_C): Ditto.
433 (Gen_Elab_Calls_C): Ditto.
434 (Gen_Elab_Order_C): Ditto.
435 (Gen_Elab_Defs_C): Ditto.
436 (Gen_Finalize_Library_C): Ditto.
437 (Gen_Finalize_Library_Defs_C): Ditto.
439 (Gen_Output_File_C): Ditto.
440 (Gen_Restrictions_C): Ditto.
441 (Gen_Versions_C): Ditto.
442 (Write_Info_Ada_C): Ditto.
443 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
444 (Gen_Output_File): Do not force Ada_Bind_File anymore.
445 Always call Gen_Output_File_Ada.
446 * gnatlink.adb (Begin_Info): Now a constant.
448 (Ada_Bind_File): Remove
449 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
450 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
451 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
452 * opt.ads (Ada_Bind_File): Remove.
454 2011-08-04 Thomas Quinot <quinot@adacore.com>
456 * projects.texi: Document target-specific directory in default project
459 2011-08-04 Thomas Quinot <quinot@adacore.com>
461 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
464 2011-08-04 Yannick Moy <moy@adacore.com>
466 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
467 opt.ads, lib-xref.ads: Code clean up.
469 2011-08-04 Yannick Moy <moy@adacore.com>
471 * gnat_rm.texi: Update description of Test_Case
472 * gnat_ugn.texi: Typo.
474 2011-08-04 Ed Falis <falis@adacore.com>
476 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
478 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
480 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
481 it is of type Root_Controlled. This action eliminates fields Prev and
482 Next from type equality.
484 2011-08-04 Yannick Moy <moy@adacore.com>
486 * lib-xref-alfa.adb: Correct typo.
488 2011-08-04 Matthew Heaney <heaney@adacore.com>
490 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
493 2011-08-04 Yannick Moy <moy@adacore.com>
495 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
496 (Analyze_Pragma): allow static string expression for name of Test_Case,
497 instead of simply string literals.
498 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
501 2011-08-04 Vincent Celier <celier@adacore.com>
503 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
504 case suffixes to find truncated main sources.
506 2011-08-04 Tristan Gingold <gingold@adacore.com>
508 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
509 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
510 (Compute_Current_Task): Ditto.
512 2011-08-04 Tristan Gingold <gingold@adacore.com>
514 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
516 2011-08-04 Yannick Moy <moy@adacore.com>
518 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
519 library-level constant.
520 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
521 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
522 used as selector of parameter association, in ALFA mode.
524 2011-08-04 Robert Dewar <dewar@adacore.com>
526 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
527 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
530 2011-08-04 Arnaud Charlet <charlet@adacore.com>
532 * make.adb (Linking_Phase): Set source search path before calling
533 gnatlink in CodePeer mode.
535 2011-08-04 Javier Miranda <miranda@adacore.com>
537 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
538 Remove code which takes care of building TSDs.
539 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
540 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
541 the accessibility check in VM targets.
542 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
543 (Building_Static_DT): Now returns false for VM targets.
544 (Build_VM_TSDs): Removed.
545 (Expand_Interface_Conversion): Generate missing runtime check for
546 conversions to interface types whose target type is unknown at compile
548 (Make_VM_TSD): Add missing code to disable the generation of calls to
549 Check_TSD if the tagged type is not defined at library level, or not
550 has a representation clause specifying its external tag, or -gnatdQ is
552 * exp_disp.ads (Build_VM_TSDs): Removed.
553 (Make_VM_TSDs): Spec relocated from exp_disp.adb
554 * sem_disp.adb (Check_Dispatching_Operation): No code required to
555 register primitives in the dispatch tables in VM targets.
556 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
557 initialization of class-wide interface objects in VM targets.
558 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
561 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
563 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
564 when dotnet-ld cannot be found.
566 2011-08-04 Arnaud Charlet <charlet@adacore.com>
568 * bindgen.adb: Simplify significantly generation of binder body file in
570 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
571 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
574 2011-08-04 Yannick Moy <moy@adacore.com>
576 * sem_prag.adb, sem.ads: Code cleanup.
578 2011-08-04 Tristan Gingold <gingold@adacore.com>
580 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
581 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
583 * s-stusta.adb (Print): Adjust after changes in s-stausa.
584 * gnat_ugn.texi: Update dynamic stack usage section.
586 2011-08-04 Steve Baird <baird@adacore.com>
588 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
589 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
590 contains only a call to the user-defined main subprogram.
591 (Gen_Main_Ada) - If CodePeer_Mode is set, then
592 call the "wrapper" subprogram instead of directly
593 calling the user-defined main subprogram.
595 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
597 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
598 alternatives of a case statement for controlled objects. Rename local
599 variable A to Dead_Alt.
600 (Expand_N_If_Statement): Check the then and else statements of an if
601 statement for controlled objects. Check the then statements of all
602 elsif parts of an if statement for controlled objects.
603 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
605 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
606 detects a loop associated with the expansion of an array object.
607 Augment the processing of the loop statements to account for a possible
608 wrap done by Process_Statements_For_Controlled_Objects.
609 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
610 statements and abortable part of an asynchronous select for controlled
612 (Expand_N_Conditional_Entry_Call): Check the else statements of a
613 conditional entry call for controlled objects.
614 (Expand_N_Selective_Accept): Check the alternatives of a selective
615 accept for controlled objects.
616 (Expand_N_Timed_Entry_Call): Check the entry call and delay
617 alternatives of a timed entry call for controlled objects.
618 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
619 exception handler for controlled objects.
620 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
621 Add formal parameter Nested_Constructs along with its associated
623 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
624 Requires_Cleanup_Actions.
625 (Process_Statements_For_Controlled_Objects): New routine.
626 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
627 routine. Inspect a node which contains a non-handled sequence of
628 statements for controlled objects. If such an object is found, the
629 statements are wrapped in a block.
631 2011-08-04 Bob Duff <duff@adacore.com>
633 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
634 need to compare with Class_Wide_Type (T2), in order to get at the
635 original class-wide type node.
636 * sem_type.ads (Covers): Improve the comment.
637 * einfo.ads (Class_Wide_Type): Improve the comment.
638 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
639 the type of the Deref.
641 2011-08-04 Yannick Moy <moy@adacore.com>
643 * gnat_rm.texi: Document that Test_Case pragma can only appear on
644 separate declarations.
645 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
646 check identifier of pragma argument.
647 (Chain_TC): check that no other test case associated to the same entity
649 (Check_Test_Case): disallow test case inside subprogram body
650 (Analyze_Pragma): correct call to check identifier and not argument
651 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
652 function gets name from test case pragma.
654 2011-08-04 Yannick Moy <moy@adacore.com>
656 * gnat_rm.texi: Document new pragma and aspect.
657 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
658 (No_Duplicates_Allowed): new constant array defining whether duplicates
659 aspects of each kind can appear on the same declaration.
660 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
661 field, which points to a node holding the previous Spec_PPC_List.
662 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
663 through the indirection with Contract.
664 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
665 * par-prag.adb (Prag): do nothing on Test_Case pragma
666 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
668 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
669 component Ensures of Test_Case.
670 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
671 (Analyze_Generic_Subprogram_Declaration,
672 Analyze_Subprogram_Instantiation,
673 Analyze_Abstract_Subprogram_Declaration,
674 Analyze_Subprogram_Body_Helper,
675 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
676 insert contract in subprogram node at point of definition
678 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
679 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
681 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
682 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
683 similar to the analysis of pre/post
684 (Derive_Subprogram): insert contract in subprogram node at point of
686 * sem_prag.adb, sem_prag.ads
687 (Check_Arg_Is_String_Literal, Check_Identifier):
688 new checking procedures to be called in treatment of pragmas
689 (Check_Test_Case): new procedure to check that a Test_Case aspect or
690 pragma is well-formed. This does not check currently that 'Result is
691 used only in the Ensures component of a Test_Case.
692 (Analyze_Pragma): add case for Test_Case
693 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
694 components of a Test_Case.
695 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
696 expressions in the 3rd (and 4th if present) arguments of a Test_Case
697 pragma, treated as spec expressions.
698 (Sig_Flags): add value -1 for Test_Case.
699 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
700 Get_Requires_From_Test_Case_Pragma): getters for both expression
701 components of a Test_Case.
702 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
703 indirection between an entry or [generic] subprogram entity and its
704 pre/post + test-cases.
705 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
706 get/set for fields of an N_Contract node.
707 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
708 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
709 names and pragma for Test_Case.
710 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
712 2011-08-04 Vincent Celier <celier@adacore.com>
714 * gnat_ugn.texi: Improve documentation of gnatmake switch
717 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
719 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
720 type). Initialize Atyp to the appropriate type which is later checked
721 for completion. Rewrite the assertion associated with private type
724 2011-08-04 Ed Falis <falis@adacore.com>
726 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
727 initialize the number of CPUs.
729 2011-08-04 Ed Schonberg <schonberg@adacore.com>
731 * sem_type.adb (Disambiguate): New subsidiary routine
732 In_Same_Declaration_List, to implement AI05-0020: a user-defined
733 equality on an anonymous access type whose designated type is private
734 does not lead to an ambiguity with the universal access equality
735 operator in the body or child units of the defining package. The same
736 is true for a multiplication operator on a private type completed with
739 2011-08-04 Javier Miranda <miranda@adacore.com>
741 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
742 (Normalize_Scalars_Config): Removed.
744 (Register_Opt_Config_Switches): Remove registering config values of
745 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
746 (Restore_Opt_Config_Switches): Remove code which restores the values of
747 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
748 Init_Or_Norm_Scalars.
749 (Save_Opt_Config_Switches): Remove code which saves values of
750 Init_Or_Norm_Scalars and Normalize_Scalars.
751 (Set_Opt_Config_Switches): Remove code which restores config values of
752 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
753 Init_Or_Norm_Scalars.
755 2011-08-04 Yannick Moy <moy@adacore.com>
757 * frontend.adb (Frontend): remove previous patch to avoid full
758 qualification in ALFA mode.
759 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
760 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
761 unique name for an entity, which could be used to identify the entity
762 across compilation units.
764 2011-08-04 Thomas Quinot <quinot@adacore.com>
767 (Initialize_Default_Project_Path): Add target specific directory
768 ($prefix/$target/lib/gnat) in front of project path in all cases
769 (making gnatmake's behaviour consistent with gprbuild).
770 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
771 Pass target name from Sdefault to project subsystem.
772 * gnatls.adb: Show new target specific default project directory.
774 2011-08-04 Johannes Kanig <kanig@adacore.com>
776 * cstand.adb: Add Information to Identifier in Standard
777 (Identifer_For): Set Entity to the corresponding entity
779 2011-08-04 Sergey Rybin <rybin@adacore.com>
781 * gnat_ugn.texi: Update doc on gnatcheck.
783 2011-08-04 Yannick Moy <moy@adacore.com>
785 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
788 2011-08-04 Yannick Moy <moy@adacore.com>
790 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
791 performing expansion.
792 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
793 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
794 it is not called in ALFA mode.
796 2011-08-04 Emmanuel Briot <briot@adacore.com>
798 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
799 after all, so removed.
801 2011-08-04 Sergey Rybin <rybin@adacore.com>
803 * vms_data.ads: Add missing VMS qualifiers.
805 2011-08-04 Emmanuel Briot <briot@adacore.com>
807 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
808 the list of files on the command line after processing it through
811 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
813 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
814 processing for .NET/JVM. These targets can now benefit from
815 Raise_From_Controlled_Operation and they share the same processing with
817 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
818 These targets need transient scopes in order to properly finalize short
819 lived controlled objects.
820 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
821 NET/JVM. These targets can now benefit from
822 Raise_From_Controlled_Operation and they share the same processing with
825 2011-08-04 Geert Bosch <bosch@adacore.com>
827 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
829 2011-08-04 Ed Schonberg <schonberg@adacore.com>
831 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
832 Expand_Record_Aggregate, to determine whether aggregate must be
833 expanded into assignments. This is the case if the ancestor part is
834 private, regarless of the setting of the flag Has_Private_Ancestor.
836 2011-08-04 Ed Falis <falis@adacore.com>
838 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
840 2011-08-04 Bob Duff <duff@adacore.com>
842 * sinfo.ads: Fix comment.
844 2011-08-04 Steve Baird <baird@adacore.com>
846 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
847 choose a package name in much the same way as is
848 done for JGNAT when VM_Target /= No_VM, except that
849 a slightly more distinctive prefix string is used.
851 2011-08-04 Emmanuel Briot <briot@adacore.com>
853 * makeutl.adb (Complete_Mains): no longer accept unit names on the
854 gnatmake command line.
855 This behavior was never documented (and was supported only because of
856 an early bug in the code). This case might lead to ambiguous cases
857 (between unit names and truncated base names without suffixes).
859 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
861 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
862 Remove the external tag of a tagged type from the internal hash table.
863 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
864 expanded usage of the routine. Strenghten the check for Is_Master. Add
865 processing for tagged types.
866 (Build_Finalizer): Create all the necessary lists used in finalizer
867 creation when the processed context is a package that may contain
869 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
870 Requires_Cleanup_Actions.
871 (Expand_N_Package_Body): Package bodies may need clean up code
872 depending on whether they contain tagged types.
873 (Expand_N_Package_Declaration): Package declarations may need clean up
874 code depending on whether they contain tagged types.
875 (Unregister_Tagged_Types): New routine. Search through a list of
876 declarations or statements, looking for non-abstract Ada tagged types.
877 For each such type, generate code to unregister the external tag.
878 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
879 Requires_Cleanup_Actions.
880 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
881 through a list of declarations or statements looking for non-abstract
882 Ada tagged types or controlled objects.
883 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
884 Requires_Cleanup_Actions.
885 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
886 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
889 2011-08-04 Vincent Celier <celier@adacore.com>
891 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
892 has Ada sources, not project Project, because if the root project
893 Project has no sources of its own, all projects will be deemed without
896 2011-08-04 Gary Dismukes <dismukes@adacore.com>
898 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
899 of the No_Param_Proc acc-to-subp type used for initialization of
900 __gnat_finalize_library_objects so that it's declared at library level
901 rather than nested inside of the adainit routine.
903 2011-08-04 Javier Miranda <miranda@adacore.com>
905 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
906 if the tagged type has a representation clause which specifies its
909 2011-08-04 Ed Schonberg <schonberg@adacore.com>
911 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
912 Remove previous procedure with that name.
913 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
915 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
916 subtype mark, the ancestor cannot have unknown discriminants.
917 (Resolve_Record_Aggregate): if the type has invisible components
918 because of a private ancestor, the aggregate is illegal.
920 2011-08-04 Vincent Celier <celier@adacore.com>
922 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
923 account switches -gnat2005, -gnat12 and -gnat2012.
925 2011-08-04 Bob Duff <duff@adacore.com>
927 * s-tasdeb.ads: Minor comment fix.
929 2011-08-04 Arnaud Charlet <charlet@adacore.com>
931 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
933 * switch.ads, switch.adb (Is_Language_Switch): New function.
935 2011-08-04 Vincent Celier <celier@adacore.com>
937 * switch-c.adb: Minor comment addition.
939 2011-08-04 Vincent Celier <celier@adacore.com>
941 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
942 ending with '=' is followed by a space (missing file name).
944 2011-08-04 Pascal Obry <obry@adacore.com>
946 * g-regist.ads: Fix size of HKEY on x86_64-windows.
948 2011-08-04 Ed Schonberg <schonberg@adacore.com>
950 * sem_ch12.adb (Analyze_Associations): New routine
951 Check_Overloaded_Formal_Subprogram to reject a formal package when
952 there is a named association or a box initialisation for an overloaded
953 formal subprogram of the corresponding generic.
955 2011-08-04 Yannick Moy <moy@adacore.com>
957 * alfa.ads (ALFA_Xref_Record): add component for type of entity
958 * get_alfa.adb, put_alfa.adb: Read and write new component of
960 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
962 2011-08-04 Pascal Obry <obry@adacore.com>
964 * urealp.adb: Minor reformatting.
966 2011-08-04 Tristan Gingold <gingold@adacore.com>
968 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
969 Handle the case when Cleanup_Protected_Object returns Empty.
971 2011-08-04 Yannick Moy <moy@adacore.com>
973 * frontend.adb (Frontend): only qualify names in non-ALFA mode
975 2011-08-04 Ed Schonberg <schonberg@adacore.com>
977 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
978 call, ignore functions.
980 2011-08-04 Geert Bosch <bosch@adacore.com>
982 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
985 2011-08-04 Emmanuel Briot <briot@adacore.com>
987 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
988 as an index for Builder'Switches. This conforms to the documentation.
989 * make.adb (Insert_Project_Sources): avoid duplicate code
991 2011-08-04 Emmanuel Briot <briot@adacore.com>
993 * makeutl.adb (Complete_Mains): if the user has passed a relative file
994 name on the command line (for instance "../dummy"), never assume it can
997 2011-08-04 Tristan Gingold <gingold@adacore.com>
999 * bindgen.adb: Remove code the reference or create the
1000 Break_Start/__gnat_break_start procedure.
1001 * s-stalib.adb (Break_Start): Removed.
1003 2011-08-04 Emmanuel Briot <briot@adacore.com>
1005 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1006 shared with gprbuild.
1008 2011-08-04 Yannick Moy <moy@adacore.com>
1010 * par-ch4.adb (P_Primary): preferentially issue an error message about
1011 a missing parenthesis arount a conditional or case expression in Ada
1012 2012 mode, if we detect that the alignment is not correct for a
1015 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1017 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1018 tag-to-class-wide conversion as needing finalization actions.
1019 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1020 a tag-to-class-wide conversion as needing finalization actions.
1021 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1022 conversion does not need finalization actions.
1023 (Is_Tag_To_CW_Conversion): New routine.
1024 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1025 whether an object is the result of a tag-to-class-wide conversion.
1027 2011-08-04 Yannick Moy <moy@adacore.com>
1029 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1030 the left-hand-side and right-hand-side of a conjunct are inserted when
1031 translating a pre- or postcondition
1032 * sem_ch6.adb: Correct typo in comment
1034 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1036 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1037 Unchecked_Conversion and Unchecked_Deallocation.
1039 2011-08-04 Thomas Quinot <quinot@adacore.com>
1041 * make.adb: Minor reformatting.
1043 2011-08-04 Emmanuel Briot <briot@adacore.com>
1045 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1046 sources in the project and its imported projects, but not in the whole
1049 2011-08-04 Emmanuel Briot <briot@adacore.com>
1051 * make.adb: Remove debug trace.
1053 2011-08-04 Vincent Celier <celier@adacore.com>
1055 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1056 path in canonical form, to be able to compare path names on platforms
1057 such as Windows or Darwin.
1059 2011-08-04 Thomas Quinot <quinot@adacore.com>
1061 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1062 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1063 * scos.ads: Update documentation accordingly.
1064 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1067 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1069 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1070 attribute only if prefix type is scalar.
1072 2011-08-04 Emmanuel Briot <briot@adacore.com>
1074 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1075 in gnatmake for specifying mains on the command line that do not belong
1076 to the main project. These mains must currently all belong to the same
1078 (Ultimate_Extension_Of): removed, since duplicated
1079 Ultimate_Extending_Project.
1081 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1083 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1085 (CodePeer_Mode_String): New.
1086 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1088 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1089 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1090 mode, since no useful elaboration subprogram is needed by CodePeer.
1091 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1092 In this mode, compile binder file with -gnatC and do stop after this
1095 2011-08-04 Vincent Celier <celier@adacore.com>
1097 * exp_ch7.adb: Minor comment fix.
1099 2011-08-04 Robert Dewar <dewar@adacore.com>
1101 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1102 exp_ch4.adb, makeutl.adb: Minor reformatting.
1104 2011-08-04 Emmanuel Briot <briot@adacore.com>
1106 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1107 Create several new subprograms to move code out of Make. This makes the
1108 code more readable, removes code duplication, and is a preparation work
1109 for adding support for aggregate projects.
1111 2011-08-04 Tristan Gingold <gingold@adacore.com>
1113 * s-po32gl.ads, s-po32gl.adb: New files.
1114 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1115 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1116 (Build_Finalization_Collection): Use it.
1117 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1118 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1120 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1121 * gcc-interface/Make-lang.in: Update dependencies.
1123 2011-08-04 Emmanuel Briot <briot@adacore.com>
1125 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1128 2011-08-04 Emmanuel Briot <briot@adacore.com>
1130 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1131 command line is not a file name, also check whether it could be a unit
1134 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1136 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1137 the header of the finalization routine.
1138 If the unit has no finalizer but is a body whose spec has one, then
1139 generate the decrement of the elaboration entity only.
1140 If the unit has a finalizer and is a spec, then do not generate the
1141 decrement of the elaboration entity.
1142 (Gen_Finalize_Library_C): Likewise.
1144 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1146 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1147 (Bounds_Size_Expression): Removed.
1148 (Double_Alignment_Of): New subsidiary routine.
1149 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1150 for a hole in the dope vector of unconstrained arrays due to different
1151 index and element alignments.
1153 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1155 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1156 raise program_error because body has not been seen yet.
1158 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1160 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1163 2011-08-04 Vincent Celier <celier@adacore.com>
1165 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1167 2011-08-04 Yannick Moy <moy@adacore.com>
1169 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1170 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1172 2011-08-04 Thomas Quinot <quinot@adacore.com>
1174 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1175 instantiation in RCI.
1177 2011-08-04 Emmanuel Briot <briot@adacore.com>
1179 * make.adb: Share more code with gprbuild
1181 2011-08-04 Emmanuel Briot <briot@adacore.com>
1183 * projects.texi: Added documentation for the IDE'Gnat project file
1186 2011-08-04 Nicolas Roche <roche@adacore.com>
1188 * gnat_rm.texi: Minor editing.
1190 2011-08-04 Javier Miranda <miranda@adacore.com>
1192 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1193 and the library case for VM targets.
1194 (Gen_Adainit_Ada): Likewise.
1196 2011-08-04 Robert Dewar <dewar@adacore.com>
1198 * g-altive.ads: Minor comment updates.
1199 * prj-nmsc.adb: Minor reformatting.
1201 2011-08-04 Javier Miranda <miranda@adacore.com>
1204 (Normalize_Scalars_Config): Value of the configuration switch set by
1205 pragma Normalize_Scalars when it appears in the gnat.adc file.
1206 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1207 to save and restore settings of this pragma.
1209 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1210 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1212 2011-08-04 Vincent Celier <celier@adacore.com>
1214 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1216 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1218 * makeutl.adb: Minor reformatting.
1220 2011-08-04 Olivier Hainque <hainque@adacore.com>
1222 * g-altive.ads: Update comments to reflect that only the soft
1223 binding is available today.
1225 2011-08-04 Robert Dewar <dewar@adacore.com>
1227 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1228 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1229 * gcc-interface/Make-lang.in: Update dependencies.
1231 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1233 * prj-env.adb: Remove local debug traces.
1235 2011-08-04 Yannick Moy <moy@adacore.com>
1237 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1238 was used instead of Hi_OK, which could cause a read of an uninitialized
1239 value later on. Detected while working on the new warning.
1240 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1242 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1243 in more cases, in order to detect more unreferenced values.
1244 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1245 object for expression, if any.
1247 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1249 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1250 the operand types instead of the Esize.
1252 2011-08-04 Steve Baird <baird@adacore.com>
1254 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1255 enable CodePeer_Mode.
1256 * bindusg.adb (Display): Add help message describing -P binder switch.
1257 * gnat_ugn.texi: Document -P binder switch.
1258 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1259 user-defined main program directly.
1260 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1261 user-defined main program in the context clause of the package body.
1263 2011-08-04 Yannick Moy <moy@adacore.com>
1265 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1266 duplicate of Defining_Entity
1267 (Get_Unique_Entity_For_Decl): rename function into
1268 Unique_Defining_Entity
1269 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1270 (Formal_Proof_On): remove synthesized flag
1271 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1272 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1273 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1274 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1275 Annotate (Formal_Proof)
1277 2011-08-04 Emmanuel Briot <briot@adacore.com>
1279 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1280 source files with non-standard naming schemes, in imported projects
1282 2011-08-04 Emmanuel Briot <briot@adacore.com>
1284 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1285 specified on the gprbuild command line, we need to compile all units
1286 within that file, not just the first one we find
1287 Fix error message for mains that are not found.
1289 2011-08-04 Thomas Quinot <quinot@adacore.com>
1291 * sem_ch6.adb: Update comment.
1292 * sem_ch12.adb: Minor reformatting.
1294 2011-08-04 Bob Duff <duff@adacore.com>
1296 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1297 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1298 race condition whose symptom is to fail to lock Parent. That, in turn,
1299 causes Parent.Awake_Count to be accessed without locking Parent, which
1300 causes another race condition whose symptom is that Parent.Awake_Count
1301 can be off by 1 (either too high or too low). The solution is to lock
1302 Parent unconditionally, and then lock Acceptor, before reading
1303 Acceptor.Terminate_Alternative.
1305 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1307 * debug.adb: Update comment.
1309 2011-08-04 Robert Dewar <dewar@adacore.com>
1311 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1312 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1313 exp_ch6.adb: Minor reformatting.
1315 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1317 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1320 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1322 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1324 2011-08-04 Thomas Quinot <quinot@adacore.com>
1326 * sinfo.ads: Minor reformatting.
1328 2011-08-04 Emmanuel Briot <briot@adacore.com>
1330 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1331 even if there is no location.
1333 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1335 * sem_res.adb, sem_ch4.adb: move check for restriction
1336 No_Task_Hierarchy to resolve_allocator.
1338 2011-08-04 Thomas Quinot <quinot@adacore.com>
1340 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1341 This flag of N_Pragma nodes is not used, remove it as well as all of
1342 the associated circuitry.
1344 2011-08-04 Javier Miranda <miranda@adacore.com>
1346 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1347 runtime check on duplicated externa tags
1348 * debug.adb Document switch -gnatdQ.
1350 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1352 * a-fihema.ads: Minor typo fix.
1354 2011-08-04 Yannick Moy <moy@adacore.com>
1356 * sem_ch10.adb: Minor comment update.
1358 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1360 * einfo.adb: Update the node field usage to reflect the renaming of
1361 Return_Flag to Return_ Flag_Or_Transient_Decl.
1362 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1363 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1364 (Write_Field15_Name): Change Return_Flag to
1365 Return_Flag_Or_Transient_Decl.
1366 * einfo.ads: Rename node field Return_Flag to
1367 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1368 occurrences in entities.
1369 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1370 associated Inline pragma.
1371 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1372 associated Inline pragma.
1373 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1375 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1376 Return_Flag and Set_Return_Flag.
1377 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1378 objects generated for controlled transients declared inside an
1379 Exception_With_Actions. Update the calls to Return_Flag.
1380 (Process_Object_Declaration): Add code to add a null guard for hook
1381 objects generated for controlled transients declared inside an
1382 Exception_With_Actions. Update related comment.
1383 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1384 objects generated for controlled transients declared inside an
1385 Exception_With_Actions. Update the calls to Return_Flag.
1386 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1388 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1390 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1391 positional aggregate.
1393 2011-08-04 Vincent Celier <celier@adacore.com>
1395 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1396 SLOC only for pragmas.
1398 2011-08-04 Emmanuel Briot <briot@adacore.com>
1400 * projects.texi: Minor typo fix.
1402 2011-08-04 Emmanuel Briot <briot@adacore.com>
1404 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1405 on case-sensitive file systems.
1407 2011-08-04 Thomas Quinot <quinot@adacore.com>
1409 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1410 nested in a disabled pragma.
1411 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1412 enclosing pragma, if any, for X decisions.
1414 2011-08-04 Thomas Quinot <quinot@adacore.com>
1416 * sem_prag.adb: Minor reformatting.
1418 2011-08-04 Vincent Celier <celier@adacore.com>
1420 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1421 allowed in no run time mode.
1423 2011-08-04 Vincent Celier <celier@adacore.com>
1425 * make.adb (Check): When -gnatc is used, check for the source file
1426 inside the ALI file with a canonical case file name.
1428 2011-08-04 Emmanuel Briot <briot@adacore.com>
1430 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1431 overriding the separator.
1433 2011-08-04 Robert Dewar <dewar@adacore.com>
1435 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1436 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1438 2011-08-04 Robert Dewar <dewar@adacore.com>
1440 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1442 2011-08-04 Yannick Moy <moy@adacore.com>
1444 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1445 'Result only appears in postcondition of function.
1447 2011-08-04 Thomas Quinot <quinot@adacore.com>
1449 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1450 external tag, include the value of the external tag in the exception
1453 2011-08-04 Yannick Moy <moy@adacore.com>
1455 * sem_attr.adb (Result): modify error message for misplaced 'Result
1457 2011-08-04 Sergey Rybin <rybin@adacore.com>
1459 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1460 clear that the second argument must be an identifier.
1462 2011-08-04 Thomas Quinot <quinot@adacore.com>
1464 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1465 -fpreserve-control-flow, insert an IF statement on the barrier
1466 condition to ensure that a conditional branch instruction is generated.
1468 2011-08-04 Emmanuel Briot <briot@adacore.com>
1470 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1471 (Processing_Flags.Ignore_Missing_With): new flag.
1473 2011-08-04 Emmanuel Briot <briot@adacore.com>
1475 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1476 Source_List_File on case-insensitive systems where the file is actually
1477 on a case-sensitive file system (NFS,...).
1479 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1481 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1482 function return contains a controlled [extension] aggregate and the
1483 return statement is not part of a handled sequence of statements, wrap
1484 the return in a block. This ensures that all controlled temporaries
1485 generated during aggregate resolution will be picked up by the
1486 finalization machinery.
1488 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1490 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1491 components, freeze type before resolution, to ensure that default
1492 initializations are present for all components.
1493 * sem_res.adb (Resolve_Actuals): the designated object of an
1494 accces-to-constant type is a legal actual in a call to an
1495 initialization procedure.
1497 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1499 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1500 N_Unchecked_Type_Conversion to the possible containers of a renamed
1503 2011-08-04 Yannick Moy <moy@adacore.com>
1505 * par-ch13.adb (Aspect_Specifications_Present): recognize
1506 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1507 is issued in Strict mode.
1508 * par.adb: Fix typos in comments.
1510 2011-08-04 Yannick Moy <moy@adacore.com>
1512 * sem_attr.adb (Result): modify error message to take into account Post
1513 aspect when compiling Ada 2012 (or newer) code.
1515 2011-08-04 Nicolas Roche <roche@adacore.com>
1517 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1518 remove need for GCC exceptions.
1520 2011-08-04 Vincent Celier <celier@adacore.com>
1522 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1523 project, not the source file name.
1524 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1525 excluded, continue looking. This excluded source will only be returned
1526 if there is no other source with the same base name that is not locally
1529 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1531 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1532 private and one of the operands is a real literal, use a qualified
1533 expression rather than a conversion which is not meaningful to the
1536 2011-08-04 Yannick Moy <moy@adacore.com>
1538 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1539 corresponding aspect X'Class are allowed, proceed with analysis of the
1540 aspect instead of skipping it.
1542 2011-08-04 Tristan Gingold <gingold@adacore.com>
1544 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1545 This will allow to have an Ada implementation for the subprogram.
1547 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1549 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1550 completion and aspects are present, apply them to the entity for the
1551 type which is currently the partial view, but which is the one that
1553 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1554 applies to a partial view, indicate that the full view has predicates
1555 and delayed aspects.
1556 (Replace_Type_Reference): Handle properly predicates that apply to the
1557 full view of a private completion.
1559 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1561 * layout.adb (Layout_Type): For composite types, do not set Esize.
1562 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1564 (Size_Known): Look at the RM size of components instead of the Esize.
1565 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1566 issue warning and activate Implicit_Packing.
1567 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1568 if the Esize is not known.
1569 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1570 for elementary types only.
1571 (Analyze_Record_Representation_Clause): Look at the RM size instead
1572 of the Esize to issue errors.
1573 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1575 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1577 Look at the RM size instead of the Esize for types if the latter is
1579 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1581 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1583 * sem_type.adb: proper handling of equality not involving anonymous
1586 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1588 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1589 Vis_Decls. When creating a library-level finalizer for a package spec,
1590 both the declaration and body of the finalizer are inserted either in
1591 the visible or private declarations of the package spec.
1593 2011-08-04 Javier Miranda <miranda@adacore.com>
1595 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1596 use of the full-view of a type when invoking Is_Ancestor.
1597 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1598 the full-view of private parents is requested, then use also the
1599 full-view of the parent of the first derivation.
1601 2011-08-04 Tristan Gingold <gingold@adacore.com>
1603 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1604 instead of the locally imported procedure.
1605 * s-taprop-mingw.adb (Enter_Task): Ditto.
1606 * s-valrea.adb (Scan_Real): Ditto.
1607 * s-imgrea.adb (Set_Image_Real): Ditto.
1608 * s-flocon.ads: Make the package pure.
1610 2011-08-04 Thomas Quinot <quinot@adacore.com>
1612 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1613 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1614 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1615 New subprogram, moved here from...
1616 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1617 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1618 rewriting of the last argument into a procedure call statement here...
1619 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1622 2011-08-04 Thomas Quinot <quinot@adacore.com>
1624 * par_sco.adb: Minor reformatting.
1626 2011-08-04 Robert Dewar <dewar@adacore.com>
1628 * erroutc.adb: Minor reformatting.
1630 2011-08-04 Thomas Quinot <quinot@adacore.com>
1632 * par_sco.adb: Comment update.
1634 2011-08-04 Tristan Gingold <gingold@adacore.com>
1636 * s-flocon.ads: New file.
1637 * g-flocon.ads: Now a renaming of s-flocon.
1638 * Makefile.rtl: Add s-flocon.o
1640 2011-08-04 Javier Miranda <miranda@adacore.com>
1642 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1643 constrained, do not attempt to build a subtype of it.
1645 2011-08-04 Yannick Moy <moy@adacore.com>
1647 * errout.ads Change comments: remove 'R'M as an example where quotes
1648 are needed; add ALFA as another case where quotes are not needed
1649 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1650 case where quotes are not needed.
1651 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1652 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1653 Remove all occurrences of 'A'L'F'A
1655 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1657 * sem_ch13.adb: check legality of invariant pragma.
1659 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1661 * bindgen.adb: Add comments.
1663 2011-08-04 Yannick Moy <moy@adacore.com>
1665 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1667 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1668 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1670 2011-08-04 Robert Dewar <dewar@adacore.com>
1672 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1673 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1674 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1676 2011-08-04 Thomas Quinot <quinot@adacore.com>
1678 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1680 2011-08-04 Thomas Quinot <quinot@adacore.com>
1683 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1686 2011-08-04 Robert Dewar <dewar@adacore.com>
1688 * einfo.ads, exp_ch4.adb: Minor reformatting.
1690 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1692 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1694 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1696 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1697 type in all cases to compute list of primitive operations, because full
1698 view may be an itype that is not attached to the list of declarations.
1700 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1702 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1703 library has already been finalized.
1704 (Gen_Adafinal_C): Likewise.
1705 (Gen_Adainit_Ada): Generate an early return if the library has
1706 already been elaborated.
1707 (Gen_Adainit_C): Likewise.
1708 (Gen_Output_File_Ada): Generate an elaboration flag.
1709 (Gen_Output_File_C): Likewise.
1711 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1713 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1714 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1715 built in the first place.
1716 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1717 for CodePeer because Finalize_Address was not built to begin with.
1718 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1720 2011-08-04 Pascal Obry <obry@adacore.com>
1722 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1723 filenames, this ensures unicity of filenames across processes.
1725 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1727 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1728 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1729 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1730 Add False as the actual to From_Abort in the generated call to
1731 Raise_From_Controlled_Operation.
1733 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1735 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1736 so that the ali file name can be retrieved from outside of this package.
1737 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1738 doing nothing in the general case, but used to update the object file
1739 timestamp if directly generated by the backend.
1740 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1741 to a later time than the ali file one.
1743 2011-08-04 Yannick Moy <moy@adacore.com>
1745 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1746 entities whose body contains an Annotate pragma which forces formal
1748 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1749 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1750 Mark_Non_ALFA_Subprogram to pass in a message and node.
1751 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1752 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1753 surrounding subprogram.
1754 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1755 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1756 as not in ALFA is annotated with Formal_Proof being On, then an error
1757 is issued based on the additional parameters for message and node.
1758 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1759 * gcc-interface/Make-lang.in: Update dependencies.
1761 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1763 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1764 Finalize_Address when CodePeer is enabled.
1766 2011-08-04 Pascal Obry <obry@adacore.com>
1768 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1769 the latter returns a pointer to a static buffer which is deallocated
1770 at the end of the routine.
1772 2011-08-04 Yannick Moy <moy@adacore.com>
1774 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1775 after index creation; mark unconstrained base array type generated as
1776 being in/not in ALFA as well
1777 (Make_Index): mark subtype created as in/not in ALFA
1778 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1779 over a loop as in/not in ALFA, depending on its type and form of loop
1782 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1784 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1785 directly to False on .NET and JVM.
1787 2011-08-04 Yannick Moy <moy@adacore.com>
1789 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1790 constraint that subtype must come from source code to be in ALFA, so
1791 that anonymous subtypes can be in ALFA too.
1793 2011-08-04 Yannick Moy <moy@adacore.com>
1795 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1796 reference for ALFA mode.
1797 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1798 procedure public so as to use it from formal verification back-end.
1800 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1802 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1803 invalid checks of the Parameter, making Remove_Switch not working
1806 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1808 * targparm.ads: Update header: no run-time exception is needed on this
1811 2011-08-04 Vincent Celier <celier@adacore.com>
1813 * a-fihema.adb: Use System.IO instead of GNAT.IO
1815 2011-08-04 Thomas Quinot <quinot@adacore.com>
1817 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1818 are forbidden in Compiler_Unit mode.
1820 2011-08-04 Robert Dewar <dewar@adacore.com>
1822 * sem_util.adb: Minor reformatting.
1824 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1826 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
1827 library-level finalizers.
1828 (Gen_Finalize_Library_C): Update the import string for library-level
1830 (Gen_Finalize_Library_Defs_C): Update the definition name of a
1831 library-level finalizer.
1832 * exp_ch7.adb: Remove with and use clauses for Stringt.
1833 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
1834 Spec_Decl. Add local variable Body_Id. The names of library-level
1835 finalizers are now manually fully qualified and are no longer external.
1836 A single name is now capable of servicing .NET, JVM and non-VM targets.
1837 Pragma Export is no longer required to provide visibility for the name.
1838 (Create_Finalizer_String): Removed.
1839 (New_Finalizer_Name): New routine which mimics New_..._Name.
1841 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1843 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
1844 elaboration counter to Standard_Short_Integer.
1845 * sem_util.adb (Build_Elaboration_Entity): Likewise.
1846 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
1847 (Gen_Elab_Externals_C): Likewise.
1849 2011-08-04 Ed Falis <falis@adacore.com>
1851 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1852 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1853 system-vxworks-mips.ads, system-vxworks-x86.ads
1854 (Always_Compatible_Rep): set to False for all VxWorks targets.
1856 2011-08-04 Robert Dewar <dewar@adacore.com>
1858 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
1859 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
1860 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
1861 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
1862 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
1863 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
1864 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
1865 Minor reformatting and code reorganization.
1867 2011-08-04 Emmanuel Briot <briot@adacore.com>
1869 * projects.texi: Added doc for aggregate projects.
1871 2011-08-04 Emmanuel Briot <briot@adacore.com>
1873 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
1874 Add support for overriding the Project_Path in aggregate projects.
1876 2011-08-04 Robert Dewar <dewar@adacore.com>
1878 * a-cofove.ads: Minor reformatting.
1880 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1882 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
1883 on the generated code.
1884 (Build_Finalize_Statements): Update the comment on the generated code.
1885 (Build_Initialize_Statements): Update the comment on the generated code.
1886 (Build_Object_Declarations): Add local variable Result. The object
1887 declarations are now built in sequence.
1888 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
1891 2011-08-04 Robert Dewar <dewar@adacore.com>
1893 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
1895 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1897 * einfo.ads (Elaboration_Entity): Document new definition and use.
1898 (Elaboration_Entity_Required): Adjust to above change.
1899 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
1900 * exp_ch12.adb: And with and use for Snames.
1901 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
1902 * exp_util.adb (Set_Elaboration_Flag): Likewise.
1903 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
1904 <Check_Unit_Name>: Deal with N_Expanded_Name.
1905 <Attribute_Elaborated>: Extend to all unit names.
1906 * sem_elab.adb: And with and use for Uintp.
1907 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
1908 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
1909 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
1910 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
1911 from Gen_Adainit_Ada.
1912 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
1913 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
1914 case, do not call System.Standard_Library.Adafinal; instead call
1915 finalize_library if needed.
1916 (Gen_Adafinal_C): Likewise.
1917 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
1918 non-main program case.
1919 (Gen_Adainit_C): Generate a couple of external declarations here.
1920 In the main program case, set SSL.Finalize_Library_Objects.
1921 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
1922 (Gen_Elab_Calls_C): Likewise.
1923 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
1924 (Gen_Finalize_Library_C): Likewise. Generate a full function.
1925 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
1927 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
1928 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
1930 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
1931 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
1932 of external declarations. Â Call Gen_Finalize_Library_C.
1934 2011-08-04 Emmanuel Briot <briot@adacore.com>
1936 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
1937 Compute_Compilation_Phases): new subprogram.
1938 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
1939 The number of mains as well as the various compilation phases that
1940 need to be run are now project tree specific, since various
1941 aggregated trees might have different requirements. In particular,
1942 they do not all require bind or link phases.
1944 2011-08-04 Emmanuel Briot <briot@adacore.com>
1946 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
1947 (Project_Tree_Appdata): New type.
1948 It is now possible to associate application-specific data to a project
1949 tree. In particular, this is used in the gprbuild builder to avoid a
1950 number of global tables and htables, especially now that there can be
1951 several project trees loaded at once because of aggregate projects.
1952 (Debug_Name): new procedure.
1953 * projects.texi: Clarify syntax of "**" for Source_Dirs
1955 2011-08-03 Emmanuel Briot <briot@adacore.com>
1957 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
1958 the "roots" for a main.
1959 (Fill_From_Project): add support for aggregate projects. Main units
1960 in aggregated projects are now automatically added in the list of
1961 files to build (although this fails later on in gprbuild, because
1962 these files are not using the root proejct tree, so this needs
1964 * gcc-interface/Make-lang.in: Update dependencies.
1966 2011-08-03 Yannick Moy <moy@adacore.com>
1968 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
1969 conditional expression in ALFA.
1970 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
1971 expressions as not in ALFA.
1973 2011-08-03 Robert Dewar <dewar@adacore.com>
1975 * a-cofove.adb: Minor reformatting.
1977 2011-08-03 Emmanuel Briot <briot@adacore.com>
1979 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
1980 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
1982 These packages are more logically placed in the Queue package, since
1983 they manipulate the queue. It is also likely that they can be adapted
1984 for gnatmake, thus sharing more code.
1985 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
1986 that we could move the above.
1988 2011-08-03 Emmanuel Briot <briot@adacore.com>
1990 * errutil.adb (Finalize): clean up the list of error messages on exit.
1991 Calling this subprogram multiple times will no longer show duplicate
1992 error messages on stderr.
1994 2011-08-03 Emmanuel Briot <briot@adacore.com>
1996 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
1997 Getopt_Switches when we have already define a command line
2000 2011-08-03 Yannick Moy <moy@adacore.com>
2002 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2003 in ALFA. Instead, they are considered as assertions to prove.
2004 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2005 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2006 if they have no ELSE part, or if they occur in pre- and postconditions,
2007 where the Condition cannot have side-effects in ALFA
2008 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2009 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2010 Instead, include type conversion between scalar types in ALFA.
2011 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2012 if-and-only-if its type is in ALFA.
2014 2011-08-03 Thomas Quinot <quinot@adacore.com>
2016 * scos.adb, get_scos.adb, put_scos.adb
2017 New code letter for decisions: G (entry guard)
2019 (Traverse_Subprogram_Body): Rename to...
2020 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2021 (Traverse_Protected_Body): New subprogram
2022 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2023 protected bodies and entry bodies.
2025 2011-08-03 Yannick Moy <moy@adacore.com>
2027 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2028 entities with get/set subprograms, which is set on procedure entities
2029 generated by the compiler for a postcondition.
2030 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2031 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2032 entity for a declaration
2033 (Get_Unique_Entity_For_Decl): new function returning an entity which
2034 represents a declaration, so that matching spec and body have the same
2037 2011-08-03 Robert Dewar <dewar@adacore.com>
2039 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2040 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2042 2011-08-03 Yannick Moy <moy@adacore.com>
2044 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2045 library-level because retriction No_Implicit_Dynamic_Code in the
2046 front-end prevents its definition as a local subprogram
2047 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2048 for reuse in other contexts
2049 (Traverse_Declarations_Or_Statements,
2050 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2051 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2052 procedures take a callback parameter to be called on all declarations
2054 (Traverse_All_Compilation_Units): new generic function to traverse a
2055 compilation unit and call a callback parameter on all declarations
2057 2011-08-03 Javier Miranda <miranda@adacore.com>
2059 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2060 in Java since they are always enclosed in a namespace that
2061 differentiates them, and overloaded entities are supported by the VM.
2063 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2065 * checks.adb (Determine_Range): If a computed bound of an operation is
2066 outside the range of the base type of the expression, and overflow
2067 checks are enabled, the result is unknown and cannot be used for any
2068 subsequent constant folding.
2069 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2070 unknown, so is the result of the comparison.
2072 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2074 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2075 From_Abort. When finalization was triggered by an abort, propagate
2076 Standard'Abort_Signal rather than Program_Error.
2077 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2079 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2080 From_Abort. When finalization was triggered by an abort, propagate
2081 Standard'Abort_Signal rather than Program_Error.
2082 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2084 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2085 Abort_Id. Update the calls to Build_Object_Declarations and
2086 Build_Raise_Statement to include Abort_Id.
2087 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2088 calls to Build_Object_Declarations and Build_Raise_Statement to include
2090 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2091 calls to Build_Object_Declarations and Build_Raise_Statement to include
2093 (Build_Components): Create an entity for Abort_Id when exceptions are
2094 allowed on the target.
2095 (Build_Finalizer): New local variable Abort_Id.
2096 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2097 calls to Build_Object_Declarations and Build_Raise_Statement to include
2099 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2100 declaration of flag Abort_Id to preserve the original abort status
2101 before finalization code is executed.
2102 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2103 runtime routine Raise_From_Controlled_Operation.
2104 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2105 Abort_Id. Update the call to Build_Object_Declarations to include
2106 Abort_Id. Update the layout of the finalizer body.
2107 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2108 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2109 clunky code to create all flags and objects related to
2110 exception propagation and replace it with a call to
2111 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2113 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2114 Add new formal Abort_Id and associated comment on its use.
2115 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2117 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2118 Remove the clunky code to create all flags and objects related to
2119 exception propagation and replace it with a call to
2120 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2122 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2124 * s-tassta.adb: Fix minor typos.
2126 2011-08-03 Robert Dewar <dewar@adacore.com>
2128 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2129 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2131 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2133 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2134 to packages. This ensures that the finalizer body will not end up
2135 inside the freeze node.
2136 (Process_Declarations): Add code to detect whether a freeze node has a
2137 nested finalization collection.
2139 2011-08-03 Pascal Obry <obry@adacore.com>
2141 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2142 (Current_Session): Return a not null access to Session_Type.
2143 (Default_Session): Likewise.
2145 2011-08-03 Robert Dewar <dewar@adacore.com>
2147 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2148 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2150 2011-08-03 Pascal Obry <obry@adacore.com>
2152 * g-awk.ads: Minor comment fix.
2154 2011-08-03 Sergey Rybin <rybin@adacore.com>
2156 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2157 the tree structure related to discriminant constraints.
2158 Original_Discriminant cannot be used any more for computing the
2159 defining name for the reference to a discriminant.
2161 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2163 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2164 function is not visibly tagged, this is not a dispatching call and
2165 therfore is not Tag_Indeterminate, even if the function is marked as
2166 dispatching on result.
2168 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2170 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2171 (Expand_N_Free_Statement): Add a guard to protect against run-times
2172 which do not support controlled types.
2173 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2174 against run-times which do not support controlled types.
2175 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2176 against run-times which do not support controlled types.
2177 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2178 against run-times which do not support controlled types.
2179 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2180 protect against run-times which do not support controlled types.
2182 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2184 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2185 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2187 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2189 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2190 modified in the source, to prevent spurious warnings when compiling
2193 2011-08-03 Thomas Quinot <quinot@adacore.com>
2195 * a-except-2005.adb: Minor reformatting.
2197 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2199 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2200 is a renaming declaration in the private part of a package, do not emit
2201 a warning that the with_clause could be moved because the renaming may
2202 be used in the body or in a child unit.
2204 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2206 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2207 Propagate the Comes_From_Source attribute from the original return
2208 object to the renaming.
2210 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2212 * exp_ch7.adb (Build_Raise_Statement): Do not call
2213 Raise_From_Controlled_Operation when this routine is not present in
2214 the run-time library.
2215 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2216 libraries (Ravenscar), tasks are non-terminating, and protected objects
2217 and tasks can only appear at library level, so we do not want
2218 finalization of protected objects nor tasks.
2219 * exp_intr.adb: Minor clarification in comment.
2220 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2221 Gen_Output_File_C): Remove references to finalization of library-level
2222 objects when using restricted run-time libraries.
2224 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2226 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2227 Original_Discriminant only if the parent type is a generic formal.
2229 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2231 * exp_ch13.adb: Add with and use clause for Targparm;
2232 (Expand_N_Free_Statement): Prevent the generation of a custom
2233 Deallocate on .NET/JVM targets since this requires pools and address
2235 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2236 .NET/JVM targets, attach the newly allocated object to the access
2237 type's finalization collection. Do not generate a call to
2238 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2239 exist in the runtime.
2240 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2241 create a custom Allocate for object that do not require initialization.
2242 Attach a newly allocated object to the access type's finalization
2243 collection on .NET/JVM.
2244 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2245 assignment of controlled types on .NET/JVM. The two hidden pointers
2246 Prev and Next and stored and later restored after the assignment takes
2248 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2249 kludge for .NET/JVM to recognize a particular piece of code coming from
2250 Heap_Management and change the call to Finalize into Deep_Finalize.
2251 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2252 finalization collections on .NET/JVM only for types derived from
2253 Controlled. Separate the association of storage pools with a collection
2254 and only allow it on non-.NET/JVM targets.
2255 (Make_Attach_Call): New routine.
2256 (Make_Detach_Call): New routine.
2257 (Process_Object_Declarations): Suppress the generation of
2258 build-in-place return object clean up code on .NET/JVM since it uses
2260 * exp_ch7.ads (Make_Attach_Call): New routine.
2261 (Make_Detach_Call): New routine.
2262 * exp_intr.adb Add with and use clause for Targparm.
2263 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2264 on .NET/JVM targets.
2265 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2266 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2267 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2268 names used in finalization.
2270 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2272 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2273 (Attach, Detach): Lock the current task when chaining an object onto a
2276 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2278 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2279 Rewritten to create the message strings when the exception is not
2280 raised by an abort during finalization.
2281 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2282 Raise_From_Controlled_Operation and update its associated comment.
2283 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2284 Ada.Finalization.Heap_Management provides key functionality
2285 associated with controlled objects on the heap, their creation,
2286 finalization and reclamation. Type Finalization_Collection is
2287 effectively a wrapper which sits ontop of a storage pool and performs
2288 all necessary bookkeeping for all the objects it contains. Each
2289 access-to-controlled or access-to-class-wide type receives a collection
2290 as part of its expansion. The compiler generates buffer code and
2291 invokes Allocate / Deallocate to create and destroy allocated
2293 * a-finali.adb ("="): Removed.
2294 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2295 fields Prev and Next.
2296 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2297 A library unit with at least one controlled object on the library level
2298 has a special finalizer which is invoked by the binder. To signal this,
2299 ali files carry field PF.
2300 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2301 associated comment on field usage.
2302 * a-tags.adb (Get_RC_Offset): Removed.
2303 (Needs_Finalization): New routine.
2304 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2305 Dispatch tables now carry field Needs_Finalization which provides
2306 runtime indication whether a type is controlled or has controlled
2307 components or both. Remove field RC_Offset.
2308 (Get_RC_Offset): Removed along with its associated pragma Export.
2309 Since tagged types with controlled components no longer carry hidden
2310 field _controller, the special mechanism to retrieve its location is no
2312 (Needs_Finalization): New routine.
2313 * atree.ads, atree.adb (Elist24): New routine.
2314 (Set_Elist24): New routine.
2315 * atree.h: Add a define clause for Elist24.
2316 * bindgen.adb New library-level variable Lib_Final_Built.
2317 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2318 presence of a VM target, the routine generates calls to the proper
2319 library finalization routine.
2320 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2321 targets. Set the correct library finalization routine depending on
2322 whether the library has controlled objects or this is a VM compilation.
2323 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2324 to library-level finalizers of compiled units in reverse order of
2325 elaboration. It also produces exception management code and reraises a
2326 potential exception after all units have been finalized.
2327 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2328 library-level finalizers of compiled units in reverse order of
2330 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2331 definitions of all library-level finalizers available to the compilation
2332 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2334 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2335 System.Standard_Library.Adafinal directly. If the library needs
2336 finalization actions, create the sequence of finalization calls.
2337 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2338 Generate a with clause for System.Soft_Links when compiling for a VM.
2339 Remove the code which imports System.Standard_Library.Adafinal as
2340 Do_Finalize. Generate the library finalization routine.
2341 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2342 If the library needs finalization actions, create all the definitions
2343 of library- level finalizers.
2344 (Has_Finalizer): New routine. Determines whether at least one compiled
2345 unit has a library-level finalizer.
2346 Add type Qualification_Mode.
2347 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2348 * einfo.adb: New usage of field 15 as Return_Flag.
2349 Remove Finalization_Chain_Entity from the usages of field 19.
2350 Remove Associated_Final_Chain from the usages of field 23.
2351 New usage of field 23 as Associated_Collection.
2352 New usage of field 24 as Finalizer.
2353 New usage of flag 252 as Is_Processed_Transient.
2354 (Associated_Final_Chain): Removed.
2355 (Associated_Collection): New routine.
2356 (Finalization_Chain_Entity): Removed.
2357 (Finalizer): New routine.
2358 (Is_Finalizer): New routine.
2359 (Is_Processed_Transient): New routine.
2360 (Return_Flag): New routine.
2361 (Set_Associated_Final_Chain): Removed.
2362 (Set_Associated_Collection): New routine.
2363 (Set_Finalization_Chain_Entity): Removed.
2364 (Set_Finalizer): New routine.
2365 (Set_Is_Processed_Transient): New routine.
2366 (Set_Return_Flag): New routine.
2367 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2369 (Write_Field8_Name): Alphabetize the output.
2370 (Write_Field11_Name): Alphabetize the output.
2371 (Write_Field12_Name): Alphabetize the output.
2372 (Write_Field13_Name): Alphabetize the output.
2373 (Write_Field14_Name): Alphabetize the output.
2374 (Write_Field15_Name): Alphabetize the output.
2375 (Write_Field16_Name): Alphabetize the output.
2376 (Write_Field17_Name): Alphabetize the output.
2377 (Write_Field18_Name): Alphabetize the output.
2378 (Write_Field19_Name): Alphabetize the output. Remove the output of
2379 Finalization_Chain_Entity.
2380 (Write_Field20_Name): Alphabetize the output.
2381 (Write_Field21_Name): Alphabetize the output.
2382 (Write_Field22_Name): Alphabetize the output.
2383 (Write_Field23_Name): Alphabetize the output. Remove the output of
2384 Associated_Final_Chain. Add output for Associated_Collection.
2385 (Write_Field24_Name): Alphabetize the output.
2386 (Write_Field25_Name): Add output for Finalizer.
2387 (Write_Field26_Name): Alphabetize the output.
2388 (Write_Field27_Name): Alphabetize the output.
2389 (Write_Field28_Name): Alphabetize the output.
2390 * einfo.ads: Add new field description for Associated_Collection and
2392 Remove Associated_Final_Chain and its uses in nodes.
2393 Remove Finalization_Chain_Entity and its uses in nodes.
2394 Add new field description for Finalizer and its uses in nodes.
2395 Add new synthesized attribute Is_Finalizer.
2396 Add new flag description for Is_Processed_Transient and its uses in
2398 Add new field description for Return_Flag and its uses in nodes.
2399 (Associated_Final_Chain): Removed along with its pragma Inline.
2400 (Associated_Collection): New routine and pragma Inline.
2401 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2402 (Finalizer): New routine and pragma Inline.
2403 (Is_Finalizer): New routine and pragma Inline.
2404 (Is_Processed_Transient): New routine and pragma Inline.
2405 (Return_Flag): New routine and pragma Inline.
2406 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2407 (Set_Associated_Collection): New routine and pragma Inline.
2408 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2409 (Set_Finalizer): New routine and pragma Inline.
2410 (Set_Is_Processed_Transient): New routine and pragma Inline.
2411 (Set_Return_Flag): New routine and pragma Inline.
2412 * exp_aggr.adb: Alphabetize subprograms.
2413 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2414 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2415 associated comments. Remove local variables External_Final_List and
2417 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2418 Ancestor. Remove the retrieval of finalization lists. Update the call to
2420 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2421 lists. Update the call to Late_Expansion.
2422 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2423 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2424 (Gen_Assign): Remove the retrieval of the finalization list used to
2425 build the assignment. Update the calls to Make_Init_Call and
2427 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2428 Remove the mechanism to determine attachment levels and finalization
2429 list retrieval. Remove the processing for coextensions.
2430 (Init_Controller): Removed. Controllers no longer exist.
2431 (Late_Expansion): Remove formals Flist and Obj along with their
2432 associated comments. Update the calls to Build_Record_Aggr_Code and
2433 Build_Array_Aggr_Code.
2434 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2435 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2436 appear in entry bodies, protected subprograms and task bodies.
2437 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2438 * exp_ch3.adb (Add_Final_Chain): Removed.
2439 (Build_Array_Init_Proc): Alphabetize local variables.
2440 (Build_Assignment): Alphabetize local variables. Update the call to
2442 (Build_Class_Wide_Master): Rename local variables to better reflect
2444 (Build_Discriminant_Assignments): Code reformatting.
2445 (Build_Init_Call_Thru): Code reformatting.
2446 (Build_Init_Procedure): Code reformatting. Generate a special version
2447 of Deep_Finalize which is capable of finalizing all initialized
2448 components and ignore the rest.
2449 (Build_Init_Statements): Rename local variables to better reflect their
2451 Reimplement the mechanism to include the creation and update of an index
2452 variable called a "counter". It is used as a bookmark for tracing
2453 initialized and non-initialized components.
2454 (Build_Initialization_Call): Remove local variable Controller_Typ.
2455 Alphabetize all local variables. Remove the initialization of the
2456 record controller and update the call to Make_Init_Call.
2457 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2458 New local variable Counter.
2459 (Constrain_Array): Alphabetize.
2460 (Expand_Freeze_Array_Type): Create a collection instead of a
2462 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2463 Finalize_Address which is used in conjunction with allocated controlled
2465 (Expand_N_Object_Declaration): Remove the creation of a finalization
2466 list for anonymous access types. Update the calls to Make_Init_Call and
2468 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2469 retrieval of finalization lists. Remove the expansion of the record
2470 controller. Create TSS primitive Finalize_Address used in conjunction
2471 with controlled objects on the heap. Create finalization collections
2472 for access-to-controlled record components.
2473 (Expand_Record_Controller): Removed.
2474 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2475 class-wide types now requires additional processing. Create
2476 finalization collections for access-to-controlled types.
2477 (Increment_Counter): New routine.
2478 (Make_Counter): New routine.
2479 (Make_Eq_If): Remove the mention of Name_uController.
2480 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2481 types coming from System.Finalization_Root.
2482 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2483 (Predefined_Primitive_Bodies): There is no longer need to skip types
2484 coming from System.Finalization_Root.
2485 (Stream_Operation_OK): Do not generate stream routines for
2486 type Ada.Finalization.Heap_Management.Finalization_Collection.
2487 * exp_ch3.ads: Alphabetize subprograms.
2488 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2489 Add with and use clause for Lib.
2490 (Complete_Coextension_Finalization): Removed.
2491 (Complete_Controlled_Allocation): New routine. Create a finalization
2492 collection for anonymous access-to-controlled types. Create a custom
2493 Allocate which interfaces with the back end and the machinery in
2495 (Expand_Allocator_Expression): Add necessary calls to
2496 Complete_Controlled_Allocation. Remove the retrieval of finalization
2497 lists. Update the calls to Make_Adjust_Call. Generate a call to
2498 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2499 the associated collection.
2500 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2501 Code clean up. Remove the retrieval of finalization lists and
2503 Update the call to Make_Init_Call. Generate a call to
2504 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2505 the associated collection.
2506 (Get_Allocator_Final_List): Removed. Finalization lists are not
2508 (Suitable_Element): Remove the mention of Name_uController.
2509 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2510 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2511 the left hand side, carry out the assignment and adjust the left hand
2513 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2514 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2515 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2516 BIP_Collection and BIPcollection.
2517 (Build_Heap_Allocator): New routine used to allocate the return object
2518 of a build-in-place function onto a collection.
2519 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2520 (Expand_Call): Do not replace direct calls to Deep routines with their
2522 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2523 and update their occurrences. Add a special return flag to monitor the
2524 [ab]normal execution of the function. The flag is set right before the
2526 Rewrite the mechanism used to allocate a build-in-place return object
2527 on the heap or on a storage pool.
2528 (Is_Direct_Deep_Call): New routine.
2529 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2530 build-in-place function call instead of a final list. Build a call to
2531 Set_Finalize_Address_Ptr to decorate the associated collection.
2532 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2533 order to name the build-in-place function call's result for later
2534 finalization. Add a collection to a build-in-place function call
2535 instead of a final list.
2536 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2537 build-in-place function call instead of a final list. Remove the code
2538 which moves one final list and transforms it into the actual in a
2539 nested build-in-place call.
2540 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2541 build-in-place function call instead of a final list.
2542 (Move_Final_List): Removed.
2543 (Needs_BIP_Collection): New routine.
2544 (Needs_BIP_Final_List): Removed.
2545 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2546 enumeration type BIP_Formal_Kind.
2547 Update the related comment.
2548 (Needs_BIP_Collection): New routine.
2549 (Needs_BIP_Final_List): Removed.
2550 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2551 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2552 majority of subprograms in this unit. Add Name_Finalize_Address to
2553 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2554 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2555 statements for an array type.
2556 (Build_Adjust_Statements): Create the adjust statements for a record
2558 (Build_Cleanup_Statements): New routine. A procedure which given any
2559 construct containing asynchronous calls, references to _master, or is a
2560 task body, a task allocation or a protected body produces the necessary
2561 runtime calls to clean up these constructs.
2562 (Build_Exception_Handler): New routine.
2563 (Build_Final_List): Removed.
2564 (Build_Finalization_Collection): New routine. A core procedure which
2565 creates a collection to service heap allocated controlled objects
2566 associated with an access-to-controlled type.
2567 (Build_Finalize_Statements): Create the finalization statements for a
2569 (Build_Finalizer): New routine. A core procedure which given any
2570 construct with declarations and/or statements detects all objects which
2571 need any type of clean up (controlled objects, protected objects) and
2572 generates all necessary code to clean up the said objects in the proper
2574 (Build_Finalizer_Call): New routine.
2575 (Build_Initialize_Statements): Create the initialization statements for
2576 an array type. The generated routine contains code to finalize partially
2578 (Build_Object_Declarations): New routine.
2579 (Build_Raise_Statement): New routine.
2580 (Clean_Simple_Protected_Objects): Removed.
2581 (Controller_Component): Removed.
2582 (Enclosing_Function): New routine.
2583 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2584 either declarations or statements or both.
2585 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2586 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2588 (Find_Final_List): Removed.
2589 (Global_Flist_Ref): Removed.
2590 (In_Finalization_Root): Removed.
2591 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2592 scope in terms of tree nodes. Process all transient variables within
2594 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2595 generated after the adjust.
2596 (Make_Attach_Call): Removed.
2597 (Make_Call): New routine.
2598 (Make_Clean): Removed.
2599 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2601 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2603 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2605 (Make_Final_Call): Modified to simply create a call to either
2606 Deep_Finalize or Finalize.
2607 (Make_Finalize_Address_Body): New routine.
2608 (Make_Finalize_Address_Stmts): New routine. A function which produces
2609 TSS primitive Finalize_Address used in conjunction with heap allocated
2611 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2612 (Make_Init_Call): Rewritten. There is no longer an attach call
2613 generated after initialization.
2614 (Make_Local_Deep_Finalize): New routine.
2615 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2616 (Make_Transient_Block): Remove the finalization list retrieval and
2618 (Needs_Finalization): Moved to Exp_Util.
2619 (Parent_Field_Type): New routine.
2620 (Preprocess_Components): New routine.
2621 (Process_Transient_Objects): New routine.
2622 (Wrap_HSS_In_Block): New routine.
2623 (Wrap_Transient_Declaration): Remove finalization list management and
2624 controller insertion.
2625 (Wrap_Transient_Expression): Code reformatting.
2626 (Wrap_Transient_Statement): Code reformatting.
2627 * exp_ch7.ads (Build_Final_List): Removed.
2628 (Build_Finalization_Collection): New routine.
2629 (Build_Raise_Statement): New routine.
2630 (Controller_Component): Removed.
2631 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2632 (Find_Final_List): Removed.
2633 (In_Finalization_Root): Removed.
2634 (Is_Simple_Protected_Type): Update related comment.
2635 (Make_Adjust_Call): New parameter profile and associated comments.
2636 (Make_Attach_Call): Removed.
2637 (Make_Final_Call): New parameter profile and associated comments.
2638 (Make_Finalize_Address_Body): New routine.
2639 (Make_Init_Call): New parameter profile and associated comments.
2640 (Make_Local_Deep_Finalize): New routine.
2641 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2642 (Needs_Finalization): Moved to Exp_Util.
2643 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2644 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2645 (Find_Protection_Type): Moved to Exp_Util.
2646 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2647 (Make_DT): Update sequence of dispatch table initialization. Remove the
2648 initialization of field RC_Offset. Add initialization of field Needs_
2650 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2651 Reimplement how an object is first finalized, then deallocated.
2652 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2654 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2655 Register TSS_Finalize_Address with type TSS_Names.
2656 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2657 procedure provides the interface between an allocation / deallocation
2658 and the support machinery in Ada.Finalization.Heap_Management.
2659 (Find_Init_Call): Code reformatting.
2660 (Find_Init_Call_In_List): Code reformatting.
2661 (Find_Protection_Type): Moved from Exp_Ch9.
2662 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2663 (Has_Controlled_Coextensions): Removed.
2664 (Has_Controlled_Objects): New routine.
2665 (In_Library_Level_Package_Body): New routine.
2666 (Insert_Action_After): New routine.
2667 (Is_Finalizable_Transient): New routine. This predicate determines
2668 whether an object declaration is one of the many variants of controlled
2670 (Is_Null_Access_BIP_Func_Call): New routine.
2671 (Is_Non_BIP_Func_Call): New routine.
2672 (Is_Related_To_Func_Return): New routine.
2673 (Needs_Finalization): Moved from Exp_Ch7.
2674 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2675 (Find_Protection_Type): Moved from Exp_Ch9.
2676 (Has_Controlled_Coextensions): Removed.
2677 (Has_Controlled_Objects): New routine.
2678 (In_Library_Level_Package_Body): New routine.
2679 (Insert_Action_After): New routine.
2680 (Is_Finalizable_Transient): New routine.
2681 (Is_Null_Access_BIP_Func_Call): New routine.
2682 (Is_Non_BIP_Func_Call): New routine.
2683 (Is_Related_To_Func_Return): New routine.
2684 (Needs_Finalization): Moved from Exp_ch7.
2685 * expander.adb (Expand): Add a case for N_Free_Statement.
2686 * freeze.adb (Freeze_All): Replace the generation of a finalization
2687 list with a collection for access-to-controlled types.
2688 (Freeze_Entity): Code reformatting.
2689 (Freeze_Record_Type): Remove the freezing of a record controller
2691 (Freeze_Subprogram): Code reformatting.
2692 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2694 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2695 has a library-level finalizer.
2696 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2697 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2698 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2699 files. Add a-fihema to the list of object files.
2701 Alphabetize the associations in type Is_Parameterless_Attribute.
2702 * rtsfind.ads: Ada.Finalization_List.Controller and
2703 System.Finalization_Implementation are no longer a GNAT unit.
2704 Update the range of type Ada_Finalization_Child. Remove the following
2705 recoverable entities:
2707 RE_Attach_To_Final_List
2711 RE_Finalizable_Ptr_Ptr
2712 RE_Global_Final_List
2713 RE_Limited_Record_Controller
2716 RE_Record_Controller
2717 RE_Simple_List_Controller
2719 Add the following recoverable entities:
2721 RE_Add_Offset_To_Address
2725 RE_Exception_Identity
2726 RE_Finalization_Collection
2727 RE_Finalization_Collection_Ptr
2728 RE_Needs_Finalization
2729 RE_Save_Library_Occurrence
2730 RE_Set_Finalize_Address_Ptr
2731 RE_Set_Storage_Pool_Ptr
2733 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2735 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2736 (First_Stored_Discriminant): Remove the mention of Name_uController.
2737 * sem_aux.ads: Comment reformatting.
2738 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2739 to redecorate an already existing class-wide type.
2740 (Decorate_Tagged_Type): New parameter profile and associated comment.
2741 Create a "shadow class-wide type" for a shadow entity.
2742 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2743 of the final chain along with the associated comment.
2744 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2745 Full_Desig and set it to the full view of the designated type.
2746 Initialize the finalization collection to empty.
2747 (Build_Derived_Record_Type): Alphabetize local variables. Code
2749 (Collect_Fixed_Components): Remove the mention of Name_uController.
2750 (Create_Constrained_Components): Remove the mention of Name_uController.
2751 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2752 class-wide type of a shadow entity.
2753 (Process_Full_View): Update the machinery which marks type
2754 Limited_Controlled's entity as limited.
2755 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2756 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2757 list, instead make a collection build-in-place formal.
2758 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2759 a designated type in order to establish a match between the renaming
2760 and the renamed entity.
2761 (Find_Selected_Component): Add guard to prevent spurious exceptions
2762 from being raised on .NET/JVM.
2763 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2764 to the list of primitive that need special processing. Update arrays
2765 C_Names and D_Names.
2766 (Replace_Types): Handle class-wide types.
2767 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2768 different parameter profile, look at the first formal.
2769 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2770 use clauses for Exp_Util.
2771 * sem_res.adb: Remove with and use clauses for Elists.
2772 (Propagate_Coextensions): Removed.
2773 (Resolve_Allocator): Do not propagate the list of coextensions from one
2774 allocator to another.
2775 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2776 Deaccessed_T to Desig_Typ.
2777 (Enter_Name): Remove the mention of Name_uController.
2778 (Gather_Components): Remove the mention of Name_uController.
2779 (Incomplete_Or_Private_View): New routine.
2780 (Is_Coextension_Root): Removed.
2781 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2782 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2783 (Is_Coextension_Root): Removed.
2784 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2785 Controlled types are now derived from a null tagged record. Remove
2786 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2787 * sinfo.adb (Coextensions): Removed.
2788 (Set_Coextensions): Removed.
2789 * sinfo.ads: Remove Coextensions from the explanation of node fields
2790 and its uses in nodes.
2791 Update the field usage of N_Allocator.
2792 (Coextensions): Removed along with its pragma Inline.
2793 (Set_Coextensions): Removed along with its pragma Inline.
2794 * snames.ads-tmpl: Remove names
2799 Name_uLocal_Final_List
2800 Name_Finalization_Root
2807 Name_Finalize_Address
2808 * s-pooglo.adb (Allocate): Add overriding indicator.
2809 (Deallocate): Add overriding indicator.
2810 (Storage_Size): Add overriding indicator.
2811 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2812 than Finalize_Global_List.
2813 (Null_Finalize_Global_List): Removed.
2814 (Save_Library_Occurrence): New routine.
2815 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2816 initialization. Add variable Finalize_Library_Objects along with its
2817 pragma Export. Add variables Library_Exception and
2818 Library_Exception_Set along with their pragma Export.
2819 (Null_Finalize_Global_List): Removed.
2820 (Save_Library_Occurrence): New routine.
2821 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2822 rather than Finalize_Global_List.
2823 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2824 of the constructed node.
2826 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2828 * link.c: Include "auto-host.h" before system headers.
2830 2011-08-03 Vincent Celier <celier@adacore.com>
2832 * make.adb (Gnatmake): Add to table Library_Projs only library projects
2833 that are not extended. Do not check if a library project that is
2834 extended should be regenerated. Do not add to table Library_Paths the
2835 libraries that are in extended projects. Link only with libraries that
2836 are in libray projects that are not extended.
2837 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
2838 for a library project that is extended.
2840 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2842 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
2843 conforming subprogram renamings that appear to be completions if they
2844 are not fully conformant.
2845 Such renamings are homographs but not completions.
2846 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
2847 names in a subprogram renaming that appears in an instance.
2849 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2851 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
2852 not immutably limited, build actual subtype from expression to provide
2853 proper bounds to caller.
2855 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2857 * sem_ch8.adb: Minor comment correction.
2859 2011-08-03 Thomas Quinot <quinot@adacore.com>
2861 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
2862 returning a limited array, use an extended return statement.
2864 2011-08-03 Vincent Celier <celier@adacore.com>
2866 * make.adb (Initialize): If --subdirs= is used, but no project file is
2867 specified, attempt to create the specify subdir if it does not already
2868 exist and use it as the object directory as if -D had been specified.
2870 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2872 * s-tpopsp-vms.adb: New file.
2873 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
2874 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
2876 2011-08-03 Emmanuel Briot <briot@adacore.com>
2878 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
2881 2011-08-03 Yannick Moy <moy@adacore.com>
2883 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
2884 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
2885 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
2886 detect that an array has static bounds.
2888 2011-08-03 Thomas Quinot <quinot@adacore.com>
2890 * exp_dist.adb: Minor reformatting.
2892 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2894 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
2895 (ATCB_Key): Removed, not always used.
2897 2011-08-03 Emmanuel Briot <briot@adacore.com>
2899 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
2900 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
2901 most remaining global variables.
2903 2011-08-03 Robert Dewar <dewar@adacore.com>
2905 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
2906 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
2909 2011-08-03 Javier Miranda <miranda@adacore.com>
2911 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
2912 that must be passed by copy in VM targets.
2914 2011-08-03 Emmanuel Briot <briot@adacore.com>
2916 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
2917 duplicates a similar htable now in the project tree.
2919 2011-08-03 Claire Dross <dross@adacore.com>
2921 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
2922 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
2923 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
2924 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
2925 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
2926 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
2927 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
2930 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2932 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
2933 (ATCB_Key): Removed, not always used.
2934 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
2936 * s-tpopsp-tls.adb: New file.
2937 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
2938 x86/x64/ia64/powerpc/sparc Linux.
2940 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2942 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
2943 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
2945 2011-08-03 Thomas Quinot <quinot@adacore.com>
2947 * rtsfind.ads, exp_dist.adb, exp_dist.ads
2948 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
2949 Fix type selection for mapping integer types to PolyORB types.
2951 2011-08-03 Bob Duff <duff@adacore.com>
2953 * sem_ch7.adb: Minor comment clarification.
2955 2011-08-03 Bob Duff <duff@adacore.com>
2957 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
2958 an error analyzing a choice, skip further processing. Further
2959 processing could cause a crash or cascade errors.
2961 2011-08-03 Emmanuel Briot <briot@adacore.com>
2963 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
2964 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
2965 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
2966 prj-env.ads (Shared_Project_Tree_Data): new type
2967 An aggregate project and its aggregated trees need to share the common
2968 data structures used for lists of strings, packages,... This makes the
2969 code simpler since otherwise we have to pass the root tree (also used
2970 for the configuration file data) in addition to the current project
2971 tree. This also avoids ambiguities as to which tree should be used.
2972 And finally this saves a bit of memory.
2973 (For_Every_Project_Imported): new parameter Tree.
2974 Since aggregated projects are using a different tree, we need to let
2975 the caller know which tree to use to manipulate the returned project.
2977 2011-08-03 Robert Dewar <dewar@adacore.com>
2979 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
2980 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
2981 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
2982 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
2984 2011-08-03 Javier Miranda <miranda@adacore.com>
2986 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
2987 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
2989 2011-08-03 Bob Duff <duff@adacore.com>
2991 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
2994 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
2996 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
2997 g-sehash.ads: Fix typo. Update header.
2999 2011-08-03 Thomas Quinot <quinot@adacore.com>
3001 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3004 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3006 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3007 prefixes of private types along with records, since the selector may be
3009 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3010 private types along with records, since the selector may be a
3013 2011-08-03 Emmanuel Briot <briot@adacore.com>
3015 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3017 2011-08-03 Javier Miranda <miranda@adacore.com>
3019 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3020 Tagged_Type_Expansion.
3022 2011-08-03 Yannick Moy <moy@adacore.com>
3025 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3026 concatenation is the name of a constant
3028 2011-08-03 Emmanuel Briot <briot@adacore.com>
3030 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3031 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3032 (Process_Declarative_Items): new parameter Child_Env.
3034 2011-08-03 Yannick Moy <moy@adacore.com>
3036 * alfa.ads Update format of ALFA section in ALI file in order to add a
3037 mapping from bodies to specs when both are present
3038 (ALFA_Scope_Record): add components for spec file/scope
3039 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3041 (Collect_ALFA): after all scopes have been collected, fill in the spec
3042 information when relevant
3043 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3046 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3048 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3049 code unit to decide whether to add internally generated subprograms.
3051 2011-08-03 Javier Miranda <miranda@adacore.com>
3053 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3055 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3058 2011-08-03 Emmanuel Briot <briot@adacore.com>
3060 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3061 code with Makeutl.Get_Switches.
3062 * prj-tree.adb: Update comment.
3064 2011-08-03 Thomas Quinot <quinot@adacore.com>
3066 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3067 subprogram with a limited formal that does not support external
3070 2011-08-03 Yannick Moy <moy@adacore.com>
3072 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3074 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3075 not from current unit in two phases, because it is not possible to
3076 change the table while iterating over its content.
3077 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3079 2011-08-03 Sergey Rybin <rybin@adacore.com>
3081 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3082 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3084 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3086 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3087 and the component type is composite, this is ambiguous for predefined
3088 concatenation, but if the node is not overloaded and the entity is a use
3089 -defined function its profile can be used to resolve that aggregate.
3091 2011-08-03 Robert Dewar <dewar@adacore.com>
3093 * exp_ch4.adb: Minor code cleanup.
3095 2011-08-03 Thomas Quinot <quinot@adacore.com>
3097 * exp_dist.adb: Do not generate distribution stubs if serious errors
3098 have been diagnosed.
3100 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3102 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3103 the first formal of a primitive operation, go to the base type to
3104 handle properly an access to a derived type with constrained
3106 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3107 user-defined function that is only use-visible.
3109 2011-08-03 Robert Dewar <dewar@adacore.com>
3111 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3112 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3113 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3114 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3115 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3116 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3117 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3118 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3120 2011-08-03 Robert Dewar <dewar@adacore.com>
3122 * repinfo.adb (List_Mechanism): Add handling of
3123 Convention_Ada_Pass_By_XXX.
3124 * sem_mech.adb (Set_Mechanism): Ditto.
3125 * sem_prag.adb (Process_Convention): Add entries for
3126 Convention_Ada_Pass_By_XXX.
3127 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3129 2011-08-03 Pascal Obry <obry@adacore.com>
3131 * makeutl.adb: Minor reformatting.
3133 2011-08-03 Vincent Celier <celier@adacore.com>
3136 (Get_File_Name) If the file cannot be found when there are no config
3137 pragmas file and May_Fail is True, return No_File instead of the file
3138 name, to be consistent.
3140 2011-08-03 Pascal Obry <obry@adacore.com>
3142 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3145 2011-08-03 Javier Miranda <miranda@adacore.com>
3148 (Same_Representation): In VM targets the representation of arrays with
3149 aliased components differs from arrays with non-aliased components.
3151 2011-08-03 Emmanuel Briot <briot@adacore.com>
3153 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3154 not systematically lower case attribute indexes that contain no "."
3155 Fix definition of several Naming attributes, which take
3156 a unit name as index and therefore should be case insensitive.
3157 Minor refactoring (reduce length of variable names).
3159 2011-08-03 Emmanuel Briot <briot@adacore.com>
3161 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3163 2011-08-03 Emmanuel Briot <briot@adacore.com>
3165 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3166 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3167 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3168 prj-tree.ads (Prj.Tree.Environment): new type.
3170 2011-08-03 Emmanuel Briot <briot@adacore.com>
3172 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3173 prj-tree.adb, prj-tree.ads (Environment): new type.
3175 2011-08-03 Emmanuel Briot <briot@adacore.com>
3177 * prj-tree.ads: Remove unused variable.
3179 2011-08-03 Yannick Moy <moy@adacore.com>
3181 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3182 issuing messages related to SPARK restriction violation.
3184 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3186 * sem_ch6.adb: guard against error nodes in return statements.
3188 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3190 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3191 a warning can only appear on a configuration file, so emit warning
3192 without further checks.
3194 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3196 * s-interr.ads: add overriding keyword.
3198 2011-08-03 Geert Bosch <bosch@adacore.com>
3200 * exp_attr.adb: Fix minor typo.
3202 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3204 * par-ch4.adb: improve error recovery.
3206 2011-08-03 Emmanuel Briot <briot@adacore.com>
3208 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3209 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3212 2011-08-03 Emmanuel Briot <briot@adacore.com>
3214 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3215 "external" as an attribute name in aggregate projects.
3217 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3219 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3220 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3221 from 0, so we need to adjust.
3223 2011-08-03 Emmanuel Briot <briot@adacore.com>
3225 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3226 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3228 2011-08-03 Yannick Moy <moy@adacore.com>
3230 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3231 restriction on overloaded entity if the entity is not an operator.
3233 2011-08-03 Yannick Moy <moy@adacore.com>
3235 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3236 restrict.ads: Rename remaining Check_Formal_Restriction* into
3237 Check_SPARK_Restriction*.
3239 2011-08-03 Emmanuel Briot <briot@adacore.com>
3241 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3242 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3244 (Project_Empty): removed
3245 (Empty_Project): new parameter Qualifier
3246 This is used to have fields specific to aggregate projects, cleaner
3247 New field to store the list of aggregated projects.
3248 (Check_Aggregate_Project): removed
3249 (Process_Aggregated_Projects, Free): new subprograms.
3251 2011-08-03 Olivier Hainque <hainque@adacore.com>
3253 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3255 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3257 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3258 explicit dereference of an unconstrained type, create a constrained
3259 subtype for it, as is done for function calls that return an
3262 2011-08-03 Thomas Quinot <quinot@adacore.com>
3264 * g-pehage.adb (Finalize): Avoid possible double-free.
3266 2011-08-03 Steve Baird <baird@adacore.com>
3268 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3269 Elab_Spec/Body attrs in CodePeer_Mode.
3271 2011-08-03 Javier Miranda <miranda@adacore.com>
3273 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3274 low bound is not known at compile time but they have no others choice.
3275 Done because in this case the bounds can be obtained directly from the
3278 2011-08-03 Ed Falis <falis@adacore.com>
3280 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3281 on VxWorks SMP. Remove unusable constant ANY_CPU.
3283 2011-08-03 Emmanuel Briot <briot@adacore.com>
3285 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3286 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3287 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3288 Prj.Env.Initialize_Empty): new subprograms
3289 (Get_Env, Find_Project): remove parameter Target_Name.
3291 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3293 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3294 as a condition for the delayed call to Derived_Subprograms done for the
3295 case of the rewriting of a derived type that constrains the
3296 discriminants of its parent type.
3297 Avoids redundant subprogram derivations for private subtype derivations.
3299 2011-08-03 Javier Miranda <miranda@adacore.com>
3301 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3302 Build_Record_Aggr_Code.
3303 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3304 discriminants in extension aggregates.
3306 2011-08-03 Emmanuel Briot <briot@adacore.com>
3308 * prj-pp.adb (Print): also output project qualifiers, since in
3309 particular "aggregate" is mandatory in an aggregate project.
3311 2011-08-03 Emmanuel Briot <briot@adacore.com>
3313 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3314 (Debug_Output): new function.
3316 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3318 * gnat_ugn.texi: Document -Wstack-usage.
3319 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3321 2011-08-03 Thomas Quinot <quinot@adacore.com>
3323 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3324 have keyword LIMITED.
3326 2011-08-03 Yannick Moy <moy@adacore.com>
3328 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3329 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3330 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3331 section (does not happen in compiler, only if code directly calls
3333 * get_alfa.adb, get_alfa.ads: New files.
3334 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3336 * lib-xref-alfa.adb: New file.
3337 * lib-xref.adb, lib-xref.ads
3338 (Xref_Entry): redefine information needed in cross-references for ALFA.
3339 Push ALFA treatments in separated local package.
3340 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3341 identifiers. Return entity of package body instead of spec. Return
3342 Empty for a scope with no location.
3343 (Generate_Reference): adapt to new components for ALFA information.
3344 Remove the need for D references on definitions.
3345 (Is_Local_Reference): moved to ALFA local package
3346 (Output_References): extract subfunction as Extract_Source_Name
3347 (Output_Local_References): remove procedure, replaced by filtering of
3348 cross-references in package ALFA and printing in Put_ALFA.
3349 (Write_Entity_Name): remove procedure
3350 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3351 print exact name of entity as it appears in source file
3352 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3353 * put_alfa.adb, put_alfa.ads: New files.
3354 * xref_lib.adb (Search_Xref): protect read of cross-references against
3355 reading other sections of the ALI file, in gnatxref
3356 (Search): protect read of cross-references against reading other
3357 sections of the ALI file, in gnatfind.
3358 * gcc-interface/Make-lang.in: Update dependencies.
3360 2011-08-03 Thomas Quinot <quinot@adacore.com>
3362 * sem_ch3.adb: Minor reformatting.
3364 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3366 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3367 raising an exception.
3369 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3371 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3372 type, always use 1 as the lower bound or string, even if lower bound of
3373 context is not static, to handle properly null strings in a non-static
3376 2011-08-03 Bob Duff <duff@adacore.com>
3378 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3379 always legal on the right-hand side of an assignment statement; there
3380 is always an applicable index constraint in this case. Therefore, the
3381 check for Pkind = N_Assignment_Statement is now unconditional -- it
3382 doesn't depend on whether Is_Constrained (Typ).
3384 2011-08-03 Robert Dewar <dewar@adacore.com>
3386 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3388 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3390 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3391 for an itype created within a generic unit.
3393 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3395 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3396 suppresses all inlining.
3398 2011-08-03 Robert Dewar <dewar@adacore.com>
3400 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3401 exp_aggr.adb: Minor reformatting.
3403 2011-08-03 Thomas Quinot <quinot@adacore.com>
3405 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3406 tagged assignment when discriminant checks are suppressed. This is
3407 useless and extremely costly in terms of static stack usage.
3409 2011-08-03 Bob Duff <duff@adacore.com>
3411 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3412 of generics, because this leads to the wrong entity in the wrong scope,
3413 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3415 (Process_Interface_Name): Follow Alias for instances of generics, to
3416 correct for the above change.
3418 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3420 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3421 is an integer literal it is always safe to replace the reference. In
3422 addition, if the reference appears in the generated code for an object
3423 declaration it is necessary to copy because otherwise the reference
3424 might be to the uninitilized value of the discriminant of the object
3427 2011-08-03 Pascal Obry <obry@adacore.com>
3429 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3430 ACL used, in this case we want to check for ending .exe, not .exe
3431 anywhere in the path.
3433 2011-08-03 Sergey Rybin <rybin@adacore.com>
3435 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3436 the tree structure (semantic decoration of references to record
3439 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3441 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3442 choices of a named array aggregate, bail out when any choices are
3443 marked as Errors_Posted.
3445 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3447 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3448 in which entity is frozen, to handle properly loop variables in
3451 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3453 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3454 subtype is not static, compute the upper bound using attributes, to
3455 handle properly index types that are not integer types.
3457 2011-08-03 Bob Duff <duff@adacore.com>
3459 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3460 Update copyright notice.
3462 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3464 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3465 Original_Discriminant if within an instance.
3466 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3468 2011-08-03 Thomas Quinot <quinot@adacore.com>
3470 * einfo.ads: Minor reformatting.
3472 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3474 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3475 composite type with an unfrozen subcomponent, in the profile of a
3476 primitive operation.
3478 2011-08-03 Robert Dewar <dewar@adacore.com>
3480 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3482 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3484 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3485 unconstrained type with discriminants is initialized with an aggregate,
3486 use the constrained subtype of the aggregate as the type of the object,
3487 because it is immutable, and this allows the back-end to generate no
3488 code for the object declaration.
3490 2011-08-03 Robert Dewar <dewar@adacore.com>
3492 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3493 comparison operand is variable, and turns out to be zero or negative.
3495 2011-08-03 Javier Miranda <miranda@adacore.com>
3498 (Expand_Dispatching_Constructor_Call): Disable expansion of
3499 code required for native targets. Done to avoid generating
3500 references to unavailable runtime entities in VM targets.
3502 (Expand_N_Object_Declaration): Add missing support to handle
3503 the explicit initialization of class-wide interface objects.
3506 2011-08-03 Matthew Heaney <heaney@adacore.com>
3508 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3510 2011-08-03 Matthew Heaney <heaney@adacore.com>
3512 * a-cbdlli.adb (Splice): move source items from first to last
3514 2011-08-03 Yannick Moy <moy@adacore.com>
3516 * sem_util.ads: comment added.
3518 2011-08-03 Javier Miranda <miranda@adacore.com>
3521 (Expand_Record_Aggregate): In VM targets disable the expansion into
3522 assignments of aggregates whose type is not known at compile time.
3524 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3526 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3527 protected entries and task entries, to build the proper renaming
3528 declaration for entry formals, used in debugging.
3529 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3530 parameters in the same way.
3532 2011-08-02 Robert Dewar <dewar@adacore.com>
3534 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3535 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3536 code reorganization.
3538 2011-08-02 Robert Dewar <dewar@adacore.com>
3540 * debug.adb: Debug flag d.P to suppress length comparison optimization
3541 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3542 comparison of Length by comparing First/Last instead.
3544 2011-08-02 Matthew Heaney <heaney@adacore.com>
3546 * a-cobove.ads: Code clean up.
3548 2011-08-02 Vincent Celier <celier@adacore.com>
3550 * adaint.c (file_names_case_sensitive_cache): New static int.
3551 (__gnat_get_file_names_case_sensitive): Cache the return value in
3552 file_names_case_sensitive_cache at the first invocation, to avoid
3553 multiple calls to getenv.
3555 2011-08-02 Bob Duff <duff@adacore.com>
3557 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3559 2011-08-02 Yannick Moy <moy@adacore.com>
3561 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3562 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3563 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3564 indicate that we are in a precondition or postcondition. This is used in
3565 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3566 decide whether to flag the spec or body of the current subprogram as
3569 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3571 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3573 * a-extiin.ads: New file.
3575 2011-08-02 Bob Duff <duff@adacore.com>
3577 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3578 now raises Name_Error instead of Use_Error in certain cases. The other
3579 parts of this AI were already implemented properly.
3581 2011-08-02 Vincent Celier <celier@adacore.com>
3583 * link.c: Only import "auto-host.h" when building the gnattools.
3585 2011-08-02 Yannick Moy <moy@adacore.com>
3587 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3588 which calls a local subprogram, so extract subprogram
3589 from Mark_Non_ALFA_Subprogram_Body.
3591 2011-08-02 Javier Miranda <miranda@adacore.com>
3594 (Extract_Dispatching_Call): If the type of the dispatching object is an
3595 access type then return an explicit dereference in the Object out-mode
3598 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3600 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3601 compatibility checks for all indexes of an array subtype, not just the
3602 first. Reset Has_Dynamic_Range_Check on the subtype before each
3603 potential check to ensure that Insert_Range_Checks will not elide any
3604 of the dynamic checks.
3606 2011-08-02 Yannick Moy <moy@adacore.com>
3608 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3609 SPARK restriction at parsing time.
3610 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3611 directive only if the SPARK restriction is set for this unit.
3613 2011-08-02 Yannick Moy <moy@adacore.com>
3615 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3616 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3617 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3618 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3619 Mark_Non_ALFA_Subprogram_Body.
3620 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3623 2011-08-02 Yannick Moy <moy@adacore.com>
3625 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3628 2011-08-02 Robert Dewar <dewar@adacore.com>
3630 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3631 exp_ch3.adb: Minor reformatting.
3633 2011-08-02 Emmanuel Briot <briot@adacore.com>
3635 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3636 files, not any regular file.
3637 (__gnat_locate_file_with_predicate): new subprogram.
3639 2011-08-02 Yannick Moy <moy@adacore.com>
3641 * sinfo.adb, sinfo.ads: Restrict the use of flags
3642 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3643 nodes, plus N_Subtype_Declaration for the 2nd one.
3645 2011-08-02 Sergey Rybin <rybin@adacore.com>
3647 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3648 - fix bugs in the description of Source_Trace;
3649 - get rid of UNIT_NAME;
3651 2011-08-02 Javier Miranda <miranda@adacore.com>
3654 (Build_Dispatching_Requeue): Adding support for VM targets
3655 since we cannot directly reference the Tag entity.
3656 * exp_sel.adb (Build_K): Adding support for VM targets.
3657 (Build_S_Assignment): Adding support for VM targets.
3659 (Default_Prim_Op_Position): In VM targets do not restrict availability
3660 of predefined interface primitives to compiling in Ada 2005 mode.
3661 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3662 restricted to compiling in Ada 2005 mode.
3663 (Make_VM_TSD): Generate code that declares and initializes the OSD
3664 record. Needed to support dispatching calls through synchronized
3667 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3668 primitives associated with synchronized interfaces.
3669 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3670 primitives associated with synchronized interfaces.
3672 2011-08-02 Yannick Moy <moy@adacore.com>
3674 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3675 statements hidden in SPARK if preceded by the HIDE directive
3676 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3677 exception handlers as hidden in SPARK if preceded by the HIDE directive
3678 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3679 if starting with the HIDE directive
3680 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3681 starting with the HIDE directive; mark the declarations in a private
3682 part as hidden in SPARK if the private part starts with the HIDE
3684 * restrict.adb, restrict.ads
3685 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3686 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3687 argument node belongs to a part which is hidden in SPARK
3688 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3689 parts in SPARK; protect the possibly costly call to
3690 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3691 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3692 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3693 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3695 (Scan): recognize special comment starting with '#' and followed by
3696 SPARK keyword "hide" as a HIDE directive.
3698 2011-08-02 Yannick Moy <moy@adacore.com>
3700 * types.ads, erroutc.ads: Minor reformatting.
3702 2011-08-02 Vincent Celier <celier@adacore.com>
3704 * link.c: Add response file support for cross platforms.
3706 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3708 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3709 in an association, set parent field of copy before partial analysis.
3710 * sem_res.adb (Resolve_Slice): create reference to itype only when
3711 expansion is enabled.
3713 2011-08-02 Yannick Moy <moy@adacore.com>
3715 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3716 for new flag denoting which subprogram bodies are in ALFA
3717 * restrict.adb, sem_ch7.adb: Update comment
3718 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3719 sem_ch9.adb, sem_res.adb: Add calls to
3720 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3721 * sem_ch6.adb (Analyze_Function_Return): add calls to
3722 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3723 middle of the body, and extended return.
3724 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3725 False when missing return.
3726 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3727 to True for subprograms whose spec is in ALFA. Remove later on the flag
3728 on the entity used for a subprogram body when there exists a separate
3730 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3731 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3732 False, otherwise do nothing.
3734 2011-08-02 Robert Dewar <dewar@adacore.com>
3736 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3738 2011-08-02 Yannick Moy <moy@adacore.com>
3740 * sem_ch4.ads: minor formatting.
3742 2011-08-02 Yannick Moy <moy@adacore.com>
3744 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3745 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3746 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3747 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3748 opt.ads: cleanup of SPARK mode
3750 2011-08-02 Yannick Moy <moy@adacore.com>
3752 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3754 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3755 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3757 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3758 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3759 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3760 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3762 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3764 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3765 functions whose return type is not in ALFA.
3766 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3768 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3769 parameter's type is not in ALFA.
3770 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3773 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3775 * sem_ch6 (Analyze_Expression_Function): treat the function as
3776 Inline_Always, and introduce a subprogram declaration for it when it is
3778 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3779 expression functions, so that the back-end can determine whether they
3780 can in fact be inlined.
3781 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3782 a function body comes from an expression function.
3784 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3786 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3787 null exclusions to test Can_Never_Be_Null on the anonymous access types
3788 of the formals rather than testing the formals themselves. Exclude this
3789 check in cases where the Old_Formal is marked as a controlling formal,
3790 to avoid issuing spurious errors for bodies completing dispatching
3791 operations (due to the flag not getting set on controlling access
3792 formals in body specs).
3793 (Find_Corresponding_Spec): When checking full and subtype conformance of
3794 subprogram bodies in instances, pass Designated and E in that order, for
3795 consistency with the expected order of the formals (New_Id followed by
3798 2011-08-02 Robert Dewar <dewar@adacore.com>
3800 * sem_ch8.adb: Minor reformatting.
3802 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3804 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3805 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3806 primitive operations of class-wide actuals.
3808 2011-08-02 Javier Miranda <miranda@adacore.com>
3810 * exp_atag.ads, exp_atag.adb
3811 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3812 since its value is implicitly passed in argument Typ.
3813 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3814 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3815 Build_Common_Dispatching_Select_Statements.
3817 2011-08-02 Robert Dewar <dewar@adacore.com>
3819 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3820 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3823 2011-08-02 Robert Dewar <dewar@adacore.com>
3825 * sem_res.adb: Minor reformatting.
3826 * sem_prag.adb: Minor reformatting.
3828 2011-08-02 Javier Miranda <miranda@adacore.com>
3830 * exp_atag.adb, exp_atags.ads
3831 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3832 by the tagged type Entity. Required to use this routine in the VM
3833 targets since we do not have available the Tag entity in the VM
3836 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3837 Ada.Tags has not been previously loaded.
3839 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3840 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3842 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3843 view of enclosing scopes. Required to handle enclosing scopes that
3844 are synchronized types whose full view is a task type.
3846 (Build_VM_TSDs): Minor code improvement to avoid generating and
3847 analyzing lists with empty nodes.
3848 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3849 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3850 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3851 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3852 (Make_Select_Specific_Data_Table): Add support for VM targets.
3853 (Make_VM_TSD): Generate code to initialize the SSD structure of
3856 2011-08-02 Yannick Moy <moy@adacore.com>
3858 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3859 cross-references section in ALI.
3860 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3861 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3863 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3864 subprogram or package entity of a node
3865 (Is_Local_Reference_Type): new function returns True for references
3866 selected in local cross-references.
3867 (Lt): function extracted from Lt in Output_References
3868 (Write_Entity_Name): function extracted from Output_References
3869 (Generate_Definition): generate reference with type 'D' for definition
3870 of objects (object declaration and parameter specification), with
3871 appropriate locations and units, for use in local cross-references.
3872 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3873 references of type 'I' for initialization in object definition.
3874 (Output_References): move part of function Lt and procedure
3875 Write_Entity_Name outside of the body. Ignore references of types 'D'
3876 and 'I' introduced for local cross-references.
3877 (Output_Local_References): new procedure to output the local
3878 cross-references sections.
3879 (Lref_Entity_Status): new array defining whether an entity is a local
3880 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3881 with 'I' type when initialization expression is present.
3882 * get_scos.adb, get_scos.ads: Correct comments and typos
3884 2011-08-02 Javier Miranda <miranda@adacore.com>
3886 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3888 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3890 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3893 2011-08-02 Vincent Celier <celier@adacore.com>
3895 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3896 (No_Space_Img): New function
3897 (Find_Excluded_Sources): When reading from a file, record the file name
3898 and the line number for each excluded source.
3899 (Mark_Excluded_Sources): When reporting an error, if the excluded
3900 sources were read from a file, include file name and line number in
3903 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3905 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
3907 2011-08-02 Robert Dewar <dewar@adacore.com>
3909 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
3911 2011-08-02 Javier Miranda <miranda@adacore.com>
3913 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
3914 generation of TSDs to the DOTNET compiler.
3915 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
3916 generation of TSDs to the DOTNET compiler.
3918 2011-08-02 Javier Miranda <miranda@adacore.com>
3920 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
3921 record of all the tagged types declared inside library level package
3922 declarations, library level package bodies or library level subprograms.
3923 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
3924 associated with a given tagged type.
3925 (Build_VM_TSDs): New subprogram.
3926 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
3927 compilation units that are subprograms.
3928 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
3929 compilation units that are package bodies.
3930 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
3931 units that are a package declaration or a package instantiation.
3932 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
3933 reorganization to improve the error generated by the frontend when the
3934 function Ada.Tags.Secondary_Tag is not available.
3935 * rtsfind.ads (RE_Register_TSD): New runtime entity.
3936 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
3938 2011-08-02 Javier Miranda <miranda@adacore.com>
3940 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
3942 2011-08-02 Robert Dewar <dewar@adacore.com>
3944 * s-imenne.ads: Minor reformatting.
3946 2011-08-02 Robert Dewar <dewar@adacore.com>
3948 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
3949 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
3950 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
3952 2011-08-02 Robert Dewar <dewar@adacore.com>
3954 * einfo.ads (Materialize_Entity): Document this is only for renamings
3955 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
3956 required debug information in the case where we transform the object
3957 declaration into a renaming declaration.
3958 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
3960 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
3963 2011-08-02 Robert Dewar <dewar@adacore.com>
3965 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
3966 Suppress_Init_Procs.
3967 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
3968 Suppress_Initialization/Initialization_Suppressed.
3969 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
3970 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
3971 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
3972 * sem_prag.adb: New processing for pragma Suppress_Initialization.
3974 2011-08-02 Robert Dewar <dewar@adacore.com>
3976 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
3979 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3981 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
3982 only have inheritable classwide pre/postconditions.
3984 2011-08-02 Javier Miranda <miranda@adacore.com>
3986 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
3987 * rtsfind.ads (RE_Check_TSD): New runtime entity.
3988 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
3989 checks if the external tag of a type is the same as the external tag
3990 of some other declaration.
3992 2011-08-02 Thomas Quinot <quinot@adacore.com>
3994 * s-taskin.ads: Minor reformatting.
3996 2011-08-02 Emmanuel Briot <briot@adacore.com>
3998 * g-comlin.adb (Display_Help): swap the order in which it prints the
3999 short help and the general usage.
4001 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4003 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4004 the aspect declarations and attach them to the generic copy for
4005 subsequent analysis.
4006 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4007 declarations of the generic tree to the new subprogram declarations.
4008 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4009 conditions that apply to a subprogram instance.
4011 2011-08-02 Robert Dewar <dewar@adacore.com>
4013 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4015 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4017 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4018 private type with a tagged full view is not derived in the immediate
4019 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4021 2011-08-02 Robert Dewar <dewar@adacore.com>
4023 * exp_ch4.adb: Minor reformatting.
4025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4027 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4028 Ada2012 iterator, the loop will be rewritten during expansion into a
4029 while loop with a cursor and an element declaration. Do not analyze the
4030 body in this case, because if the container is for indefinite types the
4031 actual subtype of the elements will only be determined when the cursor
4032 declaration is analyzed.
4034 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4036 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4037 size/alignment related attributes in CodePeer_Mode.
4039 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4041 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4042 Prepend_Element, since this can result in the operation getting the
4043 wrong slot in the full type's dispatch table if the full type has
4044 inherited operations. The incomplete type's operation will get added
4045 to the proper position in the full type's primitives
4046 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4047 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4048 dispatching operations, since there are cases where nonprimitive
4049 subprograms can get added to the list of incomplete dependents (such
4050 as subprograms in nested packages).
4051 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4052 private part when determining whether to add a primitive with a
4053 parameter of a tagged incomplete type to the Private_Dependents list.
4054 Such primitives can also occur in the visible part, and should not have
4055 been excluded from being private dependents.
4056 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4057 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4058 list of a Taft-amendment incomplete type is a primitive before issuing
4059 an error that the full type must appear in the same unit. There are
4060 cases where nonprimitives can be in the list (such as subprograms in
4062 * sem_disp.adb (Derives_From): Use correct condition for checking that
4063 a formal's type is derived from the type of the corresponding formal in
4064 the parent subprogram (the condition was completely wrong). Add
4065 checking that was missing for controlling result types being derived
4066 from the result type of the parent operation.
4068 2011-08-02 Yannick Moy <moy@adacore.com>
4070 * errout.adb (First_Node): minor renaming
4071 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4074 2011-08-02 Yannick Moy <moy@adacore.com>
4076 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4077 before accessing operands.
4078 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4079 decide whether an initialization expression respects SPARK rules, as
4080 the plain node is the expanded one. This allows for more valid warnings
4082 * gnat_rm.texi: Minor update.
4084 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4086 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4089 2011-08-02 Robert Dewar <dewar@adacore.com>
4091 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4093 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4095 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4096 loop statements and the element renaming declaration with a block when
4097 the element type is controlled.
4099 2011-08-02 Yannick Moy <moy@adacore.com>
4101 * sinfo.ads: Minor formatting.
4103 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4105 * sem_aggr.adb (Add_Association): if the association has a box and no
4106 expression, use the Sloc of the aggregate itself for the new
4108 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4111 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4113 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4114 When a container is provided via a function call, generate a renaming
4115 of the function result. This avoids the creation of a transient scope
4116 and the premature finalization of the container.
4117 * exp_ch7.adb (Is_Container_Cursor): Removed.
4118 (Wrap_Transient_Declaration): Remove the supression of the finalization
4119 of the list controller when the declaration denotes a container cursor,
4122 2011-08-02 Yannick Moy <moy@adacore.com>
4124 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4125 node is from source, instead of the original node being from source.
4127 (Resolve_Array_Aggregate): refine the check for a static expression, to
4128 recognize also static ranges
4129 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4130 Array_Type_Declaration): postpone the test for the type being a subtype
4131 mark after the type has been resolved, so that component-selection and
4132 expanded-name are discriminated.
4133 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4134 to distinguish the case of an iteration scheme, so that an error is
4135 issed on a non-static range in SPARK except in an iteration scheme.
4136 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4137 In_Iter_Schm = True.
4138 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4139 user-defined operators so that they are allowed in renaming
4141 (Find_Selected_Component): refine the check for prefixing of operators
4142 so that they are allowed in renaming. Move the checks for restrictions
4143 on selector name after analysis discriminated between
4144 component-selection and expanded-name.
4145 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4146 concatenation argument of string type if it is static.
4147 * sem_util.adb, sem_util.ads
4148 (Check_Later_Vs_Basic_Declarations): add a new function
4149 Is_Later_Declarative_Item to decice which declarations are allowed as
4150 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4151 mode, add that renamings are considered as later items.
4152 (Enclosing_Package): new function to return the enclosing package
4153 (Enter_Name): correct the rule for homonyms in SPARK
4154 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4155 from source (result of expansion) to avoid issuing wrong warnings.
4157 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4159 * errout.adb: On anything but an expression First_Node returns its
4162 2011-08-02 Pascal Obry <obry@adacore.com>
4164 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4166 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4168 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4169 Set the associated loop as the related expression of internally
4171 * exp_ch7.adb (Is_Container_Cursor): New routine.
4172 (Wrap_Transient_Declaration): Supress the finalization of the list
4173 controller when the declaration denotes a container cursor.
4175 2011-08-02 Yannick Moy <moy@adacore.com>
4177 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4179 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4180 expression is a simple expression. This check cannot be performed in
4181 the semantics, so just drop it.
4182 (P_Index_Or_Discriminant_Constraint): move check that the index or
4183 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4184 semantics. Other cases were previously checked in the semantics.
4185 * par-ch4.adb (P_Name): move checks that a selector name is not
4186 character literal or an operator symbol to Find_Selected_Component in
4188 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4189 declarations are not placed after later declarations in a separate
4190 procedure in Sem_Util (possibly not the best choice?), to be used both
4191 during parsing, for Ada 83 mode, and during semantic analysis, for
4193 * par-endh.adb (Check_End): move check that end label is not missing
4194 to Process_End_Label in the semantics
4195 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4196 the special case for SPARK restriction
4197 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4198 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4199 parameter Force to issue the error message even on internal node (used
4200 for generated end label). Call Check_Restriction to check when an error
4201 must be issued. In SPARK mode, issue an error message even if the
4202 restriction is not set.
4203 (Check_Restriction): new procedure with an additional out parameter to
4204 inform the caller that a message has been issued
4205 * sem_aggr.adb: Minor modification of message
4206 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4207 instead of issuing an error message directly
4208 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4209 declarations are not placed after later declarations, by calling
4210 Check_Later_Vs_Basic_Declarations
4211 (Analyze_Subtype_Declaration): move here the check that an index or
4212 discriminant constraint must be a subtype mark. Change the check that
4213 a subtype of String must start at one so that it works on subtype marks.
4214 * sem_ch4.adb (Analyze_Call): move here the check that a named
4215 association cannot follow a positional one in a call
4216 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4217 instead of issuing an error message directly
4218 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4219 selector name is not a character literal or an operator symbol. Move
4220 here the check that the prefix of an expanded name cannot be a
4221 subprogram or a loop statement.
4222 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4223 procedure called from parsing and semantics to check that basic
4224 declarations are not placed after later declarations
4225 (Process_End_Label): move here the check that end label is not missing
4227 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4229 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4230 representation clause in codepeer mode, since it confuses CodePeer and
4231 does not bring useful info.
4233 2011-08-02 Ed Falis <falis@adacore.com>
4235 * init.c: initialize fp hw on MILS.
4237 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4239 * errout.adb (First_Node): for bodies, return the node itself (small
4240 optimization). For other nodes, do not check source_unit if the node
4241 comes from Standard.
4243 2011-08-02 Robert Dewar <dewar@adacore.com>
4245 * exp_ch3.adb: Minor comment additions.
4246 * sem_ch13.adb: Minor reformatting.
4248 2011-08-02 Pascal Obry <obry@adacore.com>
4250 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4252 2011-08-02 Robert Dewar <dewar@adacore.com>
4254 * sem_attr.adb: Minor reformatting.
4256 2011-08-02 Robert Dewar <dewar@adacore.com>
4258 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4259 (Has_Default_Component_Value): Removed
4260 * einfo.ads Comment updates
4261 (Has_Default_Aspect): Replaces Has_Default_Value
4262 (Has_Default_Component_Value): Removed
4264 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4266 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4267 (Get_Simple_Init_Val): Handle Default_Value aspect
4268 (Needs_Simple_Initialization): Handle Default_Value aspect
4269 * exp_ch3.ads: Needs_Simple_Initialization
4270 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4271 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4273 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4274 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4275 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4277 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4279 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4280 package containing iteration primitives.
4281 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4283 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4285 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4286 "of", pre-analyze expression in case it is a function call with
4287 finalization actions that must be placed ahead of the loop.
4288 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4289 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4291 2011-08-02 Geert Bosch <bosch@adacore.com>
4293 * cstand.adb (Create_Float_Types): Only consider C's long double for
4294 Long_Long_Float, in addition to double.
4296 2011-08-02 Robert Dewar <dewar@adacore.com>
4298 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4299 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4300 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4303 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4305 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4308 2011-08-02 Javier Miranda <miranda@adacore.com>
4310 * einfo.ads, einfo.adb
4311 (Original_Access_Type): Move this attribute to Node26 since there was
4312 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4313 which causes conflicts and breaks the generation of the .NET compiler.
4314 (Interface_Name): Add missing documentation on JGNAT only uses of
4317 2011-08-02 Geert Bosch <bosch@adacore.com>
4319 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4320 (Find_Back_End_Float_Type): Likewise
4321 (Create_Back_End_Float_Types): Likewise
4322 (Create_Float_Types): Likewise
4323 (Register_Float_Type): Likewise
4324 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4325 Nlist and split out type selection in new local Find_Base_Type function.
4326 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4328 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4330 2011-08-02 Robert Dewar <dewar@adacore.com>
4332 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4334 * opt.ads: Minor comment change.
4335 * sem_ch12.adb: Minor code reorganization.
4337 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4339 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4340 subtype's list of rep items to the list on the full subtype in the case
4341 where the lists are the same.
4343 2011-08-02 Geert Bosch <bosch@adacore.com>
4345 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4346 using the one from System.Strings, which also deallocates all strings.
4348 2011-08-02 Geert Bosch <bosch@adacore.com>
4350 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4352 * gcc-interface/Make-lang.in: Update dependencies.
4354 2011-08-02 Olivier Hainque <hainque@adacore.com>
4356 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4359 2011-08-02 Javier Miranda <miranda@adacore.com>
4361 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4362 associated with anonymous access to subprograms.
4364 2011-08-02 Geert Bosch <bosch@adacore.com>
4367 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4368 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4369 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4370 (Add_Symbol_Definition): Move to switch-c.adb
4371 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4372 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4373 (Add_Symbol_Definition): Move to switch-c.adb.
4374 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4376 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4378 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4379 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4381 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4382 (Add_Symbol_Definition): Moved from Prepcomp.
4383 * switch-c.ads: Update copyright notice. Use String_List instead of
4384 Argument_List, removing dependency on System.OS_Lib.
4386 2011-08-02 Yannick Moy <moy@adacore.com>
4388 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4389 mode on initialization expression which does not respect SPARK
4391 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4392 if the tree referenced by its argument represents an initialization
4393 expression in SPARK, suitable for initializing an object in an object
4396 2011-08-02 Javier Miranda <miranda@adacore.com>
4398 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4399 internally generated access to subprogram with its associated protected
4401 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4403 2011-08-02 Geert Bosch <bosch@adacore.com>
4405 * cstand.adb (Register_Float_Type): Print information about type to
4406 register, if the Debug_Flag_Dot_B is set.
4407 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4408 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4409 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4410 with a requested precision of more than Max_Digits digits and no more
4411 than Max_Base_Digits digits, if a range specification is present and the
4412 Predefined_Float_Types list has a suitable type to derive from.
4413 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4414 case of type completion with pragma Import
4416 (Process_Import_Predefined_Type): Processing to complete a type
4417 with pragma Import. Currently supports floating point types only.
4418 (Set_Convention_From_Pragma): Do nothing without underlying type.
4419 (Process_Convention): Guard against absence of underlying type,
4420 which may happen when importing incomplete types.
4421 (Process_Import_Or_Interface): Handle case of importing predefined
4422 types. Tweak error message.
4424 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4426 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4427 functions to previous change. Reorganize code slightly.
4429 2011-08-02 Geert Bosch <bosch@adacore.com>
4431 * back_end.ads (Register_Type_Proc): New call back procedure type for
4432 allowing the back end to provide information about available types.
4433 (Register_Back_End_Types): New procedure to register back end types.
4434 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4436 * cstand.adb (Back_End_Float_Types): New list for floating point types
4437 supported by the back end.
4438 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4439 (Copy_Float_Type): New procedure to make new copies of predefined types.
4440 (Register_Float_Type): New call back procedure to populate the BEFT list
4441 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4442 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4443 (Create_Float_Types): New procedure to create entities for floating
4444 point types predefined in Standard, and put these and any remaining
4445 BEFTs on the Predefined_Float_Types list.
4446 * stand.ads (Predefined_Float_Types): New list for predefined floating
4447 point types that do not have declarations in package Standard.
4449 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4451 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4452 entity node for the unit containing the parameter.
4453 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4454 (Add_Inlined_Subprogram): Likewise.
4455 * gcc-interface/Make-lang.in: Update dependencies.
4457 2011-08-02 Thomas Quinot <quinot@adacore.com>
4459 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4462 2011-08-02 Geert Bosch <bosch@adacore.com>
4464 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4466 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4468 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4469 computed value of Base_Type.
4471 2011-08-02 Yannick Moy <moy@adacore.com>
4473 * restrict.adb (Check_Restriction): issue an error for any use of
4474 class-wide, even if the No_Dispatch restriction is not set.
4475 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4476 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4477 when completing a private extension, the type named in the private part
4478 is not the same as that named in the visible part.
4479 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4480 of an inherited primitive operations of a tagged type or type extension
4481 that returns the tagged type.
4482 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4483 function which returns True for an implicit operation inherited by the
4484 derived type declaration for the argument type.
4485 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4488 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4490 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4491 Process_Bounds, to perform analysis with expansion of a range or an
4492 expression that is the iteration scheme for a loop.
4493 (Analyze_Iterator_Specification): If domain of iteration is given by a
4494 function call with a controlled result, as is the case if call returns
4495 a predefined container, ensure that finalization actions are properly
4497 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4499 2011-08-02 Javier Miranda <miranda@adacore.com>
4501 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4502 * gcc-interface/Make-lang.in: Update dependencies.
4504 2011-08-02 Javier Miranda <miranda@adacore.com>
4506 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4507 determine if the analysis is performed using N or Original_Node (N).
4508 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4509 functionality of routine Is_Variable avoids code duplication.
4510 * checks.adb (Determine_Range): Handle temporaries generated by
4511 Remove_Side_Effects.
4513 2011-08-02 Javier Miranda <miranda@adacore.com>
4515 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4516 expansion of the condition. Required since the previous analysis was
4517 done with expansion disabled (see Resolve_Quantified_Expression) and
4518 hence checks were not inserted and record comparisons have not been
4521 2011-08-02 Ed Falis <falis@adacore.com>
4523 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4526 2011-08-02 Bob Duff <duff@adacore.com>
4528 * opt.ads: Minor comment fix.
4530 2011-08-02 Bob Duff <duff@adacore.com>
4532 * sem_ch12.adb (Analyze_Package_Instantiation,
4533 Analyze_Subprogram_Instantiation): Turn off style checking while
4534 analyzing an instance. Whatever style checks that apply to the generic
4535 unit should apply, so it makes no sense to apply them in an instance.
4536 This was causing trouble when compiling an instance of a runtime
4537 unit that violates the -gnatyO switch.
4538 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4539 one of the two case statements, causing spurious errors.
4541 2011-08-02 Robert Dewar <dewar@adacore.com>
4543 * uname.adb: Minor reformatting.
4544 * gnatcmd.adb: Minor reformatting.
4545 * exp_attr.adb: Minor reformatting.
4547 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4549 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4550 No_Dispatching_Calls, do not look for the Assign primitive, because
4551 predefined primitives are not created in this case.
4553 2011-08-02 Bob Duff <duff@adacore.com>
4555 * stylesw.ads: Minor comment fixes.
4557 2011-08-02 Robert Dewar <dewar@adacore.com>
4559 * freeze.adb (Add_To_Result): New procedure.
4561 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4563 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4564 time, if the specific run-time routines for handling streams of strings
4565 are not available, use the default mechanism.
4567 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4569 * s-regpat.ads: Fix typo.
4571 2011-08-02 Vincent Celier <celier@adacore.com>
4573 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4574 not null, call it to create the in memory config project file without
4575 parsing an existing default config project file.
4577 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4579 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4581 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4583 * sem_elim.adb: an abstract subprogram does not need an eliminate
4584 pragma for its descendant to be eliminable.
4586 2011-08-02 Ed Falis <falis@adacore.com>
4588 * init.c: revert to handling before previous checkin for VxWorks
4589 * s-intman-vxworks.adb: delete unnecessary declarations related to
4590 using Ada interrupt facilities for handling signals.
4591 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4592 * s-intman-vxworks.ads: Import __gnat_install_handler as
4593 Initialize_Interrupts.
4594 * s-taprop-vxworks.adb: Delete Signal_Mask.
4595 (Abort_Handler): change construction of mask to unblock exception
4598 2011-08-02 Jerome Guitton <guitton@adacore.com>
4600 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4601 Debug_Raise_Exception before propagation starts.
4603 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4605 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4606 to Restriction_Check_Required.
4607 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4608 * sem_res.adb (Resolve_Call): Likewise.
4609 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4611 2011-08-02 Bob Duff <duff@adacore.com>
4613 * stylesw.ads: Update comment.
4614 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4615 * errout.ads: Remove obsolete comment.
4617 2011-08-02 Javier Miranda <miranda@adacore.com>
4619 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4620 (Set_Is_Safe_To_Reevaluate): new procedure.
4621 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4622 assignment is allowed on safe-to-reevaluate variables.
4623 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4624 temporary created to remove side effects in expressions that use
4625 the secondary stack as safe-to-reevaluate.
4626 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4627 variables that are not true constants.
4629 2011-08-02 Robert Dewar <dewar@adacore.com>
4631 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4632 sem_res.adb, sem_ch6.adb: Minor reformatting.
4634 2011-08-02 Jerome Guitton <guitton@adacore.com>
4636 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4638 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4640 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4641 not set Overridden_Operation if subprogram is an initialization
4644 2011-08-02 Yannick Moy <moy@adacore.com>
4646 * par-ch6.adb: Correct obsolete name in comments
4647 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4648 which takes two message arguments (existing function takes one), with
4649 second message used for continuation.
4650 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4651 block statements that originate from a source block statement, not
4652 generated block statements
4653 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4654 symmetry with procedure case
4655 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4656 function to issue an error in formal mode if a package specification
4657 contains more than one tagged type or type extension.
4658 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4659 parameters matching formals of tagged types are objects (or ancestor
4660 type conversions of objects), not general expressions. Issue an error
4661 on view conversions that are not involving ancestor conversion of an
4663 (Resolve_Type_Conversion): in formal mode, issue an error on the
4664 operand of an ancestor type conversion which is not an object
4665 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4666 procedure so that it works also for actuals of function calls
4667 (Is_Actual_Tagged_Parameter): new function which determines if its
4668 argument is an actual parameter of a formal of tagged type in a
4670 (Is_SPARK_Object_Reference): new function which determines if the tree
4671 referenced by its argument represents an object in SPARK
4673 2011-08-02 Robert Dewar <dewar@adacore.com>
4675 * sem_ch3.adb: Minor reformatting
4676 Minor comment addition
4677 Minor error msg text change
4679 2011-08-02 Javier Miranda <miranda@adacore.com>
4681 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4682 function. Used to be more precise when we generate a variable plus one
4683 assignment to remove side effects in the evaluation of the Bound
4685 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4686 of the bound expression to force its re-analysis and thus expand the
4687 associated transient scope (if required). Code cleanup replacing the
4688 previous code that declared the constant entity by an invocation to
4689 routine Force_Evaluation which centralizes this work in the frontend.
4691 2011-08-02 Robert Dewar <dewar@adacore.com>
4693 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4694 (Base_Type): Now uses improved Is_Base_Type function
4695 * einfo.ads (Base_Type): Inline this function
4697 2011-08-02 Robert Dewar <dewar@adacore.com>
4699 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4700 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4702 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4704 * gcc-interface/Make-lang.in: Update dependencies.
4705 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4708 2011-08-02 Yannick Moy <moy@adacore.com>
4710 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4711 non-simple expression used in delta constraint
4712 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4713 index constraint which is not a subtype mark
4714 * par.adb: With and use Restrict
4715 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4716 mode on component type which is not a subtype mark and default
4717 expression on component
4718 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4719 of string which does not have a lower index bound equal to 1
4720 (Array_Type_Declaration): issue an error in formal mode on index or
4721 component type which is not a subtype mark, and on aliased keyword on
4723 (Derived_Type_Declaration): issue an error in formal mode on interface,
4724 limited or abstract type
4725 (Record_Type_Declaration): issue an error in formal mode on interface
4726 (Record_Type_Definition): issue an error in formal mode on tagged types
4727 and type extensions not declared in the specification of a library unit
4728 package; on null non-tagged record; on variant part
4730 2011-08-02 Vincent Celier <celier@adacore.com>
4732 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4733 not declared for qualified library project when Library_Name is not
4734 declared, but Library_Dir is.
4736 2011-08-02 Robert Dewar <dewar@adacore.com>
4738 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4739 pragmas (affects aspects [Component_]Default_Value
4740 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4741 component type for the resolution
4743 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4745 * einfo.adb (Base_Type): Tune implementation for speed.
4747 2011-08-02 Robert Dewar <dewar@adacore.com>
4749 * freeze.adb: Minor reformatting.
4751 2011-08-02 Thomas Quinot <quinot@adacore.com>
4753 * scos.ads: Update comments.
4755 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4757 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4758 base type, because the parent may be a subtype of a private type whose
4759 convention is established in a private part.
4761 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4763 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4764 statement in a block when the expansion of the return expression has
4765 created a finalization chain.
4766 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4767 with the parent node.
4768 Add N_Extended_Return_Statement to handle the case where a transient
4769 object declaration appears in the Return_Object_Declarations list of
4770 an extended return statement.
4772 2011-08-02 Matthew Gingell <gingell@adacore.com>
4774 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4775 unused parameter 'name'.
4777 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4779 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4780 inherited operation, check whether its alias, which is the source
4781 operastion that it renames, has been marked eliminated.
4783 2011-08-02 Javier Miranda <miranda@adacore.com>
4785 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4786 in-mode parameter whose type is an access type since it can be used to
4787 modify its designated object. Enforce code that handles as safe an
4788 access type that is not access-to-constant but it is the result of a
4789 previous removal of side-effects.
4790 (Remove_Side_Effects): Minor code reorganization of cases which require
4791 no action. Done to incorporate documentation on new cases uncovered
4792 working in this ticket: no action needed if this routine was invoked
4793 too early and the nodes are not yet decorated.
4794 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4795 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4796 were issued with actuals that are implicitly provided by
4799 2011-08-02 Robert Dewar <dewar@adacore.com>
4801 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4803 2011-08-02 Yannick Moy <moy@adacore.com>
4805 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4806 to issue an error in formal mode on attribute not supported in this mode
4807 (Analyze_Attribute): issue errors on standard attributes not supported
4809 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4810 comment, and issue error in formal mode on modulus which is not a power
4812 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4814 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4816 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4817 operator on modular type (except 'not').
4819 2011-08-02 Robert Dewar <dewar@adacore.com>
4821 * gnat_rm.texi: Minor reformatting.
4823 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4825 * s-osinte-linux.ads: Minor comment update and reformatting.
4826 * i-cexten.ads: Make this unit pure, as for its parent.
4827 Will allow its usage in more contexts if needed.
4829 2011-08-02 Robert Dewar <dewar@adacore.com>
4831 * s-utf_32.ads: Minor comment fix.
4833 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4835 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4836 operation of a tagged synchronized type, handle the case where the
4837 controlling argument is overloaded.
4839 2011-08-02 Yannick Moy <moy@adacore.com>
4841 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4842 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4843 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4844 SPARK mode and formal verification mode on processing SPARK restriction
4845 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4846 requiring consistency checking.
4848 2011-08-02 Robert Dewar <dewar@adacore.com>
4850 * sem_res.adb: Minor reformatting.
4852 2011-08-02 Robert Dewar <dewar@adacore.com>
4854 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4855 a-cforse.ads: Remove unneeded with of Ada.Containers
4856 Remove commented out pragma Inline's
4857 Move specifications of new subprograms to the actual specs
4859 2011-08-02 Yannick Moy <moy@adacore.com>
4861 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4862 a-cforse.ads: Update comments.
4864 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4866 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4868 2011-08-02 Robert Dewar <dewar@adacore.com>
4870 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4871 a-cforse.ads, a-cofove.ads: Minor reformatting.
4873 2011-08-02 Claire Dross <dross@adacore.com>
4875 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4876 a-cofove.ads: Add comments.
4878 2011-08-02 Yannick Moy <moy@adacore.com>
4880 * gnat_rm.texi: Document formal containers.
4882 2011-08-02 Emmanuel Briot <briot@adacore.com>
4884 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4887 2011-08-02 Robert Dewar <dewar@adacore.com>
4889 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4892 2011-08-02 Robert Dewar <dewar@adacore.com>
4894 * aspects.adb: New aspects Default_Value and Default_Component_Value
4895 New format of Aspect_Names table checks for omitted entries
4896 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4897 handling of boolean aspects for derived types.
4898 New aspects Default_Value and Default_Component_Value
4899 New format of Aspect_Names table checks for omitted entries
4900 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
4901 (Has_Default_Value): New flag
4902 (Has_Default_Component_Value): New flag
4903 (Has_Default_Value): New flag
4904 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
4906 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
4907 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
4908 Default_Value and Default_Component_Value
4909 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
4910 New aspects Default_Value and Default_Component_Value
4911 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
4912 * sprint.adb: Print N_Aspect_Specification node when called from gdb
4914 2011-08-02 Vincent Celier <celier@adacore.com>
4916 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
4917 inherit library kind.
4919 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4921 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
4924 2011-08-02 Robert Dewar <dewar@adacore.com>
4926 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
4928 2011-08-02 Yannick Moy <moy@adacore.com>
4930 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
4932 2011-08-02 Robert Dewar <dewar@adacore.com>
4934 * impunit.adb: Add comment.
4936 2011-08-02 Yannick Moy <moy@adacore.com>
4938 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
4939 qualification of aggregates in formal mode
4940 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
4942 (Resolve_Aggregate): complete the test that an aggregate is adequately
4943 qualified in formal mode
4945 2011-08-02 Pascal Obry <obry@adacore.com>
4947 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
4948 * mlib-prj.adb: Supress warning when compiling binder generated file.
4949 (Build_Library): Supress all warnings when compiling the binder
4952 2011-08-02 Yannick Moy <moy@adacore.com>
4954 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
4956 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
4957 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
4958 Add with/use clauses to make Check_Formal_Restriction visible
4960 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4962 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
4963 in-parameters when type of the generic formal is private in the generic
4964 spec and non-private in the body.
4966 2011-08-02 Claire Dross <dross@adacore.com>
4968 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
4969 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
4970 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
4971 * impunit.adb, Makefile.rtl: Take new files into account.
4973 2011-08-02 Robert Dewar <dewar@adacore.com>
4975 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
4976 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4978 2011-08-02 Yannick Moy <moy@adacore.com>
4980 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
4982 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
4983 matching static array bounds, taking into account the special case of
4985 * sem_ch3.adb: Typo in comment.
4987 2011-08-02 Yannick Moy <moy@adacore.com>
4989 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
4990 which issues an error in formal mode if its argument node is originally
4992 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
4993 has a discriminant specification so that it does not include the case
4995 (Derived_Type_Declaration): move here the test that a derived type has a
4996 discriminant specification
4997 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
4998 first element of a component association before accessing its choices
4999 (presence of component association is not enough)
5000 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5001 declaration is a library item before accessing the next element in a
5002 list, as library items are not member of lists
5003 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5004 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5005 Check_Formal_Restriction whenever possible.
5007 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5009 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5010 reference when needed.
5012 2011-08-02 Bob Duff <duff@adacore.com>
5014 * gnat_ugn.texi: Fix typo.
5016 2011-08-02 Vincent Celier <celier@adacore.com>
5018 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5019 archive file name. Do not use the full path name of archives for Open
5022 2011-08-02 Robert Dewar <dewar@adacore.com>
5024 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5025 Analyze_Aspect_Specifications
5027 (Analyze_Aspect_Specifications): New handling for boolean aspects
5028 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5029 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5030 sequence for Analyze_Aspect_Specifications
5031 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5032 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5034 2011-08-02 Robert Dewar <dewar@adacore.com>
5036 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5037 aspects, since these no longer exist.
5039 2011-08-02 Robert Dewar <dewar@adacore.com>
5041 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5042 semicolon, do not try to see if there are aspects following it.
5043 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5046 2011-08-02 Robert Dewar <dewar@adacore.com>
5048 * sem_ch8.adb, aspects.ads: Minor reformatting.
5050 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5052 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5053 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5055 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5057 2011-08-02 Yannick Moy <moy@adacore.com>
5059 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5060 mode on subprogram declaration outside of package specification, unless
5061 it is followed by a pragma Import
5062 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5063 Access_Type_Declaration): issue error in formal mode on access type
5064 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5066 (Analyze_Object_Declaration): issue error in formal mode on object
5067 declaration which does not respect SPARK restrictions
5068 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5069 declaration which does not respect SPARK restrictions
5070 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5071 error in formal mode on digits or delta constraint
5072 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5073 decimal fixed point type
5074 (Derived_Type_Declaration): issue error in formal mode on derived type
5075 other than type extensions of tagged record types
5076 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5077 with check on access definition
5078 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5079 mode on protected definition.
5080 (Analyze_Task_Definition): issue error in formal mode on task definition
5082 2011-08-02 Robert Dewar <dewar@adacore.com>
5084 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5086 2011-08-02 Javier Miranda <miranda@adacore.com>
5088 * sem_ch6.adb (Can_Override_Operator): New function.
5089 (Verify_Overriding_Indicator): Add missing code to check overriding
5090 indicator in operators. Fixes regression.
5091 (Check_Overriding_Indicator): Minor reformating after replacing the
5092 code that evaluates if the subprogram can override an operator by
5093 invocations to the above new function.
5095 (Write_Field26_Name): Add missing code to ensure that, following
5096 the documentation in einfo.ads, this field is not shown as attribute
5097 "Static_Initialization" on non-dispatching functions.
5099 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5101 * sem_res.adb (Resolve_Call): A call to
5102 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5103 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5104 i.e., when the second parameter is of type Time_Span.
5106 2011-08-02 Vincent Celier <celier@adacore.com>
5108 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5109 with an archive instead of -L<library dir> -l<library name>.
5111 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5113 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5114 mark the base types In_Use in addition to making the operations
5117 2011-08-02 Ed Falis <falis@adacore.com>
5119 * init.c: add and setup __gnat_signal_mask for the exception signals
5120 * s-inmaop-vxworks.adb: new file.
5121 * s-intman-vxworks.adb: remove unnecessary initializations and
5123 * s-intman-vxworks.ads: remove unnecessary variable
5124 * s-taprop-vxworks.adb: simplify signal initialization
5126 2011-08-02 Robert Dewar <dewar@adacore.com>
5128 * sem_ch8.adb: Minor code reorganization, comment updates.
5130 2011-08-02 Robert Dewar <dewar@adacore.com>
5132 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5133 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5135 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5136 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5138 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5140 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5141 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5142 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5143 use_type_clauses, to handle more efficiently use_type and use_all_type
5145 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5146 Ada2012 Use_All_Type clause.
5147 (Use_Class_Wide_Operations): new procedure.
5149 2011-08-02 Robert Dewar <dewar@adacore.com>
5151 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5152 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5153 expression to expression function.
5155 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5157 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5158 if types are compatible.
5160 2011-08-02 Yannick Moy <moy@adacore.com>
5162 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5163 returns True if its argument array types have same dimension and same
5164 static bounds at each index.
5165 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5166 OUT or IN OUT paramaters which are not view conversions in SPARK.
5167 (Resolve_Arithmetic_Op): issue an error in formal mode on
5168 multiplication or division with operands of fixed point types which are
5169 not qualified or explicitly converted.
5170 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5171 Boolean or array type (except String) operands.
5172 (Resolve_Equality_Op): issue an error in formal mode on equality
5173 operators for array types other than String with non-matching static
5175 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5176 for array types with non-matching static bounds. Factorize the code in
5177 Matching_Static_Array_Bounds.
5178 (Resolve_Qualified_Expression): issue an error in formal mode on
5179 qualified expressions for array types with non-matching static bounds.
5180 (Resolve_Type_Conversion): issue an error in formal mode on type
5181 conversion for array types with non-matching static bounds
5183 2011-08-02 Robert Dewar <dewar@adacore.com>
5185 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5187 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5189 * par-ch9.adb: save location of entry for proper error message.
5191 2011-08-02 Javier Miranda <miranda@adacore.com>
5193 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5194 (Use_Full_View) which permits this routine to climb through the
5195 ancestors using the full-view of private parents.
5196 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5197 Use_Full_View to true in calls to Is_Ancestor.
5198 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5199 true in call to Is_Ancestor.
5200 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5201 Use_Full_View to true in call to Is_Ancestor.
5202 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5203 call to Is_Ancestor.
5204 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5205 Use_Full_View to true in calls to Is_Ancestor.
5206 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5207 Make_Select_Specific_Data_Table, Register_Primitive,
5208 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5209 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5210 to true in call to Is_Ancestor.
5211 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5212 Use_Full_View to true in calls to Is_Ancestor.
5214 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5215 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5217 2011-08-02 Robert Dewar <dewar@adacore.com>
5219 * gnat_rm.texi: Minor reformatting.
5220 * sem_prag.adb: Minor reformatting.
5222 2011-08-02 Tristan Gingold <gingold@adacore.com>
5224 * vms_data.ads: Add VMS qualifier for -gnateP.
5226 2011-08-02 Robert Dewar <dewar@adacore.com>
5228 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5229 * par-ch7.adb (P_Package): Proper placement of aspects for package
5231 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5232 (End_Statements): Add Is_Sloc parameterr
5233 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5234 (Check_End): Ad Is_Sloc parameter
5235 (End_Statements): Add Is_Sloc parameterr
5237 2011-08-02 Vincent Celier <celier@adacore.com>
5239 * ug_words: Add VMS qualifier equivalent to -gnateP:
5240 /SYMBOL_PREPROCESSING.
5242 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5244 * gnat-style.texi: For hexadecimal numeric literals the typical
5245 grouping of digits is 4 to represent 2 bytes.
5246 A procedure spec which is split into several lines is indented two
5249 2011-08-02 Yannick Moy <moy@adacore.com>
5251 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5252 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5253 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5255 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5256 choice in array aggregate
5257 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5259 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5260 positional and named aggregate for record, or others in record
5261 aggregate, or multiple choice in record aggregate
5262 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5263 array operands to logical operations AND, OR and XOR do not have the
5264 same static lower and higher bounds
5265 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5267 2011-08-01 Robert Dewar <dewar@adacore.com>
5269 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5270 Replaces Last_Source_Node_In_Sequence.
5271 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5272 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5273 parens and blank in string (this was inconsistently implemented).
5275 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5276 blank in string (this was inconsistently implemented).
5278 (Set_Global_Switches): Set formal mode switches appropriately
5279 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5281 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5282 call Set_Error_Msg_Lang to set "spark" as language name.
5283 * par.adb: Remove unnecessary call to set formal language for errout
5284 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5285 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5287 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5288 calls to it, moved after resolution so that types are known
5289 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5290 result of concatenation is not of type String
5291 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5292 concatenation is not properly restricted
5293 * gnat_rm.texi: Add doc on pragma Spark_95.
5294 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5295 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5296 * gcc-interface/Make-lang.in: Update dependencies.
5298 2011-08-01 Javier Miranda <miranda@adacore.com>
5300 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5301 condition that detects if the overridden operation must replace an
5304 2011-08-01 Javier Miranda <miranda@adacore.com>
5306 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5307 code declarations inserted by Insert_Actions in each alternative of the
5308 N_Case_Expression node.
5310 2011-08-01 Robert Dewar <dewar@adacore.com>
5312 * sem_ch6.adb: Minor code reorganization.
5313 * sem_util.adb: Minor reformatting.
5315 2011-08-01 Pascal Obry <obry@adacore.com>
5317 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5318 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5320 2011-08-01 Yannick Moy <moy@adacore.com>
5322 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5323 literal or operator symbol which is prefixed
5324 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5325 mode on access attributes.
5326 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5327 that concatenation operands are properly restricted in formal mode
5328 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5329 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5330 result of the concatenation has a type different from String.
5331 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5332 Analyze_Quantified_Expression, Analyze_Slice,
5333 Analyze_Null): issue an error in formal mode on unsupported constructs
5335 (Analyze_Block_Statement): only issue error on source block statement
5336 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5337 function which returns the last node in a list of nodes for which
5338 Comes_From_Source returns True, if any
5339 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5340 Last_Source_Node_In_Sequence
5341 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5342 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5343 mode on unsupported constructs
5344 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5345 rest of the actions may be needed later on since the error is marked as
5347 * sinfo.ads: Typos in comments.
5349 2011-08-01 Pascal Obry <obry@adacore.com>
5351 * projects.texi: Minor editing.
5353 2011-08-01 Yannick Moy <moy@adacore.com>
5355 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5356 insertion character ~~
5357 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5358 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5359 with insertion character ~~
5360 (Set_Msg_Text): treat insertion character ~~
5361 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5362 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5363 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5364 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5365 errors related to the formal language restriction not serious
5366 (insertion character |).
5367 * par.adb (Par): set formal language for error messages if needed
5368 * sem_ch6.adb (Check_Missing_Return): take into account possible
5369 generated statements at the end of the function
5370 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5371 enumeration value to define a new pragma SPARK_95
5372 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5373 SPARK_Version): new type and variables to store the SPARK version
5375 (SPARK_Mode): return True when SPARK_Version is set
5376 * par-prag.adb: Correct indentation
5377 (Prag): take Pragma_SPARK_95 into account
5378 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5381 2011-08-01 Robert Dewar <dewar@adacore.com>
5383 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5384 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5385 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5387 2011-08-01 Pascal Obry <obry@adacore.com>
5389 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5390 Target_Name to Get_Path call.
5391 (Parse_Single_Project): Likewise.
5392 (Post_Parse_Context_Clause): Likewise.
5393 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5394 Call Initialise_Project_Path with the proper Target_Name.
5395 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5397 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5398 with the proper Target_Name.
5399 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5401 (Parse_Project_And_Apply_Config): Likewise.
5402 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5403 This is fine as this part of the code is supporting only native
5405 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5406 is fine as this part of the code is supporting only native compilation.
5408 2011-08-01 Yannick Moy <moy@adacore.com>
5410 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5411 of homonym, unless the homonym is one of the cases allowed in SPARK
5412 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5413 package declaration occurring after a body.
5415 2011-08-01 Robert Dewar <dewar@adacore.com>
5417 * checks.adb, exp_ch4.adb: Minor reformatting.
5419 2011-08-01 Javier Miranda <miranda@adacore.com>
5421 * einfo.ads (Access_Disp_Table): Fix documentation.
5422 (Dispatch_Table_Wrappers): Fix documentation.
5424 2011-08-01 Pascal Obry <obry@adacore.com>
5426 * prj-env.adb, prj-env.ads: Minor reformatting.
5428 2011-08-01 Yannick Moy <moy@adacore.com>
5430 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5431 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5432 procedures out of these packages.
5433 * errout.ads, errout.adb
5434 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5435 procedures in of this package
5436 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5437 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5438 on misplaced later vs initial declarations, like in Ada 83
5439 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5440 formal mode on attribute of private type whose full type declaration
5442 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5443 package declaration inside a package specification
5444 (Analyze_Full_Type_Declaration): issue error in formal mode on
5445 controlled type or discriminant type
5446 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5447 user-defined operator means that it should come from the source
5448 (New_Overloaded_Entity): issue error in formal mode on overloaded
5450 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5452 2011-08-01 Thomas Quinot <quinot@adacore.com>
5454 * atree.adb: Minor reformatting.
5455 * checks.adb: Minor reformatting.
5457 2011-08-01 Vincent Celier <celier@adacore.com>
5459 * s-parame-vms-ia64.ads: Fix typo in comment
5461 * s-parame-vms-restrict.ads: Removed, unused.
5463 2011-08-01 Javier Miranda <miranda@adacore.com>
5466 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5468 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5469 * sem_ch3.ads, sem_ch3.adb
5470 (Is_Constant_Bound): New extended version of the subprogram that was
5471 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5472 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5473 * sem_aux.ads (Constant_Value): Fix typo in comment.
5474 * checks.adb (Generate_Index_Checks): New implementation which, for
5475 array objects with constant bounds, generates the runtime check
5476 referencing the bounds of the array type. For other cases this routine
5477 provides its previous behavior obtaining such values from the array
5479 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5481 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5482 we cannot have semantic interpretations of the new node.
5484 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5486 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5489 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5491 * sem_ch8.adb: Minor code editing.
5492 * s-vxwext.adb: Remove trailing space.
5493 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5494 consistency with other files.
5496 2011-08-01 Thomas Quinot <quinot@adacore.com>
5498 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5500 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5502 * par-ch10.adb: reject parameterized expressions as compilation unit.
5503 * sem_ch4.adb: handle properly conditional expression with overloaded
5504 then_clause and no else_clause.
5506 2011-08-01 Tristan Gingold <gingold@adacore.com>
5508 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5509 like done by System.Aux_DEC.
5510 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5512 2011-08-01 Yannick Moy <moy@adacore.com>
5514 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5515 missing label at end of declaration (subprogram or package)
5516 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5517 of positional and named parameter association
5518 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5519 Error_Msg_SP which adds a prefix to the error message giving the name
5520 of the formal language analyzed
5521 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5522 access result type in subprogram, unconstrained array as result type,.
5523 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5525 * sem_ch8.adb: Code clean up.
5527 2011-08-01 Javier Miranda <miranda@adacore.com>
5529 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5530 * einfo.ads (Access_Disp_Table): Fix documentation.
5531 (Dispatch_Table_Wrappers): Fix documentation.
5532 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5533 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5534 to enforce the documentation of this attribute.
5535 (Set_Is_Interface): Cleanup the assertion.
5536 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5537 the Underlying_Type entity before reading attribute Access_Disp_Table.
5538 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5539 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5540 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5541 the Underlying_Type entity before reading attribute Access_Disp_Table.
5542 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5543 Locate the Underlying_Type entity before reading attribute
5546 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5548 * s-poosiz.ads: Additional overriding indicators.
5550 2011-08-01 Yannick Moy <moy@adacore.com>
5552 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5554 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5555 parameter specification does not include a subtype mark.
5556 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5557 formal mode on abstract subprogram.
5558 (Analyze_Subprogram_Specification): issue error in formal mode on
5559 user-defined operator.
5560 (Process_Formals): issue error in formal mode on access parameter and
5562 * sem_ch9.adb (Analyze_Abort_Statement,
5563 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5564 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5565 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5566 Analyze_Requeue, Analyze_Selective_Accept,
5567 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5568 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5569 issue error in formal mode on user-defined raise statement.
5571 2011-08-01 Thomas Quinot <quinot@adacore.com>
5573 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5574 declaration being hidden when overriding an implicit inherited
5576 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5577 (-gnats), do not complain about a source file that contains only a
5580 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5582 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5583 variable if already set.
5585 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5587 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5588 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5589 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5590 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5591 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5592 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5593 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5594 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5595 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5596 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5597 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5598 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5599 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5600 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5601 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5602 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5603 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5604 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5605 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5606 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5607 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5608 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5609 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5610 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5611 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5612 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5613 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5614 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5615 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5616 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5617 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5618 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5619 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5620 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5621 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5622 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5623 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5624 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5625 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5626 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5627 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5628 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5629 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5630 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5631 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5632 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5633 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5634 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5635 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5636 Use GNAT instead of GNARL.
5638 2011-08-01 Bob Duff <duff@adacore.com>
5640 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5641 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5642 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5645 2011-08-01 Yannick Moy <moy@adacore.com>
5647 * debug.adb (d.D) reverve flag for the SPARK mode
5648 (d.E) reverve flag for SPARK generation mode
5649 (d.F) reverve flag for Why generation mode
5650 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5651 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5652 functions which return True when the corresponding modes are set
5653 (Formal_Language): return "spark" or "alfa" when in formal verification
5655 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5656 Error_Msg to prefix the error message with a tag giving the formal
5658 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5659 message with a tag giving the formal language
5660 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5662 (Analyze_Case_Statement): issue error in formal mode on case statement
5663 with a single "others" case alternative
5664 (Analyze_Exit_Statement): issue errors in formal mode on exit
5665 statements which do not respect SPARK restrictions
5666 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5667 (Check_Unreachable_Code): always issue an error (not a warning) in
5668 formal mode on unreachable code (concerns both code after an infinite
5669 loop and after an unconditional jump, both not allowed in SPARK)
5670 * sem_ch6.adb (Analyze_Return_Statement): add call to
5671 Set_Return_Present for a procedure containing a return statement
5672 (already done for functions in Analyze_Function_Return)
5673 (Analyze_Function_Return): issue error in formal mode on extended
5674 return or if return is not last statement in function
5675 (Check_Missing_Return): issue error in formal mode if function does
5676 not end with return or if procedure contains a return
5677 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5678 function to detect if there is an inner scope of its parameter S which
5681 2011-08-01 Thomas Quinot <quinot@adacore.com>
5683 * sem_ch6.ads: Minor reformatting.
5685 2011-08-01 Javier Miranda <miranda@adacore.com>
5687 * sem_util.adb (Abstract_Interface_List): Complete condition when
5688 processing private type declarations to avoid reading unavailable
5690 (Is_Synchronized_Tagged_Type): Complete condition when processing
5691 private extension declaration nodes to avoid reading unavailable
5694 2011-08-01 Thomas Quinot <quinot@adacore.com>
5696 * sem_ch3.adb: Minor reformatting.
5698 2011-08-01 Thomas Quinot <quinot@adacore.com>
5700 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5701 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5702 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5703 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5704 for VMS, instead parametrize the common implementation with
5705 System.Parameters declarations.
5707 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5709 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5711 2011-08-01 Tristan Gingold <gingold@adacore.com>
5713 * seh_init.c: Fix SEH handler installation on win64.
5715 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5717 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5718 double analysis of an anonymous access to subprogram, because it can
5719 lead to improper sharing of profiles and a back-end crash.
5721 2011-08-01 Robert Dewar <dewar@adacore.com>
5723 * make.adb, sem_ch4.adb: Minor reformatting.
5724 * gcc-interface/Make-lang.in: Update dependencies.
5725 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5727 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5729 * gnat_rm.texi: Fix definition of Long_Integer.
5731 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5733 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5734 to prevent storage exhaustion.
5735 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5736 finalized is a function body, insert the cleanup code before the final
5737 return statement, to prevent spurious warnings.
5738 * s-pooglo.ads: add overriding indicator.
5740 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5742 * sem_ch4.adb (Operator_Check): improve error message when both a
5743 with_clause and a use_clause are needed to make operator usage legal.
5744 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5745 determine whether a compilation unit is visible within an other,
5746 either through a with_clause in the current unit, or a with_clause in
5747 its library unit or one one of its parents.
5749 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5751 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5752 over an arbitrary expression of an array or container type.
5753 * lib-xref.adb: clarify comment.
5755 2011-08-01 Bob Duff <duff@adacore.com>
5757 * einfo.ads: Minor reformatting.
5758 * debug.adb: Minor comment improvement.
5760 2011-08-01 Javier Miranda <miranda@adacore.com>
5762 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5763 consider hidden subprograms as valid candidates.
5765 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5767 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5769 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5771 * gnat_ugn.texi: Fix typo.
5773 2011-08-01 Robert Dewar <dewar@adacore.com>
5775 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5776 lib-xref.adb: Minor reformatting
5778 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5780 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5781 when to generate a call to Move_Final_List.
5782 (Has_Controlled_Parts): Remove this function.
5784 2011-08-01 Geert Bosch <bosch@adacore.com>
5786 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5789 2011-08-01 Thomas Quinot <quinot@adacore.com>
5791 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5792 explicit raise of a predefined exception as Comes_From_Source if the
5793 original N_Raise_Statement comes from source.
5795 2011-08-01 Robert Dewar <dewar@adacore.com>
5797 * sinfo.ads: Add comment.
5798 * sem_ch6.adb: Minor reformatting.
5800 2011-08-01 Robert Dewar <dewar@adacore.com>
5802 * freeze.adb (Freeze_Entity): Refine check for bad component size
5803 clause to avoid rejecting confirming clause when atomic/aliased present.
5805 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5807 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5808 better determine whether an entity reference is a write.
5809 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5811 * lib-xref.adb (Output_References): Do no suppress a read reference at
5812 the same location as an immediately preceeding modify-reference, to
5813 handle properly in-out actuals.
5815 2011-08-01 Tristan Gingold <gingold@adacore.com>
5817 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5819 2011-08-01 Quentin Ochem <ochem@adacore.com>
5821 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5822 heap to compute the result.
5824 2011-08-01 Robert Dewar <dewar@adacore.com>
5826 * atree.ads: Minor reformatting.
5828 2011-08-01 Emmanuel Briot <briot@adacore.com>
5830 * g-expect.adb (Get_Command_Output): Fix memory leak.
5832 2011-08-01 Geert Bosch <bosch@adacore.com>
5834 * cstand.adb (P_Float_Type): New procedure to print the definition of
5835 predefined fpt types.
5836 (P_Mixed_Name): New procedure to print a name using mixed case
5837 (Print_Standard): Use P_Float_Type for printing floating point types
5838 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5839 precision IEEE float.
5841 2011-08-01 Thomas Quinot <quinot@adacore.com>
5843 * sem_ch3.adb: Minor reformatting.
5845 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5847 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5848 the completion of a generic function, insert the new body rather than
5849 rewriting the original.
5851 2011-08-01 Yannick Moy <moy@adacore.com>
5853 * sinfo.ads, errout.ads: Typos in comments.
5855 2011-08-01 Robert Dewar <dewar@adacore.com>
5857 * par-endh.adb: Minor reformatting.
5859 2011-08-01 Robert Dewar <dewar@adacore.com>
5861 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5862 (Pre_Post_Aspects): New subtype.
5863 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5864 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5865 * par-ch7.adb (P_Package): Remove Decl parameter
5866 (P_Package): Handle new syntax for aspects (before IS)
5867 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5869 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5870 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5871 (P_Package): Remove Decl parameter
5872 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5874 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5876 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5877 * sinfo.ads: Document new syntax for aspects in packages etc.
5878 * sprint.adb: Handle new syntax of aspects before IS in package
5880 2011-08-01 Thomas Quinot <quinot@adacore.com>
5882 * atree.ads: Minor reformatting.
5883 * sem_prag.adb: Minor reformatting.
5885 2011-08-01 Robert Dewar <dewar@adacore.com>
5887 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5888 case expr alternative.
5890 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5892 * sem_ch12.adb: Fix typo.
5894 2011-08-01 Geert Bosch <bosch@adacore.com>
5896 * sem_prag.adb (Check_No_Link_Name): New procedure.
5897 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5898 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5899 instead of Standard_Long_Long_Float_Size global. Preparation for
5900 eventual removal of per type constants.
5901 * exp_util.ads (Get_Stream_Size): New function returning the stream
5902 size value of subtype E.
5903 * exp_util.adb (Get_Stream_Size): Implement new function.
5904 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
5906 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
5908 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
5910 2011-08-01 Geert Bosch <bosch@adacore.com>
5912 * cstand.adb: Fix comments.
5913 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
5916 2011-08-01 Robert Dewar <dewar@adacore.com>
5918 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
5920 2011-08-01 Geert Bosch <bosch@adacore.com>
5922 * atree.ads: Fix comment.
5924 2011-08-01 Robert Dewar <dewar@adacore.com>
5926 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
5927 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
5928 * par.adb: Add with for Namet.Sp.
5929 * par-tchk.adb: Minor reformatting.
5931 2011-08-01 Vincent Celier <celier@adacore.com>
5933 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
5934 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
5935 of the init procedure of a SAL.
5936 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
5939 2011-08-01 Thomas Quinot <quinot@adacore.com>
5941 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
5944 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5946 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
5948 2011-08-01 Thomas Quinot <quinot@adacore.com>
5950 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
5951 conformant with its spec (return True only for types that have
5952 an overriding Initialize primitive operation that prevents them from
5953 having preelaborable initialization).
5954 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
5955 initialization for controlled types in Ada 2005 or later mode.
5957 2011-08-01 Robert Dewar <dewar@adacore.com>
5959 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
5961 (Same_Aspect): New function.
5962 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
5963 Type_Invariant, Precondition, Postcondition.
5964 * snames.ads-tmpl: Add Name_Type_Invariant.
5966 2011-08-01 Robert Dewar <dewar@adacore.com>
5968 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
5970 (Freeze_All_Ent): Fix error in handling inherited aspects.
5971 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
5972 already analyzed, but don't skip entire processing of a declaration,
5973 that's wrong in some cases of declarations being rewritten.
5974 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
5975 Don't delay for integer, string literals
5976 Treat predicates in usual manner for delay, remove special case code,
5978 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
5979 (Build_Predicate_Function): Update saved expression in aspect
5980 (Build_Invariant_Procedure): Update saved expression in aspect
5981 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
5982 of replacement of discriminant references if the reference is simple.
5984 2011-08-01 Robert Dewar <dewar@adacore.com>
5986 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
5987 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
5988 Static_Predicate and Dynamic_Predicate.
5989 (Build_Predicate_Function): Add processing for Static_Predicate
5990 and Dynamic_Predicate.
5991 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
5992 (From_Static_Predicate): New flag
5993 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
5995 2011-08-01 Robert Dewar <dewar@adacore.com>
5997 * usage.adb: Documentation cleanup for Ada version modes in usage.
5998 * expander.adb: Minor reformatting.
6000 2011-08-01 Robert Dewar <dewar@adacore.com>
6002 * atree.ads: Minor comment fix.
6003 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6004 a-witeio.ads, sem_prag.adb: Minor reformatting.
6006 2011-08-01 Doug Rupp <rupp@adacore.com>
6008 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6009 pointers. Use descrip.h header file for convenience. Add some
6012 2011-08-01 Robert Dewar <dewar@adacore.com>
6014 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6015 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6016 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6018 (Check_Aspect_At_End_Of_Declarations): New procedure
6019 (Analye_Aspect_Specification): Minor changes for above procedures
6020 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6021 specification node as well.
6023 2011-08-01 Pascal Obry <obry@adacore.com>
6025 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6026 Windows files. Use GetFilesAttributes() in this case to check for file
6027 existence instead of returning with an error code.
6029 2011-08-01 Vincent Celier <celier@adacore.com>
6031 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6032 High is above Source length.
6034 2011-08-01 Robert Dewar <dewar@adacore.com>
6036 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6038 2011-08-01 Robert Dewar <dewar@adacore.com>
6040 * aspects.ads (Boolean_Aspects): New subtype.
6041 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6042 for derived types in cases where the parent type and derived type have
6044 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6045 with aspects when parent type also has aspects.
6046 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6047 boolean expression at this point).
6048 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6049 accordance with final decision on the Ada 2012 feature.
6050 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6052 2011-08-01 Matthew Heaney <heaney@adacore.com>
6054 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6056 2011-08-01 Pascal Obry <obry@adacore.com>
6058 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6059 Fix Replace_Slice when High is above current string size.
6060 (Replace_Slice): Fix DL computation when High is above current
6063 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6065 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6067 2011-08-01 Matthew Heaney <heaney@adacore.com>
6069 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6072 2011-08-01 Pascal Obry <obry@adacore.com>
6074 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6077 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6079 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6080 access to protected subprograms in generic bodies.
6081 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6082 protected type, indicate that the convention of the subprogram is
6083 Convention_Protected, because it may be used in subsequent declarations
6084 within the protected declaration.
6086 2011-08-01 Vincent Celier <celier@adacore.com>
6088 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6089 and "final" procedures when the name of the library is "ada", to avoid
6090 duplicate symbols "adainit" and "adafinal" in executables.
6092 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6094 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6095 quantified expression that appears within a postcondition and uses the
6096 Ada2012 'Result attribute.
6098 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6100 * init.c (__gnat_error_handler): Cast reason to int.
6101 (__gnat_install_handler): Explain sa_sigaction use.
6103 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6105 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6106 subprogram has copy-in copy-out parameters, try to promote the mode of
6107 the return type if it is passed in registers.
6109 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6111 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6112 left operand as addressable.
6114 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6116 * gcc-interface/gigi.h (build_function_stub): Remove.
6117 (build_return_expr): Likewise.
6118 (convert_vms_descriptor): Declare.
6119 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6120 (build_function_stub): Move to...
6121 * gcc-interface/utils2.c (build_return_expr): Move to...
6122 * gcc-interface/trans.c (build_function_stub): ...here.
6123 (build_return_expr): ...here.
6124 (Subprogram_Body_to_gnu): Add local variable for language_function.
6125 Disconnect the parameter attributes cache, if any, once done with it.
6126 Call end_subprog_body only after setting the end_locus.
6127 Build the stub associated with the function, if any, at the very end.
6128 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6129 variables and streamline control flow.
6131 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6134 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6137 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6140 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6141 Assign to act.sa_sigaction.
6142 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6143 current->return_address to char * before arithmetic.
6145 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6147 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6148 Correct argument types.
6149 Extract code from reason.
6150 (__gnat_install_handler): Assign to act.sa_sigaction.
6152 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6154 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6155 (GNAT1_OBJS): ...here.
6157 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6160 * g-socthi-mingw.adb (Fill): Fix formatting.
6162 * gcc-interface/gigi.h: Move around comment.
6164 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6167 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6169 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6172 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6174 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6176 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6177 range comparison if Pmode is SImode.
6179 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6180 Eric Botcazou <ebotcazou@adacore.com>
6182 * adadecode.c: Wrap up in extern "C" block.
6183 * adadecode.h: Likewise.
6184 * adaint.c: Likewise. Remove 'const' keyword.
6185 * adaint.h: Likewise.
6187 * atree.h: Likewise.
6189 * cstreams.c: Likewise.
6193 * final.c: Likewise.
6195 * initialize.c: Likewise.
6197 * namet.h: Likewise.
6198 * nlists.h: Likewise.
6199 * raise.c: Likewise.
6200 * raise.h: Likewise.
6201 * repinfo.h: Likewise.
6202 * seh_init.c: Likewise.
6203 * targext.c: Likewise.
6204 * tracebak.c: Likewise.
6205 * uintp.h: Likewise.
6206 * urealp.h: Likewise.
6207 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6208 * xsinfo.adb: Likewise.
6209 * xsnamest.adb: Likewise.
6210 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6211 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6212 * gcc-interface/misc.c: Likewise.
6213 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6214 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6215 ada/targext.o here...
6216 (GNAT_ADA_OBJS): ...and not here.
6217 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6218 (GNATBIND_OBJS): Reorder.
6220 2011-07-07 Richard Henderson <rth@redhat.com>
6222 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6223 dwarf2out_frame_init.
6225 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6227 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6229 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6232 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6234 2011-07-06 Richard Guenther <rguenther@suse.de>
6236 * gcc-interface/misc.c (gnat_init): Merge calls to
6237 build_common_tree_nodes and build_common_tree_nodes_2.
6238 Re-initialize boolean_false_node.
6240 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6241 Olivier Hainque <hainque@adacore.com>
6242 Nicolas Setton <setton@adacore.com>
6244 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6245 the type according to the ARTIFICIAL_P parameter.
6246 (create_type_decl): Likewise.
6247 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6249 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6251 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6252 (gnatbind): Likewise.
6254 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6256 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6258 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6260 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6261 local variable throughout. Remove useless call to Base_Type.
6262 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6263 Take it also into account for the volatileness of the field. Set the
6264 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6266 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6268 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6269 on a dereference built for a by-ref object if it has an address clause.
6271 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6273 * einfo.ads (Address_Taken): Document use for the second argument of
6274 Asm_Input and Asm_Output attributes.
6275 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6276 argument is an entity name, then set Address_Taken on it.
6277 <Attribute_Asm_Output>: Likewise.
6278 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6279 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6280 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6281 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6283 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6286 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6288 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6290 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6291 (ada/utils.o): Update dependencies.
6292 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6293 ../../../libcpp/libcpp.a.
6294 * gcc-interface/utils.c: Include common/common-target.h.
6295 (process_attributes): Use targetm_common.have_named_sections.
6297 2011-06-07 Richard Guenther <rguenther@suse.de>
6299 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6302 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6304 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6305 TREE_THIS_NOTRAP flag.
6307 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6309 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6312 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6314 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6315 constants whose full view has discriminants specially.
6317 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6319 * gcc-interface/utils.c: Include diagnostic.h.
6320 (gnat_write_global_declarations): Output debug information for all
6321 global type declarations before finalizing the compilation unit.
6322 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6324 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6326 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6328 2011-05-25 Kai Tietz <ktietz@redhat.com>
6330 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6331 initialization instead of const/none-const pointer assignment.
6333 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6335 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6336 $(EXTRA_GNAT1_OBJS).
6337 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6338 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6339 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6340 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6341 libcommon-target.a instead of prefix.o.
6343 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6346 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6348 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6350 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6351 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6352 instead of version.o.
6354 2011-05-18 Kai Tietz <ktietz@redhat.com>
6356 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6357 boolean_false_node instead of integer_zero_node.
6358 (convert_with_check): Likewise.
6359 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6361 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6363 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6364 type of the parameter is an unconstrained array, convert the actual to
6365 the type of the formal in the In Out and Out cases as well.
6367 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6369 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6370 call build_function_type_array or build_varargs_function_type_array
6372 (create_subprog_type): Don't call build_function_type; call
6373 build_function_type_vec instead.
6375 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6377 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6378 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6379 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6381 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6383 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6385 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6386 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6388 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6390 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6392 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6394 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6395 instead of accessing TYPE_ARG_TYPES directly.
6396 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6398 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6401 * gcc-interface/gigi.h (get_variant_part): Declare.
6402 * gcc-interface/decl.c (get_variant_part): Make global.
6403 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6404 types have the same constant size, are record types and T1 has a
6405 variant part while T2 doesn't.
6407 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6409 * gcc-interface/utils.c (begin_subprog_body): Do not call
6411 (end_subprog_body): Likewise.
6413 2011-05-04 Richard Guenther <rguenther@suse.de>
6415 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6417 (pos_to_constructor): Likewise.
6419 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6420 Eric Botcazou <ebotcazou@adacore.com>
6422 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6423 of build_function_type. Adjust calls to...
6424 (build_raise_check): ...this. Do not take a void_tree parameter.
6425 Call build_function_type_list instead of build_function_type.
6426 Fix head comment and swap couple of conditional blocks.
6428 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6430 * gnatvsn.ads (Library_Version): Bump to 4.7.
6431 (Current_Year): Bump to 2011.
6433 2011-04-29 Michael Matz <matz@suse.de>
6435 * gcc-interface/misc.c (gnat_handle_option): Set
6436 warn_maybe_uninitialized.
6438 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6440 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6441 the Watson/McCabe paper.
6443 2011-04-23 Jim Meyering <meyering@redhat.com>
6445 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6447 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6449 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6452 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6454 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6456 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6457 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6458 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6459 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6460 <all>: Do not set flags on the reused DECL node coming from an alias.
6461 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6462 don't need debug info here...
6463 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6464 (gigi): Adjust calls to create_subprog_decl.
6465 (build_raise_check): Likewise.
6466 (establish_gnat_vms_condition_handler): Likewise.
6467 (Compilation_Unit_to_gnu): Likewise.
6468 (gnat_to_gnu): Likewise.
6470 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6472 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6473 (NO_REORDER_ADAFLAGS): New variable.
6474 (EXTRA_GNATTOOLS): Always define.
6475 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6476 Clean up and adjust list of files compiled with special options.
6477 * gcc-interface/Make-lang.in: Likewise.
6478 (ada/decl.o): Cosmetical change.
6479 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6481 2011-04-20 Jim Meyering <meyering@redhat.com>
6483 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6485 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6487 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6488 $(CFLAGS) on the link line.
6490 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6492 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6493 padded type built for the return type if it is unconstrained.
6495 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6497 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6499 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6501 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6502 before calling TREE_CHAIN.
6503 * gcc-interface/misc.c (gnat_init_ts): New function.
6504 (LANG_HOOKS_INIT_TS): Define.
6506 2011-04-12 Martin Jambor <mjambor@suse.cz>
6508 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6509 instead of cgraph_node.
6511 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6513 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6514 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6517 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6519 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6520 of aggregate types that contain a placeholder.
6522 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6524 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6526 (handle_type_generic_attribute): Likewise.
6528 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6531 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6533 2011-04-04 Kai Tietz <ktietz@redhat.com>
6536 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6539 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6541 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6542 type case, do not strip a padding type around the array type.
6544 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6546 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6549 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6551 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6552 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6553 code for -feliminate-unused-debug-types.
6554 (gnat_post_options): Likewise.
6556 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6558 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6559 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6562 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6564 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6565 DECL_ARTIFICIAL flag on enumeration types.
6567 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6569 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6570 fat pointer types artificial unconditionally.
6571 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6574 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6576 * gcc-interface/gigi.h (get_dummy_type): Declare.
6577 (build_dummy_unc_pointer_types): Likewise.
6578 (finish_fat_pointer_type): Likewise.
6579 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6580 fat pointer type has been built, complete it in place.
6581 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6582 and thin pointers. Remove useless variable.
6583 (finish_fat_pointer_type): Make global and move to...
6584 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6585 (get_dummy_type): New function.
6586 (build_dummy_unc_pointer_types): Likewise.
6587 (gnat_pushdecl): Propage the name to the anonymous variants only.
6588 (update_pointer_to): Only adjust the pointer types in the unconstrained
6591 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6593 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6594 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6595 if this is a Taft amendment type and the full declaration is available.
6596 * gcc-interface/trans.c (process_type): Likewise.
6597 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6598 (process_freeze_entity): Likewise.
6599 * gcc-interface/utils.c (dummy_global): New static variable.
6600 (gnat_write_global_declarations): If there are types declared as used
6601 at the global level, insert them in the global hash table.
6603 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6605 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6606 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6607 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6609 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6610 flag of the type accordingly.
6611 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6613 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6615 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6616 finalizing types when updating the pointers to the designated type.
6617 <all>: Finalize the deferred types even if we didn't defer processing
6618 of incomplete types in this invocation.
6620 2011-04-01 Olivier Hainque <hainque@adacore.com>
6621 Nicolas Setton <setton@adacore.com>
6622 Eric Botcazou <ebotcazou@adacore.com>
6624 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6625 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6627 2011-03-28 Kai Tietz <ktietz@redhat.com>
6629 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6631 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6632 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6634 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6636 2011-03-28 Tristan Gingold <gingold@adacore.com>
6639 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6640 Use ada output of gnatbind.
6641 (ada/b_gnatb.adb): Ditto.
6642 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6643 (ada.mostlyclean, ada.stage1)
6644 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6645 (ada.stagefeedback): Adjust.
6646 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6647 Use ada output of gnatbind.
6648 (b_gnatm.adb): Ditto.
6649 (b_gnatl.o, b_gnatm.o): New rules.
6651 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6653 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6654 for the padded type built to support a specified size or alignment.
6656 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6658 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6659 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6660 unconditionally to the end of the unit when the designated type is
6662 <all>: Rename local variable. Attempt to un-defer types only and do it
6663 for limited_with'ed types as well.
6664 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6665 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6666 consistently and remove redundant call to finalize_from_with_types.
6668 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6670 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6671 subprograms without a previous spec declared in the same unit.
6672 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6673 subprograms at the end of the unit instead of at the beginning.
6674 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6675 isn't public for the special handling of non-inline functions nested
6676 inside inline external functions.
6678 2011-03-25 Jeff Law <law@redhat.com>
6680 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6682 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6684 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6685 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6686 to compute Set_Size_Depends_On_Discriminant.
6687 (Layout_Type): Call it on array types in back-end layout mode.
6688 * sem_util.adb (Requires_Transient_Scope): Return true for array
6689 types only if the size depends on the value of discriminants.
6690 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6691 type if the RHS is a call to a function that returns an unconstrained
6692 type with default discriminant.
6694 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6696 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6697 non-conversion to the nominal result type at the end.
6699 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6701 * gcc-interface/trans.c (create_temporary): New function taken from...
6702 (create_init_temporary): ...here. Call it.
6703 (call_to_gnu): Create the temporary for the return value early, if any.
6704 Create it for a function with copy-in/copy-out parameters if there is
6705 no target; in other cases of copy-in/copy-out, use another temporary.
6706 Push the new binding level lazily. Add and rename local variables.
6708 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6710 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6712 (set_rm_size): Likewise.
6714 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6716 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6717 for the padded type built in order to support a specified alignment.
6718 Fix incorrect formatting.
6720 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6723 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6725 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6727 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6728 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6729 to the end of the list. Adjust recursive call. Rename local variable.
6730 If REORDER is true, reorder components of the record type.
6731 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6732 components_to_record and adjust the parameter list.
6734 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6736 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6737 disabled, use the variable for bounds of loop iteration scheme.
6739 2011-03-21 Kai Tietz <ktietz@redhat.com>
6742 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6744 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6746 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6747 out whether the expression is read-only. Short-circuit placeholder
6748 case and rename a couple of local variables.
6750 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6752 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6753 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6754 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6755 (convert): Deal with conversions from a smaller form type specially.
6757 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6759 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6760 its argument, except for the special -I- switch.
6762 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6764 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6767 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6769 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6771 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6773 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6775 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6776 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6777 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6778 Do not generate the check directly, instead instantiate the template
6779 check present in the descriptor.
6780 (make_descriptor_field): Move around.
6781 (build_vms_descriptor32): Build a template check in the POINTER field.
6782 (build_vms_descriptor): Remove useless suffixes.
6783 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6785 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6788 * targext.c: Include target files if IN_RTS is defined.
6790 2011-01-26 Richard Guenther <rguenther@suse.de>
6793 * targext.c: Include config.h.
6794 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6797 2011-01-04 Pascal Obry <obry@adacore.com>
6798 Eric Botcazou <ebotcazou@adacore.com>
6800 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6802 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6804 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6805 end-of-case on the end label and its associated gotos, if any.
6807 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6809 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6810 expressions of the parameter cache within the statement group of
6813 2011-01-04 Olivier Hainque <hainque@adacore.com>
6814 Eric Botcazou <ebotcazou@adacore.com>
6816 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6817 (set_end_locus_from_node): New function.
6818 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6819 make and the function end_locus.
6820 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6821 for the elaboration subprogram.
6822 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6823 set the end_locus of the expression as well.
6825 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6828 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6829 variables that are referenced in exception handlers volatile.
6833 Copyright (C) 2011 Free Software Foundation, Inc.
6835 Copying and distribution of this file, with or without modification,
6836 are permitted in any medium without royalty provided the copyright
6837 notice and this notice are preserved.
6839 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6840 - fix bugs in the description of Source_Trace;
6841 - get rid of UNIT_NAME;
6843 2011-08-02 Javier Miranda <miranda@adacore.com>
6846 (Build_Dispatching_Requeue): Adding support for VM targets
6847 since we cannot directly reference the Tag entity.
6848 * exp_sel.adb (Build_K): Adding support for VM targets.
6849 (Build_S_Assignment): Adding support for VM targets.
6851 (Default_Prim_Op_Position): In VM targets do not restrict availability
6852 of predefined interface primitives to compiling in Ada 2005 mode.
6853 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6854 restricted to compiling in Ada 2005 mode.
6855 (Make_VM_TSD): Generate code that declares and initializes the OSD
6856 record. Needed to support dispatching calls through synchronized
6859 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6860 primitives associated with synchronized interfaces.
6861 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6862 primitives associated with synchronized interfaces.
6864 2011-08-02 Yannick Moy <moy@adacore.com>
6866 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6867 statements hidden in SPARK if preceded by the HIDE directive
6868 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6869 exception handlers as hidden in SPARK if preceded by the HIDE directive
6870 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6871 if starting with the HIDE directive
6872 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6873 starting with the HIDE directive; mark the declarations in a private
6874 part as hidden in SPARK if the private part starts with the HIDE
6876 * restrict.adb, restrict.ads
6877 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6878 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6879 argument node belongs to a part which is hidden in SPARK
6880 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6881 parts in SPARK; protect the possibly costly call to
6882 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6883 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6884 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6885 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6887 (Scan): recognize special comment starting with '#' and followed by
6888 SPARK keyword "hide" as a HIDE directive.
6890 2011-08-02 Yannick Moy <moy@adacore.com>
6892 * types.ads, erroutc.ads: Minor reformatting.
6894 2011-08-02 Vincent Celier <celier@adacore.com>
6896 * link.c: Add response file support for cross platforms.
6898 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6900 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6901 in an association, set parent field of copy before partial analysis.
6902 * sem_res.adb (Resolve_Slice): create reference to itype only when
6903 expansion is enabled.
6905 2011-08-02 Yannick Moy <moy@adacore.com>
6907 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6908 for new flag denoting which subprogram bodies are in ALFA
6909 * restrict.adb, sem_ch7.adb: Update comment
6910 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6911 sem_ch9.adb, sem_res.adb: Add calls to
6912 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6913 * sem_ch6.adb (Analyze_Function_Return): add calls to
6914 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6915 middle of the body, and extended return.
6916 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6917 False when missing return.
6918 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6919 to True for subprograms whose spec is in ALFA. Remove later on the flag
6920 on the entity used for a subprogram body when there exists a separate
6922 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6923 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6924 False, otherwise do nothing.
6926 2011-08-02 Robert Dewar <dewar@adacore.com>
6928 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6930 2011-08-02 Yannick Moy <moy@adacore.com>
6932 * sem_ch4.ads: minor formatting.
6934 2011-08-02 Yannick Moy <moy@adacore.com>
6936 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6937 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6938 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6939 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6940 opt.ads: cleanup of SPARK mode
6942 2011-08-02 Yannick Moy <moy@adacore.com>
6944 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6946 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6947 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6949 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6950 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6951 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6952 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6954 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6956 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6957 functions whose return type is not in ALFA.
6958 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6960 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6961 parameter's type is not in ALFA.
6962 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6965 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6967 * sem_ch6 (Analyze_Expression_Function): treat the function as
6968 Inline_Always, and introduce a subprogram declaration for it when it is
6970 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6971 expression functions, so that the back-end can determine whether they
6972 can in fact be inlined.
6973 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6974 a function body comes from an expression function.
6976 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6978 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6979 null exclusions to test Can_Never_Be_Null on the anonymous access types
6980 of the formals rather than testing the formals themselves. Exclude this
6981 check in cases where the Old_Formal is marked as a controlling formal,
6982 to avoid issuing spurious errors for bodies completing dispatching
6983 operations (due to the flag not getting set on controlling access
6984 formals in body specs).
6985 (Find_Corresponding_Spec): When checking full and subtype conformance of
6986 subprogram bodies in instances, pass Designated and E in that order, for
6987 consistency with the expected order of the formals (New_Id followed by
6990 2011-08-02 Robert Dewar <dewar@adacore.com>
6992 * sem_ch8.adb: Minor reformatting.
6994 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6996 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
6997 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
6998 primitive operations of class-wide actuals.
7000 2011-08-02 Javier Miranda <miranda@adacore.com>
7002 * exp_atag.ads, exp_atag.adb
7003 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7004 since its value is implicitly passed in argument Typ.
7005 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7006 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7007 Build_Common_Dispatching_Select_Statements.
7009 2011-08-02 Robert Dewar <dewar@adacore.com>
7011 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7012 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7015 2011-08-02 Robert Dewar <dewar@adacore.com>
7017 * sem_res.adb: Minor reformatting.
7018 * sem_prag.adb: Minor reformatting.
7020 2011-08-02 Javier Miranda <miranda@adacore.com>
7022 * exp_atag.adb, exp_atags.ads
7023 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7024 by the tagged type Entity. Required to use this routine in the VM
7025 targets since we do not have available the Tag entity in the VM
7028 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7029 Ada.Tags has not been previously loaded.
7031 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7032 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7034 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7035 view of enclosing scopes. Required to handle enclosing scopes that
7036 are synchronized types whose full view is a task type.
7038 (Build_VM_TSDs): Minor code improvement to avoid generating and
7039 analyzing lists with empty nodes.
7040 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7041 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7042 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7043 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7044 (Make_Select_Specific_Data_Table): Add support for VM targets.
7045 (Make_VM_TSD): Generate code to initialize the SSD structure of
7048 2011-08-02 Yannick Moy <moy@adacore.com>
7050 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7051 cross-references section in ALI.
7052 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7053 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7055 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7056 subprogram or package entity of a node
7057 (Is_Local_Reference_Type): new function returns True for references
7058 selected in local cross-references.
7059 (Lt): function extracted from Lt in Output_References
7060 (Write_Entity_Name): function extracted from Output_References
7061 (Generate_Definition): generate reference with type 'D' for definition
7062 of objects (object declaration and parameter specification), with
7063 appropriate locations and units, for use in local cross-references.
7064 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7065 references of type 'I' for initialization in object definition.
7066 (Output_References): move part of function Lt and procedure
7067 Write_Entity_Name outside of the body. Ignore references of types 'D'
7068 and 'I' introduced for local cross-references.
7069 (Output_Local_References): new procedure to output the local
7070 cross-references sections.
7071 (Lref_Entity_Status): new array defining whether an entity is a local
7072 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7073 with 'I' type when initialization expression is present.
7074 * get_scos.adb, get_scos.ads: Correct comments and typos
7076 2011-08-02 Javier Miranda <miranda@adacore.com>
7078 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7080 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7082 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7085 2011-08-02 Vincent Celier <celier@adacore.com>
7087 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7088 (No_Space_Img): New function
7089 (Find_Excluded_Sources): When reading from a file, record the file name
7090 and the line number for each excluded source.
7091 (Mark_Excluded_Sources): When reporting an error, if the excluded
7092 sources were read from a file, include file name and line number in
7095 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7097 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7099 2011-08-02 Robert Dewar <dewar@adacore.com>
7101 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7103 2011-08-02 Javier Miranda <miranda@adacore.com>
7105 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7106 generation of TSDs to the DOTNET compiler.
7107 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7108 generation of TSDs to the DOTNET compiler.
7110 2011-08-02 Javier Miranda <miranda@adacore.com>
7112 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7113 record of all the tagged types declared inside library level package
7114 declarations, library level package bodies or library level subprograms.
7115 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7116 associated with a given tagged type.
7117 (Build_VM_TSDs): New subprogram.
7118 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7119 compilation units that are subprograms.
7120 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7121 compilation units that are package bodies.
7122 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7123 units that are a package declaration or a package instantiation.
7124 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7125 reorganization to improve the error generated by the frontend when the
7126 function Ada.Tags.Secondary_Tag is not available.
7127 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7128 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7130 2011-08-02 Javier Miranda <miranda@adacore.com>
7132 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7134 2011-08-02 Robert Dewar <dewar@adacore.com>
7136 * s-imenne.ads: Minor reformatting.
7138 2011-08-02 Robert Dewar <dewar@adacore.com>
7140 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7141 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7142 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7144 2011-08-02 Robert Dewar <dewar@adacore.com>
7146 * einfo.ads (Materialize_Entity): Document this is only for renamings
7147 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7148 required debug information in the case where we transform the object
7149 declaration into a renaming declaration.
7150 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7152 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7155 2011-08-02 Robert Dewar <dewar@adacore.com>
7157 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7158 Suppress_Init_Procs.
7159 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7160 Suppress_Initialization/Initialization_Suppressed.
7161 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7162 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7163 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7164 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7166 2011-08-02 Robert Dewar <dewar@adacore.com>
7168 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7171 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7173 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7174 only have inheritable classwide pre/postconditions.
7176 2011-08-02 Javier Miranda <miranda@adacore.com>
7178 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7179 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7180 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7181 checks if the external tag of a type is the same as the external tag
7182 of some other declaration.
7184 2011-08-02 Thomas Quinot <quinot@adacore.com>
7186 * s-taskin.ads: Minor reformatting.
7188 2011-08-02 Emmanuel Briot <briot@adacore.com>
7190 * g-comlin.adb (Display_Help): swap the order in which it prints the
7191 short help and the general usage.
7193 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7195 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7196 the aspect declarations and attach them to the generic copy for
7197 subsequent analysis.
7198 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7199 declarations of the generic tree to the new subprogram declarations.
7200 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7201 conditions that apply to a subprogram instance.
7203 2011-08-02 Robert Dewar <dewar@adacore.com>
7205 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7207 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7209 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7210 private type with a tagged full view is not derived in the immediate
7211 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7213 2011-08-02 Robert Dewar <dewar@adacore.com>
7215 * exp_ch4.adb: Minor reformatting.
7217 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7219 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7220 Ada2012 iterator, the loop will be rewritten during expansion into a
7221 while loop with a cursor and an element declaration. Do not analyze the
7222 body in this case, because if the container is for indefinite types the
7223 actual subtype of the elements will only be determined when the cursor
7224 declaration is analyzed.
7226 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7228 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7229 size/alignment related attributes in CodePeer_Mode.
7231 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7233 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7234 Prepend_Element, since this can result in the operation getting the
7235 wrong slot in the full type's dispatch table if the full type has
7236 inherited operations. The incomplete type's operation will get added
7237 to the proper position in the full type's primitives
7238 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7239 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7240 dispatching operations, since there are cases where nonprimitive
7241 subprograms can get added to the list of incomplete dependents (such
7242 as subprograms in nested packages).
7243 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7244 private part when determining whether to add a primitive with a
7245 parameter of a tagged incomplete type to the Private_Dependents list.
7246 Such primitives can also occur in the visible part, and should not have
7247 been excluded from being private dependents.
7248 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7249 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7250 list of a Taft-amendment incomplete type is a primitive before issuing
7251 an error that the full type must appear in the same unit. There are
7252 cases where nonprimitives can be in the list (such as subprograms in
7254 * sem_disp.adb (Derives_From): Use correct condition for checking that
7255 a formal's type is derived from the type of the corresponding formal in
7256 the parent subprogram (the condition was completely wrong). Add
7257 checking that was missing for controlling result types being derived
7258 from the result type of the parent operation.
7260 2011-08-02 Yannick Moy <moy@adacore.com>
7262 * errout.adb (First_Node): minor renaming
7263 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7266 2011-08-02 Yannick Moy <moy@adacore.com>
7268 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7269 before accessing operands.
7270 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7271 decide whether an initialization expression respects SPARK rules, as
7272 the plain node is the expanded one. This allows for more valid warnings
7274 * gnat_rm.texi: Minor update.
7276 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7278 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7281 2011-08-02 Robert Dewar <dewar@adacore.com>
7283 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7285 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7287 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7288 loop statements and the element renaming declaration with a block when
7289 the element type is controlled.
7291 2011-08-02 Yannick Moy <moy@adacore.com>
7293 * sinfo.ads: Minor formatting.
7295 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7297 * sem_aggr.adb (Add_Association): if the association has a box and no
7298 expression, use the Sloc of the aggregate itself for the new
7300 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7303 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7305 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7306 When a container is provided via a function call, generate a renaming
7307 of the function result. This avoids the creation of a transient scope
7308 and the premature finalization of the container.
7309 * exp_ch7.adb (Is_Container_Cursor): Removed.
7310 (Wrap_Transient_Declaration): Remove the supression of the finalization
7311 of the list controller when the declaration denotes a container cursor,
7314 2011-08-02 Yannick Moy <moy@adacore.com>
7316 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7317 node is from source, instead of the original node being from source.
7319 (Resolve_Array_Aggregate): refine the check for a static expression, to
7320 recognize also static ranges
7321 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7322 Array_Type_Declaration): postpone the test for the type being a subtype
7323 mark after the type has been resolved, so that component-selection and
7324 expanded-name are discriminated.
7325 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7326 to distinguish the case of an iteration scheme, so that an error is
7327 issed on a non-static range in SPARK except in an iteration scheme.
7328 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7329 In_Iter_Schm = True.
7330 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7331 user-defined operators so that they are allowed in renaming
7333 (Find_Selected_Component): refine the check for prefixing of operators
7334 so that they are allowed in renaming. Move the checks for restrictions
7335 on selector name after analysis discriminated between
7336 component-selection and expanded-name.
7337 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7338 concatenation argument of string type if it is static.
7339 * sem_util.adb, sem_util.ads
7340 (Check_Later_Vs_Basic_Declarations): add a new function
7341 Is_Later_Declarative_Item to decice which declarations are allowed as
7342 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7343 mode, add that renamings are considered as later items.
7344 (Enclosing_Package): new function to return the enclosing package
7345 (Enter_Name): correct the rule for homonyms in SPARK
7346 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7347 from source (result of expansion) to avoid issuing wrong warnings.
7349 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7351 * errout.adb: On anything but an expression First_Node returns its
7354 2011-08-02 Pascal Obry <obry@adacore.com>
7356 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7358 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7360 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7361 Set the associated loop as the related expression of internally
7363 * exp_ch7.adb (Is_Container_Cursor): New routine.
7364 (Wrap_Transient_Declaration): Supress the finalization of the list
7365 controller when the declaration denotes a container cursor.
7367 2011-08-02 Yannick Moy <moy@adacore.com>
7369 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7371 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7372 expression is a simple expression. This check cannot be performed in
7373 the semantics, so just drop it.
7374 (P_Index_Or_Discriminant_Constraint): move check that the index or
7375 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7376 semantics. Other cases were previously checked in the semantics.
7377 * par-ch4.adb (P_Name): move checks that a selector name is not
7378 character literal or an operator symbol to Find_Selected_Component in
7380 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7381 declarations are not placed after later declarations in a separate
7382 procedure in Sem_Util (possibly not the best choice?), to be used both
7383 during parsing, for Ada 83 mode, and during semantic analysis, for
7385 * par-endh.adb (Check_End): move check that end label is not missing
7386 to Process_End_Label in the semantics
7387 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7388 the special case for SPARK restriction
7389 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7390 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7391 parameter Force to issue the error message even on internal node (used
7392 for generated end label). Call Check_Restriction to check when an error
7393 must be issued. In SPARK mode, issue an error message even if the
7394 restriction is not set.
7395 (Check_Restriction): new procedure with an additional out parameter to
7396 inform the caller that a message has been issued
7397 * sem_aggr.adb: Minor modification of message
7398 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7399 instead of issuing an error message directly
7400 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7401 declarations are not placed after later declarations, by calling
7402 Check_Later_Vs_Basic_Declarations
7403 (Analyze_Subtype_Declaration): move here the check that an index or
7404 discriminant constraint must be a subtype mark. Change the check that
7405 a subtype of String must start at one so that it works on subtype marks.
7406 * sem_ch4.adb (Analyze_Call): move here the check that a named
7407 association cannot follow a positional one in a call
7408 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7409 instead of issuing an error message directly
7410 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7411 selector name is not a character literal or an operator symbol. Move
7412 here the check that the prefix of an expanded name cannot be a
7413 subprogram or a loop statement.
7414 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7415 procedure called from parsing and semantics to check that basic
7416 declarations are not placed after later declarations
7417 (Process_End_Label): move here the check that end label is not missing
7419 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7421 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7422 representation clause in codepeer mode, since it confuses CodePeer and
7423 does not bring useful info.
7425 2011-08-02 Ed Falis <falis@adacore.com>
7427 * init.c: initialize fp hw on MILS.
7429 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7431 * errout.adb (First_Node): for bodies, return the node itself (small
7432 optimization). For other nodes, do not check source_unit if the node
7433 comes from Standard.
7435 2011-08-02 Robert Dewar <dewar@adacore.com>
7437 * exp_ch3.adb: Minor comment additions.
7438 * sem_ch13.adb: Minor reformatting.
7440 2011-08-02 Pascal Obry <obry@adacore.com>
7442 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7444 2011-08-02 Robert Dewar <dewar@adacore.com>
7446 * sem_attr.adb: Minor reformatting.
7448 2011-08-02 Robert Dewar <dewar@adacore.com>
7450 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7451 (Has_Default_Component_Value): Removed
7452 * einfo.ads Comment updates
7453 (Has_Default_Aspect): Replaces Has_Default_Value
7454 (Has_Default_Component_Value): Removed
7456 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7458 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7459 (Get_Simple_Init_Val): Handle Default_Value aspect
7460 (Needs_Simple_Initialization): Handle Default_Value aspect
7461 * exp_ch3.ads: Needs_Simple_Initialization
7462 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7463 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7465 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7466 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7467 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7469 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7471 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7472 package containing iteration primitives.
7473 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7475 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7477 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7478 "of", pre-analyze expression in case it is a function call with
7479 finalization actions that must be placed ahead of the loop.
7480 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7481 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7483 2011-08-02 Geert Bosch <bosch@adacore.com>
7485 * cstand.adb (Create_Float_Types): Only consider C's long double for
7486 Long_Long_Float, in addition to double.
7488 2011-08-02 Robert Dewar <dewar@adacore.com>
7490 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7491 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7492 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7495 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7497 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7500 2011-08-02 Javier Miranda <miranda@adacore.com>
7502 * einfo.ads, einfo.adb
7503 (Original_Access_Type): Move this attribute to Node26 since there was
7504 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7505 which causes conflicts and breaks the generation of the .NET compiler.
7506 (Interface_Name): Add missing documentation on JGNAT only uses of
7509 2011-08-02 Geert Bosch <bosch@adacore.com>
7511 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7512 (Find_Back_End_Float_Type): Likewise
7513 (Create_Back_End_Float_Types): Likewise
7514 (Create_Float_Types): Likewise
7515 (Register_Float_Type): Likewise
7516 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7517 Nlist and split out type selection in new local Find_Base_Type function.
7518 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7520 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7522 2011-08-02 Robert Dewar <dewar@adacore.com>
7524 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7526 * opt.ads: Minor comment change.
7527 * sem_ch12.adb: Minor code reorganization.
7529 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7531 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7532 subtype's list of rep items to the list on the full subtype in the case
7533 where the lists are the same.
7535 2011-08-02 Geert Bosch <bosch@adacore.com>
7537 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7538 using the one from System.Strings, which also deallocates all strings.
7540 2011-08-02 Geert Bosch <bosch@adacore.com>
7542 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7544 * gcc-interface/Make-lang.in: Update dependencies.
7546 2011-08-02 Olivier Hainque <hainque@adacore.com>
7548 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7551 2011-08-02 Javier Miranda <miranda@adacore.com>
7553 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7554 associated with anonymous access to subprograms.
7556 2011-08-02 Geert Bosch <bosch@adacore.com>
7559 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7560 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7561 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7562 (Add_Symbol_Definition): Move to switch-c.adb
7563 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7564 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7565 (Add_Symbol_Definition): Move to switch-c.adb.
7566 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7568 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7570 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7571 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7573 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7574 (Add_Symbol_Definition): Moved from Prepcomp.
7575 * switch-c.ads: Update copyright notice. Use String_List instead of
7576 Argument_List, removing dependency on System.OS_Lib.
7578 2011-08-02 Yannick Moy <moy@adacore.com>
7580 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7581 mode on initialization expression which does not respect SPARK
7583 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7584 if the tree referenced by its argument represents an initialization
7585 expression in SPARK, suitable for initializing an object in an object
7588 2011-08-02 Javier Miranda <miranda@adacore.com>
7590 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7591 internally generated access to subprogram with its associated protected
7593 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7595 2011-08-02 Geert Bosch <bosch@adacore.com>
7597 * cstand.adb (Register_Float_Type): Print information about type to
7598 register, if the Debug_Flag_Dot_B is set.
7599 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7600 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7601 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7602 with a requested precision of more than Max_Digits digits and no more
7603 than Max_Base_Digits digits, if a range specification is present and the
7604 Predefined_Float_Types list has a suitable type to derive from.
7605 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7606 case of type completion with pragma Import
7608 (Process_Import_Predefined_Type): Processing to complete a type
7609 with pragma Import. Currently supports floating point types only.
7610 (Set_Convention_From_Pragma): Do nothing without underlying type.
7611 (Process_Convention): Guard against absence of underlying type,
7612 which may happen when importing incomplete types.
7613 (Process_Import_Or_Interface): Handle case of importing predefined
7614 types. Tweak error message.
7616 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7618 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7619 functions to previous change. Reorganize code slightly.
7621 2011-08-02 Geert Bosch <bosch@adacore.com>
7623 * back_end.ads (Register_Type_Proc): New call back procedure type for
7624 allowing the back end to provide information about available types.
7625 (Register_Back_End_Types): New procedure to register back end types.
7626 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7628 * cstand.adb (Back_End_Float_Types): New list for floating point types
7629 supported by the back end.
7630 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7631 (Copy_Float_Type): New procedure to make new copies of predefined types.
7632 (Register_Float_Type): New call back procedure to populate the BEFT list
7633 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7634 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7635 (Create_Float_Types): New procedure to create entities for floating
7636 point types predefined in Standard, and put these and any remaining
7637 BEFTs on the Predefined_Float_Types list.
7638 * stand.ads (Predefined_Float_Types): New list for predefined floating
7639 point types that do not have declarations in package Standard.
7641 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7643 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7644 entity node for the unit containing the parameter.
7645 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7646 (Add_Inlined_Subprogram): Likewise.
7647 * gcc-interface/Make-lang.in: Update dependencies.
7649 2011-08-02 Thomas Quinot <quinot@adacore.com>
7651 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7654 2011-08-02 Geert Bosch <bosch@adacore.com>
7656 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7658 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7660 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7661 computed value of Base_Type.
7663 2011-08-02 Yannick Moy <moy@adacore.com>
7665 * restrict.adb (Check_Restriction): issue an error for any use of
7666 class-wide, even if the No_Dispatch restriction is not set.
7667 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7668 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7669 when completing a private extension, the type named in the private part
7670 is not the same as that named in the visible part.
7671 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7672 of an inherited primitive operations of a tagged type or type extension
7673 that returns the tagged type.
7674 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7675 function which returns True for an implicit operation inherited by the
7676 derived type declaration for the argument type.
7677 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7680 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7682 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7683 Process_Bounds, to perform analysis with expansion of a range or an
7684 expression that is the iteration scheme for a loop.
7685 (Analyze_Iterator_Specification): If domain of iteration is given by a
7686 function call with a controlled result, as is the case if call returns
7687 a predefined container, ensure that finalization actions are properly
7689 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7691 2011-08-02 Javier Miranda <miranda@adacore.com>
7693 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7694 * gcc-interface/Make-lang.in: Update dependencies.
7696 2011-08-02 Javier Miranda <miranda@adacore.com>
7698 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7699 determine if the analysis is performed using N or Original_Node (N).
7700 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7701 functionality of routine Is_Variable avoids code duplication.
7702 * checks.adb (Determine_Range): Handle temporaries generated by
7703 Remove_Side_Effects.
7705 2011-08-02 Javier Miranda <miranda@adacore.com>
7707 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7708 expansion of the condition. Required since the previous analysis was
7709 done with expansion disabled (see Resolve_Quantified_Expression) and
7710 hence checks were not inserted and record comparisons have not been
7713 2011-08-02 Ed Falis <falis@adacore.com>
7715 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7718 2011-08-02 Bob Duff <duff@adacore.com>
7720 * opt.ads: Minor comment fix.
7722 2011-08-02 Bob Duff <duff@adacore.com>
7724 * sem_ch12.adb (Analyze_Package_Instantiation,
7725 Analyze_Subprogram_Instantiation): Turn off style checking while
7726 analyzing an instance. Whatever style checks that apply to the generic
7727 unit should apply, so it makes no sense to apply them in an instance.
7728 This was causing trouble when compiling an instance of a runtime
7729 unit that violates the -gnatyO switch.
7730 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7731 one of the two case statements, causing spurious errors.
7733 2011-08-02 Robert Dewar <dewar@adacore.com>
7735 * uname.adb: Minor reformatting.
7736 * gnatcmd.adb: Minor reformatting.
7737 * exp_attr.adb: Minor reformatting.
7739 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7741 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7742 No_Dispatching_Calls, do not look for the Assign primitive, because
7743 predefined primitives are not created in this case.
7745 2011-08-02 Bob Duff <duff@adacore.com>
7747 * stylesw.ads: Minor comment fixes.
7749 2011-08-02 Robert Dewar <dewar@adacore.com>
7751 * freeze.adb (Add_To_Result): New procedure.
7753 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7755 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7756 time, if the specific run-time routines for handling streams of strings
7757 are not available, use the default mechanism.
7759 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7761 * s-regpat.ads: Fix typo.
7763 2011-08-02 Vincent Celier <celier@adacore.com>
7765 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7766 not null, call it to create the in memory config project file without
7767 parsing an existing default config project file.
7769 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7771 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7773 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7775 * sem_elim.adb: an abstract subprogram does not need an eliminate
7776 pragma for its descendant to be eliminable.
7778 2011-08-02 Ed Falis <falis@adacore.com>
7780 * init.c: revert to handling before previous checkin for VxWorks
7781 * s-intman-vxworks.adb: delete unnecessary declarations related to
7782 using Ada interrupt facilities for handling signals.
7783 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7784 * s-intman-vxworks.ads: Import __gnat_install_handler as
7785 Initialize_Interrupts.
7786 * s-taprop-vxworks.adb: Delete Signal_Mask.
7787 (Abort_Handler): change construction of mask to unblock exception
7790 2011-08-02 Jerome Guitton <guitton@adacore.com>
7792 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7793 Debug_Raise_Exception before propagation starts.
7795 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7797 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7798 to Restriction_Check_Required.
7799 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7800 * sem_res.adb (Resolve_Call): Likewise.
7801 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7803 2011-08-02 Bob Duff <duff@adacore.com>
7805 * stylesw.ads: Update comment.
7806 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7807 * errout.ads: Remove obsolete comment.
7809 2011-08-02 Javier Miranda <miranda@adacore.com>
7811 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7812 (Set_Is_Safe_To_Reevaluate): new procedure.
7813 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7814 assignment is allowed on safe-to-reevaluate variables.
7815 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7816 temporary created to remove side effects in expressions that use
7817 the secondary stack as safe-to-reevaluate.
7818 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7819 variables that are not true constants.
7821 2011-08-02 Robert Dewar <dewar@adacore.com>
7823 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7824 sem_res.adb, sem_ch6.adb: Minor reformatting.
7826 2011-08-02 Jerome Guitton <guitton@adacore.com>
7828 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7830 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7832 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7833 not set Overridden_Operation if subprogram is an initialization
7836 2011-08-02 Yannick Moy <moy@adacore.com>
7838 * par-ch6.adb: Correct obsolete name in comments
7839 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7840 which takes two message arguments (existing function takes one), with
7841 second message used for continuation.
7842 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7843 block statements that originate from a source block statement, not
7844 generated block statements
7845 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7846 symmetry with procedure case
7847 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7848 function to issue an error in formal mode if a package specification
7849 contains more than one tagged type or type extension.
7850 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7851 parameters matching formals of tagged types are objects (or ancestor
7852 type conversions of objects), not general expressions. Issue an error
7853 on view conversions that are not involving ancestor conversion of an
7855 (Resolve_Type_Conversion): in formal mode, issue an error on the
7856 operand of an ancestor type conversion which is not an object
7857 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7858 procedure so that it works also for actuals of function calls
7859 (Is_Actual_Tagged_Parameter): new function which determines if its
7860 argument is an actual parameter of a formal of tagged type in a
7862 (Is_SPARK_Object_Reference): new function which determines if the tree
7863 referenced by its argument represents an object in SPARK
7865 2011-08-02 Robert Dewar <dewar@adacore.com>
7867 * sem_ch3.adb: Minor reformatting
7868 Minor comment addition
7869 Minor error msg text change
7871 2011-08-02 Javier Miranda <miranda@adacore.com>
7873 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7874 function. Used to be more precise when we generate a variable plus one
7875 assignment to remove side effects in the evaluation of the Bound
7877 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7878 of the bound expression to force its re-analysis and thus expand the
7879 associated transient scope (if required). Code cleanup replacing the
7880 previous code that declared the constant entity by an invocation to
7881 routine Force_Evaluation which centralizes this work in the frontend.
7883 2011-08-02 Robert Dewar <dewar@adacore.com>
7885 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7886 (Base_Type): Now uses improved Is_Base_Type function
7887 * einfo.ads (Base_Type): Inline this function
7889 2011-08-02 Robert Dewar <dewar@adacore.com>
7891 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7892 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7894 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7896 * gcc-interface/Make-lang.in: Update dependencies.
7897 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7900 2011-08-02 Yannick Moy <moy@adacore.com>
7902 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7903 non-simple expression used in delta constraint
7904 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7905 index constraint which is not a subtype mark
7906 * par.adb: With and use Restrict
7907 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7908 mode on component type which is not a subtype mark and default
7909 expression on component
7910 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7911 of string which does not have a lower index bound equal to 1
7912 (Array_Type_Declaration): issue an error in formal mode on index or
7913 component type which is not a subtype mark, and on aliased keyword on
7915 (Derived_Type_Declaration): issue an error in formal mode on interface,
7916 limited or abstract type
7917 (Record_Type_Declaration): issue an error in formal mode on interface
7918 (Record_Type_Definition): issue an error in formal mode on tagged types
7919 and type extensions not declared in the specification of a library unit
7920 package; on null non-tagged record; on variant part
7922 2011-08-02 Vincent Celier <celier@adacore.com>
7924 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7925 not declared for qualified library project when Library_Name is not
7926 declared, but Library_Dir is.
7928 2011-08-02 Robert Dewar <dewar@adacore.com>
7930 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7931 pragmas (affects aspects [Component_]Default_Value
7932 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7933 component type for the resolution
7935 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7937 * einfo.adb (Base_Type): Tune implementation for speed.
7939 2011-08-02 Robert Dewar <dewar@adacore.com>
7941 * freeze.adb: Minor reformatting.
7943 2011-08-02 Thomas Quinot <quinot@adacore.com>
7945 * scos.ads: Update comments.
7947 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7949 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7950 base type, because the parent may be a subtype of a private type whose
7951 convention is established in a private part.
7953 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7955 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7956 statement in a block when the expansion of the return expression has
7957 created a finalization chain.
7958 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7959 with the parent node.
7960 Add N_Extended_Return_Statement to handle the case where a transient
7961 object declaration appears in the Return_Object_Declarations list of
7962 an extended return statement.
7964 2011-08-02 Matthew Gingell <gingell@adacore.com>
7966 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7967 unused parameter 'name'.
7969 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7971 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7972 inherited operation, check whether its alias, which is the source
7973 operastion that it renames, has been marked eliminated.
7975 2011-08-02 Javier Miranda <miranda@adacore.com>
7977 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7978 in-mode parameter whose type is an access type since it can be used to
7979 modify its designated object. Enforce code that handles as safe an
7980 access type that is not access-to-constant but it is the result of a
7981 previous removal of side-effects.
7982 (Remove_Side_Effects): Minor code reorganization of cases which require
7983 no action. Done to incorporate documentation on new cases uncovered
7984 working in this ticket: no action needed if this routine was invoked
7985 too early and the nodes are not yet decorated.
7986 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
7987 to routine Remove_Side_Effects by calls to Force_Evaluation since they
7988 were issued with actuals that are implicitly provided by
7991 2011-08-02 Robert Dewar <dewar@adacore.com>
7993 * sem_ch3.adb, sem_res.adb: Minor reformatting.
7995 2011-08-02 Yannick Moy <moy@adacore.com>
7997 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
7998 to issue an error in formal mode on attribute not supported in this mode
7999 (Analyze_Attribute): issue errors on standard attributes not supported
8001 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8002 comment, and issue error in formal mode on modulus which is not a power
8004 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8006 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8008 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8009 operator on modular type (except 'not').
8011 2011-08-02 Robert Dewar <dewar@adacore.com>
8013 * gnat_rm.texi: Minor reformatting.
8015 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8017 * s-osinte-linux.ads: Minor comment update and reformatting.
8018 * i-cexten.ads: Make this unit pure, as for its parent.
8019 Will allow its usage in more contexts if needed.
8021 2011-08-02 Robert Dewar <dewar@adacore.com>
8023 * s-utf_32.ads: Minor comment fix.
8025 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8027 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8028 operation of a tagged synchronized type, handle the case where the
8029 controlling argument is overloaded.
8031 2011-08-02 Yannick Moy <moy@adacore.com>
8033 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8034 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8035 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8036 SPARK mode and formal verification mode on processing SPARK restriction
8037 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8038 requiring consistency checking.
8040 2011-08-02 Robert Dewar <dewar@adacore.com>
8042 * sem_res.adb: Minor reformatting.
8044 2011-08-02 Robert Dewar <dewar@adacore.com>
8046 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8047 a-cforse.ads: Remove unneeded with of Ada.Containers
8048 Remove commented out pragma Inline's
8049 Move specifications of new subprograms to the actual specs
8051 2011-08-02 Yannick Moy <moy@adacore.com>
8053 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8054 a-cforse.ads: Update comments.
8056 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8058 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8060 2011-08-02 Robert Dewar <dewar@adacore.com>
8062 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8063 a-cforse.ads, a-cofove.ads: Minor reformatting.
8065 2011-08-02 Claire Dross <dross@adacore.com>
8067 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8068 a-cofove.ads: Add comments.
8070 2011-08-02 Yannick Moy <moy@adacore.com>
8072 * gnat_rm.texi: Document formal containers.
8074 2011-08-02 Emmanuel Briot <briot@adacore.com>
8076 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8079 2011-08-02 Robert Dewar <dewar@adacore.com>
8081 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8084 2011-08-02 Robert Dewar <dewar@adacore.com>
8086 * aspects.adb: New aspects Default_Value and Default_Component_Value
8087 New format of Aspect_Names table checks for omitted entries
8088 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8089 handling of boolean aspects for derived types.
8090 New aspects Default_Value and Default_Component_Value
8091 New format of Aspect_Names table checks for omitted entries
8092 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8093 (Has_Default_Value): New flag
8094 (Has_Default_Component_Value): New flag
8095 (Has_Default_Value): New flag
8096 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8098 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8099 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8100 Default_Value and Default_Component_Value
8101 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8102 New aspects Default_Value and Default_Component_Value
8103 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8104 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8106 2011-08-02 Vincent Celier <celier@adacore.com>
8108 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8109 inherit library kind.
8111 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8113 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8116 2011-08-02 Robert Dewar <dewar@adacore.com>
8118 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8120 2011-08-02 Yannick Moy <moy@adacore.com>
8122 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8124 2011-08-02 Robert Dewar <dewar@adacore.com>
8126 * impunit.adb: Add comment.
8128 2011-08-02 Yannick Moy <moy@adacore.com>
8130 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8131 qualification of aggregates in formal mode
8132 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8134 (Resolve_Aggregate): complete the test that an aggregate is adequately
8135 qualified in formal mode
8137 2011-08-02 Pascal Obry <obry@adacore.com>
8139 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8140 * mlib-prj.adb: Supress warning when compiling binder generated file.
8141 (Build_Library): Supress all warnings when compiling the binder
8144 2011-08-02 Yannick Moy <moy@adacore.com>
8146 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8148 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8149 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8150 Add with/use clauses to make Check_Formal_Restriction visible
8152 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8154 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8155 in-parameters when type of the generic formal is private in the generic
8156 spec and non-private in the body.
8158 2011-08-02 Claire Dross <dross@adacore.com>
8160 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8161 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8162 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8163 * impunit.adb, Makefile.rtl: Take new files into account.
8165 2011-08-02 Robert Dewar <dewar@adacore.com>
8167 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8168 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8170 2011-08-02 Yannick Moy <moy@adacore.com>
8172 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8174 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8175 matching static array bounds, taking into account the special case of
8177 * sem_ch3.adb: Typo in comment.
8179 2011-08-02 Yannick Moy <moy@adacore.com>
8181 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8182 which issues an error in formal mode if its argument node is originally
8184 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8185 has a discriminant specification so that it does not include the case
8187 (Derived_Type_Declaration): move here the test that a derived type has a
8188 discriminant specification
8189 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8190 first element of a component association before accessing its choices
8191 (presence of component association is not enough)
8192 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8193 declaration is a library item before accessing the next element in a
8194 list, as library items are not member of lists
8195 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8196 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8197 Check_Formal_Restriction whenever possible.
8199 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8201 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8202 reference when needed.
8204 2011-08-02 Bob Duff <duff@adacore.com>
8206 * gnat_ugn.texi: Fix typo.
8208 2011-08-02 Vincent Celier <celier@adacore.com>
8210 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8211 archive file name. Do not use the full path name of archives for Open
8214 2011-08-02 Robert Dewar <dewar@adacore.com>
8216 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8217 Analyze_Aspect_Specifications
8219 (Analyze_Aspect_Specifications): New handling for boolean aspects
8220 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8221 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8222 sequence for Analyze_Aspect_Specifications
8223 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8224 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8226 2011-08-02 Robert Dewar <dewar@adacore.com>
8228 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8229 aspects, since these no longer exist.
8231 2011-08-02 Robert Dewar <dewar@adacore.com>
8233 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8234 semicolon, do not try to see if there are aspects following it.
8235 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8238 2011-08-02 Robert Dewar <dewar@adacore.com>
8240 * sem_ch8.adb, aspects.ads: Minor reformatting.
8242 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8244 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8245 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8247 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8249 2011-08-02 Yannick Moy <moy@adacore.com>
8251 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8252 mode on subprogram declaration outside of package specification, unless
8253 it is followed by a pragma Import
8254 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8255 Access_Type_Declaration): issue error in formal mode on access type
8256 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8258 (Analyze_Object_Declaration): issue error in formal mode on object
8259 declaration which does not respect SPARK restrictions
8260 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8261 declaration which does not respect SPARK restrictions
8262 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8263 error in formal mode on digits or delta constraint
8264 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8265 decimal fixed point type
8266 (Derived_Type_Declaration): issue error in formal mode on derived type
8267 other than type extensions of tagged record types
8268 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8269 with check on access definition
8270 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8271 mode on protected definition.
8272 (Analyze_Task_Definition): issue error in formal mode on task definition
8274 2011-08-02 Robert Dewar <dewar@adacore.com>
8276 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8278 2011-08-02 Javier Miranda <miranda@adacore.com>
8280 * sem_ch6.adb (Can_Override_Operator): New function.
8281 (Verify_Overriding_Indicator): Add missing code to check overriding
8282 indicator in operators. Fixes regression.
8283 (Check_Overriding_Indicator): Minor reformating after replacing the
8284 code that evaluates if the subprogram can override an operator by
8285 invocations to the above new function.
8287 (Write_Field26_Name): Add missing code to ensure that, following
8288 the documentation in einfo.ads, this field is not shown as attribute
8289 "Static_Initialization" on non-dispatching functions.
8291 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8293 * sem_res.adb (Resolve_Call): A call to
8294 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8295 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8296 i.e., when the second parameter is of type Time_Span.
8298 2011-08-02 Vincent Celier <celier@adacore.com>
8300 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8301 with an archive instead of -L<library dir> -l<library name>.
8303 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8305 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8306 mark the base types In_Use in addition to making the operations
8309 2011-08-02 Ed Falis <falis@adacore.com>
8311 * init.c: add and setup __gnat_signal_mask for the exception signals
8312 * s-inmaop-vxworks.adb: new file.
8313 * s-intman-vxworks.adb: remove unnecessary initializations and
8315 * s-intman-vxworks.ads: remove unnecessary variable
8316 * s-taprop-vxworks.adb: simplify signal initialization
8318 2011-08-02 Robert Dewar <dewar@adacore.com>
8320 * sem_ch8.adb: Minor code reorganization, comment updates.
8322 2011-08-02 Robert Dewar <dewar@adacore.com>
8324 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8325 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8327 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8328 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8330 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8332 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8333 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8334 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8335 use_type_clauses, to handle more efficiently use_type and use_all_type
8337 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8338 Ada2012 Use_All_Type clause.
8339 (Use_Class_Wide_Operations): new procedure.
8341 2011-08-02 Robert Dewar <dewar@adacore.com>
8343 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8344 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8345 expression to expression function.
8347 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8349 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8350 if types are compatible.
8352 2011-08-02 Yannick Moy <moy@adacore.com>
8354 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8355 returns True if its argument array types have same dimension and same
8356 static bounds at each index.
8357 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8358 OUT or IN OUT paramaters which are not view conversions in SPARK.
8359 (Resolve_Arithmetic_Op): issue an error in formal mode on
8360 multiplication or division with operands of fixed point types which are
8361 not qualified or explicitly converted.
8362 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8363 Boolean or array type (except String) operands.
8364 (Resolve_Equality_Op): issue an error in formal mode on equality
8365 operators for array types other than String with non-matching static
8367 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8368 for array types with non-matching static bounds. Factorize the code in
8369 Matching_Static_Array_Bounds.
8370 (Resolve_Qualified_Expression): issue an error in formal mode on
8371 qualified expressions for array types with non-matching static bounds.
8372 (Resolve_Type_Conversion): issue an error in formal mode on type
8373 conversion for array types with non-matching static bounds
8375 2011-08-02 Robert Dewar <dewar@adacore.com>
8377 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8379 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8381 * par-ch9.adb: save location of entry for proper error message.
8383 2011-08-02 Javier Miranda <miranda@adacore.com>
8385 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8386 (Use_Full_View) which permits this routine to climb through the
8387 ancestors using the full-view of private parents.
8388 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8389 Use_Full_View to true in calls to Is_Ancestor.
8390 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8391 true in call to Is_Ancestor.
8392 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8393 Use_Full_View to true in call to Is_Ancestor.
8394 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8395 call to Is_Ancestor.
8396 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8397 Use_Full_View to true in calls to Is_Ancestor.
8398 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8399 Make_Select_Specific_Data_Table, Register_Primitive,
8400 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8401 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8402 to true in call to Is_Ancestor.
8403 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8404 Use_Full_View to true in calls to Is_Ancestor.
8406 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8407 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8409 2011-08-02 Robert Dewar <dewar@adacore.com>
8411 * gnat_rm.texi: Minor reformatting.
8412 * sem_prag.adb: Minor reformatting.
8414 2011-08-02 Tristan Gingold <gingold@adacore.com>
8416 * vms_data.ads: Add VMS qualifier for -gnateP.
8418 2011-08-02 Robert Dewar <dewar@adacore.com>
8420 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8421 * par-ch7.adb (P_Package): Proper placement of aspects for package
8423 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8424 (End_Statements): Add Is_Sloc parameterr
8425 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8426 (Check_End): Ad Is_Sloc parameter
8427 (End_Statements): Add Is_Sloc parameterr
8429 2011-08-02 Vincent Celier <celier@adacore.com>
8431 * ug_words: Add VMS qualifier equivalent to -gnateP:
8432 /SYMBOL_PREPROCESSING.
8434 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8436 * gnat-style.texi: For hexadecimal numeric literals the typical
8437 grouping of digits is 4 to represent 2 bytes.
8438 A procedure spec which is split into several lines is indented two
8441 2011-08-02 Yannick Moy <moy@adacore.com>
8443 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8444 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8445 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8447 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8448 choice in array aggregate
8449 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8451 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8452 positional and named aggregate for record, or others in record
8453 aggregate, or multiple choice in record aggregate
8454 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8455 array operands to logical operations AND, OR and XOR do not have the
8456 same static lower and higher bounds
8457 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8459 2011-08-01 Robert Dewar <dewar@adacore.com>
8461 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8462 Replaces Last_Source_Node_In_Sequence.
8463 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8464 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8465 parens and blank in string (this was inconsistently implemented).
8467 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8468 blank in string (this was inconsistently implemented).
8470 (Set_Global_Switches): Set formal mode switches appropriately
8471 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8473 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8474 call Set_Error_Msg_Lang to set "spark" as language name.
8475 * par.adb: Remove unnecessary call to set formal language for errout
8476 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8477 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8479 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8480 calls to it, moved after resolution so that types are known
8481 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8482 result of concatenation is not of type String
8483 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8484 concatenation is not properly restricted
8485 * gnat_rm.texi: Add doc on pragma Spark_95.
8486 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8487 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8488 * gcc-interface/Make-lang.in: Update dependencies.
8490 2011-08-01 Javier Miranda <miranda@adacore.com>
8492 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8493 condition that detects if the overridden operation must replace an
8496 2011-08-01 Javier Miranda <miranda@adacore.com>
8498 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8499 code declarations inserted by Insert_Actions in each alternative of the
8500 N_Case_Expression node.
8502 2011-08-01 Robert Dewar <dewar@adacore.com>
8504 * sem_ch6.adb: Minor code reorganization.
8505 * sem_util.adb: Minor reformatting.
8507 2011-08-01 Pascal Obry <obry@adacore.com>
8509 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8510 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8512 2011-08-01 Yannick Moy <moy@adacore.com>
8514 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8515 literal or operator symbol which is prefixed
8516 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8517 mode on access attributes.
8518 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8519 that concatenation operands are properly restricted in formal mode
8520 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8521 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8522 result of the concatenation has a type different from String.
8523 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8524 Analyze_Quantified_Expression, Analyze_Slice,
8525 Analyze_Null): issue an error in formal mode on unsupported constructs
8527 (Analyze_Block_Statement): only issue error on source block statement
8528 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8529 function which returns the last node in a list of nodes for which
8530 Comes_From_Source returns True, if any
8531 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8532 Last_Source_Node_In_Sequence
8533 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8534 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8535 mode on unsupported constructs
8536 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8537 rest of the actions may be needed later on since the error is marked as
8539 * sinfo.ads: Typos in comments.
8541 2011-08-01 Pascal Obry <obry@adacore.com>
8543 * projects.texi: Minor editing.
8545 2011-08-01 Yannick Moy <moy@adacore.com>
8547 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8548 insertion character ~~
8549 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8550 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8551 with insertion character ~~
8552 (Set_Msg_Text): treat insertion character ~~
8553 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8554 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8555 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8556 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8557 errors related to the formal language restriction not serious
8558 (insertion character |).
8559 * par.adb (Par): set formal language for error messages if needed
8560 * sem_ch6.adb (Check_Missing_Return): take into account possible
8561 generated statements at the end of the function
8562 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8563 enumeration value to define a new pragma SPARK_95
8564 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8565 SPARK_Version): new type and variables to store the SPARK version
8567 (SPARK_Mode): return True when SPARK_Version is set
8568 * par-prag.adb: Correct indentation
8569 (Prag): take Pragma_SPARK_95 into account
8570 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8573 2011-08-01 Robert Dewar <dewar@adacore.com>
8575 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8576 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8577 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8579 2011-08-01 Pascal Obry <obry@adacore.com>
8581 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8582 Target_Name to Get_Path call.
8583 (Parse_Single_Project): Likewise.
8584 (Post_Parse_Context_Clause): Likewise.
8585 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8586 Call Initialise_Project_Path with the proper Target_Name.
8587 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8589 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8590 with the proper Target_Name.
8591 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8593 (Parse_Project_And_Apply_Config): Likewise.
8594 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8595 This is fine as this part of the code is supporting only native
8597 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8598 is fine as this part of the code is supporting only native compilation.
8600 2011-08-01 Yannick Moy <moy@adacore.com>
8602 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8603 of homonym, unless the homonym is one of the cases allowed in SPARK
8604 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8605 package declaration occurring after a body.
8607 2011-08-01 Robert Dewar <dewar@adacore.com>
8609 * checks.adb, exp_ch4.adb: Minor reformatting.
8611 2011-08-01 Javier Miranda <miranda@adacore.com>
8613 * einfo.ads (Access_Disp_Table): Fix documentation.
8614 (Dispatch_Table_Wrappers): Fix documentation.
8616 2011-08-01 Pascal Obry <obry@adacore.com>
8618 * prj-env.adb, prj-env.ads: Minor reformatting.
8620 2011-08-01 Yannick Moy <moy@adacore.com>
8622 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8623 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8624 procedures out of these packages.
8625 * errout.ads, errout.adb
8626 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8627 procedures in of this package
8628 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8629 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8630 on misplaced later vs initial declarations, like in Ada 83
8631 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8632 formal mode on attribute of private type whose full type declaration
8634 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8635 package declaration inside a package specification
8636 (Analyze_Full_Type_Declaration): issue error in formal mode on
8637 controlled type or discriminant type
8638 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8639 user-defined operator means that it should come from the source
8640 (New_Overloaded_Entity): issue error in formal mode on overloaded
8642 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8644 2011-08-01 Thomas Quinot <quinot@adacore.com>
8646 * atree.adb: Minor reformatting.
8647 * checks.adb: Minor reformatting.
8649 2011-08-01 Vincent Celier <celier@adacore.com>
8651 * s-parame-vms-ia64.ads: Fix typo in comment
8653 * s-parame-vms-restrict.ads: Removed, unused.
8655 2011-08-01 Javier Miranda <miranda@adacore.com>
8658 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8660 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8661 * sem_ch3.ads, sem_ch3.adb
8662 (Is_Constant_Bound): New extended version of the subprogram that was
8663 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8664 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8665 * sem_aux.ads (Constant_Value): Fix typo in comment.
8666 * checks.adb (Generate_Index_Checks): New implementation which, for
8667 array objects with constant bounds, generates the runtime check
8668 referencing the bounds of the array type. For other cases this routine
8669 provides its previous behavior obtaining such values from the array
8671 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8673 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8674 we cannot have semantic interpretations of the new node.
8676 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8678 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8681 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8683 * sem_ch8.adb: Minor code editing.
8684 * s-vxwext.adb: Remove trailing space.
8685 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8686 consistency with other files.
8688 2011-08-01 Thomas Quinot <quinot@adacore.com>
8690 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8692 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8694 * par-ch10.adb: reject parameterized expressions as compilation unit.
8695 * sem_ch4.adb: handle properly conditional expression with overloaded
8696 then_clause and no else_clause.
8698 2011-08-01 Tristan Gingold <gingold@adacore.com>
8700 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8701 like done by System.Aux_DEC.
8702 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8704 2011-08-01 Yannick Moy <moy@adacore.com>
8706 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8707 missing label at end of declaration (subprogram or package)
8708 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8709 of positional and named parameter association
8710 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8711 Error_Msg_SP which adds a prefix to the error message giving the name
8712 of the formal language analyzed
8713 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8714 access result type in subprogram, unconstrained array as result type,.
8715 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8717 * sem_ch8.adb: Code clean up.
8719 2011-08-01 Javier Miranda <miranda@adacore.com>
8721 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8722 * einfo.ads (Access_Disp_Table): Fix documentation.
8723 (Dispatch_Table_Wrappers): Fix documentation.
8724 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8725 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8726 to enforce the documentation of this attribute.
8727 (Set_Is_Interface): Cleanup the assertion.
8728 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8729 the Underlying_Type entity before reading attribute Access_Disp_Table.
8730 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8731 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8732 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8733 the Underlying_Type entity before reading attribute Access_Disp_Table.
8734 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8735 Locate the Underlying_Type entity before reading attribute
8738 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8740 * s-poosiz.ads: Additional overriding indicators.
8742 2011-08-01 Yannick Moy <moy@adacore.com>
8744 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8746 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8747 parameter specification does not include a subtype mark.
8748 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8749 formal mode on abstract subprogram.
8750 (Analyze_Subprogram_Specification): issue error in formal mode on
8751 user-defined operator.
8752 (Process_Formals): issue error in formal mode on access parameter and
8754 * sem_ch9.adb (Analyze_Abort_Statement,
8755 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8756 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8757 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8758 Analyze_Requeue, Analyze_Selective_Accept,
8759 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8760 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8761 issue error in formal mode on user-defined raise statement.
8763 2011-08-01 Thomas Quinot <quinot@adacore.com>
8765 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8766 declaration being hidden when overriding an implicit inherited
8768 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8769 (-gnats), do not complain about a source file that contains only a
8772 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8774 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8775 variable if already set.
8777 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8779 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8780 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8781 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8782 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8783 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8784 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8785 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8786 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8787 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8788 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8789 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8790 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8791 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8792 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8793 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8794 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8795 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8796 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8797 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8798 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8799 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8800 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8801 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8802 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8803 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8804 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8805 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8806 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8807 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8808 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8809 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8810 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8811 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8812 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8813 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8814 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8815 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8816 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8817 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8818 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8819 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8820 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8821 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8822 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8823 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8824 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8825 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8826 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8827 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8828 Use GNAT instead of GNARL.
8830 2011-08-01 Bob Duff <duff@adacore.com>
8832 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8833 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8834 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8837 2011-08-01 Yannick Moy <moy@adacore.com>
8839 * debug.adb (d.D) reverve flag for the SPARK mode
8840 (d.E) reverve flag for SPARK generation mode
8841 (d.F) reverve flag for Why generation mode
8842 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8843 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8844 functions which return True when the corresponding modes are set
8845 (Formal_Language): return "spark" or "alfa" when in formal verification
8847 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8848 Error_Msg to prefix the error message with a tag giving the formal
8850 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8851 message with a tag giving the formal language
8852 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8854 (Analyze_Case_Statement): issue error in formal mode on case statement
8855 with a single "others" case alternative
8856 (Analyze_Exit_Statement): issue errors in formal mode on exit
8857 statements which do not respect SPARK restrictions
8858 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8859 (Check_Unreachable_Code): always issue an error (not a warning) in
8860 formal mode on unreachable code (concerns both code after an infinite
8861 loop and after an unconditional jump, both not allowed in SPARK)
8862 * sem_ch6.adb (Analyze_Return_Statement): add call to
8863 Set_Return_Present for a procedure containing a return statement
8864 (already done for functions in Analyze_Function_Return)
8865 (Analyze_Function_Return): issue error in formal mode on extended
8866 return or if return is not last statement in function
8867 (Check_Missing_Return): issue error in formal mode if function does
8868 not end with return or if procedure contains a return
8869 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8870 function to detect if there is an inner scope of its parameter S which
8873 2011-08-01 Thomas Quinot <quinot@adacore.com>
8875 * sem_ch6.ads: Minor reformatting.
8877 2011-08-01 Javier Miranda <miranda@adacore.com>
8879 * sem_util.adb (Abstract_Interface_List): Complete condition when
8880 processing private type declarations to avoid reading unavailable
8882 (Is_Synchronized_Tagged_Type): Complete condition when processing
8883 private extension declaration nodes to avoid reading unavailable
8886 2011-08-01 Thomas Quinot <quinot@adacore.com>
8888 * sem_ch3.adb: Minor reformatting.
8890 2011-08-01 Thomas Quinot <quinot@adacore.com>
8892 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8893 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8894 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8895 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8896 for VMS, instead parametrize the common implementation with
8897 System.Parameters declarations.
8899 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8901 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8903 2011-08-01 Tristan Gingold <gingold@adacore.com>
8905 * seh_init.c: Fix SEH handler installation on win64.
8907 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8909 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8910 double analysis of an anonymous access to subprogram, because it can
8911 lead to improper sharing of profiles and a back-end crash.
8913 2011-08-01 Robert Dewar <dewar@adacore.com>
8915 * make.adb, sem_ch4.adb: Minor reformatting.
8916 * gcc-interface/Make-lang.in: Update dependencies.
8917 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8919 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8921 * gnat_rm.texi: Fix definition of Long_Integer.
8923 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8925 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8926 to prevent storage exhaustion.
8927 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8928 finalized is a function body, insert the cleanup code before the final
8929 return statement, to prevent spurious warnings.
8930 * s-pooglo.ads: add overriding indicator.
8932 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8934 * sem_ch4.adb (Operator_Check): improve error message when both a
8935 with_clause and a use_clause are needed to make operator usage legal.
8936 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8937 determine whether a compilation unit is visible within an other,
8938 either through a with_clause in the current unit, or a with_clause in
8939 its library unit or one one of its parents.
8941 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8943 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8944 over an arbitrary expression of an array or container type.
8945 * lib-xref.adb: clarify comment.
8947 2011-08-01 Bob Duff <duff@adacore.com>
8949 * einfo.ads: Minor reformatting.
8950 * debug.adb: Minor comment improvement.
8952 2011-08-01 Javier Miranda <miranda@adacore.com>
8954 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8955 consider hidden subprograms as valid candidates.
8957 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8959 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8961 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8963 * gnat_ugn.texi: Fix typo.
8965 2011-08-01 Robert Dewar <dewar@adacore.com>
8967 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8968 lib-xref.adb: Minor reformatting
8970 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8972 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8973 when to generate a call to Move_Final_List.
8974 (Has_Controlled_Parts): Remove this function.
8976 2011-08-01 Geert Bosch <bosch@adacore.com>
8978 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
8981 2011-08-01 Thomas Quinot <quinot@adacore.com>
8983 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
8984 explicit raise of a predefined exception as Comes_From_Source if the
8985 original N_Raise_Statement comes from source.
8987 2011-08-01 Robert Dewar <dewar@adacore.com>
8989 * sinfo.ads: Add comment.
8990 * sem_ch6.adb: Minor reformatting.
8992 2011-08-01 Robert Dewar <dewar@adacore.com>
8994 * freeze.adb (Freeze_Entity): Refine check for bad component size
8995 clause to avoid rejecting confirming clause when atomic/aliased present.
8997 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8999 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9000 better determine whether an entity reference is a write.
9001 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9003 * lib-xref.adb (Output_References): Do no suppress a read reference at
9004 the same location as an immediately preceeding modify-reference, to
9005 handle properly in-out actuals.
9007 2011-08-01 Tristan Gingold <gingold@adacore.com>
9009 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9011 2011-08-01 Quentin Ochem <ochem@adacore.com>
9013 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9014 heap to compute the result.
9016 2011-08-01 Robert Dewar <dewar@adacore.com>
9018 * atree.ads: Minor reformatting.
9020 2011-08-01 Emmanuel Briot <briot@adacore.com>
9022 * g-expect.adb (Get_Command_Output): Fix memory leak.
9024 2011-08-01 Geert Bosch <bosch@adacore.com>
9026 * cstand.adb (P_Float_Type): New procedure to print the definition of
9027 predefined fpt types.
9028 (P_Mixed_Name): New procedure to print a name using mixed case
9029 (Print_Standard): Use P_Float_Type for printing floating point types
9030 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9031 precision IEEE float.
9033 2011-08-01 Thomas Quinot <quinot@adacore.com>
9035 * sem_ch3.adb: Minor reformatting.
9037 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9039 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9040 the completion of a generic function, insert the new body rather than
9041 rewriting the original.
9043 2011-08-01 Yannick Moy <moy@adacore.com>
9045 * sinfo.ads, errout.ads: Typos in comments.
9047 2011-08-01 Robert Dewar <dewar@adacore.com>
9049 * par-endh.adb: Minor reformatting.
9051 2011-08-01 Robert Dewar <dewar@adacore.com>
9053 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9054 (Pre_Post_Aspects): New subtype.
9055 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9056 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9057 * par-ch7.adb (P_Package): Remove Decl parameter
9058 (P_Package): Handle new syntax for aspects (before IS)
9059 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9061 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9062 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9063 (P_Package): Remove Decl parameter
9064 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9066 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9068 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9069 * sinfo.ads: Document new syntax for aspects in packages etc.
9070 * sprint.adb: Handle new syntax of aspects before IS in package
9072 2011-08-01 Thomas Quinot <quinot@adacore.com>
9074 * atree.ads: Minor reformatting.
9075 * sem_prag.adb: Minor reformatting.
9077 2011-08-01 Robert Dewar <dewar@adacore.com>
9079 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9080 case expr alternative.
9082 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9084 * sem_ch12.adb: Fix typo.
9086 2011-08-01 Geert Bosch <bosch@adacore.com>
9088 * sem_prag.adb (Check_No_Link_Name): New procedure.
9089 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9090 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9091 instead of Standard_Long_Long_Float_Size global. Preparation for
9092 eventual removal of per type constants.
9093 * exp_util.ads (Get_Stream_Size): New function returning the stream
9094 size value of subtype E.
9095 * exp_util.adb (Get_Stream_Size): Implement new function.
9096 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9098 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9100 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9102 2011-08-01 Geert Bosch <bosch@adacore.com>
9104 * cstand.adb: Fix comments.
9105 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9108 2011-08-01 Robert Dewar <dewar@adacore.com>
9110 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9112 2011-08-01 Geert Bosch <bosch@adacore.com>
9114 * atree.ads: Fix comment.
9116 2011-08-01 Robert Dewar <dewar@adacore.com>
9118 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9119 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9120 * par.adb: Add with for Namet.Sp.
9121 * par-tchk.adb: Minor reformatting.
9123 2011-08-01 Vincent Celier <celier@adacore.com>
9125 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9126 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9127 of the init procedure of a SAL.
9128 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9131 2011-08-01 Thomas Quinot <quinot@adacore.com>
9133 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9136 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9138 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9140 2011-08-01 Thomas Quinot <quinot@adacore.com>
9142 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9143 conformant with its spec (return True only for types that have
9144 an overriding Initialize primitive operation that prevents them from
9145 having preelaborable initialization).
9146 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9147 initialization for controlled types in Ada 2005 or later mode.
9149 2011-08-01 Robert Dewar <dewar@adacore.com>
9151 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9153 (Same_Aspect): New function.
9154 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9155 Type_Invariant, Precondition, Postcondition.
9156 * snames.ads-tmpl: Add Name_Type_Invariant.
9158 2011-08-01 Robert Dewar <dewar@adacore.com>
9160 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9162 (Freeze_All_Ent): Fix error in handling inherited aspects.
9163 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9164 already analyzed, but don't skip entire processing of a declaration,
9165 that's wrong in some cases of declarations being rewritten.
9166 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9167 Don't delay for integer, string literals
9168 Treat predicates in usual manner for delay, remove special case code,
9170 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9171 (Build_Predicate_Function): Update saved expression in aspect
9172 (Build_Invariant_Procedure): Update saved expression in aspect
9173 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9174 of replacement of discriminant references if the reference is simple.
9176 2011-08-01 Robert Dewar <dewar@adacore.com>
9178 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9179 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9180 Static_Predicate and Dynamic_Predicate.
9181 (Build_Predicate_Function): Add processing for Static_Predicate
9182 and Dynamic_Predicate.
9183 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9184 (From_Static_Predicate): New flag
9185 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9187 2011-08-01 Robert Dewar <dewar@adacore.com>
9189 * usage.adb: Documentation cleanup for Ada version modes in usage.
9190 * expander.adb: Minor reformatting.
9192 2011-08-01 Robert Dewar <dewar@adacore.com>
9194 * atree.ads: Minor comment fix.
9195 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9196 a-witeio.ads, sem_prag.adb: Minor reformatting.
9198 2011-08-01 Doug Rupp <rupp@adacore.com>
9200 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9201 pointers. Use descrip.h header file for convenience. Add some
9204 2011-08-01 Robert Dewar <dewar@adacore.com>
9206 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9207 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9208 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9210 (Check_Aspect_At_End_Of_Declarations): New procedure
9211 (Analye_Aspect_Specification): Minor changes for above procedures
9212 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9213 specification node as well.
9215 2011-08-01 Pascal Obry <obry@adacore.com>
9217 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9218 Windows files. Use GetFilesAttributes() in this case to check for file
9219 existence instead of returning with an error code.
9221 2011-08-01 Vincent Celier <celier@adacore.com>
9223 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9224 High is above Source length.
9226 2011-08-01 Robert Dewar <dewar@adacore.com>
9228 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9230 2011-08-01 Robert Dewar <dewar@adacore.com>
9232 * aspects.ads (Boolean_Aspects): New subtype.
9233 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9234 for derived types in cases where the parent type and derived type have
9236 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9237 with aspects when parent type also has aspects.
9238 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9239 boolean expression at this point).
9240 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9241 accordance with final decision on the Ada 2012 feature.
9242 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9244 2011-08-01 Matthew Heaney <heaney@adacore.com>
9246 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9248 2011-08-01 Pascal Obry <obry@adacore.com>
9250 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9251 Fix Replace_Slice when High is above current string size.
9252 (Replace_Slice): Fix DL computation when High is above current
9255 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9257 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9259 2011-08-01 Matthew Heaney <heaney@adacore.com>
9261 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9264 2011-08-01 Pascal Obry <obry@adacore.com>
9266 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9269 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9271 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9272 access to protected subprograms in generic bodies.
9273 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9274 protected type, indicate that the convention of the subprogram is
9275 Convention_Protected, because it may be used in subsequent declarations
9276 within the protected declaration.
9278 2011-08-01 Vincent Celier <celier@adacore.com>
9280 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9281 and "final" procedures when the name of the library is "ada", to avoid
9282 duplicate symbols "adainit" and "adafinal" in executables.
9284 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9286 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9287 quantified expression that appears within a postcondition and uses the
9288 Ada2012 'Result attribute.
9290 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9292 * init.c (__gnat_error_handler): Cast reason to int.
9293 (__gnat_install_handler): Explain sa_sigaction use.
9295 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9297 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9298 subprogram has copy-in copy-out parameters, try to promote the mode of
9299 the return type if it is passed in registers.
9301 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9303 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9304 left operand as addressable.
9306 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9308 * gcc-interface/gigi.h (build_function_stub): Remove.
9309 (build_return_expr): Likewise.
9310 (convert_vms_descriptor): Declare.
9311 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9312 (build_function_stub): Move to...
9313 * gcc-interface/utils2.c (build_return_expr): Move to...
9314 * gcc-interface/trans.c (build_function_stub): ...here.
9315 (build_return_expr): ...here.
9316 (Subprogram_Body_to_gnu): Add local variable for language_function.
9317 Disconnect the parameter attributes cache, if any, once done with it.
9318 Call end_subprog_body only after setting the end_locus.
9319 Build the stub associated with the function, if any, at the very end.
9320 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9321 variables and streamline control flow.
9323 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9326 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9329 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9332 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9333 Assign to act.sa_sigaction.
9334 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9335 current->return_address to char * before arithmetic.
9337 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9339 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9340 Correct argument types.
9341 Extract code from reason.
9342 (__gnat_install_handler): Assign to act.sa_sigaction.
9344 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9346 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9347 (GNAT1_OBJS): ...here.
9349 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9352 * g-socthi-mingw.adb (Fill): Fix formatting.
9354 * gcc-interface/gigi.h: Move around comment.
9356 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9359 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9361 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9364 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9366 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9368 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9369 range comparison if Pmode is SImode.
9371 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9372 Eric Botcazou <ebotcazou@adacore.com>
9374 * adadecode.c: Wrap up in extern "C" block.
9375 * adadecode.h: Likewise.
9376 * adaint.c: Likewise. Remove 'const' keyword.
9377 * adaint.h: Likewise.
9379 * atree.h: Likewise.
9381 * cstreams.c: Likewise.
9385 * final.c: Likewise.
9387 * initialize.c: Likewise.
9389 * namet.h: Likewise.
9390 * nlists.h: Likewise.
9391 * raise.c: Likewise.
9392 * raise.h: Likewise.
9393 * repinfo.h: Likewise.
9394 * seh_init.c: Likewise.
9395 * targext.c: Likewise.
9396 * tracebak.c: Likewise.
9397 * uintp.h: Likewise.
9398 * urealp.h: Likewise.
9399 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9400 * xsinfo.adb: Likewise.
9401 * xsnamest.adb: Likewise.
9402 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9403 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9404 * gcc-interface/misc.c: Likewise.
9405 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9406 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9407 ada/targext.o here...
9408 (GNAT_ADA_OBJS): ...and not here.
9409 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9410 (GNATBIND_OBJS): Reorder.
9412 2011-07-07 Richard Henderson <rth@redhat.com>
9414 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9415 dwarf2out_frame_init.
9417 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9419 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9421 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9424 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9426 2011-07-06 Richard Guenther <rguenther@suse.de>
9428 * gcc-interface/misc.c (gnat_init): Merge calls to
9429 build_common_tree_nodes and build_common_tree_nodes_2.
9430 Re-initialize boolean_false_node.
9432 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9433 Olivier Hainque <hainque@adacore.com>
9434 Nicolas Setton <setton@adacore.com>
9436 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9437 the type according to the ARTIFICIAL_P parameter.
9438 (create_type_decl): Likewise.
9439 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9441 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9443 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9444 (gnatbind): Likewise.
9446 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9448 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9450 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9452 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9453 local variable throughout. Remove useless call to Base_Type.
9454 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9455 Take it also into account for the volatileness of the field. Set the
9456 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9458 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9460 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9461 on a dereference built for a by-ref object if it has an address clause.
9463 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9465 * einfo.ads (Address_Taken): Document use for the second argument of
9466 Asm_Input and Asm_Output attributes.
9467 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9468 argument is an entity name, then set Address_Taken on it.
9469 <Attribute_Asm_Output>: Likewise.
9470 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9471 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9472 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9473 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9475 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9478 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9480 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9482 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9483 (ada/utils.o): Update dependencies.
9484 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9485 ../../../libcpp/libcpp.a.
9486 * gcc-interface/utils.c: Include common/common-target.h.
9487 (process_attributes): Use targetm_common.have_named_sections.
9489 2011-06-07 Richard Guenther <rguenther@suse.de>
9491 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9494 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9496 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9497 TREE_THIS_NOTRAP flag.
9499 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9501 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9504 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9506 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9507 constants whose full view has discriminants specially.
9509 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9511 * gcc-interface/utils.c: Include diagnostic.h.
9512 (gnat_write_global_declarations): Output debug information for all
9513 global type declarations before finalizing the compilation unit.
9514 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9516 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9518 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9520 2011-05-25 Kai Tietz <ktietz@redhat.com>
9522 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9523 initialization instead of const/none-const pointer assignment.
9525 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9527 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9528 $(EXTRA_GNAT1_OBJS).
9529 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9530 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9531 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9532 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9533 libcommon-target.a instead of prefix.o.
9535 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9538 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9540 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9542 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9543 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9544 instead of version.o.
9546 2011-05-18 Kai Tietz <ktietz@redhat.com>
9548 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9549 boolean_false_node instead of integer_zero_node.
9550 (convert_with_check): Likewise.
9551 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9553 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9555 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9556 type of the parameter is an unconstrained array, convert the actual to
9557 the type of the formal in the In Out and Out cases as well.
9559 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9561 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9562 call build_function_type_array or build_varargs_function_type_array
9564 (create_subprog_type): Don't call build_function_type; call
9565 build_function_type_vec instead.
9567 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9569 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9570 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9571 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9573 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9575 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9577 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9578 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9580 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9582 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9584 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9586 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9587 instead of accessing TYPE_ARG_TYPES directly.
9588 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9590 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9593 * gcc-interface/gigi.h (get_variant_part): Declare.
9594 * gcc-interface/decl.c (get_variant_part): Make global.
9595 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9596 types have the same constant size, are record types and T1 has a
9597 variant part while T2 doesn't.
9599 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9601 * gcc-interface/utils.c (begin_subprog_body): Do not call
9603 (end_subprog_body): Likewise.
9605 2011-05-04 Richard Guenther <rguenther@suse.de>
9607 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9609 (pos_to_constructor): Likewise.
9611 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9612 Eric Botcazou <ebotcazou@adacore.com>
9614 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9615 of build_function_type. Adjust calls to...
9616 (build_raise_check): ...this. Do not take a void_tree parameter.
9617 Call build_function_type_list instead of build_function_type.
9618 Fix head comment and swap couple of conditional blocks.
9620 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9622 * gnatvsn.ads (Library_Version): Bump to 4.7.
9623 (Current_Year): Bump to 2011.
9625 2011-04-29 Michael Matz <matz@suse.de>
9627 * gcc-interface/misc.c (gnat_handle_option): Set
9628 warn_maybe_uninitialized.
9630 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9632 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9633 the Watson/McCabe paper.
9635 2011-04-23 Jim Meyering <meyering@redhat.com>
9637 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9639 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9641 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9644 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9646 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9648 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9649 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9650 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9651 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9652 <all>: Do not set flags on the reused DECL node coming from an alias.
9653 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9654 don't need debug info here...
9655 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9656 (gigi): Adjust calls to create_subprog_decl.
9657 (build_raise_check): Likewise.
9658 (establish_gnat_vms_condition_handler): Likewise.
9659 (Compilation_Unit_to_gnu): Likewise.
9660 (gnat_to_gnu): Likewise.
9662 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9664 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9665 (NO_REORDER_ADAFLAGS): New variable.
9666 (EXTRA_GNATTOOLS): Always define.
9667 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9668 Clean up and adjust list of files compiled with special options.
9669 * gcc-interface/Make-lang.in: Likewise.
9670 (ada/decl.o): Cosmetical change.
9671 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9673 2011-04-20 Jim Meyering <meyering@redhat.com>
9675 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9677 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9679 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9680 $(CFLAGS) on the link line.
9682 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9684 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9685 padded type built for the return type if it is unconstrained.
9687 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9689 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9691 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9693 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9694 before calling TREE_CHAIN.
9695 * gcc-interface/misc.c (gnat_init_ts): New function.
9696 (LANG_HOOKS_INIT_TS): Define.
9698 2011-04-12 Martin Jambor <mjambor@suse.cz>
9700 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9701 instead of cgraph_node.
9703 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9705 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9706 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9709 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9711 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9712 of aggregate types that contain a placeholder.
9714 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9716 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9718 (handle_type_generic_attribute): Likewise.
9720 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9723 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9725 2011-04-04 Kai Tietz <ktietz@redhat.com>
9728 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9731 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9733 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9734 type case, do not strip a padding type around the array type.
9736 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9738 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9741 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9743 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9744 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9745 code for -feliminate-unused-debug-types.
9746 (gnat_post_options): Likewise.
9748 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9750 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9751 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9754 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9756 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9757 DECL_ARTIFICIAL flag on enumeration types.
9759 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9761 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9762 fat pointer types artificial unconditionally.
9763 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9766 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9768 * gcc-interface/gigi.h (get_dummy_type): Declare.
9769 (build_dummy_unc_pointer_types): Likewise.
9770 (finish_fat_pointer_type): Likewise.
9771 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9772 fat pointer type has been built, complete it in place.
9773 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9774 and thin pointers. Remove useless variable.
9775 (finish_fat_pointer_type): Make global and move to...
9776 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9777 (get_dummy_type): New function.
9778 (build_dummy_unc_pointer_types): Likewise.
9779 (gnat_pushdecl): Propage the name to the anonymous variants only.
9780 (update_pointer_to): Only adjust the pointer types in the unconstrained
9783 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9785 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9786 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9787 if this is a Taft amendment type and the full declaration is available.
9788 * gcc-interface/trans.c (process_type): Likewise.
9789 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9790 (process_freeze_entity): Likewise.
9791 * gcc-interface/utils.c (dummy_global): New static variable.
9792 (gnat_write_global_declarations): If there are types declared as used
9793 at the global level, insert them in the global hash table.
9795 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9797 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9798 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9799 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9801 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9802 flag of the type accordingly.
9803 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9805 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9807 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9808 finalizing types when updating the pointers to the designated type.
9809 <all>: Finalize the deferred types even if we didn't defer processing
9810 of incomplete types in this invocation.
9812 2011-04-01 Olivier Hainque <hainque@adacore.com>
9813 Nicolas Setton <setton@adacore.com>
9814 Eric Botcazou <ebotcazou@adacore.com>
9816 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9817 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9819 2011-03-28 Kai Tietz <ktietz@redhat.com>
9821 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9823 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9824 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9826 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9828 2011-03-28 Tristan Gingold <gingold@adacore.com>
9831 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9832 Use ada output of gnatbind.
9833 (ada/b_gnatb.adb): Ditto.
9834 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9835 (ada.mostlyclean, ada.stage1)
9836 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9837 (ada.stagefeedback): Adjust.
9838 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9839 Use ada output of gnatbind.
9840 (b_gnatm.adb): Ditto.
9841 (b_gnatl.o, b_gnatm.o): New rules.
9843 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9845 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9846 for the padded type built to support a specified size or alignment.
9848 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9850 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9851 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9852 unconditionally to the end of the unit when the designated type is
9854 <all>: Rename local variable. Attempt to un-defer types only and do it
9855 for limited_with'ed types as well.
9856 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9857 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9858 consistently and remove redundant call to finalize_from_with_types.
9860 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9862 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9863 subprograms without a previous spec declared in the same unit.
9864 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9865 subprograms at the end of the unit instead of at the beginning.
9866 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9867 isn't public for the special handling of non-inline functions nested
9868 inside inline external functions.
9870 2011-03-25 Jeff Law <law@redhat.com>
9872 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9874 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9876 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9877 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9878 to compute Set_Size_Depends_On_Discriminant.
9879 (Layout_Type): Call it on array types in back-end layout mode.
9880 * sem_util.adb (Requires_Transient_Scope): Return true for array
9881 types only if the size depends on the value of discriminants.
9882 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9883 type if the RHS is a call to a function that returns an unconstrained
9884 type with default discriminant.
9886 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9888 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9889 non-conversion to the nominal result type at the end.
9891 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9893 * gcc-interface/trans.c (create_temporary): New function taken from...
9894 (create_init_temporary): ...here. Call it.
9895 (call_to_gnu): Create the temporary for the return value early, if any.
9896 Create it for a function with copy-in/copy-out parameters if there is
9897 no target; in other cases of copy-in/copy-out, use another temporary.
9898 Push the new binding level lazily. Add and rename local variables.
9900 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9902 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9904 (set_rm_size): Likewise.
9906 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9908 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9909 for the padded type built in order to support a specified alignment.
9910 Fix incorrect formatting.
9912 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9915 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9917 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9919 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9920 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9921 to the end of the list. Adjust recursive call. Rename local variable.
9922 If REORDER is true, reorder components of the record type.
9923 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9924 components_to_record and adjust the parameter list.
9926 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9928 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9929 disabled, use the variable for bounds of loop iteration scheme.
9931 2011-03-21 Kai Tietz <ktietz@redhat.com>
9934 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9936 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9938 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9939 out whether the expression is read-only. Short-circuit placeholder
9940 case and rename a couple of local variables.
9942 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9944 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9945 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9946 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9947 (convert): Deal with conversions from a smaller form type specially.
9949 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9951 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9952 its argument, except for the special -I- switch.
9954 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9956 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9959 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9961 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9963 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9965 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9967 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9968 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9969 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9970 Do not generate the check directly, instead instantiate the template
9971 check present in the descriptor.
9972 (make_descriptor_field): Move around.
9973 (build_vms_descriptor32): Build a template check in the POINTER field.
9974 (build_vms_descriptor): Remove useless suffixes.
9975 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9977 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9980 * targext.c: Include target files if IN_RTS is defined.
9982 2011-01-26 Richard Guenther <rguenther@suse.de>
9985 * targext.c: Include config.h.
9986 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
9989 2011-01-04 Pascal Obry <obry@adacore.com>
9990 Eric Botcazou <ebotcazou@adacore.com>
9992 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
9994 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
9996 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
9997 end-of-case on the end label and its associated gotos, if any.
9999 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10001 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10002 expressions of the parameter cache within the statement group of
10003 the CICO mechanism.
10005 2011-01-04 Olivier Hainque <hainque@adacore.com>
10006 Eric Botcazou <ebotcazou@adacore.com>
10008 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10009 (set_end_locus_from_node): New function.
10010 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10011 make and the function end_locus.
10012 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10013 for the elaboration subprogram.
10014 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10015 set the end_locus of the expression as well.
10017 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10020 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10021 variables that are referenced in exception handlers volatile.
10025 Copyright (C) 2011 Free Software Foundation, Inc.
10027 Copying and distribution of this file, with or without modification,
10028 are permitted in any medium without royalty provided the copyright
10029 notice and this notice are preserved.