1 2011-08-05 Robert Dewar <dewar@adacore.com>
3 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
4 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
6 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
8 2011-08-05 Bob Duff <duff@adacore.com>
10 * a-stunau.ads, g-spipat.adb: Update comments.
12 2011-08-05 Bob Duff <duff@adacore.com>
14 * a-fihema.ads: Minor comment fix.
15 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
17 (Attach, Detach): Remove some unnecessary code.
18 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
20 2011-08-05 Bob Duff <duff@adacore.com>
22 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
23 allocation for Objects component. This simplifies the code somewhat. It
24 is also a little more efficient in the not-so-unusual case where there
25 are no controlled objects allocated.
26 Make Finalization_Started flag atomic.
27 (Finalize): Avoid unnecessary detachment of items from the list.
28 (pcol): Minor cleanup.
30 2011-08-05 Ed Schonberg <schonberg@adacore.com>
32 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
33 package whose name is the same as that of the generic unit, or its
36 2011-08-05 Bob Duff <duff@adacore.com>
38 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
39 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
42 2011-08-05 Arnaud Charlet <charlet@adacore.com>
44 * make.adb (Linking_Phase): No longer need to set source search path
45 before calling gnatlink in CodePeer mode.
46 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
47 gcc in CodePeer mode, since the binder generated file no longer has a
49 * switch.ads, switch.adb (Is_Language_Switch): Removed.
50 * switch-c.adb: Update comment.
52 2011-08-05 Thomas Quinot <quinot@adacore.com>
54 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
56 2011-08-05 Nicolas Roche <roche@adacore.com>
58 * gnat_ugn.texi: Fix minor syntax error issue.
60 2011-08-05 Vincent Celier <celier@adacore.com>
62 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
63 delete or close the file when the call to gnatmake returns a non
64 successful return code.
66 2011-08-05 Ed Schonberg <schonberg@adacore.com>
68 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
69 check, indicate that the copy of the original node does not come from
70 source, to prevent an infinite recursion of the expansion.
72 2011-08-05 Johannes Kanig <kanig@adacore.com>
74 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
75 VC generation for subprogram bodies.
77 2011-08-05 Yannick Moy <moy@adacore.com>
80 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
81 the base type with the smallest allowed base type.
83 2011-08-05 Sergey Rybin <rybin@adacore.com>
85 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
88 2011-08-05 Ed Schonberg <schonberg@adacore.com>
90 * sem_ch12.ads: minor comment updates.
92 2011-08-05 Ed Schonberg <schonberg@adacore.com>
94 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
95 instantiation and a formal package the compiler generates a package
96 renaming declaration so that the generic name within the declaration
97 is interpreted as a renaming of the instance. At the end of a formal
98 package declaration, this renaming must become invisible.
100 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
102 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
103 comparison and rely on concrete entities instead.
105 2011-08-05 Ed Schonberg <schonberg@adacore.com>
107 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
108 and discriminants, to indicate that the type has an access discriminant
109 that supports implicit dereference.
110 * snames.ads-tmpl: Add names of aspects and attributes related to
111 Ada2012 iterators: constant_indexing, default_iterator,
112 iterator_element, implicit_dereference, variable_indexing.
113 * aspects.ads, aspects.adb: entries for iterator-related aspects.
114 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
115 iterator-related aspects.
116 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
118 2011-08-05 Sergey Rybin <rybin@adacore.com>
120 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
121 metrics in gnatmetric to cover new kinds of coupling mentrics.
123 2011-08-05 Steve Baird <baird@adacore.com>
125 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
126 of calling the user-defined main subprogram.
127 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
128 is set) Call_Main_Subprogram ahead of, as opposed to
130 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
131 generation of a "with" of the user-defined main subprogram.
132 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
133 (which is now called from Gen_Main instead).
135 2011-08-05 Emmanuel Briot <briot@adacore.com>
137 * projects.texi: Added reference to the Makefile package.
139 2011-08-05 Thomas Quinot <quinot@adacore.com>
141 * exp_ch7.adb: Minor comment rewording.
143 2011-08-05 Ed Falis <falis@adacore.com>
145 * env.c: Fix comment.
147 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
149 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
150 character comparison and rely on concrete entities instead.
152 2011-08-05 Ed Schonberg <schonberg@adacore.com>
154 * sem_ch3.adb: (Check_Private_Overriding): better error message,
155 suggested by AI95-0068.
157 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
159 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
160 the two potential initialization calls. This accounts for any
161 access-before-elaboration checks which may precede the initialization
163 (Next_Suitable_Statement): New routine. Returns the next real statement
164 after the input node while skipping generated checks.
165 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
166 with comment on usage.
167 Do not generate Elaborate_All when the trigger is a finalization call
168 coming from a type init proc.
169 (Check_Elab_Call): Propagate the initialization procedure context to
170 subsequent calls to Check_A_Call.
171 (Check_Internal_Call_Continue): Propagate the initialization procedure
172 context to subsequent calls to Check_Elab_Call.
173 (Is_Finalization_Procedure): New routine. Returns True if the input
174 entity denotes a [Deep_]Finalize routine.
175 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
176 along with comment on usage.
178 2011-08-05 Vadim Godunko <godunko@adacore.com>
180 * s-atocou.ads: Add list of supported platforms.
182 2011-08-05 Yannick Moy <moy@adacore.com>
184 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
186 * opt.ads (Disable_ALI_File): new Boolean flag
187 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
189 2011-08-05 Ed Falis <falis@adacore.com>
191 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
192 environ is properly defined.
194 2011-08-05 Vincent Celier <celier@adacore.com>
196 * make.adb (Compilation_Phase): Exit immediately when all objects have
197 been found up to date, to avoid multiple exit messages.
198 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
199 same project for languages with no compiler.
200 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
202 2011-08-05 Robert Dewar <dewar@adacore.com>
204 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
205 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
206 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
207 s-atocou-builtin.adb: Minor reformatting.
209 2011-08-05 Yannick Moy <moy@adacore.com>
211 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
212 if the node to wrap is a pragma check, this node and enclosed
213 expression are not expanded, so do not apply any transformations here.
214 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
215 introducing transient scopes.
217 2011-08-05 Jose Ruiz <ruiz@adacore.com>
219 * adaint.c (__gnat_set_writable, __gnat_set_readable,
220 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
221 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
222 routine is available, so we use the default implementation of these
224 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
225 support for copying attributes on VxWorks 6.
227 2011-08-05 Yannick Moy <moy@adacore.com>
229 * debug.adb: Remove use of -gnatd.D.
230 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
231 * opt.ads: Simplify variables for ALFA mode, to keep one only
232 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
235 2011-08-05 Vincent Celier <celier@adacore.com>
237 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
238 Builder'Default_Switches.
240 2011-08-05 Vincent Celier <celier@adacore.com>
242 * makeusg.adb: Add lines for --create-map-file switches.
244 2011-08-05 Ed Schonberg <schonberg@adacore.com>
246 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
247 profile is incomplete and the full view is available, replace it with
249 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
250 incomplete, freezing the subprogram is delayed until the full view is
252 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
253 fixed-point multiplication operator and the predefined operator is
254 resolved in favor of the user-defined one.
256 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
258 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
261 2011-08-04 Ed Schonberg <schonberg@adacore.com>
263 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
264 whether a type lacks user-defined Read or Write operations, or has a
265 component that lacks them.
266 * sem_attr.adb (Check_Stream_Attribute): if restriction
267 No_Default_Stream_Attributes is active, verify that all subcomponent
268 types of the target have user-defined stream operations, and report
270 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
271 * exp_strm.adb: Build_Elementary_Input_Call,
272 Build_Elementary_Write_Call): remove checks for restriction
273 No_Default_Stream_Attributes, now checked in semantics.
275 2011-08-04 Vincent Celier <celier@adacore.com>
277 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
278 switches on the command line, look for all valid --RTS switches in the
279 Builder switches and for each language use the first runtime name found
281 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
282 command line and there is no auto-configuration.
283 (Runtime_Name_Set_For): New function.
285 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
287 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
288 elaborate initialization expression for variable Abort when processing
289 a package body or a declaration.
290 (Create_Finalizer): Propagate the package context when creating the
291 exception-related variables.
292 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
293 For_Package along with usage comment.
295 2011-08-04 Arnaud Charlet <charlet@adacore.com>
297 * gcc-interface/Makefile.in: Clean up targets.
298 Enable new package for atomic counters and copy-on-write implementation
299 of unbounded strings on x86 platforms.
300 * gcc-interface/Make-lang.in: Update dependencies.
302 2011-08-04 Robert Dewar <dewar@adacore.com>
304 * exp_ch7.adb: Minor reformatting.
306 2011-08-04 Robert Dewar <dewar@adacore.com>
308 * exp_strm.adb: Minor reformatting.
310 2011-08-04 Vadim Godunko <godunko@adacore.com>
312 * s-atocou.adb: Replace by dummy version and use on targets where atomic
313 operations are not supported.
314 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
315 * s-atocou-x86.adb: New file.
316 * Makefile.rtl: Add s-atocou.o file
318 2011-08-04 Arnaud Charlet <charlet@adacore.com>
320 * make.adb (Compile): Move setting of CodePeer_Mode to ...
321 (Compilation_Phase): ... here.
322 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
324 2011-08-04 Thomas Quinot <quinot@adacore.com>
326 * Make-generated.in: Fix minor typo in comment.
328 2011-08-04 Thomas Quinot <quinot@adacore.com>
330 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
333 2011-08-04 Robert Dewar <dewar@adacore.com>
335 * a-coinho.adb: Minor reformatting.
337 2011-08-04 Robert Dewar <dewar@adacore.com>
339 * a-coinho.ads: Minor reformatting.
341 2011-08-04 Vadim Godunko <godunko@adacore.com>
343 * s-atocou.ads, s-atocou.adb: New files.
344 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
345 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
346 direct use of GCC's atomic builtins and replace them by use of new
347 atomic counter package.
349 2011-08-04 Ed Schonberg <schonberg@adacore.com>
351 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
353 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
355 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
356 with a call to Get_External_Tag.
357 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
358 subprogram usage. Remove the guard against package declarations and
359 bodies since Build_Cleanup_Statements is no longer invoked in that
361 (Build_Components): Initialize Tagged_Type_Stmts when the context
362 contains at least one library-level tagged type.
363 (Build_Finalizer): New local variables Has_Tagged_Types and
364 Tagged_Type_Stmts along with associated comments on usage. Update the
365 logic to include tagged type processing.
366 (Create_Finalizer): Insert all library-level tagged type unregistration
367 code before the jump block circuitry.
368 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
369 (Expand_N_Package_Declaration): Remove the call to
370 Build_Cleanup_Statements.
371 (Process_Tagged_Type_Declaration): New routine. Generate a call to
372 unregister the external tag of a tagged type.
373 (Processing_Actions): Reimplemented to handle tagged types.
374 (Process_Declarations): Detect the declaration of a library-level
375 tagged type and carry out the appropriate actions.
376 (Unregister_Tagged_Types): Removed. The machinery has been directly
377 merged with Build_Finalizer.
379 2011-08-04 Robert Dewar <dewar@adacore.com>
381 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
382 gnatls.adb, exp_ch3.adb: Minor reformatting.
384 2011-08-04 Marc Sango <sango@adacore.com>
386 * sem_attr.adb (Analyze_Attribute): Replace the message
387 "invisible attribute of}" of the spark restriction violation in
388 attribute reference by the simple message "invisible attribute of type".
389 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
390 two insertion characters: '&' and '}'.
392 2011-08-04 Vadim Godunko <godunko@adacore.com>
394 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
395 * a-coinho.ads, a-coinho.adb: New file.
396 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
398 2011-08-04 Nicolas Roche <roche@adacore.com>
400 * alfa_test.adb: Not all ali files are containing alfa information even
401 if compiled with -gnatd.F. So suppress warning about missing ALFA
404 2011-08-04 Yannick Moy <moy@adacore.com>
406 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
408 * put_alfa.adb: Check that scope name is not empty.
410 2011-08-04 Ed Schonberg <schonberg@adacore.com>
412 * exp_ch3.adb (Stream_Operation_Ok): new predicate
413 Needs_Elementary_Stream_Operation, to determine whether user-defined
414 Read and Write attributes are available for the elementary components
415 of the given type. If only the predefined attributes are available,
416 then when restriction No_Default_Stream_Attributes is active the
417 predefined stream attributes for the composite type cannot be created.
419 2011-08-04 Robert Dewar <dewar@adacore.com>
421 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
422 Put routines in alpha order
424 2011-08-04 Jose Ruiz <ruiz@adacore.com>
426 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
427 * gcc-interface/Make-lang.in: Update dependencies.
429 2011-08-04 Arnaud Charlet <charlet@adacore.com>
431 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
432 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
435 2011-08-04 Robert Dewar <dewar@adacore.com>
437 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
438 lib-xref-alfa.adb: Minor reformatting.
440 2011-08-04 Marc Sango <sango@adacore.com>
442 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
443 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
444 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
447 2011-08-04 Tristan Gingold <gingold@adacore.com>
449 * bindgen.adb (Gen_Adainit_C): Remove.
450 (Gen_Adafinal_C): Ditto.
451 (Gen_Elab_Externals_C): Ditto.
452 (Gen_Elab_Calls_C): Ditto.
453 (Gen_Elab_Order_C): Ditto.
454 (Gen_Elab_Defs_C): Ditto.
455 (Gen_Finalize_Library_C): Ditto.
456 (Gen_Finalize_Library_Defs_C): Ditto.
458 (Gen_Output_File_C): Ditto.
459 (Gen_Restrictions_C): Ditto.
460 (Gen_Versions_C): Ditto.
461 (Write_Info_Ada_C): Ditto.
462 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
463 (Gen_Output_File): Do not force Ada_Bind_File anymore.
464 Always call Gen_Output_File_Ada.
465 * gnatlink.adb (Begin_Info): Now a constant.
467 (Ada_Bind_File): Remove
468 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
469 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
470 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
471 * opt.ads (Ada_Bind_File): Remove.
473 2011-08-04 Thomas Quinot <quinot@adacore.com>
475 * projects.texi: Document target-specific directory in default project
478 2011-08-04 Thomas Quinot <quinot@adacore.com>
480 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
483 2011-08-04 Yannick Moy <moy@adacore.com>
485 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
486 opt.ads, lib-xref.ads: Code clean up.
488 2011-08-04 Yannick Moy <moy@adacore.com>
490 * gnat_rm.texi: Update description of Test_Case
491 * gnat_ugn.texi: Typo.
493 2011-08-04 Ed Falis <falis@adacore.com>
495 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
497 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
499 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
500 it is of type Root_Controlled. This action eliminates fields Prev and
501 Next from type equality.
503 2011-08-04 Yannick Moy <moy@adacore.com>
505 * lib-xref-alfa.adb: Correct typo.
507 2011-08-04 Matthew Heaney <heaney@adacore.com>
509 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
512 2011-08-04 Yannick Moy <moy@adacore.com>
514 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
515 (Analyze_Pragma): allow static string expression for name of Test_Case,
516 instead of simply string literals.
517 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
520 2011-08-04 Vincent Celier <celier@adacore.com>
522 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
523 case suffixes to find truncated main sources.
525 2011-08-04 Tristan Gingold <gingold@adacore.com>
527 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
528 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
529 (Compute_Current_Task): Ditto.
531 2011-08-04 Tristan Gingold <gingold@adacore.com>
533 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
535 2011-08-04 Yannick Moy <moy@adacore.com>
537 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
538 library-level constant.
539 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
540 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
541 used as selector of parameter association, in ALFA mode.
543 2011-08-04 Robert Dewar <dewar@adacore.com>
545 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
546 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
549 2011-08-04 Arnaud Charlet <charlet@adacore.com>
551 * make.adb (Linking_Phase): Set source search path before calling
552 gnatlink in CodePeer mode.
554 2011-08-04 Javier Miranda <miranda@adacore.com>
556 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
557 Remove code which takes care of building TSDs.
558 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
559 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
560 the accessibility check in VM targets.
561 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
562 (Building_Static_DT): Now returns false for VM targets.
563 (Build_VM_TSDs): Removed.
564 (Expand_Interface_Conversion): Generate missing runtime check for
565 conversions to interface types whose target type is unknown at compile
567 (Make_VM_TSD): Add missing code to disable the generation of calls to
568 Check_TSD if the tagged type is not defined at library level, or not
569 has a representation clause specifying its external tag, or -gnatdQ is
571 * exp_disp.ads (Build_VM_TSDs): Removed.
572 (Make_VM_TSDs): Spec relocated from exp_disp.adb
573 * sem_disp.adb (Check_Dispatching_Operation): No code required to
574 register primitives in the dispatch tables in VM targets.
575 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
576 initialization of class-wide interface objects in VM targets.
577 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
580 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
582 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
583 when dotnet-ld cannot be found.
585 2011-08-04 Arnaud Charlet <charlet@adacore.com>
587 * bindgen.adb: Simplify significantly generation of binder body file in
589 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
590 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
593 2011-08-04 Yannick Moy <moy@adacore.com>
595 * sem_prag.adb, sem.ads: Code cleanup.
597 2011-08-04 Tristan Gingold <gingold@adacore.com>
599 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
600 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
602 * s-stusta.adb (Print): Adjust after changes in s-stausa.
603 * gnat_ugn.texi: Update dynamic stack usage section.
605 2011-08-04 Steve Baird <baird@adacore.com>
607 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
608 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
609 contains only a call to the user-defined main subprogram.
610 (Gen_Main_Ada) - If CodePeer_Mode is set, then
611 call the "wrapper" subprogram instead of directly
612 calling the user-defined main subprogram.
614 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
616 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
617 alternatives of a case statement for controlled objects. Rename local
618 variable A to Dead_Alt.
619 (Expand_N_If_Statement): Check the then and else statements of an if
620 statement for controlled objects. Check the then statements of all
621 elsif parts of an if statement for controlled objects.
622 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
624 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
625 detects a loop associated with the expansion of an array object.
626 Augment the processing of the loop statements to account for a possible
627 wrap done by Process_Statements_For_Controlled_Objects.
628 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
629 statements and abortable part of an asynchronous select for controlled
631 (Expand_N_Conditional_Entry_Call): Check the else statements of a
632 conditional entry call for controlled objects.
633 (Expand_N_Selective_Accept): Check the alternatives of a selective
634 accept for controlled objects.
635 (Expand_N_Timed_Entry_Call): Check the entry call and delay
636 alternatives of a timed entry call for controlled objects.
637 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
638 exception handler for controlled objects.
639 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
640 Add formal parameter Nested_Constructs along with its associated
642 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
643 Requires_Cleanup_Actions.
644 (Process_Statements_For_Controlled_Objects): New routine.
645 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
646 routine. Inspect a node which contains a non-handled sequence of
647 statements for controlled objects. If such an object is found, the
648 statements are wrapped in a block.
650 2011-08-04 Bob Duff <duff@adacore.com>
652 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
653 need to compare with Class_Wide_Type (T2), in order to get at the
654 original class-wide type node.
655 * sem_type.ads (Covers): Improve the comment.
656 * einfo.ads (Class_Wide_Type): Improve the comment.
657 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
658 the type of the Deref.
660 2011-08-04 Yannick Moy <moy@adacore.com>
662 * gnat_rm.texi: Document that Test_Case pragma can only appear on
663 separate declarations.
664 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
665 check identifier of pragma argument.
666 (Chain_TC): check that no other test case associated to the same entity
668 (Check_Test_Case): disallow test case inside subprogram body
669 (Analyze_Pragma): correct call to check identifier and not argument
670 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
671 function gets name from test case pragma.
673 2011-08-04 Yannick Moy <moy@adacore.com>
675 * gnat_rm.texi: Document new pragma and aspect.
676 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
677 (No_Duplicates_Allowed): new constant array defining whether duplicates
678 aspects of each kind can appear on the same declaration.
679 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
680 field, which points to a node holding the previous Spec_PPC_List.
681 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
682 through the indirection with Contract.
683 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
684 * par-prag.adb (Prag): do nothing on Test_Case pragma
685 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
687 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
688 component Ensures of Test_Case.
689 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
690 (Analyze_Generic_Subprogram_Declaration,
691 Analyze_Subprogram_Instantiation,
692 Analyze_Abstract_Subprogram_Declaration,
693 Analyze_Subprogram_Body_Helper,
694 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
695 insert contract in subprogram node at point of definition
697 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
698 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
700 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
701 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
702 similar to the analysis of pre/post
703 (Derive_Subprogram): insert contract in subprogram node at point of
705 * sem_prag.adb, sem_prag.ads
706 (Check_Arg_Is_String_Literal, Check_Identifier):
707 new checking procedures to be called in treatment of pragmas
708 (Check_Test_Case): new procedure to check that a Test_Case aspect or
709 pragma is well-formed. This does not check currently that 'Result is
710 used only in the Ensures component of a Test_Case.
711 (Analyze_Pragma): add case for Test_Case
712 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
713 components of a Test_Case.
714 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
715 expressions in the 3rd (and 4th if present) arguments of a Test_Case
716 pragma, treated as spec expressions.
717 (Sig_Flags): add value -1 for Test_Case.
718 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
719 Get_Requires_From_Test_Case_Pragma): getters for both expression
720 components of a Test_Case.
721 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
722 indirection between an entry or [generic] subprogram entity and its
723 pre/post + test-cases.
724 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
725 get/set for fields of an N_Contract node.
726 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
727 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
728 names and pragma for Test_Case.
729 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
731 2011-08-04 Vincent Celier <celier@adacore.com>
733 * gnat_ugn.texi: Improve documentation of gnatmake switch
736 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
738 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
739 type). Initialize Atyp to the appropriate type which is later checked
740 for completion. Rewrite the assertion associated with private type
743 2011-08-04 Ed Falis <falis@adacore.com>
745 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
746 initialize the number of CPUs.
748 2011-08-04 Ed Schonberg <schonberg@adacore.com>
750 * sem_type.adb (Disambiguate): New subsidiary routine
751 In_Same_Declaration_List, to implement AI05-0020: a user-defined
752 equality on an anonymous access type whose designated type is private
753 does not lead to an ambiguity with the universal access equality
754 operator in the body or child units of the defining package. The same
755 is true for a multiplication operator on a private type completed with
758 2011-08-04 Javier Miranda <miranda@adacore.com>
760 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
761 (Normalize_Scalars_Config): Removed.
763 (Register_Opt_Config_Switches): Remove registering config values of
764 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
765 (Restore_Opt_Config_Switches): Remove code which restores the values of
766 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
767 Init_Or_Norm_Scalars.
768 (Save_Opt_Config_Switches): Remove code which saves values of
769 Init_Or_Norm_Scalars and Normalize_Scalars.
770 (Set_Opt_Config_Switches): Remove code which restores config values of
771 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
772 Init_Or_Norm_Scalars.
774 2011-08-04 Yannick Moy <moy@adacore.com>
776 * frontend.adb (Frontend): remove previous patch to avoid full
777 qualification in ALFA mode.
778 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
779 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
780 unique name for an entity, which could be used to identify the entity
781 across compilation units.
783 2011-08-04 Thomas Quinot <quinot@adacore.com>
786 (Initialize_Default_Project_Path): Add target specific directory
787 ($prefix/$target/lib/gnat) in front of project path in all cases
788 (making gnatmake's behaviour consistent with gprbuild).
789 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
790 Pass target name from Sdefault to project subsystem.
791 * gnatls.adb: Show new target specific default project directory.
793 2011-08-04 Johannes Kanig <kanig@adacore.com>
795 * cstand.adb: Add Information to Identifier in Standard
796 (Identifer_For): Set Entity to the corresponding entity
798 2011-08-04 Sergey Rybin <rybin@adacore.com>
800 * gnat_ugn.texi: Update doc on gnatcheck.
802 2011-08-04 Yannick Moy <moy@adacore.com>
804 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
807 2011-08-04 Yannick Moy <moy@adacore.com>
809 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
810 performing expansion.
811 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
812 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
813 it is not called in ALFA mode.
815 2011-08-04 Emmanuel Briot <briot@adacore.com>
817 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
818 after all, so removed.
820 2011-08-04 Sergey Rybin <rybin@adacore.com>
822 * vms_data.ads: Add missing VMS qualifiers.
824 2011-08-04 Emmanuel Briot <briot@adacore.com>
826 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
827 the list of files on the command line after processing it through
830 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
832 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
833 processing for .NET/JVM. These targets can now benefit from
834 Raise_From_Controlled_Operation and they share the same processing with
836 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
837 These targets need transient scopes in order to properly finalize short
838 lived controlled objects.
839 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
840 NET/JVM. These targets can now benefit from
841 Raise_From_Controlled_Operation and they share the same processing with
844 2011-08-04 Geert Bosch <bosch@adacore.com>
846 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
848 2011-08-04 Ed Schonberg <schonberg@adacore.com>
850 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
851 Expand_Record_Aggregate, to determine whether aggregate must be
852 expanded into assignments. This is the case if the ancestor part is
853 private, regarless of the setting of the flag Has_Private_Ancestor.
855 2011-08-04 Ed Falis <falis@adacore.com>
857 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
859 2011-08-04 Bob Duff <duff@adacore.com>
861 * sinfo.ads: Fix comment.
863 2011-08-04 Steve Baird <baird@adacore.com>
865 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
866 choose a package name in much the same way as is
867 done for JGNAT when VM_Target /= No_VM, except that
868 a slightly more distinctive prefix string is used.
870 2011-08-04 Emmanuel Briot <briot@adacore.com>
872 * makeutl.adb (Complete_Mains): no longer accept unit names on the
873 gnatmake command line.
874 This behavior was never documented (and was supported only because of
875 an early bug in the code). This case might lead to ambiguous cases
876 (between unit names and truncated base names without suffixes).
878 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
880 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
881 Remove the external tag of a tagged type from the internal hash table.
882 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
883 expanded usage of the routine. Strenghten the check for Is_Master. Add
884 processing for tagged types.
885 (Build_Finalizer): Create all the necessary lists used in finalizer
886 creation when the processed context is a package that may contain
888 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
889 Requires_Cleanup_Actions.
890 (Expand_N_Package_Body): Package bodies may need clean up code
891 depending on whether they contain tagged types.
892 (Expand_N_Package_Declaration): Package declarations may need clean up
893 code depending on whether they contain tagged types.
894 (Unregister_Tagged_Types): New routine. Search through a list of
895 declarations or statements, looking for non-abstract Ada tagged types.
896 For each such type, generate code to unregister the external tag.
897 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
898 Requires_Cleanup_Actions.
899 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
900 through a list of declarations or statements looking for non-abstract
901 Ada tagged types or controlled objects.
902 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
903 Requires_Cleanup_Actions.
904 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
905 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
908 2011-08-04 Vincent Celier <celier@adacore.com>
910 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
911 has Ada sources, not project Project, because if the root project
912 Project has no sources of its own, all projects will be deemed without
915 2011-08-04 Gary Dismukes <dismukes@adacore.com>
917 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
918 of the No_Param_Proc acc-to-subp type used for initialization of
919 __gnat_finalize_library_objects so that it's declared at library level
920 rather than nested inside of the adainit routine.
922 2011-08-04 Javier Miranda <miranda@adacore.com>
924 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
925 if the tagged type has a representation clause which specifies its
928 2011-08-04 Ed Schonberg <schonberg@adacore.com>
930 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
931 Remove previous procedure with that name.
932 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
934 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
935 subtype mark, the ancestor cannot have unknown discriminants.
936 (Resolve_Record_Aggregate): if the type has invisible components
937 because of a private ancestor, the aggregate is illegal.
939 2011-08-04 Vincent Celier <celier@adacore.com>
941 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
942 account switches -gnat2005, -gnat12 and -gnat2012.
944 2011-08-04 Bob Duff <duff@adacore.com>
946 * s-tasdeb.ads: Minor comment fix.
948 2011-08-04 Arnaud Charlet <charlet@adacore.com>
950 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
952 * switch.ads, switch.adb (Is_Language_Switch): New function.
954 2011-08-04 Vincent Celier <celier@adacore.com>
956 * switch-c.adb: Minor comment addition.
958 2011-08-04 Vincent Celier <celier@adacore.com>
960 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
961 ending with '=' is followed by a space (missing file name).
963 2011-08-04 Pascal Obry <obry@adacore.com>
965 * g-regist.ads: Fix size of HKEY on x86_64-windows.
967 2011-08-04 Ed Schonberg <schonberg@adacore.com>
969 * sem_ch12.adb (Analyze_Associations): New routine
970 Check_Overloaded_Formal_Subprogram to reject a formal package when
971 there is a named association or a box initialisation for an overloaded
972 formal subprogram of the corresponding generic.
974 2011-08-04 Yannick Moy <moy@adacore.com>
976 * alfa.ads (ALFA_Xref_Record): add component for type of entity
977 * get_alfa.adb, put_alfa.adb: Read and write new component of
979 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
981 2011-08-04 Pascal Obry <obry@adacore.com>
983 * urealp.adb: Minor reformatting.
985 2011-08-04 Tristan Gingold <gingold@adacore.com>
987 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
988 Handle the case when Cleanup_Protected_Object returns Empty.
990 2011-08-04 Yannick Moy <moy@adacore.com>
992 * frontend.adb (Frontend): only qualify names in non-ALFA mode
994 2011-08-04 Ed Schonberg <schonberg@adacore.com>
996 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
997 call, ignore functions.
999 2011-08-04 Geert Bosch <bosch@adacore.com>
1001 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1004 2011-08-04 Emmanuel Briot <briot@adacore.com>
1006 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1007 as an index for Builder'Switches. This conforms to the documentation.
1008 * make.adb (Insert_Project_Sources): avoid duplicate code
1010 2011-08-04 Emmanuel Briot <briot@adacore.com>
1012 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1013 name on the command line (for instance "../dummy"), never assume it can
1016 2011-08-04 Tristan Gingold <gingold@adacore.com>
1018 * bindgen.adb: Remove code the reference or create the
1019 Break_Start/__gnat_break_start procedure.
1020 * s-stalib.adb (Break_Start): Removed.
1022 2011-08-04 Emmanuel Briot <briot@adacore.com>
1024 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1025 shared with gprbuild.
1027 2011-08-04 Yannick Moy <moy@adacore.com>
1029 * par-ch4.adb (P_Primary): preferentially issue an error message about
1030 a missing parenthesis arount a conditional or case expression in Ada
1031 2012 mode, if we detect that the alignment is not correct for a
1034 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1036 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1037 tag-to-class-wide conversion as needing finalization actions.
1038 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1039 a tag-to-class-wide conversion as needing finalization actions.
1040 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1041 conversion does not need finalization actions.
1042 (Is_Tag_To_CW_Conversion): New routine.
1043 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1044 whether an object is the result of a tag-to-class-wide conversion.
1046 2011-08-04 Yannick Moy <moy@adacore.com>
1048 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1049 the left-hand-side and right-hand-side of a conjunct are inserted when
1050 translating a pre- or postcondition
1051 * sem_ch6.adb: Correct typo in comment
1053 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1055 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1056 Unchecked_Conversion and Unchecked_Deallocation.
1058 2011-08-04 Thomas Quinot <quinot@adacore.com>
1060 * make.adb: Minor reformatting.
1062 2011-08-04 Emmanuel Briot <briot@adacore.com>
1064 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1065 sources in the project and its imported projects, but not in the whole
1068 2011-08-04 Emmanuel Briot <briot@adacore.com>
1070 * make.adb: Remove debug trace.
1072 2011-08-04 Vincent Celier <celier@adacore.com>
1074 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1075 path in canonical form, to be able to compare path names on platforms
1076 such as Windows or Darwin.
1078 2011-08-04 Thomas Quinot <quinot@adacore.com>
1080 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1081 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1082 * scos.ads: Update documentation accordingly.
1083 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1086 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1088 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1089 attribute only if prefix type is scalar.
1091 2011-08-04 Emmanuel Briot <briot@adacore.com>
1093 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1094 in gnatmake for specifying mains on the command line that do not belong
1095 to the main project. These mains must currently all belong to the same
1097 (Ultimate_Extension_Of): removed, since duplicated
1098 Ultimate_Extending_Project.
1100 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1102 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1104 (CodePeer_Mode_String): New.
1105 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1107 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1108 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1109 mode, since no useful elaboration subprogram is needed by CodePeer.
1110 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1111 In this mode, compile binder file with -gnatC and do stop after this
1114 2011-08-04 Vincent Celier <celier@adacore.com>
1116 * exp_ch7.adb: Minor comment fix.
1118 2011-08-04 Robert Dewar <dewar@adacore.com>
1120 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1121 exp_ch4.adb, makeutl.adb: Minor reformatting.
1123 2011-08-04 Emmanuel Briot <briot@adacore.com>
1125 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1126 Create several new subprograms to move code out of Make. This makes the
1127 code more readable, removes code duplication, and is a preparation work
1128 for adding support for aggregate projects.
1130 2011-08-04 Tristan Gingold <gingold@adacore.com>
1132 * s-po32gl.ads, s-po32gl.adb: New files.
1133 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1134 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1135 (Build_Finalization_Collection): Use it.
1136 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1137 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1139 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1140 * gcc-interface/Make-lang.in: Update dependencies.
1142 2011-08-04 Emmanuel Briot <briot@adacore.com>
1144 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1147 2011-08-04 Emmanuel Briot <briot@adacore.com>
1149 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1150 command line is not a file name, also check whether it could be a unit
1153 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1155 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1156 the header of the finalization routine.
1157 If the unit has no finalizer but is a body whose spec has one, then
1158 generate the decrement of the elaboration entity only.
1159 If the unit has a finalizer and is a spec, then do not generate the
1160 decrement of the elaboration entity.
1161 (Gen_Finalize_Library_C): Likewise.
1163 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1165 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1166 (Bounds_Size_Expression): Removed.
1167 (Double_Alignment_Of): New subsidiary routine.
1168 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1169 for a hole in the dope vector of unconstrained arrays due to different
1170 index and element alignments.
1172 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1174 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1175 raise program_error because body has not been seen yet.
1177 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1179 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1182 2011-08-04 Vincent Celier <celier@adacore.com>
1184 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1186 2011-08-04 Yannick Moy <moy@adacore.com>
1188 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1189 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1191 2011-08-04 Thomas Quinot <quinot@adacore.com>
1193 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1194 instantiation in RCI.
1196 2011-08-04 Emmanuel Briot <briot@adacore.com>
1198 * make.adb: Share more code with gprbuild
1200 2011-08-04 Emmanuel Briot <briot@adacore.com>
1202 * projects.texi: Added documentation for the IDE'Gnat project file
1205 2011-08-04 Nicolas Roche <roche@adacore.com>
1207 * gnat_rm.texi: Minor editing.
1209 2011-08-04 Javier Miranda <miranda@adacore.com>
1211 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1212 and the library case for VM targets.
1213 (Gen_Adainit_Ada): Likewise.
1215 2011-08-04 Robert Dewar <dewar@adacore.com>
1217 * g-altive.ads: Minor comment updates.
1218 * prj-nmsc.adb: Minor reformatting.
1220 2011-08-04 Javier Miranda <miranda@adacore.com>
1223 (Normalize_Scalars_Config): Value of the configuration switch set by
1224 pragma Normalize_Scalars when it appears in the gnat.adc file.
1225 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1226 to save and restore settings of this pragma.
1228 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1229 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1231 2011-08-04 Vincent Celier <celier@adacore.com>
1233 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1235 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1237 * makeutl.adb: Minor reformatting.
1239 2011-08-04 Olivier Hainque <hainque@adacore.com>
1241 * g-altive.ads: Update comments to reflect that only the soft
1242 binding is available today.
1244 2011-08-04 Robert Dewar <dewar@adacore.com>
1246 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1247 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1248 * gcc-interface/Make-lang.in: Update dependencies.
1250 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1252 * prj-env.adb: Remove local debug traces.
1254 2011-08-04 Yannick Moy <moy@adacore.com>
1256 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1257 was used instead of Hi_OK, which could cause a read of an uninitialized
1258 value later on. Detected while working on the new warning.
1259 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1261 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1262 in more cases, in order to detect more unreferenced values.
1263 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1264 object for expression, if any.
1266 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1268 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1269 the operand types instead of the Esize.
1271 2011-08-04 Steve Baird <baird@adacore.com>
1273 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1274 enable CodePeer_Mode.
1275 * bindusg.adb (Display): Add help message describing -P binder switch.
1276 * gnat_ugn.texi: Document -P binder switch.
1277 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1278 user-defined main program directly.
1279 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1280 user-defined main program in the context clause of the package body.
1282 2011-08-04 Yannick Moy <moy@adacore.com>
1284 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1285 duplicate of Defining_Entity
1286 (Get_Unique_Entity_For_Decl): rename function into
1287 Unique_Defining_Entity
1288 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1289 (Formal_Proof_On): remove synthesized flag
1290 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1291 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1292 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1293 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1294 Annotate (Formal_Proof)
1296 2011-08-04 Emmanuel Briot <briot@adacore.com>
1298 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1299 source files with non-standard naming schemes, in imported projects
1301 2011-08-04 Emmanuel Briot <briot@adacore.com>
1303 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1304 specified on the gprbuild command line, we need to compile all units
1305 within that file, not just the first one we find
1306 Fix error message for mains that are not found.
1308 2011-08-04 Thomas Quinot <quinot@adacore.com>
1310 * sem_ch6.adb: Update comment.
1311 * sem_ch12.adb: Minor reformatting.
1313 2011-08-04 Bob Duff <duff@adacore.com>
1315 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1316 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1317 race condition whose symptom is to fail to lock Parent. That, in turn,
1318 causes Parent.Awake_Count to be accessed without locking Parent, which
1319 causes another race condition whose symptom is that Parent.Awake_Count
1320 can be off by 1 (either too high or too low). The solution is to lock
1321 Parent unconditionally, and then lock Acceptor, before reading
1322 Acceptor.Terminate_Alternative.
1324 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1326 * debug.adb: Update comment.
1328 2011-08-04 Robert Dewar <dewar@adacore.com>
1330 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1331 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1332 exp_ch6.adb: Minor reformatting.
1334 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1336 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1339 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1341 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1343 2011-08-04 Thomas Quinot <quinot@adacore.com>
1345 * sinfo.ads: Minor reformatting.
1347 2011-08-04 Emmanuel Briot <briot@adacore.com>
1349 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1350 even if there is no location.
1352 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1354 * sem_res.adb, sem_ch4.adb: move check for restriction
1355 No_Task_Hierarchy to resolve_allocator.
1357 2011-08-04 Thomas Quinot <quinot@adacore.com>
1359 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1360 This flag of N_Pragma nodes is not used, remove it as well as all of
1361 the associated circuitry.
1363 2011-08-04 Javier Miranda <miranda@adacore.com>
1365 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1366 runtime check on duplicated externa tags
1367 * debug.adb Document switch -gnatdQ.
1369 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1371 * a-fihema.ads: Minor typo fix.
1373 2011-08-04 Yannick Moy <moy@adacore.com>
1375 * sem_ch10.adb: Minor comment update.
1377 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1379 * einfo.adb: Update the node field usage to reflect the renaming of
1380 Return_Flag to Return_ Flag_Or_Transient_Decl.
1381 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1382 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1383 (Write_Field15_Name): Change Return_Flag to
1384 Return_Flag_Or_Transient_Decl.
1385 * einfo.ads: Rename node field Return_Flag to
1386 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1387 occurrences in entities.
1388 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1389 associated Inline pragma.
1390 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1391 associated Inline pragma.
1392 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1394 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1395 Return_Flag and Set_Return_Flag.
1396 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1397 objects generated for controlled transients declared inside an
1398 Exception_With_Actions. Update the calls to Return_Flag.
1399 (Process_Object_Declaration): Add code to add a null guard for hook
1400 objects generated for controlled transients declared inside an
1401 Exception_With_Actions. Update related comment.
1402 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1403 objects generated for controlled transients declared inside an
1404 Exception_With_Actions. Update the calls to Return_Flag.
1405 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1407 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1409 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1410 positional aggregate.
1412 2011-08-04 Vincent Celier <celier@adacore.com>
1414 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1415 SLOC only for pragmas.
1417 2011-08-04 Emmanuel Briot <briot@adacore.com>
1419 * projects.texi: Minor typo fix.
1421 2011-08-04 Emmanuel Briot <briot@adacore.com>
1423 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1424 on case-sensitive file systems.
1426 2011-08-04 Thomas Quinot <quinot@adacore.com>
1428 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1429 nested in a disabled pragma.
1430 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1431 enclosing pragma, if any, for X decisions.
1433 2011-08-04 Thomas Quinot <quinot@adacore.com>
1435 * sem_prag.adb: Minor reformatting.
1437 2011-08-04 Vincent Celier <celier@adacore.com>
1439 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1440 allowed in no run time mode.
1442 2011-08-04 Vincent Celier <celier@adacore.com>
1444 * make.adb (Check): When -gnatc is used, check for the source file
1445 inside the ALI file with a canonical case file name.
1447 2011-08-04 Emmanuel Briot <briot@adacore.com>
1449 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1450 overriding the separator.
1452 2011-08-04 Robert Dewar <dewar@adacore.com>
1454 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1455 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1457 2011-08-04 Robert Dewar <dewar@adacore.com>
1459 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1461 2011-08-04 Yannick Moy <moy@adacore.com>
1463 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1464 'Result only appears in postcondition of function.
1466 2011-08-04 Thomas Quinot <quinot@adacore.com>
1468 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1469 external tag, include the value of the external tag in the exception
1472 2011-08-04 Yannick Moy <moy@adacore.com>
1474 * sem_attr.adb (Result): modify error message for misplaced 'Result
1476 2011-08-04 Sergey Rybin <rybin@adacore.com>
1478 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1479 clear that the second argument must be an identifier.
1481 2011-08-04 Thomas Quinot <quinot@adacore.com>
1483 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1484 -fpreserve-control-flow, insert an IF statement on the barrier
1485 condition to ensure that a conditional branch instruction is generated.
1487 2011-08-04 Emmanuel Briot <briot@adacore.com>
1489 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1490 (Processing_Flags.Ignore_Missing_With): new flag.
1492 2011-08-04 Emmanuel Briot <briot@adacore.com>
1494 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1495 Source_List_File on case-insensitive systems where the file is actually
1496 on a case-sensitive file system (NFS,...).
1498 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1500 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1501 function return contains a controlled [extension] aggregate and the
1502 return statement is not part of a handled sequence of statements, wrap
1503 the return in a block. This ensures that all controlled temporaries
1504 generated during aggregate resolution will be picked up by the
1505 finalization machinery.
1507 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1509 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1510 components, freeze type before resolution, to ensure that default
1511 initializations are present for all components.
1512 * sem_res.adb (Resolve_Actuals): the designated object of an
1513 accces-to-constant type is a legal actual in a call to an
1514 initialization procedure.
1516 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1518 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1519 N_Unchecked_Type_Conversion to the possible containers of a renamed
1522 2011-08-04 Yannick Moy <moy@adacore.com>
1524 * par-ch13.adb (Aspect_Specifications_Present): recognize
1525 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1526 is issued in Strict mode.
1527 * par.adb: Fix typos in comments.
1529 2011-08-04 Yannick Moy <moy@adacore.com>
1531 * sem_attr.adb (Result): modify error message to take into account Post
1532 aspect when compiling Ada 2012 (or newer) code.
1534 2011-08-04 Nicolas Roche <roche@adacore.com>
1536 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1537 remove need for GCC exceptions.
1539 2011-08-04 Vincent Celier <celier@adacore.com>
1541 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1542 project, not the source file name.
1543 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1544 excluded, continue looking. This excluded source will only be returned
1545 if there is no other source with the same base name that is not locally
1548 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1550 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1551 private and one of the operands is a real literal, use a qualified
1552 expression rather than a conversion which is not meaningful to the
1555 2011-08-04 Yannick Moy <moy@adacore.com>
1557 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1558 corresponding aspect X'Class are allowed, proceed with analysis of the
1559 aspect instead of skipping it.
1561 2011-08-04 Tristan Gingold <gingold@adacore.com>
1563 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1564 This will allow to have an Ada implementation for the subprogram.
1566 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1568 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1569 completion and aspects are present, apply them to the entity for the
1570 type which is currently the partial view, but which is the one that
1572 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1573 applies to a partial view, indicate that the full view has predicates
1574 and delayed aspects.
1575 (Replace_Type_Reference): Handle properly predicates that apply to the
1576 full view of a private completion.
1578 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1580 * layout.adb (Layout_Type): For composite types, do not set Esize.
1581 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1583 (Size_Known): Look at the RM size of components instead of the Esize.
1584 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1585 issue warning and activate Implicit_Packing.
1586 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1587 if the Esize is not known.
1588 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1589 for elementary types only.
1590 (Analyze_Record_Representation_Clause): Look at the RM size instead
1591 of the Esize to issue errors.
1592 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1594 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1596 Look at the RM size instead of the Esize for types if the latter is
1598 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1600 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1602 * sem_type.adb: proper handling of equality not involving anonymous
1605 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1607 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1608 Vis_Decls. When creating a library-level finalizer for a package spec,
1609 both the declaration and body of the finalizer are inserted either in
1610 the visible or private declarations of the package spec.
1612 2011-08-04 Javier Miranda <miranda@adacore.com>
1614 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1615 use of the full-view of a type when invoking Is_Ancestor.
1616 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1617 the full-view of private parents is requested, then use also the
1618 full-view of the parent of the first derivation.
1620 2011-08-04 Tristan Gingold <gingold@adacore.com>
1622 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1623 instead of the locally imported procedure.
1624 * s-taprop-mingw.adb (Enter_Task): Ditto.
1625 * s-valrea.adb (Scan_Real): Ditto.
1626 * s-imgrea.adb (Set_Image_Real): Ditto.
1627 * s-flocon.ads: Make the package pure.
1629 2011-08-04 Thomas Quinot <quinot@adacore.com>
1631 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1632 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1633 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1634 New subprogram, moved here from...
1635 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1636 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1637 rewriting of the last argument into a procedure call statement here...
1638 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1641 2011-08-04 Thomas Quinot <quinot@adacore.com>
1643 * par_sco.adb: Minor reformatting.
1645 2011-08-04 Robert Dewar <dewar@adacore.com>
1647 * erroutc.adb: Minor reformatting.
1649 2011-08-04 Thomas Quinot <quinot@adacore.com>
1651 * par_sco.adb: Comment update.
1653 2011-08-04 Tristan Gingold <gingold@adacore.com>
1655 * s-flocon.ads: New file.
1656 * g-flocon.ads: Now a renaming of s-flocon.
1657 * Makefile.rtl: Add s-flocon.o
1659 2011-08-04 Javier Miranda <miranda@adacore.com>
1661 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1662 constrained, do not attempt to build a subtype of it.
1664 2011-08-04 Yannick Moy <moy@adacore.com>
1666 * errout.ads Change comments: remove 'R'M as an example where quotes
1667 are needed; add ALFA as another case where quotes are not needed
1668 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1669 case where quotes are not needed.
1670 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1671 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1672 Remove all occurrences of 'A'L'F'A
1674 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1676 * sem_ch13.adb: check legality of invariant pragma.
1678 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1680 * bindgen.adb: Add comments.
1682 2011-08-04 Yannick Moy <moy@adacore.com>
1684 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1686 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1687 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1689 2011-08-04 Robert Dewar <dewar@adacore.com>
1691 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1692 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1693 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1695 2011-08-04 Thomas Quinot <quinot@adacore.com>
1697 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1699 2011-08-04 Thomas Quinot <quinot@adacore.com>
1702 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1705 2011-08-04 Robert Dewar <dewar@adacore.com>
1707 * einfo.ads, exp_ch4.adb: Minor reformatting.
1709 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1711 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1713 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1715 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1716 type in all cases to compute list of primitive operations, because full
1717 view may be an itype that is not attached to the list of declarations.
1719 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1721 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1722 library has already been finalized.
1723 (Gen_Adafinal_C): Likewise.
1724 (Gen_Adainit_Ada): Generate an early return if the library has
1725 already been elaborated.
1726 (Gen_Adainit_C): Likewise.
1727 (Gen_Output_File_Ada): Generate an elaboration flag.
1728 (Gen_Output_File_C): Likewise.
1730 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1732 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1733 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1734 built in the first place.
1735 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1736 for CodePeer because Finalize_Address was not built to begin with.
1737 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1739 2011-08-04 Pascal Obry <obry@adacore.com>
1741 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1742 filenames, this ensures unicity of filenames across processes.
1744 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1746 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1747 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1748 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1749 Add False as the actual to From_Abort in the generated call to
1750 Raise_From_Controlled_Operation.
1752 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1754 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1755 so that the ali file name can be retrieved from outside of this package.
1756 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1757 doing nothing in the general case, but used to update the object file
1758 timestamp if directly generated by the backend.
1759 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1760 to a later time than the ali file one.
1762 2011-08-04 Yannick Moy <moy@adacore.com>
1764 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1765 entities whose body contains an Annotate pragma which forces formal
1767 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1768 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1769 Mark_Non_ALFA_Subprogram to pass in a message and node.
1770 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1771 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1772 surrounding subprogram.
1773 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1774 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1775 as not in ALFA is annotated with Formal_Proof being On, then an error
1776 is issued based on the additional parameters for message and node.
1777 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1778 * gcc-interface/Make-lang.in: Update dependencies.
1780 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1782 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1783 Finalize_Address when CodePeer is enabled.
1785 2011-08-04 Pascal Obry <obry@adacore.com>
1787 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1788 the latter returns a pointer to a static buffer which is deallocated
1789 at the end of the routine.
1791 2011-08-04 Yannick Moy <moy@adacore.com>
1793 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1794 after index creation; mark unconstrained base array type generated as
1795 being in/not in ALFA as well
1796 (Make_Index): mark subtype created as in/not in ALFA
1797 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1798 over a loop as in/not in ALFA, depending on its type and form of loop
1801 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1803 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1804 directly to False on .NET and JVM.
1806 2011-08-04 Yannick Moy <moy@adacore.com>
1808 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1809 constraint that subtype must come from source code to be in ALFA, so
1810 that anonymous subtypes can be in ALFA too.
1812 2011-08-04 Yannick Moy <moy@adacore.com>
1814 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1815 reference for ALFA mode.
1816 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1817 procedure public so as to use it from formal verification back-end.
1819 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1821 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1822 invalid checks of the Parameter, making Remove_Switch not working
1825 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1827 * targparm.ads: Update header: no run-time exception is needed on this
1830 2011-08-04 Vincent Celier <celier@adacore.com>
1832 * a-fihema.adb: Use System.IO instead of GNAT.IO
1834 2011-08-04 Thomas Quinot <quinot@adacore.com>
1836 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1837 are forbidden in Compiler_Unit mode.
1839 2011-08-04 Robert Dewar <dewar@adacore.com>
1841 * sem_util.adb: Minor reformatting.
1843 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1845 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
1846 library-level finalizers.
1847 (Gen_Finalize_Library_C): Update the import string for library-level
1849 (Gen_Finalize_Library_Defs_C): Update the definition name of a
1850 library-level finalizer.
1851 * exp_ch7.adb: Remove with and use clauses for Stringt.
1852 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
1853 Spec_Decl. Add local variable Body_Id. The names of library-level
1854 finalizers are now manually fully qualified and are no longer external.
1855 A single name is now capable of servicing .NET, JVM and non-VM targets.
1856 Pragma Export is no longer required to provide visibility for the name.
1857 (Create_Finalizer_String): Removed.
1858 (New_Finalizer_Name): New routine which mimics New_..._Name.
1860 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1862 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
1863 elaboration counter to Standard_Short_Integer.
1864 * sem_util.adb (Build_Elaboration_Entity): Likewise.
1865 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
1866 (Gen_Elab_Externals_C): Likewise.
1868 2011-08-04 Ed Falis <falis@adacore.com>
1870 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
1871 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
1872 system-vxworks-mips.ads, system-vxworks-x86.ads
1873 (Always_Compatible_Rep): set to False for all VxWorks targets.
1875 2011-08-04 Robert Dewar <dewar@adacore.com>
1877 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
1878 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
1879 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
1880 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
1881 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
1882 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
1883 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
1884 Minor reformatting and code reorganization.
1886 2011-08-04 Emmanuel Briot <briot@adacore.com>
1888 * projects.texi: Added doc for aggregate projects.
1890 2011-08-04 Emmanuel Briot <briot@adacore.com>
1892 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
1893 Add support for overriding the Project_Path in aggregate projects.
1895 2011-08-04 Robert Dewar <dewar@adacore.com>
1897 * a-cofove.ads: Minor reformatting.
1899 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1901 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
1902 on the generated code.
1903 (Build_Finalize_Statements): Update the comment on the generated code.
1904 (Build_Initialize_Statements): Update the comment on the generated code.
1905 (Build_Object_Declarations): Add local variable Result. The object
1906 declarations are now built in sequence.
1907 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
1910 2011-08-04 Robert Dewar <dewar@adacore.com>
1912 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
1914 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1916 * einfo.ads (Elaboration_Entity): Document new definition and use.
1917 (Elaboration_Entity_Required): Adjust to above change.
1918 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
1919 * exp_ch12.adb: And with and use for Snames.
1920 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
1921 * exp_util.adb (Set_Elaboration_Flag): Likewise.
1922 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
1923 <Check_Unit_Name>: Deal with N_Expanded_Name.
1924 <Attribute_Elaborated>: Extend to all unit names.
1925 * sem_elab.adb: And with and use for Uintp.
1926 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
1927 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
1928 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
1929 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
1930 from Gen_Adainit_Ada.
1931 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
1932 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
1933 case, do not call System.Standard_Library.Adafinal; instead call
1934 finalize_library if needed.
1935 (Gen_Adafinal_C): Likewise.
1936 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
1937 non-main program case.
1938 (Gen_Adainit_C): Generate a couple of external declarations here.
1939 In the main program case, set SSL.Finalize_Library_Objects.
1940 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
1941 (Gen_Elab_Calls_C): Likewise.
1942 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
1943 (Gen_Finalize_Library_C): Likewise. Generate a full function.
1944 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
1946 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
1947 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
1949 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
1950 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
1951 of external declarations. Â Call Gen_Finalize_Library_C.
1953 2011-08-04 Emmanuel Briot <briot@adacore.com>
1955 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
1956 Compute_Compilation_Phases): new subprogram.
1957 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
1958 The number of mains as well as the various compilation phases that
1959 need to be run are now project tree specific, since various
1960 aggregated trees might have different requirements. In particular,
1961 they do not all require bind or link phases.
1963 2011-08-04 Emmanuel Briot <briot@adacore.com>
1965 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
1966 (Project_Tree_Appdata): New type.
1967 It is now possible to associate application-specific data to a project
1968 tree. In particular, this is used in the gprbuild builder to avoid a
1969 number of global tables and htables, especially now that there can be
1970 several project trees loaded at once because of aggregate projects.
1971 (Debug_Name): new procedure.
1972 * projects.texi: Clarify syntax of "**" for Source_Dirs
1974 2011-08-03 Emmanuel Briot <briot@adacore.com>
1976 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
1977 the "roots" for a main.
1978 (Fill_From_Project): add support for aggregate projects. Main units
1979 in aggregated projects are now automatically added in the list of
1980 files to build (although this fails later on in gprbuild, because
1981 these files are not using the root proejct tree, so this needs
1983 * gcc-interface/Make-lang.in: Update dependencies.
1985 2011-08-03 Yannick Moy <moy@adacore.com>
1987 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
1988 conditional expression in ALFA.
1989 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
1990 expressions as not in ALFA.
1992 2011-08-03 Robert Dewar <dewar@adacore.com>
1994 * a-cofove.adb: Minor reformatting.
1996 2011-08-03 Emmanuel Briot <briot@adacore.com>
1998 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
1999 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2001 These packages are more logically placed in the Queue package, since
2002 they manipulate the queue. It is also likely that they can be adapted
2003 for gnatmake, thus sharing more code.
2004 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2005 that we could move the above.
2007 2011-08-03 Emmanuel Briot <briot@adacore.com>
2009 * errutil.adb (Finalize): clean up the list of error messages on exit.
2010 Calling this subprogram multiple times will no longer show duplicate
2011 error messages on stderr.
2013 2011-08-03 Emmanuel Briot <briot@adacore.com>
2015 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2016 Getopt_Switches when we have already define a command line
2019 2011-08-03 Yannick Moy <moy@adacore.com>
2021 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2022 in ALFA. Instead, they are considered as assertions to prove.
2023 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2024 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2025 if they have no ELSE part, or if they occur in pre- and postconditions,
2026 where the Condition cannot have side-effects in ALFA
2027 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2028 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2029 Instead, include type conversion between scalar types in ALFA.
2030 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2031 if-and-only-if its type is in ALFA.
2033 2011-08-03 Thomas Quinot <quinot@adacore.com>
2035 * scos.adb, get_scos.adb, put_scos.adb
2036 New code letter for decisions: G (entry guard)
2038 (Traverse_Subprogram_Body): Rename to...
2039 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2040 (Traverse_Protected_Body): New subprogram
2041 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2042 protected bodies and entry bodies.
2044 2011-08-03 Yannick Moy <moy@adacore.com>
2046 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2047 entities with get/set subprograms, which is set on procedure entities
2048 generated by the compiler for a postcondition.
2049 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2050 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2051 entity for a declaration
2052 (Get_Unique_Entity_For_Decl): new function returning an entity which
2053 represents a declaration, so that matching spec and body have the same
2056 2011-08-03 Robert Dewar <dewar@adacore.com>
2058 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2059 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2061 2011-08-03 Yannick Moy <moy@adacore.com>
2063 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2064 library-level because retriction No_Implicit_Dynamic_Code in the
2065 front-end prevents its definition as a local subprogram
2066 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2067 for reuse in other contexts
2068 (Traverse_Declarations_Or_Statements,
2069 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2070 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2071 procedures take a callback parameter to be called on all declarations
2073 (Traverse_All_Compilation_Units): new generic function to traverse a
2074 compilation unit and call a callback parameter on all declarations
2076 2011-08-03 Javier Miranda <miranda@adacore.com>
2078 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2079 in Java since they are always enclosed in a namespace that
2080 differentiates them, and overloaded entities are supported by the VM.
2082 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2084 * checks.adb (Determine_Range): If a computed bound of an operation is
2085 outside the range of the base type of the expression, and overflow
2086 checks are enabled, the result is unknown and cannot be used for any
2087 subsequent constant folding.
2088 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2089 unknown, so is the result of the comparison.
2091 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2093 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2094 From_Abort. When finalization was triggered by an abort, propagate
2095 Standard'Abort_Signal rather than Program_Error.
2096 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2098 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2099 From_Abort. When finalization was triggered by an abort, propagate
2100 Standard'Abort_Signal rather than Program_Error.
2101 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2103 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2104 Abort_Id. Update the calls to Build_Object_Declarations and
2105 Build_Raise_Statement to include Abort_Id.
2106 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2107 calls to Build_Object_Declarations and Build_Raise_Statement to include
2109 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2110 calls to Build_Object_Declarations and Build_Raise_Statement to include
2112 (Build_Components): Create an entity for Abort_Id when exceptions are
2113 allowed on the target.
2114 (Build_Finalizer): New local variable Abort_Id.
2115 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2116 calls to Build_Object_Declarations and Build_Raise_Statement to include
2118 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2119 declaration of flag Abort_Id to preserve the original abort status
2120 before finalization code is executed.
2121 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2122 runtime routine Raise_From_Controlled_Operation.
2123 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2124 Abort_Id. Update the call to Build_Object_Declarations to include
2125 Abort_Id. Update the layout of the finalizer body.
2126 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2127 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2128 clunky code to create all flags and objects related to
2129 exception propagation and replace it with a call to
2130 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2132 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2133 Add new formal Abort_Id and associated comment on its use.
2134 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2136 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2137 Remove the clunky code to create all flags and objects related to
2138 exception propagation and replace it with a call to
2139 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2141 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2143 * s-tassta.adb: Fix minor typos.
2145 2011-08-03 Robert Dewar <dewar@adacore.com>
2147 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2148 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2150 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2152 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2153 to packages. This ensures that the finalizer body will not end up
2154 inside the freeze node.
2155 (Process_Declarations): Add code to detect whether a freeze node has a
2156 nested finalization collection.
2158 2011-08-03 Pascal Obry <obry@adacore.com>
2160 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2161 (Current_Session): Return a not null access to Session_Type.
2162 (Default_Session): Likewise.
2164 2011-08-03 Robert Dewar <dewar@adacore.com>
2166 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2167 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2169 2011-08-03 Pascal Obry <obry@adacore.com>
2171 * g-awk.ads: Minor comment fix.
2173 2011-08-03 Sergey Rybin <rybin@adacore.com>
2175 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2176 the tree structure related to discriminant constraints.
2177 Original_Discriminant cannot be used any more for computing the
2178 defining name for the reference to a discriminant.
2180 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2182 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2183 function is not visibly tagged, this is not a dispatching call and
2184 therfore is not Tag_Indeterminate, even if the function is marked as
2185 dispatching on result.
2187 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2189 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2190 (Expand_N_Free_Statement): Add a guard to protect against run-times
2191 which do not support controlled types.
2192 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2193 against run-times which do not support controlled types.
2194 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2195 against run-times which do not support controlled types.
2196 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2197 against run-times which do not support controlled types.
2198 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2199 protect against run-times which do not support controlled types.
2201 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2203 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2204 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2206 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2208 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2209 modified in the source, to prevent spurious warnings when compiling
2212 2011-08-03 Thomas Quinot <quinot@adacore.com>
2214 * a-except-2005.adb: Minor reformatting.
2216 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2218 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2219 is a renaming declaration in the private part of a package, do not emit
2220 a warning that the with_clause could be moved because the renaming may
2221 be used in the body or in a child unit.
2223 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2225 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2226 Propagate the Comes_From_Source attribute from the original return
2227 object to the renaming.
2229 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2231 * exp_ch7.adb (Build_Raise_Statement): Do not call
2232 Raise_From_Controlled_Operation when this routine is not present in
2233 the run-time library.
2234 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2235 libraries (Ravenscar), tasks are non-terminating, and protected objects
2236 and tasks can only appear at library level, so we do not want
2237 finalization of protected objects nor tasks.
2238 * exp_intr.adb: Minor clarification in comment.
2239 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2240 Gen_Output_File_C): Remove references to finalization of library-level
2241 objects when using restricted run-time libraries.
2243 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2245 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2246 Original_Discriminant only if the parent type is a generic formal.
2248 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2250 * exp_ch13.adb: Add with and use clause for Targparm;
2251 (Expand_N_Free_Statement): Prevent the generation of a custom
2252 Deallocate on .NET/JVM targets since this requires pools and address
2254 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2255 .NET/JVM targets, attach the newly allocated object to the access
2256 type's finalization collection. Do not generate a call to
2257 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2258 exist in the runtime.
2259 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2260 create a custom Allocate for object that do not require initialization.
2261 Attach a newly allocated object to the access type's finalization
2262 collection on .NET/JVM.
2263 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2264 assignment of controlled types on .NET/JVM. The two hidden pointers
2265 Prev and Next and stored and later restored after the assignment takes
2267 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2268 kludge for .NET/JVM to recognize a particular piece of code coming from
2269 Heap_Management and change the call to Finalize into Deep_Finalize.
2270 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2271 finalization collections on .NET/JVM only for types derived from
2272 Controlled. Separate the association of storage pools with a collection
2273 and only allow it on non-.NET/JVM targets.
2274 (Make_Attach_Call): New routine.
2275 (Make_Detach_Call): New routine.
2276 (Process_Object_Declarations): Suppress the generation of
2277 build-in-place return object clean up code on .NET/JVM since it uses
2279 * exp_ch7.ads (Make_Attach_Call): New routine.
2280 (Make_Detach_Call): New routine.
2281 * exp_intr.adb Add with and use clause for Targparm.
2282 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2283 on .NET/JVM targets.
2284 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2285 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2286 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2287 names used in finalization.
2289 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2291 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2292 (Attach, Detach): Lock the current task when chaining an object onto a
2295 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2297 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2298 Rewritten to create the message strings when the exception is not
2299 raised by an abort during finalization.
2300 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2301 Raise_From_Controlled_Operation and update its associated comment.
2302 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2303 Ada.Finalization.Heap_Management provides key functionality
2304 associated with controlled objects on the heap, their creation,
2305 finalization and reclamation. Type Finalization_Collection is
2306 effectively a wrapper which sits ontop of a storage pool and performs
2307 all necessary bookkeeping for all the objects it contains. Each
2308 access-to-controlled or access-to-class-wide type receives a collection
2309 as part of its expansion. The compiler generates buffer code and
2310 invokes Allocate / Deallocate to create and destroy allocated
2312 * a-finali.adb ("="): Removed.
2313 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2314 fields Prev and Next.
2315 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2316 A library unit with at least one controlled object on the library level
2317 has a special finalizer which is invoked by the binder. To signal this,
2318 ali files carry field PF.
2319 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2320 associated comment on field usage.
2321 * a-tags.adb (Get_RC_Offset): Removed.
2322 (Needs_Finalization): New routine.
2323 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2324 Dispatch tables now carry field Needs_Finalization which provides
2325 runtime indication whether a type is controlled or has controlled
2326 components or both. Remove field RC_Offset.
2327 (Get_RC_Offset): Removed along with its associated pragma Export.
2328 Since tagged types with controlled components no longer carry hidden
2329 field _controller, the special mechanism to retrieve its location is no
2331 (Needs_Finalization): New routine.
2332 * atree.ads, atree.adb (Elist24): New routine.
2333 (Set_Elist24): New routine.
2334 * atree.h: Add a define clause for Elist24.
2335 * bindgen.adb New library-level variable Lib_Final_Built.
2336 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2337 presence of a VM target, the routine generates calls to the proper
2338 library finalization routine.
2339 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2340 targets. Set the correct library finalization routine depending on
2341 whether the library has controlled objects or this is a VM compilation.
2342 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2343 to library-level finalizers of compiled units in reverse order of
2344 elaboration. It also produces exception management code and reraises a
2345 potential exception after all units have been finalized.
2346 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2347 library-level finalizers of compiled units in reverse order of
2349 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2350 definitions of all library-level finalizers available to the compilation
2351 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2353 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2354 System.Standard_Library.Adafinal directly. If the library needs
2355 finalization actions, create the sequence of finalization calls.
2356 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2357 Generate a with clause for System.Soft_Links when compiling for a VM.
2358 Remove the code which imports System.Standard_Library.Adafinal as
2359 Do_Finalize. Generate the library finalization routine.
2360 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2361 If the library needs finalization actions, create all the definitions
2362 of library- level finalizers.
2363 (Has_Finalizer): New routine. Determines whether at least one compiled
2364 unit has a library-level finalizer.
2365 Add type Qualification_Mode.
2366 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2367 * einfo.adb: New usage of field 15 as Return_Flag.
2368 Remove Finalization_Chain_Entity from the usages of field 19.
2369 Remove Associated_Final_Chain from the usages of field 23.
2370 New usage of field 23 as Associated_Collection.
2371 New usage of field 24 as Finalizer.
2372 New usage of flag 252 as Is_Processed_Transient.
2373 (Associated_Final_Chain): Removed.
2374 (Associated_Collection): New routine.
2375 (Finalization_Chain_Entity): Removed.
2376 (Finalizer): New routine.
2377 (Is_Finalizer): New routine.
2378 (Is_Processed_Transient): New routine.
2379 (Return_Flag): New routine.
2380 (Set_Associated_Final_Chain): Removed.
2381 (Set_Associated_Collection): New routine.
2382 (Set_Finalization_Chain_Entity): Removed.
2383 (Set_Finalizer): New routine.
2384 (Set_Is_Processed_Transient): New routine.
2385 (Set_Return_Flag): New routine.
2386 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2388 (Write_Field8_Name): Alphabetize the output.
2389 (Write_Field11_Name): Alphabetize the output.
2390 (Write_Field12_Name): Alphabetize the output.
2391 (Write_Field13_Name): Alphabetize the output.
2392 (Write_Field14_Name): Alphabetize the output.
2393 (Write_Field15_Name): Alphabetize the output.
2394 (Write_Field16_Name): Alphabetize the output.
2395 (Write_Field17_Name): Alphabetize the output.
2396 (Write_Field18_Name): Alphabetize the output.
2397 (Write_Field19_Name): Alphabetize the output. Remove the output of
2398 Finalization_Chain_Entity.
2399 (Write_Field20_Name): Alphabetize the output.
2400 (Write_Field21_Name): Alphabetize the output.
2401 (Write_Field22_Name): Alphabetize the output.
2402 (Write_Field23_Name): Alphabetize the output. Remove the output of
2403 Associated_Final_Chain. Add output for Associated_Collection.
2404 (Write_Field24_Name): Alphabetize the output.
2405 (Write_Field25_Name): Add output for Finalizer.
2406 (Write_Field26_Name): Alphabetize the output.
2407 (Write_Field27_Name): Alphabetize the output.
2408 (Write_Field28_Name): Alphabetize the output.
2409 * einfo.ads: Add new field description for Associated_Collection and
2411 Remove Associated_Final_Chain and its uses in nodes.
2412 Remove Finalization_Chain_Entity and its uses in nodes.
2413 Add new field description for Finalizer and its uses in nodes.
2414 Add new synthesized attribute Is_Finalizer.
2415 Add new flag description for Is_Processed_Transient and its uses in
2417 Add new field description for Return_Flag and its uses in nodes.
2418 (Associated_Final_Chain): Removed along with its pragma Inline.
2419 (Associated_Collection): New routine and pragma Inline.
2420 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2421 (Finalizer): New routine and pragma Inline.
2422 (Is_Finalizer): New routine and pragma Inline.
2423 (Is_Processed_Transient): New routine and pragma Inline.
2424 (Return_Flag): New routine and pragma Inline.
2425 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2426 (Set_Associated_Collection): New routine and pragma Inline.
2427 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2428 (Set_Finalizer): New routine and pragma Inline.
2429 (Set_Is_Processed_Transient): New routine and pragma Inline.
2430 (Set_Return_Flag): New routine and pragma Inline.
2431 * exp_aggr.adb: Alphabetize subprograms.
2432 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2433 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2434 associated comments. Remove local variables External_Final_List and
2436 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2437 Ancestor. Remove the retrieval of finalization lists. Update the call to
2439 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2440 lists. Update the call to Late_Expansion.
2441 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2442 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2443 (Gen_Assign): Remove the retrieval of the finalization list used to
2444 build the assignment. Update the calls to Make_Init_Call and
2446 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2447 Remove the mechanism to determine attachment levels and finalization
2448 list retrieval. Remove the processing for coextensions.
2449 (Init_Controller): Removed. Controllers no longer exist.
2450 (Late_Expansion): Remove formals Flist and Obj along with their
2451 associated comments. Update the calls to Build_Record_Aggr_Code and
2452 Build_Array_Aggr_Code.
2453 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2454 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2455 appear in entry bodies, protected subprograms and task bodies.
2456 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2457 * exp_ch3.adb (Add_Final_Chain): Removed.
2458 (Build_Array_Init_Proc): Alphabetize local variables.
2459 (Build_Assignment): Alphabetize local variables. Update the call to
2461 (Build_Class_Wide_Master): Rename local variables to better reflect
2463 (Build_Discriminant_Assignments): Code reformatting.
2464 (Build_Init_Call_Thru): Code reformatting.
2465 (Build_Init_Procedure): Code reformatting. Generate a special version
2466 of Deep_Finalize which is capable of finalizing all initialized
2467 components and ignore the rest.
2468 (Build_Init_Statements): Rename local variables to better reflect their
2470 Reimplement the mechanism to include the creation and update of an index
2471 variable called a "counter". It is used as a bookmark for tracing
2472 initialized and non-initialized components.
2473 (Build_Initialization_Call): Remove local variable Controller_Typ.
2474 Alphabetize all local variables. Remove the initialization of the
2475 record controller and update the call to Make_Init_Call.
2476 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2477 New local variable Counter.
2478 (Constrain_Array): Alphabetize.
2479 (Expand_Freeze_Array_Type): Create a collection instead of a
2481 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2482 Finalize_Address which is used in conjunction with allocated controlled
2484 (Expand_N_Object_Declaration): Remove the creation of a finalization
2485 list for anonymous access types. Update the calls to Make_Init_Call and
2487 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2488 retrieval of finalization lists. Remove the expansion of the record
2489 controller. Create TSS primitive Finalize_Address used in conjunction
2490 with controlled objects on the heap. Create finalization collections
2491 for access-to-controlled record components.
2492 (Expand_Record_Controller): Removed.
2493 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2494 class-wide types now requires additional processing. Create
2495 finalization collections for access-to-controlled types.
2496 (Increment_Counter): New routine.
2497 (Make_Counter): New routine.
2498 (Make_Eq_If): Remove the mention of Name_uController.
2499 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2500 types coming from System.Finalization_Root.
2501 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2502 (Predefined_Primitive_Bodies): There is no longer need to skip types
2503 coming from System.Finalization_Root.
2504 (Stream_Operation_OK): Do not generate stream routines for
2505 type Ada.Finalization.Heap_Management.Finalization_Collection.
2506 * exp_ch3.ads: Alphabetize subprograms.
2507 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2508 Add with and use clause for Lib.
2509 (Complete_Coextension_Finalization): Removed.
2510 (Complete_Controlled_Allocation): New routine. Create a finalization
2511 collection for anonymous access-to-controlled types. Create a custom
2512 Allocate which interfaces with the back end and the machinery in
2514 (Expand_Allocator_Expression): Add necessary calls to
2515 Complete_Controlled_Allocation. Remove the retrieval of finalization
2516 lists. Update the calls to Make_Adjust_Call. Generate a call to
2517 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2518 the associated collection.
2519 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2520 Code clean up. Remove the retrieval of finalization lists and
2522 Update the call to Make_Init_Call. Generate a call to
2523 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2524 the associated collection.
2525 (Get_Allocator_Final_List): Removed. Finalization lists are not
2527 (Suitable_Element): Remove the mention of Name_uController.
2528 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2529 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2530 the left hand side, carry out the assignment and adjust the left hand
2532 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2533 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2534 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2535 BIP_Collection and BIPcollection.
2536 (Build_Heap_Allocator): New routine used to allocate the return object
2537 of a build-in-place function onto a collection.
2538 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2539 (Expand_Call): Do not replace direct calls to Deep routines with their
2541 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2542 and update their occurrences. Add a special return flag to monitor the
2543 [ab]normal execution of the function. The flag is set right before the
2545 Rewrite the mechanism used to allocate a build-in-place return object
2546 on the heap or on a storage pool.
2547 (Is_Direct_Deep_Call): New routine.
2548 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2549 build-in-place function call instead of a final list. Build a call to
2550 Set_Finalize_Address_Ptr to decorate the associated collection.
2551 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2552 order to name the build-in-place function call's result for later
2553 finalization. Add a collection to a build-in-place function call
2554 instead of a final list.
2555 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2556 build-in-place function call instead of a final list. Remove the code
2557 which moves one final list and transforms it into the actual in a
2558 nested build-in-place call.
2559 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2560 build-in-place function call instead of a final list.
2561 (Move_Final_List): Removed.
2562 (Needs_BIP_Collection): New routine.
2563 (Needs_BIP_Final_List): Removed.
2564 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2565 enumeration type BIP_Formal_Kind.
2566 Update the related comment.
2567 (Needs_BIP_Collection): New routine.
2568 (Needs_BIP_Final_List): Removed.
2569 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2570 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2571 majority of subprograms in this unit. Add Name_Finalize_Address to
2572 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2573 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2574 statements for an array type.
2575 (Build_Adjust_Statements): Create the adjust statements for a record
2577 (Build_Cleanup_Statements): New routine. A procedure which given any
2578 construct containing asynchronous calls, references to _master, or is a
2579 task body, a task allocation or a protected body produces the necessary
2580 runtime calls to clean up these constructs.
2581 (Build_Exception_Handler): New routine.
2582 (Build_Final_List): Removed.
2583 (Build_Finalization_Collection): New routine. A core procedure which
2584 creates a collection to service heap allocated controlled objects
2585 associated with an access-to-controlled type.
2586 (Build_Finalize_Statements): Create the finalization statements for a
2588 (Build_Finalizer): New routine. A core procedure which given any
2589 construct with declarations and/or statements detects all objects which
2590 need any type of clean up (controlled objects, protected objects) and
2591 generates all necessary code to clean up the said objects in the proper
2593 (Build_Finalizer_Call): New routine.
2594 (Build_Initialize_Statements): Create the initialization statements for
2595 an array type. The generated routine contains code to finalize partially
2597 (Build_Object_Declarations): New routine.
2598 (Build_Raise_Statement): New routine.
2599 (Clean_Simple_Protected_Objects): Removed.
2600 (Controller_Component): Removed.
2601 (Enclosing_Function): New routine.
2602 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2603 either declarations or statements or both.
2604 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2605 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2607 (Find_Final_List): Removed.
2608 (Global_Flist_Ref): Removed.
2609 (In_Finalization_Root): Removed.
2610 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2611 scope in terms of tree nodes. Process all transient variables within
2613 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2614 generated after the adjust.
2615 (Make_Attach_Call): Removed.
2616 (Make_Call): New routine.
2617 (Make_Clean): Removed.
2618 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2620 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2622 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2624 (Make_Final_Call): Modified to simply create a call to either
2625 Deep_Finalize or Finalize.
2626 (Make_Finalize_Address_Body): New routine.
2627 (Make_Finalize_Address_Stmts): New routine. A function which produces
2628 TSS primitive Finalize_Address used in conjunction with heap allocated
2630 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2631 (Make_Init_Call): Rewritten. There is no longer an attach call
2632 generated after initialization.
2633 (Make_Local_Deep_Finalize): New routine.
2634 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2635 (Make_Transient_Block): Remove the finalization list retrieval and
2637 (Needs_Finalization): Moved to Exp_Util.
2638 (Parent_Field_Type): New routine.
2639 (Preprocess_Components): New routine.
2640 (Process_Transient_Objects): New routine.
2641 (Wrap_HSS_In_Block): New routine.
2642 (Wrap_Transient_Declaration): Remove finalization list management and
2643 controller insertion.
2644 (Wrap_Transient_Expression): Code reformatting.
2645 (Wrap_Transient_Statement): Code reformatting.
2646 * exp_ch7.ads (Build_Final_List): Removed.
2647 (Build_Finalization_Collection): New routine.
2648 (Build_Raise_Statement): New routine.
2649 (Controller_Component): Removed.
2650 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2651 (Find_Final_List): Removed.
2652 (In_Finalization_Root): Removed.
2653 (Is_Simple_Protected_Type): Update related comment.
2654 (Make_Adjust_Call): New parameter profile and associated comments.
2655 (Make_Attach_Call): Removed.
2656 (Make_Final_Call): New parameter profile and associated comments.
2657 (Make_Finalize_Address_Body): New routine.
2658 (Make_Init_Call): New parameter profile and associated comments.
2659 (Make_Local_Deep_Finalize): New routine.
2660 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2661 (Needs_Finalization): Moved to Exp_Util.
2662 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2663 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2664 (Find_Protection_Type): Moved to Exp_Util.
2665 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2666 (Make_DT): Update sequence of dispatch table initialization. Remove the
2667 initialization of field RC_Offset. Add initialization of field Needs_
2669 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2670 Reimplement how an object is first finalized, then deallocated.
2671 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2673 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2674 Register TSS_Finalize_Address with type TSS_Names.
2675 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2676 procedure provides the interface between an allocation / deallocation
2677 and the support machinery in Ada.Finalization.Heap_Management.
2678 (Find_Init_Call): Code reformatting.
2679 (Find_Init_Call_In_List): Code reformatting.
2680 (Find_Protection_Type): Moved from Exp_Ch9.
2681 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2682 (Has_Controlled_Coextensions): Removed.
2683 (Has_Controlled_Objects): New routine.
2684 (In_Library_Level_Package_Body): New routine.
2685 (Insert_Action_After): New routine.
2686 (Is_Finalizable_Transient): New routine. This predicate determines
2687 whether an object declaration is one of the many variants of controlled
2689 (Is_Null_Access_BIP_Func_Call): New routine.
2690 (Is_Non_BIP_Func_Call): New routine.
2691 (Is_Related_To_Func_Return): New routine.
2692 (Needs_Finalization): Moved from Exp_Ch7.
2693 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2694 (Find_Protection_Type): Moved from Exp_Ch9.
2695 (Has_Controlled_Coextensions): Removed.
2696 (Has_Controlled_Objects): New routine.
2697 (In_Library_Level_Package_Body): New routine.
2698 (Insert_Action_After): New routine.
2699 (Is_Finalizable_Transient): New routine.
2700 (Is_Null_Access_BIP_Func_Call): New routine.
2701 (Is_Non_BIP_Func_Call): New routine.
2702 (Is_Related_To_Func_Return): New routine.
2703 (Needs_Finalization): Moved from Exp_ch7.
2704 * expander.adb (Expand): Add a case for N_Free_Statement.
2705 * freeze.adb (Freeze_All): Replace the generation of a finalization
2706 list with a collection for access-to-controlled types.
2707 (Freeze_Entity): Code reformatting.
2708 (Freeze_Record_Type): Remove the freezing of a record controller
2710 (Freeze_Subprogram): Code reformatting.
2711 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2713 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2714 has a library-level finalizer.
2715 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2716 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2717 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2718 files. Add a-fihema to the list of object files.
2720 Alphabetize the associations in type Is_Parameterless_Attribute.
2721 * rtsfind.ads: Ada.Finalization_List.Controller and
2722 System.Finalization_Implementation are no longer a GNAT unit.
2723 Update the range of type Ada_Finalization_Child. Remove the following
2724 recoverable entities:
2726 RE_Attach_To_Final_List
2730 RE_Finalizable_Ptr_Ptr
2731 RE_Global_Final_List
2732 RE_Limited_Record_Controller
2735 RE_Record_Controller
2736 RE_Simple_List_Controller
2738 Add the following recoverable entities:
2740 RE_Add_Offset_To_Address
2744 RE_Exception_Identity
2745 RE_Finalization_Collection
2746 RE_Finalization_Collection_Ptr
2747 RE_Needs_Finalization
2748 RE_Save_Library_Occurrence
2749 RE_Set_Finalize_Address_Ptr
2750 RE_Set_Storage_Pool_Ptr
2752 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2754 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2755 (First_Stored_Discriminant): Remove the mention of Name_uController.
2756 * sem_aux.ads: Comment reformatting.
2757 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2758 to redecorate an already existing class-wide type.
2759 (Decorate_Tagged_Type): New parameter profile and associated comment.
2760 Create a "shadow class-wide type" for a shadow entity.
2761 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2762 of the final chain along with the associated comment.
2763 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2764 Full_Desig and set it to the full view of the designated type.
2765 Initialize the finalization collection to empty.
2766 (Build_Derived_Record_Type): Alphabetize local variables. Code
2768 (Collect_Fixed_Components): Remove the mention of Name_uController.
2769 (Create_Constrained_Components): Remove the mention of Name_uController.
2770 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2771 class-wide type of a shadow entity.
2772 (Process_Full_View): Update the machinery which marks type
2773 Limited_Controlled's entity as limited.
2774 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2775 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2776 list, instead make a collection build-in-place formal.
2777 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2778 a designated type in order to establish a match between the renaming
2779 and the renamed entity.
2780 (Find_Selected_Component): Add guard to prevent spurious exceptions
2781 from being raised on .NET/JVM.
2782 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2783 to the list of primitive that need special processing. Update arrays
2784 C_Names and D_Names.
2785 (Replace_Types): Handle class-wide types.
2786 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2787 different parameter profile, look at the first formal.
2788 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2789 use clauses for Exp_Util.
2790 * sem_res.adb: Remove with and use clauses for Elists.
2791 (Propagate_Coextensions): Removed.
2792 (Resolve_Allocator): Do not propagate the list of coextensions from one
2793 allocator to another.
2794 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2795 Deaccessed_T to Desig_Typ.
2796 (Enter_Name): Remove the mention of Name_uController.
2797 (Gather_Components): Remove the mention of Name_uController.
2798 (Incomplete_Or_Private_View): New routine.
2799 (Is_Coextension_Root): Removed.
2800 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2801 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2802 (Is_Coextension_Root): Removed.
2803 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2804 Controlled types are now derived from a null tagged record. Remove
2805 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2806 * sinfo.adb (Coextensions): Removed.
2807 (Set_Coextensions): Removed.
2808 * sinfo.ads: Remove Coextensions from the explanation of node fields
2809 and its uses in nodes.
2810 Update the field usage of N_Allocator.
2811 (Coextensions): Removed along with its pragma Inline.
2812 (Set_Coextensions): Removed along with its pragma Inline.
2813 * snames.ads-tmpl: Remove names
2818 Name_uLocal_Final_List
2819 Name_Finalization_Root
2826 Name_Finalize_Address
2827 * s-pooglo.adb (Allocate): Add overriding indicator.
2828 (Deallocate): Add overriding indicator.
2829 (Storage_Size): Add overriding indicator.
2830 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2831 than Finalize_Global_List.
2832 (Null_Finalize_Global_List): Removed.
2833 (Save_Library_Occurrence): New routine.
2834 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2835 initialization. Add variable Finalize_Library_Objects along with its
2836 pragma Export. Add variables Library_Exception and
2837 Library_Exception_Set along with their pragma Export.
2838 (Null_Finalize_Global_List): Removed.
2839 (Save_Library_Occurrence): New routine.
2840 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2841 rather than Finalize_Global_List.
2842 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2843 of the constructed node.
2845 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2847 * link.c: Include "auto-host.h" before system headers.
2849 2011-08-03 Vincent Celier <celier@adacore.com>
2851 * make.adb (Gnatmake): Add to table Library_Projs only library projects
2852 that are not extended. Do not check if a library project that is
2853 extended should be regenerated. Do not add to table Library_Paths the
2854 libraries that are in extended projects. Link only with libraries that
2855 are in libray projects that are not extended.
2856 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
2857 for a library project that is extended.
2859 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2861 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
2862 conforming subprogram renamings that appear to be completions if they
2863 are not fully conformant.
2864 Such renamings are homographs but not completions.
2865 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
2866 names in a subprogram renaming that appears in an instance.
2868 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2870 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
2871 not immutably limited, build actual subtype from expression to provide
2872 proper bounds to caller.
2874 2011-08-03 Gary Dismukes <dismukes@adacore.com>
2876 * sem_ch8.adb: Minor comment correction.
2878 2011-08-03 Thomas Quinot <quinot@adacore.com>
2880 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
2881 returning a limited array, use an extended return statement.
2883 2011-08-03 Vincent Celier <celier@adacore.com>
2885 * make.adb (Initialize): If --subdirs= is used, but no project file is
2886 specified, attempt to create the specify subdir if it does not already
2887 exist and use it as the object directory as if -D had been specified.
2889 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2891 * s-tpopsp-vms.adb: New file.
2892 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
2893 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
2895 2011-08-03 Emmanuel Briot <briot@adacore.com>
2897 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
2900 2011-08-03 Yannick Moy <moy@adacore.com>
2902 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
2903 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
2904 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
2905 detect that an array has static bounds.
2907 2011-08-03 Thomas Quinot <quinot@adacore.com>
2909 * exp_dist.adb: Minor reformatting.
2911 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2913 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
2914 (ATCB_Key): Removed, not always used.
2916 2011-08-03 Emmanuel Briot <briot@adacore.com>
2918 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
2919 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
2920 most remaining global variables.
2922 2011-08-03 Robert Dewar <dewar@adacore.com>
2924 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
2925 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
2928 2011-08-03 Javier Miranda <miranda@adacore.com>
2930 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
2931 that must be passed by copy in VM targets.
2933 2011-08-03 Emmanuel Briot <briot@adacore.com>
2935 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
2936 duplicates a similar htable now in the project tree.
2938 2011-08-03 Claire Dross <dross@adacore.com>
2940 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
2941 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
2942 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
2943 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
2944 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
2945 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
2946 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
2949 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2951 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
2952 (ATCB_Key): Removed, not always used.
2953 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
2955 * s-tpopsp-tls.adb: New file.
2956 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
2957 x86/x64/ia64/powerpc/sparc Linux.
2959 2011-08-03 Arnaud Charlet <charlet@adacore.com>
2961 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
2962 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
2964 2011-08-03 Thomas Quinot <quinot@adacore.com>
2966 * rtsfind.ads, exp_dist.adb, exp_dist.ads
2967 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
2968 Fix type selection for mapping integer types to PolyORB types.
2970 2011-08-03 Bob Duff <duff@adacore.com>
2972 * sem_ch7.adb: Minor comment clarification.
2974 2011-08-03 Bob Duff <duff@adacore.com>
2976 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
2977 an error analyzing a choice, skip further processing. Further
2978 processing could cause a crash or cascade errors.
2980 2011-08-03 Emmanuel Briot <briot@adacore.com>
2982 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
2983 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
2984 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
2985 prj-env.ads (Shared_Project_Tree_Data): new type
2986 An aggregate project and its aggregated trees need to share the common
2987 data structures used for lists of strings, packages,... This makes the
2988 code simpler since otherwise we have to pass the root tree (also used
2989 for the configuration file data) in addition to the current project
2990 tree. This also avoids ambiguities as to which tree should be used.
2991 And finally this saves a bit of memory.
2992 (For_Every_Project_Imported): new parameter Tree.
2993 Since aggregated projects are using a different tree, we need to let
2994 the caller know which tree to use to manipulate the returned project.
2996 2011-08-03 Robert Dewar <dewar@adacore.com>
2998 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
2999 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3000 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3001 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3003 2011-08-03 Javier Miranda <miranda@adacore.com>
3005 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3006 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3008 2011-08-03 Bob Duff <duff@adacore.com>
3010 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3013 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3015 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3016 g-sehash.ads: Fix typo. Update header.
3018 2011-08-03 Thomas Quinot <quinot@adacore.com>
3020 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3023 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3025 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3026 prefixes of private types along with records, since the selector may be
3028 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3029 private types along with records, since the selector may be a
3032 2011-08-03 Emmanuel Briot <briot@adacore.com>
3034 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3036 2011-08-03 Javier Miranda <miranda@adacore.com>
3038 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3039 Tagged_Type_Expansion.
3041 2011-08-03 Yannick Moy <moy@adacore.com>
3044 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3045 concatenation is the name of a constant
3047 2011-08-03 Emmanuel Briot <briot@adacore.com>
3049 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3050 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3051 (Process_Declarative_Items): new parameter Child_Env.
3053 2011-08-03 Yannick Moy <moy@adacore.com>
3055 * alfa.ads Update format of ALFA section in ALI file in order to add a
3056 mapping from bodies to specs when both are present
3057 (ALFA_Scope_Record): add components for spec file/scope
3058 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3060 (Collect_ALFA): after all scopes have been collected, fill in the spec
3061 information when relevant
3062 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3065 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3067 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3068 code unit to decide whether to add internally generated subprograms.
3070 2011-08-03 Javier Miranda <miranda@adacore.com>
3072 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3074 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3077 2011-08-03 Emmanuel Briot <briot@adacore.com>
3079 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3080 code with Makeutl.Get_Switches.
3081 * prj-tree.adb: Update comment.
3083 2011-08-03 Thomas Quinot <quinot@adacore.com>
3085 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3086 subprogram with a limited formal that does not support external
3089 2011-08-03 Yannick Moy <moy@adacore.com>
3091 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3093 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3094 not from current unit in two phases, because it is not possible to
3095 change the table while iterating over its content.
3096 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3098 2011-08-03 Sergey Rybin <rybin@adacore.com>
3100 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3101 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3103 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3105 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3106 and the component type is composite, this is ambiguous for predefined
3107 concatenation, but if the node is not overloaded and the entity is a use
3108 -defined function its profile can be used to resolve that aggregate.
3110 2011-08-03 Robert Dewar <dewar@adacore.com>
3112 * exp_ch4.adb: Minor code cleanup.
3114 2011-08-03 Thomas Quinot <quinot@adacore.com>
3116 * exp_dist.adb: Do not generate distribution stubs if serious errors
3117 have been diagnosed.
3119 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3121 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3122 the first formal of a primitive operation, go to the base type to
3123 handle properly an access to a derived type with constrained
3125 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3126 user-defined function that is only use-visible.
3128 2011-08-03 Robert Dewar <dewar@adacore.com>
3130 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3131 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3132 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3133 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3134 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3135 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3136 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3137 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3139 2011-08-03 Robert Dewar <dewar@adacore.com>
3141 * repinfo.adb (List_Mechanism): Add handling of
3142 Convention_Ada_Pass_By_XXX.
3143 * sem_mech.adb (Set_Mechanism): Ditto.
3144 * sem_prag.adb (Process_Convention): Add entries for
3145 Convention_Ada_Pass_By_XXX.
3146 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3148 2011-08-03 Pascal Obry <obry@adacore.com>
3150 * makeutl.adb: Minor reformatting.
3152 2011-08-03 Vincent Celier <celier@adacore.com>
3155 (Get_File_Name) If the file cannot be found when there are no config
3156 pragmas file and May_Fail is True, return No_File instead of the file
3157 name, to be consistent.
3159 2011-08-03 Pascal Obry <obry@adacore.com>
3161 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3164 2011-08-03 Javier Miranda <miranda@adacore.com>
3167 (Same_Representation): In VM targets the representation of arrays with
3168 aliased components differs from arrays with non-aliased components.
3170 2011-08-03 Emmanuel Briot <briot@adacore.com>
3172 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3173 not systematically lower case attribute indexes that contain no "."
3174 Fix definition of several Naming attributes, which take
3175 a unit name as index and therefore should be case insensitive.
3176 Minor refactoring (reduce length of variable names).
3178 2011-08-03 Emmanuel Briot <briot@adacore.com>
3180 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3182 2011-08-03 Emmanuel Briot <briot@adacore.com>
3184 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3185 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3186 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3187 prj-tree.ads (Prj.Tree.Environment): new type.
3189 2011-08-03 Emmanuel Briot <briot@adacore.com>
3191 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3192 prj-tree.adb, prj-tree.ads (Environment): new type.
3194 2011-08-03 Emmanuel Briot <briot@adacore.com>
3196 * prj-tree.ads: Remove unused variable.
3198 2011-08-03 Yannick Moy <moy@adacore.com>
3200 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3201 issuing messages related to SPARK restriction violation.
3203 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3205 * sem_ch6.adb: guard against error nodes in return statements.
3207 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3209 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3210 a warning can only appear on a configuration file, so emit warning
3211 without further checks.
3213 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3215 * s-interr.ads: add overriding keyword.
3217 2011-08-03 Geert Bosch <bosch@adacore.com>
3219 * exp_attr.adb: Fix minor typo.
3221 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3223 * par-ch4.adb: improve error recovery.
3225 2011-08-03 Emmanuel Briot <briot@adacore.com>
3227 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3228 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3231 2011-08-03 Emmanuel Briot <briot@adacore.com>
3233 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3234 "external" as an attribute name in aggregate projects.
3236 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3238 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3239 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3240 from 0, so we need to adjust.
3242 2011-08-03 Emmanuel Briot <briot@adacore.com>
3244 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3245 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3247 2011-08-03 Yannick Moy <moy@adacore.com>
3249 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3250 restriction on overloaded entity if the entity is not an operator.
3252 2011-08-03 Yannick Moy <moy@adacore.com>
3254 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3255 restrict.ads: Rename remaining Check_Formal_Restriction* into
3256 Check_SPARK_Restriction*.
3258 2011-08-03 Emmanuel Briot <briot@adacore.com>
3260 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3261 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3263 (Project_Empty): removed
3264 (Empty_Project): new parameter Qualifier
3265 This is used to have fields specific to aggregate projects, cleaner
3266 New field to store the list of aggregated projects.
3267 (Check_Aggregate_Project): removed
3268 (Process_Aggregated_Projects, Free): new subprograms.
3270 2011-08-03 Olivier Hainque <hainque@adacore.com>
3272 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3274 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3276 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3277 explicit dereference of an unconstrained type, create a constrained
3278 subtype for it, as is done for function calls that return an
3281 2011-08-03 Thomas Quinot <quinot@adacore.com>
3283 * g-pehage.adb (Finalize): Avoid possible double-free.
3285 2011-08-03 Steve Baird <baird@adacore.com>
3287 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3288 Elab_Spec/Body attrs in CodePeer_Mode.
3290 2011-08-03 Javier Miranda <miranda@adacore.com>
3292 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3293 low bound is not known at compile time but they have no others choice.
3294 Done because in this case the bounds can be obtained directly from the
3297 2011-08-03 Ed Falis <falis@adacore.com>
3299 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3300 on VxWorks SMP. Remove unusable constant ANY_CPU.
3302 2011-08-03 Emmanuel Briot <briot@adacore.com>
3304 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3305 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3306 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3307 Prj.Env.Initialize_Empty): new subprograms
3308 (Get_Env, Find_Project): remove parameter Target_Name.
3310 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3312 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3313 as a condition for the delayed call to Derived_Subprograms done for the
3314 case of the rewriting of a derived type that constrains the
3315 discriminants of its parent type.
3316 Avoids redundant subprogram derivations for private subtype derivations.
3318 2011-08-03 Javier Miranda <miranda@adacore.com>
3320 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3321 Build_Record_Aggr_Code.
3322 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3323 discriminants in extension aggregates.
3325 2011-08-03 Emmanuel Briot <briot@adacore.com>
3327 * prj-pp.adb (Print): also output project qualifiers, since in
3328 particular "aggregate" is mandatory in an aggregate project.
3330 2011-08-03 Emmanuel Briot <briot@adacore.com>
3332 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3333 (Debug_Output): new function.
3335 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3337 * gnat_ugn.texi: Document -Wstack-usage.
3338 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3340 2011-08-03 Thomas Quinot <quinot@adacore.com>
3342 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3343 have keyword LIMITED.
3345 2011-08-03 Yannick Moy <moy@adacore.com>
3347 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3348 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3349 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3350 section (does not happen in compiler, only if code directly calls
3352 * get_alfa.adb, get_alfa.ads: New files.
3353 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3355 * lib-xref-alfa.adb: New file.
3356 * lib-xref.adb, lib-xref.ads
3357 (Xref_Entry): redefine information needed in cross-references for ALFA.
3358 Push ALFA treatments in separated local package.
3359 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3360 identifiers. Return entity of package body instead of spec. Return
3361 Empty for a scope with no location.
3362 (Generate_Reference): adapt to new components for ALFA information.
3363 Remove the need for D references on definitions.
3364 (Is_Local_Reference): moved to ALFA local package
3365 (Output_References): extract subfunction as Extract_Source_Name
3366 (Output_Local_References): remove procedure, replaced by filtering of
3367 cross-references in package ALFA and printing in Put_ALFA.
3368 (Write_Entity_Name): remove procedure
3369 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3370 print exact name of entity as it appears in source file
3371 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3372 * put_alfa.adb, put_alfa.ads: New files.
3373 * xref_lib.adb (Search_Xref): protect read of cross-references against
3374 reading other sections of the ALI file, in gnatxref
3375 (Search): protect read of cross-references against reading other
3376 sections of the ALI file, in gnatfind.
3377 * gcc-interface/Make-lang.in: Update dependencies.
3379 2011-08-03 Thomas Quinot <quinot@adacore.com>
3381 * sem_ch3.adb: Minor reformatting.
3383 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3385 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3386 raising an exception.
3388 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3390 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3391 type, always use 1 as the lower bound or string, even if lower bound of
3392 context is not static, to handle properly null strings in a non-static
3395 2011-08-03 Bob Duff <duff@adacore.com>
3397 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3398 always legal on the right-hand side of an assignment statement; there
3399 is always an applicable index constraint in this case. Therefore, the
3400 check for Pkind = N_Assignment_Statement is now unconditional -- it
3401 doesn't depend on whether Is_Constrained (Typ).
3403 2011-08-03 Robert Dewar <dewar@adacore.com>
3405 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3407 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3409 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3410 for an itype created within a generic unit.
3412 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3414 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3415 suppresses all inlining.
3417 2011-08-03 Robert Dewar <dewar@adacore.com>
3419 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3420 exp_aggr.adb: Minor reformatting.
3422 2011-08-03 Thomas Quinot <quinot@adacore.com>
3424 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3425 tagged assignment when discriminant checks are suppressed. This is
3426 useless and extremely costly in terms of static stack usage.
3428 2011-08-03 Bob Duff <duff@adacore.com>
3430 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3431 of generics, because this leads to the wrong entity in the wrong scope,
3432 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3434 (Process_Interface_Name): Follow Alias for instances of generics, to
3435 correct for the above change.
3437 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3439 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3440 is an integer literal it is always safe to replace the reference. In
3441 addition, if the reference appears in the generated code for an object
3442 declaration it is necessary to copy because otherwise the reference
3443 might be to the uninitilized value of the discriminant of the object
3446 2011-08-03 Pascal Obry <obry@adacore.com>
3448 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3449 ACL used, in this case we want to check for ending .exe, not .exe
3450 anywhere in the path.
3452 2011-08-03 Sergey Rybin <rybin@adacore.com>
3454 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3455 the tree structure (semantic decoration of references to record
3458 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3460 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3461 choices of a named array aggregate, bail out when any choices are
3462 marked as Errors_Posted.
3464 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3466 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3467 in which entity is frozen, to handle properly loop variables in
3470 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3472 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3473 subtype is not static, compute the upper bound using attributes, to
3474 handle properly index types that are not integer types.
3476 2011-08-03 Bob Duff <duff@adacore.com>
3478 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3479 Update copyright notice.
3481 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3483 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3484 Original_Discriminant if within an instance.
3485 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3487 2011-08-03 Thomas Quinot <quinot@adacore.com>
3489 * einfo.ads: Minor reformatting.
3491 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3493 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3494 composite type with an unfrozen subcomponent, in the profile of a
3495 primitive operation.
3497 2011-08-03 Robert Dewar <dewar@adacore.com>
3499 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3501 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3503 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3504 unconstrained type with discriminants is initialized with an aggregate,
3505 use the constrained subtype of the aggregate as the type of the object,
3506 because it is immutable, and this allows the back-end to generate no
3507 code for the object declaration.
3509 2011-08-03 Robert Dewar <dewar@adacore.com>
3511 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3512 comparison operand is variable, and turns out to be zero or negative.
3514 2011-08-03 Javier Miranda <miranda@adacore.com>
3517 (Expand_Dispatching_Constructor_Call): Disable expansion of
3518 code required for native targets. Done to avoid generating
3519 references to unavailable runtime entities in VM targets.
3521 (Expand_N_Object_Declaration): Add missing support to handle
3522 the explicit initialization of class-wide interface objects.
3525 2011-08-03 Matthew Heaney <heaney@adacore.com>
3527 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3529 2011-08-03 Matthew Heaney <heaney@adacore.com>
3531 * a-cbdlli.adb (Splice): move source items from first to last
3533 2011-08-03 Yannick Moy <moy@adacore.com>
3535 * sem_util.ads: comment added.
3537 2011-08-03 Javier Miranda <miranda@adacore.com>
3540 (Expand_Record_Aggregate): In VM targets disable the expansion into
3541 assignments of aggregates whose type is not known at compile time.
3543 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3545 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3546 protected entries and task entries, to build the proper renaming
3547 declaration for entry formals, used in debugging.
3548 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3549 parameters in the same way.
3551 2011-08-02 Robert Dewar <dewar@adacore.com>
3553 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3554 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3555 code reorganization.
3557 2011-08-02 Robert Dewar <dewar@adacore.com>
3559 * debug.adb: Debug flag d.P to suppress length comparison optimization
3560 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3561 comparison of Length by comparing First/Last instead.
3563 2011-08-02 Matthew Heaney <heaney@adacore.com>
3565 * a-cobove.ads: Code clean up.
3567 2011-08-02 Vincent Celier <celier@adacore.com>
3569 * adaint.c (file_names_case_sensitive_cache): New static int.
3570 (__gnat_get_file_names_case_sensitive): Cache the return value in
3571 file_names_case_sensitive_cache at the first invocation, to avoid
3572 multiple calls to getenv.
3574 2011-08-02 Bob Duff <duff@adacore.com>
3576 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3578 2011-08-02 Yannick Moy <moy@adacore.com>
3580 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3581 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3582 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3583 indicate that we are in a precondition or postcondition. This is used in
3584 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3585 decide whether to flag the spec or body of the current subprogram as
3588 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3590 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3592 * a-extiin.ads: New file.
3594 2011-08-02 Bob Duff <duff@adacore.com>
3596 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3597 now raises Name_Error instead of Use_Error in certain cases. The other
3598 parts of this AI were already implemented properly.
3600 2011-08-02 Vincent Celier <celier@adacore.com>
3602 * link.c: Only import "auto-host.h" when building the gnattools.
3604 2011-08-02 Yannick Moy <moy@adacore.com>
3606 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3607 which calls a local subprogram, so extract subprogram
3608 from Mark_Non_ALFA_Subprogram_Body.
3610 2011-08-02 Javier Miranda <miranda@adacore.com>
3613 (Extract_Dispatching_Call): If the type of the dispatching object is an
3614 access type then return an explicit dereference in the Object out-mode
3617 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3619 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3620 compatibility checks for all indexes of an array subtype, not just the
3621 first. Reset Has_Dynamic_Range_Check on the subtype before each
3622 potential check to ensure that Insert_Range_Checks will not elide any
3623 of the dynamic checks.
3625 2011-08-02 Yannick Moy <moy@adacore.com>
3627 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3628 SPARK restriction at parsing time.
3629 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3630 directive only if the SPARK restriction is set for this unit.
3632 2011-08-02 Yannick Moy <moy@adacore.com>
3634 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3635 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3636 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3637 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3638 Mark_Non_ALFA_Subprogram_Body.
3639 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3642 2011-08-02 Yannick Moy <moy@adacore.com>
3644 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3647 2011-08-02 Robert Dewar <dewar@adacore.com>
3649 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3650 exp_ch3.adb: Minor reformatting.
3652 2011-08-02 Emmanuel Briot <briot@adacore.com>
3654 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3655 files, not any regular file.
3656 (__gnat_locate_file_with_predicate): new subprogram.
3658 2011-08-02 Yannick Moy <moy@adacore.com>
3660 * sinfo.adb, sinfo.ads: Restrict the use of flags
3661 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3662 nodes, plus N_Subtype_Declaration for the 2nd one.
3664 2011-08-02 Sergey Rybin <rybin@adacore.com>
3666 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3667 - fix bugs in the description of Source_Trace;
3668 - get rid of UNIT_NAME;
3670 2011-08-02 Javier Miranda <miranda@adacore.com>
3673 (Build_Dispatching_Requeue): Adding support for VM targets
3674 since we cannot directly reference the Tag entity.
3675 * exp_sel.adb (Build_K): Adding support for VM targets.
3676 (Build_S_Assignment): Adding support for VM targets.
3678 (Default_Prim_Op_Position): In VM targets do not restrict availability
3679 of predefined interface primitives to compiling in Ada 2005 mode.
3680 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3681 restricted to compiling in Ada 2005 mode.
3682 (Make_VM_TSD): Generate code that declares and initializes the OSD
3683 record. Needed to support dispatching calls through synchronized
3686 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3687 primitives associated with synchronized interfaces.
3688 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3689 primitives associated with synchronized interfaces.
3691 2011-08-02 Yannick Moy <moy@adacore.com>
3693 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3694 statements hidden in SPARK if preceded by the HIDE directive
3695 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3696 exception handlers as hidden in SPARK if preceded by the HIDE directive
3697 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3698 if starting with the HIDE directive
3699 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3700 starting with the HIDE directive; mark the declarations in a private
3701 part as hidden in SPARK if the private part starts with the HIDE
3703 * restrict.adb, restrict.ads
3704 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3705 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3706 argument node belongs to a part which is hidden in SPARK
3707 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3708 parts in SPARK; protect the possibly costly call to
3709 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3710 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3711 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3712 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3714 (Scan): recognize special comment starting with '#' and followed by
3715 SPARK keyword "hide" as a HIDE directive.
3717 2011-08-02 Yannick Moy <moy@adacore.com>
3719 * types.ads, erroutc.ads: Minor reformatting.
3721 2011-08-02 Vincent Celier <celier@adacore.com>
3723 * link.c: Add response file support for cross platforms.
3725 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3727 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3728 in an association, set parent field of copy before partial analysis.
3729 * sem_res.adb (Resolve_Slice): create reference to itype only when
3730 expansion is enabled.
3732 2011-08-02 Yannick Moy <moy@adacore.com>
3734 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3735 for new flag denoting which subprogram bodies are in ALFA
3736 * restrict.adb, sem_ch7.adb: Update comment
3737 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3738 sem_ch9.adb, sem_res.adb: Add calls to
3739 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3740 * sem_ch6.adb (Analyze_Function_Return): add calls to
3741 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3742 middle of the body, and extended return.
3743 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3744 False when missing return.
3745 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3746 to True for subprograms whose spec is in ALFA. Remove later on the flag
3747 on the entity used for a subprogram body when there exists a separate
3749 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3750 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3751 False, otherwise do nothing.
3753 2011-08-02 Robert Dewar <dewar@adacore.com>
3755 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3757 2011-08-02 Yannick Moy <moy@adacore.com>
3759 * sem_ch4.ads: minor formatting.
3761 2011-08-02 Yannick Moy <moy@adacore.com>
3763 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3764 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3765 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3766 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3767 opt.ads: cleanup of SPARK mode
3769 2011-08-02 Yannick Moy <moy@adacore.com>
3771 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3773 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3774 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3776 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3777 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3778 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3779 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3781 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3783 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3784 functions whose return type is not in ALFA.
3785 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3787 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3788 parameter's type is not in ALFA.
3789 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3792 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3794 * sem_ch6 (Analyze_Expression_Function): treat the function as
3795 Inline_Always, and introduce a subprogram declaration for it when it is
3797 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3798 expression functions, so that the back-end can determine whether they
3799 can in fact be inlined.
3800 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3801 a function body comes from an expression function.
3803 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3805 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3806 null exclusions to test Can_Never_Be_Null on the anonymous access types
3807 of the formals rather than testing the formals themselves. Exclude this
3808 check in cases where the Old_Formal is marked as a controlling formal,
3809 to avoid issuing spurious errors for bodies completing dispatching
3810 operations (due to the flag not getting set on controlling access
3811 formals in body specs).
3812 (Find_Corresponding_Spec): When checking full and subtype conformance of
3813 subprogram bodies in instances, pass Designated and E in that order, for
3814 consistency with the expected order of the formals (New_Id followed by
3817 2011-08-02 Robert Dewar <dewar@adacore.com>
3819 * sem_ch8.adb: Minor reformatting.
3821 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3823 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3824 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3825 primitive operations of class-wide actuals.
3827 2011-08-02 Javier Miranda <miranda@adacore.com>
3829 * exp_atag.ads, exp_atag.adb
3830 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3831 since its value is implicitly passed in argument Typ.
3832 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3833 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3834 Build_Common_Dispatching_Select_Statements.
3836 2011-08-02 Robert Dewar <dewar@adacore.com>
3838 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3839 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3842 2011-08-02 Robert Dewar <dewar@adacore.com>
3844 * sem_res.adb: Minor reformatting.
3845 * sem_prag.adb: Minor reformatting.
3847 2011-08-02 Javier Miranda <miranda@adacore.com>
3849 * exp_atag.adb, exp_atags.ads
3850 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
3851 by the tagged type Entity. Required to use this routine in the VM
3852 targets since we do not have available the Tag entity in the VM
3855 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
3856 Ada.Tags has not been previously loaded.
3858 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
3859 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
3861 (Enclosing_Dynamic_Scope): Add missing support to handle the full
3862 view of enclosing scopes. Required to handle enclosing scopes that
3863 are synchronized types whose full view is a task type.
3865 (Build_VM_TSDs): Minor code improvement to avoid generating and
3866 analyzing lists with empty nodes.
3867 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
3868 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
3869 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
3870 (Make_Disp_Timed_Select_Body): Add support for VM targets.
3871 (Make_Select_Specific_Data_Table): Add support for VM targets.
3872 (Make_VM_TSD): Generate code to initialize the SSD structure of
3875 2011-08-02 Yannick Moy <moy@adacore.com>
3877 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
3878 cross-references section in ALI.
3879 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
3880 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
3882 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
3883 subprogram or package entity of a node
3884 (Is_Local_Reference_Type): new function returns True for references
3885 selected in local cross-references.
3886 (Lt): function extracted from Lt in Output_References
3887 (Write_Entity_Name): function extracted from Output_References
3888 (Generate_Definition): generate reference with type 'D' for definition
3889 of objects (object declaration and parameter specification), with
3890 appropriate locations and units, for use in local cross-references.
3891 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
3892 references of type 'I' for initialization in object definition.
3893 (Output_References): move part of function Lt and procedure
3894 Write_Entity_Name outside of the body. Ignore references of types 'D'
3895 and 'I' introduced for local cross-references.
3896 (Output_Local_References): new procedure to output the local
3897 cross-references sections.
3898 (Lref_Entity_Status): new array defining whether an entity is a local
3899 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
3900 with 'I' type when initialization expression is present.
3901 * get_scos.adb, get_scos.ads: Correct comments and typos
3903 2011-08-02 Javier Miranda <miranda@adacore.com>
3905 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
3907 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
3909 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
3912 2011-08-02 Vincent Celier <celier@adacore.com>
3914 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
3915 (No_Space_Img): New function
3916 (Find_Excluded_Sources): When reading from a file, record the file name
3917 and the line number for each excluded source.
3918 (Mark_Excluded_Sources): When reporting an error, if the excluded
3919 sources were read from a file, include file name and line number in
3922 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3924 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
3926 2011-08-02 Robert Dewar <dewar@adacore.com>
3928 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
3930 2011-08-02 Javier Miranda <miranda@adacore.com>
3932 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
3933 generation of TSDs to the DOTNET compiler.
3934 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
3935 generation of TSDs to the DOTNET compiler.
3937 2011-08-02 Javier Miranda <miranda@adacore.com>
3939 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
3940 record of all the tagged types declared inside library level package
3941 declarations, library level package bodies or library level subprograms.
3942 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
3943 associated with a given tagged type.
3944 (Build_VM_TSDs): New subprogram.
3945 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
3946 compilation units that are subprograms.
3947 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
3948 compilation units that are package bodies.
3949 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
3950 units that are a package declaration or a package instantiation.
3951 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
3952 reorganization to improve the error generated by the frontend when the
3953 function Ada.Tags.Secondary_Tag is not available.
3954 * rtsfind.ads (RE_Register_TSD): New runtime entity.
3955 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
3957 2011-08-02 Javier Miranda <miranda@adacore.com>
3959 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
3961 2011-08-02 Robert Dewar <dewar@adacore.com>
3963 * s-imenne.ads: Minor reformatting.
3965 2011-08-02 Robert Dewar <dewar@adacore.com>
3967 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
3968 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
3969 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
3971 2011-08-02 Robert Dewar <dewar@adacore.com>
3973 * einfo.ads (Materialize_Entity): Document this is only for renamings
3974 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
3975 required debug information in the case where we transform the object
3976 declaration into a renaming declaration.
3977 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
3979 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
3982 2011-08-02 Robert Dewar <dewar@adacore.com>
3984 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
3985 Suppress_Init_Procs.
3986 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
3987 Suppress_Initialization/Initialization_Suppressed.
3988 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
3989 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
3990 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
3991 * sem_prag.adb: New processing for pragma Suppress_Initialization.
3993 2011-08-02 Robert Dewar <dewar@adacore.com>
3995 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
3998 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4000 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4001 only have inheritable classwide pre/postconditions.
4003 2011-08-02 Javier Miranda <miranda@adacore.com>
4005 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4006 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4007 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4008 checks if the external tag of a type is the same as the external tag
4009 of some other declaration.
4011 2011-08-02 Thomas Quinot <quinot@adacore.com>
4013 * s-taskin.ads: Minor reformatting.
4015 2011-08-02 Emmanuel Briot <briot@adacore.com>
4017 * g-comlin.adb (Display_Help): swap the order in which it prints the
4018 short help and the general usage.
4020 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4022 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4023 the aspect declarations and attach them to the generic copy for
4024 subsequent analysis.
4025 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4026 declarations of the generic tree to the new subprogram declarations.
4027 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4028 conditions that apply to a subprogram instance.
4030 2011-08-02 Robert Dewar <dewar@adacore.com>
4032 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4034 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4036 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4037 private type with a tagged full view is not derived in the immediate
4038 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4040 2011-08-02 Robert Dewar <dewar@adacore.com>
4042 * exp_ch4.adb: Minor reformatting.
4044 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4046 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4047 Ada2012 iterator, the loop will be rewritten during expansion into a
4048 while loop with a cursor and an element declaration. Do not analyze the
4049 body in this case, because if the container is for indefinite types the
4050 actual subtype of the elements will only be determined when the cursor
4051 declaration is analyzed.
4053 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4055 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4056 size/alignment related attributes in CodePeer_Mode.
4058 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4060 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4061 Prepend_Element, since this can result in the operation getting the
4062 wrong slot in the full type's dispatch table if the full type has
4063 inherited operations. The incomplete type's operation will get added
4064 to the proper position in the full type's primitives
4065 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4066 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4067 dispatching operations, since there are cases where nonprimitive
4068 subprograms can get added to the list of incomplete dependents (such
4069 as subprograms in nested packages).
4070 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4071 private part when determining whether to add a primitive with a
4072 parameter of a tagged incomplete type to the Private_Dependents list.
4073 Such primitives can also occur in the visible part, and should not have
4074 been excluded from being private dependents.
4075 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4076 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4077 list of a Taft-amendment incomplete type is a primitive before issuing
4078 an error that the full type must appear in the same unit. There are
4079 cases where nonprimitives can be in the list (such as subprograms in
4081 * sem_disp.adb (Derives_From): Use correct condition for checking that
4082 a formal's type is derived from the type of the corresponding formal in
4083 the parent subprogram (the condition was completely wrong). Add
4084 checking that was missing for controlling result types being derived
4085 from the result type of the parent operation.
4087 2011-08-02 Yannick Moy <moy@adacore.com>
4089 * errout.adb (First_Node): minor renaming
4090 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4093 2011-08-02 Yannick Moy <moy@adacore.com>
4095 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4096 before accessing operands.
4097 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4098 decide whether an initialization expression respects SPARK rules, as
4099 the plain node is the expanded one. This allows for more valid warnings
4101 * gnat_rm.texi: Minor update.
4103 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4105 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4108 2011-08-02 Robert Dewar <dewar@adacore.com>
4110 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4112 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4114 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4115 loop statements and the element renaming declaration with a block when
4116 the element type is controlled.
4118 2011-08-02 Yannick Moy <moy@adacore.com>
4120 * sinfo.ads: Minor formatting.
4122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4124 * sem_aggr.adb (Add_Association): if the association has a box and no
4125 expression, use the Sloc of the aggregate itself for the new
4127 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4130 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4132 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4133 When a container is provided via a function call, generate a renaming
4134 of the function result. This avoids the creation of a transient scope
4135 and the premature finalization of the container.
4136 * exp_ch7.adb (Is_Container_Cursor): Removed.
4137 (Wrap_Transient_Declaration): Remove the supression of the finalization
4138 of the list controller when the declaration denotes a container cursor,
4141 2011-08-02 Yannick Moy <moy@adacore.com>
4143 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4144 node is from source, instead of the original node being from source.
4146 (Resolve_Array_Aggregate): refine the check for a static expression, to
4147 recognize also static ranges
4148 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4149 Array_Type_Declaration): postpone the test for the type being a subtype
4150 mark after the type has been resolved, so that component-selection and
4151 expanded-name are discriminated.
4152 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4153 to distinguish the case of an iteration scheme, so that an error is
4154 issed on a non-static range in SPARK except in an iteration scheme.
4155 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4156 In_Iter_Schm = True.
4157 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4158 user-defined operators so that they are allowed in renaming
4160 (Find_Selected_Component): refine the check for prefixing of operators
4161 so that they are allowed in renaming. Move the checks for restrictions
4162 on selector name after analysis discriminated between
4163 component-selection and expanded-name.
4164 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4165 concatenation argument of string type if it is static.
4166 * sem_util.adb, sem_util.ads
4167 (Check_Later_Vs_Basic_Declarations): add a new function
4168 Is_Later_Declarative_Item to decice which declarations are allowed as
4169 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4170 mode, add that renamings are considered as later items.
4171 (Enclosing_Package): new function to return the enclosing package
4172 (Enter_Name): correct the rule for homonyms in SPARK
4173 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4174 from source (result of expansion) to avoid issuing wrong warnings.
4176 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4178 * errout.adb: On anything but an expression First_Node returns its
4181 2011-08-02 Pascal Obry <obry@adacore.com>
4183 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4185 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4187 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4188 Set the associated loop as the related expression of internally
4190 * exp_ch7.adb (Is_Container_Cursor): New routine.
4191 (Wrap_Transient_Declaration): Supress the finalization of the list
4192 controller when the declaration denotes a container cursor.
4194 2011-08-02 Yannick Moy <moy@adacore.com>
4196 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4198 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4199 expression is a simple expression. This check cannot be performed in
4200 the semantics, so just drop it.
4201 (P_Index_Or_Discriminant_Constraint): move check that the index or
4202 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4203 semantics. Other cases were previously checked in the semantics.
4204 * par-ch4.adb (P_Name): move checks that a selector name is not
4205 character literal or an operator symbol to Find_Selected_Component in
4207 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4208 declarations are not placed after later declarations in a separate
4209 procedure in Sem_Util (possibly not the best choice?), to be used both
4210 during parsing, for Ada 83 mode, and during semantic analysis, for
4212 * par-endh.adb (Check_End): move check that end label is not missing
4213 to Process_End_Label in the semantics
4214 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4215 the special case for SPARK restriction
4216 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4217 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4218 parameter Force to issue the error message even on internal node (used
4219 for generated end label). Call Check_Restriction to check when an error
4220 must be issued. In SPARK mode, issue an error message even if the
4221 restriction is not set.
4222 (Check_Restriction): new procedure with an additional out parameter to
4223 inform the caller that a message has been issued
4224 * sem_aggr.adb: Minor modification of message
4225 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4226 instead of issuing an error message directly
4227 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4228 declarations are not placed after later declarations, by calling
4229 Check_Later_Vs_Basic_Declarations
4230 (Analyze_Subtype_Declaration): move here the check that an index or
4231 discriminant constraint must be a subtype mark. Change the check that
4232 a subtype of String must start at one so that it works on subtype marks.
4233 * sem_ch4.adb (Analyze_Call): move here the check that a named
4234 association cannot follow a positional one in a call
4235 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4236 instead of issuing an error message directly
4237 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4238 selector name is not a character literal or an operator symbol. Move
4239 here the check that the prefix of an expanded name cannot be a
4240 subprogram or a loop statement.
4241 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4242 procedure called from parsing and semantics to check that basic
4243 declarations are not placed after later declarations
4244 (Process_End_Label): move here the check that end label is not missing
4246 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4248 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4249 representation clause in codepeer mode, since it confuses CodePeer and
4250 does not bring useful info.
4252 2011-08-02 Ed Falis <falis@adacore.com>
4254 * init.c: initialize fp hw on MILS.
4256 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4258 * errout.adb (First_Node): for bodies, return the node itself (small
4259 optimization). For other nodes, do not check source_unit if the node
4260 comes from Standard.
4262 2011-08-02 Robert Dewar <dewar@adacore.com>
4264 * exp_ch3.adb: Minor comment additions.
4265 * sem_ch13.adb: Minor reformatting.
4267 2011-08-02 Pascal Obry <obry@adacore.com>
4269 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4271 2011-08-02 Robert Dewar <dewar@adacore.com>
4273 * sem_attr.adb: Minor reformatting.
4275 2011-08-02 Robert Dewar <dewar@adacore.com>
4277 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4278 (Has_Default_Component_Value): Removed
4279 * einfo.ads Comment updates
4280 (Has_Default_Aspect): Replaces Has_Default_Value
4281 (Has_Default_Component_Value): Removed
4283 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4285 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4286 (Get_Simple_Init_Val): Handle Default_Value aspect
4287 (Needs_Simple_Initialization): Handle Default_Value aspect
4288 * exp_ch3.ads: Needs_Simple_Initialization
4289 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4290 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4292 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4293 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4294 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4296 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4298 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4299 package containing iteration primitives.
4300 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4302 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4304 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4305 "of", pre-analyze expression in case it is a function call with
4306 finalization actions that must be placed ahead of the loop.
4307 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4308 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4310 2011-08-02 Geert Bosch <bosch@adacore.com>
4312 * cstand.adb (Create_Float_Types): Only consider C's long double for
4313 Long_Long_Float, in addition to double.
4315 2011-08-02 Robert Dewar <dewar@adacore.com>
4317 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4318 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4319 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4322 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4324 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4327 2011-08-02 Javier Miranda <miranda@adacore.com>
4329 * einfo.ads, einfo.adb
4330 (Original_Access_Type): Move this attribute to Node26 since there was
4331 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4332 which causes conflicts and breaks the generation of the .NET compiler.
4333 (Interface_Name): Add missing documentation on JGNAT only uses of
4336 2011-08-02 Geert Bosch <bosch@adacore.com>
4338 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4339 (Find_Back_End_Float_Type): Likewise
4340 (Create_Back_End_Float_Types): Likewise
4341 (Create_Float_Types): Likewise
4342 (Register_Float_Type): Likewise
4343 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4344 Nlist and split out type selection in new local Find_Base_Type function.
4345 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4347 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4349 2011-08-02 Robert Dewar <dewar@adacore.com>
4351 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4353 * opt.ads: Minor comment change.
4354 * sem_ch12.adb: Minor code reorganization.
4356 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4358 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4359 subtype's list of rep items to the list on the full subtype in the case
4360 where the lists are the same.
4362 2011-08-02 Geert Bosch <bosch@adacore.com>
4364 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4365 using the one from System.Strings, which also deallocates all strings.
4367 2011-08-02 Geert Bosch <bosch@adacore.com>
4369 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4371 * gcc-interface/Make-lang.in: Update dependencies.
4373 2011-08-02 Olivier Hainque <hainque@adacore.com>
4375 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4378 2011-08-02 Javier Miranda <miranda@adacore.com>
4380 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4381 associated with anonymous access to subprograms.
4383 2011-08-02 Geert Bosch <bosch@adacore.com>
4386 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4387 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4388 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4389 (Add_Symbol_Definition): Move to switch-c.adb
4390 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4391 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4392 (Add_Symbol_Definition): Move to switch-c.adb.
4393 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4395 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4397 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4398 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4400 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4401 (Add_Symbol_Definition): Moved from Prepcomp.
4402 * switch-c.ads: Update copyright notice. Use String_List instead of
4403 Argument_List, removing dependency on System.OS_Lib.
4405 2011-08-02 Yannick Moy <moy@adacore.com>
4407 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4408 mode on initialization expression which does not respect SPARK
4410 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4411 if the tree referenced by its argument represents an initialization
4412 expression in SPARK, suitable for initializing an object in an object
4415 2011-08-02 Javier Miranda <miranda@adacore.com>
4417 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4418 internally generated access to subprogram with its associated protected
4420 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4422 2011-08-02 Geert Bosch <bosch@adacore.com>
4424 * cstand.adb (Register_Float_Type): Print information about type to
4425 register, if the Debug_Flag_Dot_B is set.
4426 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4427 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4428 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4429 with a requested precision of more than Max_Digits digits and no more
4430 than Max_Base_Digits digits, if a range specification is present and the
4431 Predefined_Float_Types list has a suitable type to derive from.
4432 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4433 case of type completion with pragma Import
4435 (Process_Import_Predefined_Type): Processing to complete a type
4436 with pragma Import. Currently supports floating point types only.
4437 (Set_Convention_From_Pragma): Do nothing without underlying type.
4438 (Process_Convention): Guard against absence of underlying type,
4439 which may happen when importing incomplete types.
4440 (Process_Import_Or_Interface): Handle case of importing predefined
4441 types. Tweak error message.
4443 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4445 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4446 functions to previous change. Reorganize code slightly.
4448 2011-08-02 Geert Bosch <bosch@adacore.com>
4450 * back_end.ads (Register_Type_Proc): New call back procedure type for
4451 allowing the back end to provide information about available types.
4452 (Register_Back_End_Types): New procedure to register back end types.
4453 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4455 * cstand.adb (Back_End_Float_Types): New list for floating point types
4456 supported by the back end.
4457 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4458 (Copy_Float_Type): New procedure to make new copies of predefined types.
4459 (Register_Float_Type): New call back procedure to populate the BEFT list
4460 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4461 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4462 (Create_Float_Types): New procedure to create entities for floating
4463 point types predefined in Standard, and put these and any remaining
4464 BEFTs on the Predefined_Float_Types list.
4465 * stand.ads (Predefined_Float_Types): New list for predefined floating
4466 point types that do not have declarations in package Standard.
4468 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4470 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4471 entity node for the unit containing the parameter.
4472 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4473 (Add_Inlined_Subprogram): Likewise.
4474 * gcc-interface/Make-lang.in: Update dependencies.
4476 2011-08-02 Thomas Quinot <quinot@adacore.com>
4478 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4481 2011-08-02 Geert Bosch <bosch@adacore.com>
4483 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4485 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4487 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4488 computed value of Base_Type.
4490 2011-08-02 Yannick Moy <moy@adacore.com>
4492 * restrict.adb (Check_Restriction): issue an error for any use of
4493 class-wide, even if the No_Dispatch restriction is not set.
4494 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4495 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4496 when completing a private extension, the type named in the private part
4497 is not the same as that named in the visible part.
4498 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4499 of an inherited primitive operations of a tagged type or type extension
4500 that returns the tagged type.
4501 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4502 function which returns True for an implicit operation inherited by the
4503 derived type declaration for the argument type.
4504 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4507 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4509 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4510 Process_Bounds, to perform analysis with expansion of a range or an
4511 expression that is the iteration scheme for a loop.
4512 (Analyze_Iterator_Specification): If domain of iteration is given by a
4513 function call with a controlled result, as is the case if call returns
4514 a predefined container, ensure that finalization actions are properly
4516 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4518 2011-08-02 Javier Miranda <miranda@adacore.com>
4520 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4521 * gcc-interface/Make-lang.in: Update dependencies.
4523 2011-08-02 Javier Miranda <miranda@adacore.com>
4525 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4526 determine if the analysis is performed using N or Original_Node (N).
4527 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4528 functionality of routine Is_Variable avoids code duplication.
4529 * checks.adb (Determine_Range): Handle temporaries generated by
4530 Remove_Side_Effects.
4532 2011-08-02 Javier Miranda <miranda@adacore.com>
4534 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4535 expansion of the condition. Required since the previous analysis was
4536 done with expansion disabled (see Resolve_Quantified_Expression) and
4537 hence checks were not inserted and record comparisons have not been
4540 2011-08-02 Ed Falis <falis@adacore.com>
4542 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4545 2011-08-02 Bob Duff <duff@adacore.com>
4547 * opt.ads: Minor comment fix.
4549 2011-08-02 Bob Duff <duff@adacore.com>
4551 * sem_ch12.adb (Analyze_Package_Instantiation,
4552 Analyze_Subprogram_Instantiation): Turn off style checking while
4553 analyzing an instance. Whatever style checks that apply to the generic
4554 unit should apply, so it makes no sense to apply them in an instance.
4555 This was causing trouble when compiling an instance of a runtime
4556 unit that violates the -gnatyO switch.
4557 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4558 one of the two case statements, causing spurious errors.
4560 2011-08-02 Robert Dewar <dewar@adacore.com>
4562 * uname.adb: Minor reformatting.
4563 * gnatcmd.adb: Minor reformatting.
4564 * exp_attr.adb: Minor reformatting.
4566 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4568 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4569 No_Dispatching_Calls, do not look for the Assign primitive, because
4570 predefined primitives are not created in this case.
4572 2011-08-02 Bob Duff <duff@adacore.com>
4574 * stylesw.ads: Minor comment fixes.
4576 2011-08-02 Robert Dewar <dewar@adacore.com>
4578 * freeze.adb (Add_To_Result): New procedure.
4580 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4582 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4583 time, if the specific run-time routines for handling streams of strings
4584 are not available, use the default mechanism.
4586 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4588 * s-regpat.ads: Fix typo.
4590 2011-08-02 Vincent Celier <celier@adacore.com>
4592 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4593 not null, call it to create the in memory config project file without
4594 parsing an existing default config project file.
4596 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4598 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4600 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4602 * sem_elim.adb: an abstract subprogram does not need an eliminate
4603 pragma for its descendant to be eliminable.
4605 2011-08-02 Ed Falis <falis@adacore.com>
4607 * init.c: revert to handling before previous checkin for VxWorks
4608 * s-intman-vxworks.adb: delete unnecessary declarations related to
4609 using Ada interrupt facilities for handling signals.
4610 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4611 * s-intman-vxworks.ads: Import __gnat_install_handler as
4612 Initialize_Interrupts.
4613 * s-taprop-vxworks.adb: Delete Signal_Mask.
4614 (Abort_Handler): change construction of mask to unblock exception
4617 2011-08-02 Jerome Guitton <guitton@adacore.com>
4619 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4620 Debug_Raise_Exception before propagation starts.
4622 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4624 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4625 to Restriction_Check_Required.
4626 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4627 * sem_res.adb (Resolve_Call): Likewise.
4628 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4630 2011-08-02 Bob Duff <duff@adacore.com>
4632 * stylesw.ads: Update comment.
4633 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4634 * errout.ads: Remove obsolete comment.
4636 2011-08-02 Javier Miranda <miranda@adacore.com>
4638 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4639 (Set_Is_Safe_To_Reevaluate): new procedure.
4640 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4641 assignment is allowed on safe-to-reevaluate variables.
4642 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4643 temporary created to remove side effects in expressions that use
4644 the secondary stack as safe-to-reevaluate.
4645 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4646 variables that are not true constants.
4648 2011-08-02 Robert Dewar <dewar@adacore.com>
4650 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4651 sem_res.adb, sem_ch6.adb: Minor reformatting.
4653 2011-08-02 Jerome Guitton <guitton@adacore.com>
4655 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4657 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4659 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4660 not set Overridden_Operation if subprogram is an initialization
4663 2011-08-02 Yannick Moy <moy@adacore.com>
4665 * par-ch6.adb: Correct obsolete name in comments
4666 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4667 which takes two message arguments (existing function takes one), with
4668 second message used for continuation.
4669 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4670 block statements that originate from a source block statement, not
4671 generated block statements
4672 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4673 symmetry with procedure case
4674 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4675 function to issue an error in formal mode if a package specification
4676 contains more than one tagged type or type extension.
4677 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4678 parameters matching formals of tagged types are objects (or ancestor
4679 type conversions of objects), not general expressions. Issue an error
4680 on view conversions that are not involving ancestor conversion of an
4682 (Resolve_Type_Conversion): in formal mode, issue an error on the
4683 operand of an ancestor type conversion which is not an object
4684 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4685 procedure so that it works also for actuals of function calls
4686 (Is_Actual_Tagged_Parameter): new function which determines if its
4687 argument is an actual parameter of a formal of tagged type in a
4689 (Is_SPARK_Object_Reference): new function which determines if the tree
4690 referenced by its argument represents an object in SPARK
4692 2011-08-02 Robert Dewar <dewar@adacore.com>
4694 * sem_ch3.adb: Minor reformatting
4695 Minor comment addition
4696 Minor error msg text change
4698 2011-08-02 Javier Miranda <miranda@adacore.com>
4700 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4701 function. Used to be more precise when we generate a variable plus one
4702 assignment to remove side effects in the evaluation of the Bound
4704 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4705 of the bound expression to force its re-analysis and thus expand the
4706 associated transient scope (if required). Code cleanup replacing the
4707 previous code that declared the constant entity by an invocation to
4708 routine Force_Evaluation which centralizes this work in the frontend.
4710 2011-08-02 Robert Dewar <dewar@adacore.com>
4712 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4713 (Base_Type): Now uses improved Is_Base_Type function
4714 * einfo.ads (Base_Type): Inline this function
4716 2011-08-02 Robert Dewar <dewar@adacore.com>
4718 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4719 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4721 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4723 * gcc-interface/Make-lang.in: Update dependencies.
4724 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4727 2011-08-02 Yannick Moy <moy@adacore.com>
4729 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4730 non-simple expression used in delta constraint
4731 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4732 index constraint which is not a subtype mark
4733 * par.adb: With and use Restrict
4734 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4735 mode on component type which is not a subtype mark and default
4736 expression on component
4737 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4738 of string which does not have a lower index bound equal to 1
4739 (Array_Type_Declaration): issue an error in formal mode on index or
4740 component type which is not a subtype mark, and on aliased keyword on
4742 (Derived_Type_Declaration): issue an error in formal mode on interface,
4743 limited or abstract type
4744 (Record_Type_Declaration): issue an error in formal mode on interface
4745 (Record_Type_Definition): issue an error in formal mode on tagged types
4746 and type extensions not declared in the specification of a library unit
4747 package; on null non-tagged record; on variant part
4749 2011-08-02 Vincent Celier <celier@adacore.com>
4751 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4752 not declared for qualified library project when Library_Name is not
4753 declared, but Library_Dir is.
4755 2011-08-02 Robert Dewar <dewar@adacore.com>
4757 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4758 pragmas (affects aspects [Component_]Default_Value
4759 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4760 component type for the resolution
4762 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4764 * einfo.adb (Base_Type): Tune implementation for speed.
4766 2011-08-02 Robert Dewar <dewar@adacore.com>
4768 * freeze.adb: Minor reformatting.
4770 2011-08-02 Thomas Quinot <quinot@adacore.com>
4772 * scos.ads: Update comments.
4774 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4776 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4777 base type, because the parent may be a subtype of a private type whose
4778 convention is established in a private part.
4780 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4782 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4783 statement in a block when the expansion of the return expression has
4784 created a finalization chain.
4785 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4786 with the parent node.
4787 Add N_Extended_Return_Statement to handle the case where a transient
4788 object declaration appears in the Return_Object_Declarations list of
4789 an extended return statement.
4791 2011-08-02 Matthew Gingell <gingell@adacore.com>
4793 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4794 unused parameter 'name'.
4796 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4798 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4799 inherited operation, check whether its alias, which is the source
4800 operastion that it renames, has been marked eliminated.
4802 2011-08-02 Javier Miranda <miranda@adacore.com>
4804 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4805 in-mode parameter whose type is an access type since it can be used to
4806 modify its designated object. Enforce code that handles as safe an
4807 access type that is not access-to-constant but it is the result of a
4808 previous removal of side-effects.
4809 (Remove_Side_Effects): Minor code reorganization of cases which require
4810 no action. Done to incorporate documentation on new cases uncovered
4811 working in this ticket: no action needed if this routine was invoked
4812 too early and the nodes are not yet decorated.
4813 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4814 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4815 were issued with actuals that are implicitly provided by
4818 2011-08-02 Robert Dewar <dewar@adacore.com>
4820 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4822 2011-08-02 Yannick Moy <moy@adacore.com>
4824 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4825 to issue an error in formal mode on attribute not supported in this mode
4826 (Analyze_Attribute): issue errors on standard attributes not supported
4828 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4829 comment, and issue error in formal mode on modulus which is not a power
4831 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4833 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4835 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4836 operator on modular type (except 'not').
4838 2011-08-02 Robert Dewar <dewar@adacore.com>
4840 * gnat_rm.texi: Minor reformatting.
4842 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4844 * s-osinte-linux.ads: Minor comment update and reformatting.
4845 * i-cexten.ads: Make this unit pure, as for its parent.
4846 Will allow its usage in more contexts if needed.
4848 2011-08-02 Robert Dewar <dewar@adacore.com>
4850 * s-utf_32.ads: Minor comment fix.
4852 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4854 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
4855 operation of a tagged synchronized type, handle the case where the
4856 controlling argument is overloaded.
4858 2011-08-02 Yannick Moy <moy@adacore.com>
4860 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
4861 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
4862 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
4863 SPARK mode and formal verification mode on processing SPARK restriction
4864 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
4865 requiring consistency checking.
4867 2011-08-02 Robert Dewar <dewar@adacore.com>
4869 * sem_res.adb: Minor reformatting.
4871 2011-08-02 Robert Dewar <dewar@adacore.com>
4873 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4874 a-cforse.ads: Remove unneeded with of Ada.Containers
4875 Remove commented out pragma Inline's
4876 Move specifications of new subprograms to the actual specs
4878 2011-08-02 Yannick Moy <moy@adacore.com>
4880 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4881 a-cforse.ads: Update comments.
4883 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4885 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
4887 2011-08-02 Robert Dewar <dewar@adacore.com>
4889 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4890 a-cforse.ads, a-cofove.ads: Minor reformatting.
4892 2011-08-02 Claire Dross <dross@adacore.com>
4894 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4895 a-cofove.ads: Add comments.
4897 2011-08-02 Yannick Moy <moy@adacore.com>
4899 * gnat_rm.texi: Document formal containers.
4901 2011-08-02 Emmanuel Briot <briot@adacore.com>
4903 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
4906 2011-08-02 Robert Dewar <dewar@adacore.com>
4908 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
4911 2011-08-02 Robert Dewar <dewar@adacore.com>
4913 * aspects.adb: New aspects Default_Value and Default_Component_Value
4914 New format of Aspect_Names table checks for omitted entries
4915 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
4916 handling of boolean aspects for derived types.
4917 New aspects Default_Value and Default_Component_Value
4918 New format of Aspect_Names table checks for omitted entries
4919 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
4920 (Has_Default_Value): New flag
4921 (Has_Default_Component_Value): New flag
4922 (Has_Default_Value): New flag
4923 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
4925 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
4926 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
4927 Default_Value and Default_Component_Value
4928 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
4929 New aspects Default_Value and Default_Component_Value
4930 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
4931 * sprint.adb: Print N_Aspect_Specification node when called from gdb
4933 2011-08-02 Vincent Celier <celier@adacore.com>
4935 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
4936 inherit library kind.
4938 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4940 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
4943 2011-08-02 Robert Dewar <dewar@adacore.com>
4945 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
4947 2011-08-02 Yannick Moy <moy@adacore.com>
4949 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
4951 2011-08-02 Robert Dewar <dewar@adacore.com>
4953 * impunit.adb: Add comment.
4955 2011-08-02 Yannick Moy <moy@adacore.com>
4957 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
4958 qualification of aggregates in formal mode
4959 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
4961 (Resolve_Aggregate): complete the test that an aggregate is adequately
4962 qualified in formal mode
4964 2011-08-02 Pascal Obry <obry@adacore.com>
4966 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
4967 * mlib-prj.adb: Supress warning when compiling binder generated file.
4968 (Build_Library): Supress all warnings when compiling the binder
4971 2011-08-02 Yannick Moy <moy@adacore.com>
4973 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
4975 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
4976 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
4977 Add with/use clauses to make Check_Formal_Restriction visible
4979 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4981 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
4982 in-parameters when type of the generic formal is private in the generic
4983 spec and non-private in the body.
4985 2011-08-02 Claire Dross <dross@adacore.com>
4987 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
4988 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
4989 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
4990 * impunit.adb, Makefile.rtl: Take new files into account.
4992 2011-08-02 Robert Dewar <dewar@adacore.com>
4994 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
4995 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4997 2011-08-02 Yannick Moy <moy@adacore.com>
4999 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5001 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5002 matching static array bounds, taking into account the special case of
5004 * sem_ch3.adb: Typo in comment.
5006 2011-08-02 Yannick Moy <moy@adacore.com>
5008 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5009 which issues an error in formal mode if its argument node is originally
5011 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5012 has a discriminant specification so that it does not include the case
5014 (Derived_Type_Declaration): move here the test that a derived type has a
5015 discriminant specification
5016 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5017 first element of a component association before accessing its choices
5018 (presence of component association is not enough)
5019 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5020 declaration is a library item before accessing the next element in a
5021 list, as library items are not member of lists
5022 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5023 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5024 Check_Formal_Restriction whenever possible.
5026 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5028 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5029 reference when needed.
5031 2011-08-02 Bob Duff <duff@adacore.com>
5033 * gnat_ugn.texi: Fix typo.
5035 2011-08-02 Vincent Celier <celier@adacore.com>
5037 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5038 archive file name. Do not use the full path name of archives for Open
5041 2011-08-02 Robert Dewar <dewar@adacore.com>
5043 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5044 Analyze_Aspect_Specifications
5046 (Analyze_Aspect_Specifications): New handling for boolean aspects
5047 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5048 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5049 sequence for Analyze_Aspect_Specifications
5050 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5051 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5053 2011-08-02 Robert Dewar <dewar@adacore.com>
5055 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5056 aspects, since these no longer exist.
5058 2011-08-02 Robert Dewar <dewar@adacore.com>
5060 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5061 semicolon, do not try to see if there are aspects following it.
5062 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5065 2011-08-02 Robert Dewar <dewar@adacore.com>
5067 * sem_ch8.adb, aspects.ads: Minor reformatting.
5069 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5071 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5072 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5074 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5076 2011-08-02 Yannick Moy <moy@adacore.com>
5078 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5079 mode on subprogram declaration outside of package specification, unless
5080 it is followed by a pragma Import
5081 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5082 Access_Type_Declaration): issue error in formal mode on access type
5083 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5085 (Analyze_Object_Declaration): issue error in formal mode on object
5086 declaration which does not respect SPARK restrictions
5087 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5088 declaration which does not respect SPARK restrictions
5089 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5090 error in formal mode on digits or delta constraint
5091 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5092 decimal fixed point type
5093 (Derived_Type_Declaration): issue error in formal mode on derived type
5094 other than type extensions of tagged record types
5095 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5096 with check on access definition
5097 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5098 mode on protected definition.
5099 (Analyze_Task_Definition): issue error in formal mode on task definition
5101 2011-08-02 Robert Dewar <dewar@adacore.com>
5103 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5105 2011-08-02 Javier Miranda <miranda@adacore.com>
5107 * sem_ch6.adb (Can_Override_Operator): New function.
5108 (Verify_Overriding_Indicator): Add missing code to check overriding
5109 indicator in operators. Fixes regression.
5110 (Check_Overriding_Indicator): Minor reformating after replacing the
5111 code that evaluates if the subprogram can override an operator by
5112 invocations to the above new function.
5114 (Write_Field26_Name): Add missing code to ensure that, following
5115 the documentation in einfo.ads, this field is not shown as attribute
5116 "Static_Initialization" on non-dispatching functions.
5118 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5120 * sem_res.adb (Resolve_Call): A call to
5121 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5122 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5123 i.e., when the second parameter is of type Time_Span.
5125 2011-08-02 Vincent Celier <celier@adacore.com>
5127 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5128 with an archive instead of -L<library dir> -l<library name>.
5130 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5132 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5133 mark the base types In_Use in addition to making the operations
5136 2011-08-02 Ed Falis <falis@adacore.com>
5138 * init.c: add and setup __gnat_signal_mask for the exception signals
5139 * s-inmaop-vxworks.adb: new file.
5140 * s-intman-vxworks.adb: remove unnecessary initializations and
5142 * s-intman-vxworks.ads: remove unnecessary variable
5143 * s-taprop-vxworks.adb: simplify signal initialization
5145 2011-08-02 Robert Dewar <dewar@adacore.com>
5147 * sem_ch8.adb: Minor code reorganization, comment updates.
5149 2011-08-02 Robert Dewar <dewar@adacore.com>
5151 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5152 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5154 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5155 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5157 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5159 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5160 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5161 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5162 use_type_clauses, to handle more efficiently use_type and use_all_type
5164 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5165 Ada2012 Use_All_Type clause.
5166 (Use_Class_Wide_Operations): new procedure.
5168 2011-08-02 Robert Dewar <dewar@adacore.com>
5170 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5171 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5172 expression to expression function.
5174 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5176 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5177 if types are compatible.
5179 2011-08-02 Yannick Moy <moy@adacore.com>
5181 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5182 returns True if its argument array types have same dimension and same
5183 static bounds at each index.
5184 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5185 OUT or IN OUT paramaters which are not view conversions in SPARK.
5186 (Resolve_Arithmetic_Op): issue an error in formal mode on
5187 multiplication or division with operands of fixed point types which are
5188 not qualified or explicitly converted.
5189 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5190 Boolean or array type (except String) operands.
5191 (Resolve_Equality_Op): issue an error in formal mode on equality
5192 operators for array types other than String with non-matching static
5194 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5195 for array types with non-matching static bounds. Factorize the code in
5196 Matching_Static_Array_Bounds.
5197 (Resolve_Qualified_Expression): issue an error in formal mode on
5198 qualified expressions for array types with non-matching static bounds.
5199 (Resolve_Type_Conversion): issue an error in formal mode on type
5200 conversion for array types with non-matching static bounds
5202 2011-08-02 Robert Dewar <dewar@adacore.com>
5204 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5206 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5208 * par-ch9.adb: save location of entry for proper error message.
5210 2011-08-02 Javier Miranda <miranda@adacore.com>
5212 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5213 (Use_Full_View) which permits this routine to climb through the
5214 ancestors using the full-view of private parents.
5215 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5216 Use_Full_View to true in calls to Is_Ancestor.
5217 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5218 true in call to Is_Ancestor.
5219 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5220 Use_Full_View to true in call to Is_Ancestor.
5221 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5222 call to Is_Ancestor.
5223 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5224 Use_Full_View to true in calls to Is_Ancestor.
5225 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5226 Make_Select_Specific_Data_Table, Register_Primitive,
5227 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5228 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5229 to true in call to Is_Ancestor.
5230 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5231 Use_Full_View to true in calls to Is_Ancestor.
5233 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5234 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5236 2011-08-02 Robert Dewar <dewar@adacore.com>
5238 * gnat_rm.texi: Minor reformatting.
5239 * sem_prag.adb: Minor reformatting.
5241 2011-08-02 Tristan Gingold <gingold@adacore.com>
5243 * vms_data.ads: Add VMS qualifier for -gnateP.
5245 2011-08-02 Robert Dewar <dewar@adacore.com>
5247 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5248 * par-ch7.adb (P_Package): Proper placement of aspects for package
5250 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5251 (End_Statements): Add Is_Sloc parameterr
5252 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5253 (Check_End): Ad Is_Sloc parameter
5254 (End_Statements): Add Is_Sloc parameterr
5256 2011-08-02 Vincent Celier <celier@adacore.com>
5258 * ug_words: Add VMS qualifier equivalent to -gnateP:
5259 /SYMBOL_PREPROCESSING.
5261 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5263 * gnat-style.texi: For hexadecimal numeric literals the typical
5264 grouping of digits is 4 to represent 2 bytes.
5265 A procedure spec which is split into several lines is indented two
5268 2011-08-02 Yannick Moy <moy@adacore.com>
5270 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5271 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5272 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5274 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5275 choice in array aggregate
5276 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5278 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5279 positional and named aggregate for record, or others in record
5280 aggregate, or multiple choice in record aggregate
5281 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5282 array operands to logical operations AND, OR and XOR do not have the
5283 same static lower and higher bounds
5284 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5286 2011-08-01 Robert Dewar <dewar@adacore.com>
5288 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5289 Replaces Last_Source_Node_In_Sequence.
5290 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5291 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5292 parens and blank in string (this was inconsistently implemented).
5294 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5295 blank in string (this was inconsistently implemented).
5297 (Set_Global_Switches): Set formal mode switches appropriately
5298 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5300 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5301 call Set_Error_Msg_Lang to set "spark" as language name.
5302 * par.adb: Remove unnecessary call to set formal language for errout
5303 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5304 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5306 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5307 calls to it, moved after resolution so that types are known
5308 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5309 result of concatenation is not of type String
5310 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5311 concatenation is not properly restricted
5312 * gnat_rm.texi: Add doc on pragma Spark_95.
5313 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5314 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5315 * gcc-interface/Make-lang.in: Update dependencies.
5317 2011-08-01 Javier Miranda <miranda@adacore.com>
5319 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5320 condition that detects if the overridden operation must replace an
5323 2011-08-01 Javier Miranda <miranda@adacore.com>
5325 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5326 code declarations inserted by Insert_Actions in each alternative of the
5327 N_Case_Expression node.
5329 2011-08-01 Robert Dewar <dewar@adacore.com>
5331 * sem_ch6.adb: Minor code reorganization.
5332 * sem_util.adb: Minor reformatting.
5334 2011-08-01 Pascal Obry <obry@adacore.com>
5336 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5337 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5339 2011-08-01 Yannick Moy <moy@adacore.com>
5341 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5342 literal or operator symbol which is prefixed
5343 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5344 mode on access attributes.
5345 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5346 that concatenation operands are properly restricted in formal mode
5347 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5348 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5349 result of the concatenation has a type different from String.
5350 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5351 Analyze_Quantified_Expression, Analyze_Slice,
5352 Analyze_Null): issue an error in formal mode on unsupported constructs
5354 (Analyze_Block_Statement): only issue error on source block statement
5355 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5356 function which returns the last node in a list of nodes for which
5357 Comes_From_Source returns True, if any
5358 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5359 Last_Source_Node_In_Sequence
5360 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5361 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5362 mode on unsupported constructs
5363 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5364 rest of the actions may be needed later on since the error is marked as
5366 * sinfo.ads: Typos in comments.
5368 2011-08-01 Pascal Obry <obry@adacore.com>
5370 * projects.texi: Minor editing.
5372 2011-08-01 Yannick Moy <moy@adacore.com>
5374 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5375 insertion character ~~
5376 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5377 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5378 with insertion character ~~
5379 (Set_Msg_Text): treat insertion character ~~
5380 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5381 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5382 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5383 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5384 errors related to the formal language restriction not serious
5385 (insertion character |).
5386 * par.adb (Par): set formal language for error messages if needed
5387 * sem_ch6.adb (Check_Missing_Return): take into account possible
5388 generated statements at the end of the function
5389 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5390 enumeration value to define a new pragma SPARK_95
5391 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5392 SPARK_Version): new type and variables to store the SPARK version
5394 (SPARK_Mode): return True when SPARK_Version is set
5395 * par-prag.adb: Correct indentation
5396 (Prag): take Pragma_SPARK_95 into account
5397 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5400 2011-08-01 Robert Dewar <dewar@adacore.com>
5402 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5403 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5404 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5406 2011-08-01 Pascal Obry <obry@adacore.com>
5408 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5409 Target_Name to Get_Path call.
5410 (Parse_Single_Project): Likewise.
5411 (Post_Parse_Context_Clause): Likewise.
5412 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5413 Call Initialise_Project_Path with the proper Target_Name.
5414 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5416 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5417 with the proper Target_Name.
5418 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5420 (Parse_Project_And_Apply_Config): Likewise.
5421 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5422 This is fine as this part of the code is supporting only native
5424 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5425 is fine as this part of the code is supporting only native compilation.
5427 2011-08-01 Yannick Moy <moy@adacore.com>
5429 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5430 of homonym, unless the homonym is one of the cases allowed in SPARK
5431 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5432 package declaration occurring after a body.
5434 2011-08-01 Robert Dewar <dewar@adacore.com>
5436 * checks.adb, exp_ch4.adb: Minor reformatting.
5438 2011-08-01 Javier Miranda <miranda@adacore.com>
5440 * einfo.ads (Access_Disp_Table): Fix documentation.
5441 (Dispatch_Table_Wrappers): Fix documentation.
5443 2011-08-01 Pascal Obry <obry@adacore.com>
5445 * prj-env.adb, prj-env.ads: Minor reformatting.
5447 2011-08-01 Yannick Moy <moy@adacore.com>
5449 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5450 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5451 procedures out of these packages.
5452 * errout.ads, errout.adb
5453 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5454 procedures in of this package
5455 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5456 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5457 on misplaced later vs initial declarations, like in Ada 83
5458 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5459 formal mode on attribute of private type whose full type declaration
5461 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5462 package declaration inside a package specification
5463 (Analyze_Full_Type_Declaration): issue error in formal mode on
5464 controlled type or discriminant type
5465 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5466 user-defined operator means that it should come from the source
5467 (New_Overloaded_Entity): issue error in formal mode on overloaded
5469 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5471 2011-08-01 Thomas Quinot <quinot@adacore.com>
5473 * atree.adb: Minor reformatting.
5474 * checks.adb: Minor reformatting.
5476 2011-08-01 Vincent Celier <celier@adacore.com>
5478 * s-parame-vms-ia64.ads: Fix typo in comment
5480 * s-parame-vms-restrict.ads: Removed, unused.
5482 2011-08-01 Javier Miranda <miranda@adacore.com>
5485 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5487 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5488 * sem_ch3.ads, sem_ch3.adb
5489 (Is_Constant_Bound): New extended version of the subprogram that was
5490 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5491 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5492 * sem_aux.ads (Constant_Value): Fix typo in comment.
5493 * checks.adb (Generate_Index_Checks): New implementation which, for
5494 array objects with constant bounds, generates the runtime check
5495 referencing the bounds of the array type. For other cases this routine
5496 provides its previous behavior obtaining such values from the array
5498 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5500 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5501 we cannot have semantic interpretations of the new node.
5503 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5505 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5508 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5510 * sem_ch8.adb: Minor code editing.
5511 * s-vxwext.adb: Remove trailing space.
5512 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5513 consistency with other files.
5515 2011-08-01 Thomas Quinot <quinot@adacore.com>
5517 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5519 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5521 * par-ch10.adb: reject parameterized expressions as compilation unit.
5522 * sem_ch4.adb: handle properly conditional expression with overloaded
5523 then_clause and no else_clause.
5525 2011-08-01 Tristan Gingold <gingold@adacore.com>
5527 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5528 like done by System.Aux_DEC.
5529 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5531 2011-08-01 Yannick Moy <moy@adacore.com>
5533 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5534 missing label at end of declaration (subprogram or package)
5535 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5536 of positional and named parameter association
5537 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5538 Error_Msg_SP which adds a prefix to the error message giving the name
5539 of the formal language analyzed
5540 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5541 access result type in subprogram, unconstrained array as result type,.
5542 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5544 * sem_ch8.adb: Code clean up.
5546 2011-08-01 Javier Miranda <miranda@adacore.com>
5548 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5549 * einfo.ads (Access_Disp_Table): Fix documentation.
5550 (Dispatch_Table_Wrappers): Fix documentation.
5551 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5552 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5553 to enforce the documentation of this attribute.
5554 (Set_Is_Interface): Cleanup the assertion.
5555 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5556 the Underlying_Type entity before reading attribute Access_Disp_Table.
5557 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5558 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5559 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5560 the Underlying_Type entity before reading attribute Access_Disp_Table.
5561 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5562 Locate the Underlying_Type entity before reading attribute
5565 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5567 * s-poosiz.ads: Additional overriding indicators.
5569 2011-08-01 Yannick Moy <moy@adacore.com>
5571 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5573 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5574 parameter specification does not include a subtype mark.
5575 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5576 formal mode on abstract subprogram.
5577 (Analyze_Subprogram_Specification): issue error in formal mode on
5578 user-defined operator.
5579 (Process_Formals): issue error in formal mode on access parameter and
5581 * sem_ch9.adb (Analyze_Abort_Statement,
5582 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5583 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5584 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5585 Analyze_Requeue, Analyze_Selective_Accept,
5586 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5587 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5588 issue error in formal mode on user-defined raise statement.
5590 2011-08-01 Thomas Quinot <quinot@adacore.com>
5592 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5593 declaration being hidden when overriding an implicit inherited
5595 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5596 (-gnats), do not complain about a source file that contains only a
5599 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5601 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5602 variable if already set.
5604 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5606 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5607 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5608 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5609 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5610 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5611 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5612 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5613 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5614 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5615 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5616 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5617 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5618 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5619 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5620 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5621 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5622 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5623 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5624 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5625 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5626 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5627 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5628 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5629 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5630 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5631 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5632 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5633 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5634 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5635 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5636 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5637 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5638 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5639 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5640 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5641 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5642 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5643 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5644 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5645 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5646 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5647 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5648 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5649 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5650 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5651 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5652 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5653 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5654 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5655 Use GNAT instead of GNARL.
5657 2011-08-01 Bob Duff <duff@adacore.com>
5659 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5660 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5661 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5664 2011-08-01 Yannick Moy <moy@adacore.com>
5666 * debug.adb (d.D) reverve flag for the SPARK mode
5667 (d.E) reverve flag for SPARK generation mode
5668 (d.F) reverve flag for Why generation mode
5669 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5670 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5671 functions which return True when the corresponding modes are set
5672 (Formal_Language): return "spark" or "alfa" when in formal verification
5674 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5675 Error_Msg to prefix the error message with a tag giving the formal
5677 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5678 message with a tag giving the formal language
5679 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5681 (Analyze_Case_Statement): issue error in formal mode on case statement
5682 with a single "others" case alternative
5683 (Analyze_Exit_Statement): issue errors in formal mode on exit
5684 statements which do not respect SPARK restrictions
5685 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5686 (Check_Unreachable_Code): always issue an error (not a warning) in
5687 formal mode on unreachable code (concerns both code after an infinite
5688 loop and after an unconditional jump, both not allowed in SPARK)
5689 * sem_ch6.adb (Analyze_Return_Statement): add call to
5690 Set_Return_Present for a procedure containing a return statement
5691 (already done for functions in Analyze_Function_Return)
5692 (Analyze_Function_Return): issue error in formal mode on extended
5693 return or if return is not last statement in function
5694 (Check_Missing_Return): issue error in formal mode if function does
5695 not end with return or if procedure contains a return
5696 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5697 function to detect if there is an inner scope of its parameter S which
5700 2011-08-01 Thomas Quinot <quinot@adacore.com>
5702 * sem_ch6.ads: Minor reformatting.
5704 2011-08-01 Javier Miranda <miranda@adacore.com>
5706 * sem_util.adb (Abstract_Interface_List): Complete condition when
5707 processing private type declarations to avoid reading unavailable
5709 (Is_Synchronized_Tagged_Type): Complete condition when processing
5710 private extension declaration nodes to avoid reading unavailable
5713 2011-08-01 Thomas Quinot <quinot@adacore.com>
5715 * sem_ch3.adb: Minor reformatting.
5717 2011-08-01 Thomas Quinot <quinot@adacore.com>
5719 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5720 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5721 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5722 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5723 for VMS, instead parametrize the common implementation with
5724 System.Parameters declarations.
5726 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5728 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5730 2011-08-01 Tristan Gingold <gingold@adacore.com>
5732 * seh_init.c: Fix SEH handler installation on win64.
5734 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5736 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5737 double analysis of an anonymous access to subprogram, because it can
5738 lead to improper sharing of profiles and a back-end crash.
5740 2011-08-01 Robert Dewar <dewar@adacore.com>
5742 * make.adb, sem_ch4.adb: Minor reformatting.
5743 * gcc-interface/Make-lang.in: Update dependencies.
5744 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5746 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5748 * gnat_rm.texi: Fix definition of Long_Integer.
5750 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5752 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5753 to prevent storage exhaustion.
5754 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5755 finalized is a function body, insert the cleanup code before the final
5756 return statement, to prevent spurious warnings.
5757 * s-pooglo.ads: add overriding indicator.
5759 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5761 * sem_ch4.adb (Operator_Check): improve error message when both a
5762 with_clause and a use_clause are needed to make operator usage legal.
5763 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5764 determine whether a compilation unit is visible within an other,
5765 either through a with_clause in the current unit, or a with_clause in
5766 its library unit or one one of its parents.
5768 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5770 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5771 over an arbitrary expression of an array or container type.
5772 * lib-xref.adb: clarify comment.
5774 2011-08-01 Bob Duff <duff@adacore.com>
5776 * einfo.ads: Minor reformatting.
5777 * debug.adb: Minor comment improvement.
5779 2011-08-01 Javier Miranda <miranda@adacore.com>
5781 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5782 consider hidden subprograms as valid candidates.
5784 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5786 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5788 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5790 * gnat_ugn.texi: Fix typo.
5792 2011-08-01 Robert Dewar <dewar@adacore.com>
5794 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5795 lib-xref.adb: Minor reformatting
5797 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5799 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5800 when to generate a call to Move_Final_List.
5801 (Has_Controlled_Parts): Remove this function.
5803 2011-08-01 Geert Bosch <bosch@adacore.com>
5805 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5808 2011-08-01 Thomas Quinot <quinot@adacore.com>
5810 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5811 explicit raise of a predefined exception as Comes_From_Source if the
5812 original N_Raise_Statement comes from source.
5814 2011-08-01 Robert Dewar <dewar@adacore.com>
5816 * sinfo.ads: Add comment.
5817 * sem_ch6.adb: Minor reformatting.
5819 2011-08-01 Robert Dewar <dewar@adacore.com>
5821 * freeze.adb (Freeze_Entity): Refine check for bad component size
5822 clause to avoid rejecting confirming clause when atomic/aliased present.
5824 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5826 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5827 better determine whether an entity reference is a write.
5828 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5830 * lib-xref.adb (Output_References): Do no suppress a read reference at
5831 the same location as an immediately preceeding modify-reference, to
5832 handle properly in-out actuals.
5834 2011-08-01 Tristan Gingold <gingold@adacore.com>
5836 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5838 2011-08-01 Quentin Ochem <ochem@adacore.com>
5840 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5841 heap to compute the result.
5843 2011-08-01 Robert Dewar <dewar@adacore.com>
5845 * atree.ads: Minor reformatting.
5847 2011-08-01 Emmanuel Briot <briot@adacore.com>
5849 * g-expect.adb (Get_Command_Output): Fix memory leak.
5851 2011-08-01 Geert Bosch <bosch@adacore.com>
5853 * cstand.adb (P_Float_Type): New procedure to print the definition of
5854 predefined fpt types.
5855 (P_Mixed_Name): New procedure to print a name using mixed case
5856 (Print_Standard): Use P_Float_Type for printing floating point types
5857 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
5858 precision IEEE float.
5860 2011-08-01 Thomas Quinot <quinot@adacore.com>
5862 * sem_ch3.adb: Minor reformatting.
5864 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5866 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
5867 the completion of a generic function, insert the new body rather than
5868 rewriting the original.
5870 2011-08-01 Yannick Moy <moy@adacore.com>
5872 * sinfo.ads, errout.ads: Typos in comments.
5874 2011-08-01 Robert Dewar <dewar@adacore.com>
5876 * par-endh.adb: Minor reformatting.
5878 2011-08-01 Robert Dewar <dewar@adacore.com>
5880 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
5881 (Pre_Post_Aspects): New subtype.
5882 * par-ch12.adb (P_Generic): New syntax for aspects in packages
5883 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
5884 * par-ch7.adb (P_Package): Remove Decl parameter
5885 (P_Package): Handle new syntax for aspects (before IS)
5886 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
5888 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
5889 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
5890 (P_Package): Remove Decl parameter
5891 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
5893 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
5895 * sem_util.ads, sem_util.adb (Static_Boolean): New function
5896 * sinfo.ads: Document new syntax for aspects in packages etc.
5897 * sprint.adb: Handle new syntax of aspects before IS in package
5899 2011-08-01 Thomas Quinot <quinot@adacore.com>
5901 * atree.ads: Minor reformatting.
5902 * sem_prag.adb: Minor reformatting.
5904 2011-08-01 Robert Dewar <dewar@adacore.com>
5906 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
5907 case expr alternative.
5909 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5911 * sem_ch12.adb: Fix typo.
5913 2011-08-01 Geert Bosch <bosch@adacore.com>
5915 * sem_prag.adb (Check_No_Link_Name): New procedure.
5916 (Process_Import_Or_Interface): Use Check_No_Link_Name.
5917 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
5918 instead of Standard_Long_Long_Float_Size global. Preparation for
5919 eventual removal of per type constants.
5920 * exp_util.ads (Get_Stream_Size): New function returning the stream
5921 size value of subtype E.
5922 * exp_util.adb (Get_Stream_Size): Implement new function.
5923 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
5925 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
5927 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
5929 2011-08-01 Geert Bosch <bosch@adacore.com>
5931 * cstand.adb: Fix comments.
5932 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
5935 2011-08-01 Robert Dewar <dewar@adacore.com>
5937 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
5939 2011-08-01 Geert Bosch <bosch@adacore.com>
5941 * atree.ads: Fix comment.
5943 2011-08-01 Robert Dewar <dewar@adacore.com>
5945 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
5946 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
5947 * par.adb: Add with for Namet.Sp.
5948 * par-tchk.adb: Minor reformatting.
5950 2011-08-01 Vincent Celier <celier@adacore.com>
5952 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
5953 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
5954 of the init procedure of a SAL.
5955 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
5958 2011-08-01 Thomas Quinot <quinot@adacore.com>
5960 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
5963 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5965 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
5967 2011-08-01 Thomas Quinot <quinot@adacore.com>
5969 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
5970 conformant with its spec (return True only for types that have
5971 an overriding Initialize primitive operation that prevents them from
5972 having preelaborable initialization).
5973 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
5974 initialization for controlled types in Ada 2005 or later mode.
5976 2011-08-01 Robert Dewar <dewar@adacore.com>
5978 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
5980 (Same_Aspect): New function.
5981 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
5982 Type_Invariant, Precondition, Postcondition.
5983 * snames.ads-tmpl: Add Name_Type_Invariant.
5985 2011-08-01 Robert Dewar <dewar@adacore.com>
5987 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
5989 (Freeze_All_Ent): Fix error in handling inherited aspects.
5990 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
5991 already analyzed, but don't skip entire processing of a declaration,
5992 that's wrong in some cases of declarations being rewritten.
5993 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
5994 Don't delay for integer, string literals
5995 Treat predicates in usual manner for delay, remove special case code,
5997 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
5998 (Build_Predicate_Function): Update saved expression in aspect
5999 (Build_Invariant_Procedure): Update saved expression in aspect
6000 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6001 of replacement of discriminant references if the reference is simple.
6003 2011-08-01 Robert Dewar <dewar@adacore.com>
6005 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6006 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6007 Static_Predicate and Dynamic_Predicate.
6008 (Build_Predicate_Function): Add processing for Static_Predicate
6009 and Dynamic_Predicate.
6010 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6011 (From_Static_Predicate): New flag
6012 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6014 2011-08-01 Robert Dewar <dewar@adacore.com>
6016 * usage.adb: Documentation cleanup for Ada version modes in usage.
6017 * expander.adb: Minor reformatting.
6019 2011-08-01 Robert Dewar <dewar@adacore.com>
6021 * atree.ads: Minor comment fix.
6022 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6023 a-witeio.ads, sem_prag.adb: Minor reformatting.
6025 2011-08-01 Doug Rupp <rupp@adacore.com>
6027 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6028 pointers. Use descrip.h header file for convenience. Add some
6031 2011-08-01 Robert Dewar <dewar@adacore.com>
6033 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6034 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6035 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6037 (Check_Aspect_At_End_Of_Declarations): New procedure
6038 (Analye_Aspect_Specification): Minor changes for above procedures
6039 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6040 specification node as well.
6042 2011-08-01 Pascal Obry <obry@adacore.com>
6044 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6045 Windows files. Use GetFilesAttributes() in this case to check for file
6046 existence instead of returning with an error code.
6048 2011-08-01 Vincent Celier <celier@adacore.com>
6050 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6051 High is above Source length.
6053 2011-08-01 Robert Dewar <dewar@adacore.com>
6055 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6057 2011-08-01 Robert Dewar <dewar@adacore.com>
6059 * aspects.ads (Boolean_Aspects): New subtype.
6060 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6061 for derived types in cases where the parent type and derived type have
6063 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6064 with aspects when parent type also has aspects.
6065 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6066 boolean expression at this point).
6067 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6068 accordance with final decision on the Ada 2012 feature.
6069 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6071 2011-08-01 Matthew Heaney <heaney@adacore.com>
6073 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6075 2011-08-01 Pascal Obry <obry@adacore.com>
6077 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6078 Fix Replace_Slice when High is above current string size.
6079 (Replace_Slice): Fix DL computation when High is above current
6082 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6084 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6086 2011-08-01 Matthew Heaney <heaney@adacore.com>
6088 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6091 2011-08-01 Pascal Obry <obry@adacore.com>
6093 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6096 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6098 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6099 access to protected subprograms in generic bodies.
6100 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6101 protected type, indicate that the convention of the subprogram is
6102 Convention_Protected, because it may be used in subsequent declarations
6103 within the protected declaration.
6105 2011-08-01 Vincent Celier <celier@adacore.com>
6107 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6108 and "final" procedures when the name of the library is "ada", to avoid
6109 duplicate symbols "adainit" and "adafinal" in executables.
6111 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6113 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6114 quantified expression that appears within a postcondition and uses the
6115 Ada2012 'Result attribute.
6117 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6119 * init.c (__gnat_error_handler): Cast reason to int.
6120 (__gnat_install_handler): Explain sa_sigaction use.
6122 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6124 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6125 subprogram has copy-in copy-out parameters, try to promote the mode of
6126 the return type if it is passed in registers.
6128 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6130 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6131 left operand as addressable.
6133 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6135 * gcc-interface/gigi.h (build_function_stub): Remove.
6136 (build_return_expr): Likewise.
6137 (convert_vms_descriptor): Declare.
6138 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6139 (build_function_stub): Move to...
6140 * gcc-interface/utils2.c (build_return_expr): Move to...
6141 * gcc-interface/trans.c (build_function_stub): ...here.
6142 (build_return_expr): ...here.
6143 (Subprogram_Body_to_gnu): Add local variable for language_function.
6144 Disconnect the parameter attributes cache, if any, once done with it.
6145 Call end_subprog_body only after setting the end_locus.
6146 Build the stub associated with the function, if any, at the very end.
6147 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6148 variables and streamline control flow.
6150 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6153 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6156 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6159 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6160 Assign to act.sa_sigaction.
6161 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6162 current->return_address to char * before arithmetic.
6164 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6166 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6167 Correct argument types.
6168 Extract code from reason.
6169 (__gnat_install_handler): Assign to act.sa_sigaction.
6171 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6173 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6174 (GNAT1_OBJS): ...here.
6176 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6179 * g-socthi-mingw.adb (Fill): Fix formatting.
6181 * gcc-interface/gigi.h: Move around comment.
6183 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6186 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6188 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6191 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6193 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6195 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6196 range comparison if Pmode is SImode.
6198 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6199 Eric Botcazou <ebotcazou@adacore.com>
6201 * adadecode.c: Wrap up in extern "C" block.
6202 * adadecode.h: Likewise.
6203 * adaint.c: Likewise. Remove 'const' keyword.
6204 * adaint.h: Likewise.
6206 * atree.h: Likewise.
6208 * cstreams.c: Likewise.
6212 * final.c: Likewise.
6214 * initialize.c: Likewise.
6216 * namet.h: Likewise.
6217 * nlists.h: Likewise.
6218 * raise.c: Likewise.
6219 * raise.h: Likewise.
6220 * repinfo.h: Likewise.
6221 * seh_init.c: Likewise.
6222 * targext.c: Likewise.
6223 * tracebak.c: Likewise.
6224 * uintp.h: Likewise.
6225 * urealp.h: Likewise.
6226 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6227 * xsinfo.adb: Likewise.
6228 * xsnamest.adb: Likewise.
6229 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6230 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6231 * gcc-interface/misc.c: Likewise.
6232 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6233 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6234 ada/targext.o here...
6235 (GNAT_ADA_OBJS): ...and not here.
6236 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6237 (GNATBIND_OBJS): Reorder.
6239 2011-07-07 Richard Henderson <rth@redhat.com>
6241 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6242 dwarf2out_frame_init.
6244 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6246 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6248 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6251 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6253 2011-07-06 Richard Guenther <rguenther@suse.de>
6255 * gcc-interface/misc.c (gnat_init): Merge calls to
6256 build_common_tree_nodes and build_common_tree_nodes_2.
6257 Re-initialize boolean_false_node.
6259 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6260 Olivier Hainque <hainque@adacore.com>
6261 Nicolas Setton <setton@adacore.com>
6263 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6264 the type according to the ARTIFICIAL_P parameter.
6265 (create_type_decl): Likewise.
6266 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6268 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6270 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6271 (gnatbind): Likewise.
6273 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6275 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6277 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6279 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6280 local variable throughout. Remove useless call to Base_Type.
6281 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6282 Take it also into account for the volatileness of the field. Set the
6283 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6285 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6287 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6288 on a dereference built for a by-ref object if it has an address clause.
6290 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6292 * einfo.ads (Address_Taken): Document use for the second argument of
6293 Asm_Input and Asm_Output attributes.
6294 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6295 argument is an entity name, then set Address_Taken on it.
6296 <Attribute_Asm_Output>: Likewise.
6297 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6298 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6299 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6300 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6302 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6305 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6307 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6309 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6310 (ada/utils.o): Update dependencies.
6311 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6312 ../../../libcpp/libcpp.a.
6313 * gcc-interface/utils.c: Include common/common-target.h.
6314 (process_attributes): Use targetm_common.have_named_sections.
6316 2011-06-07 Richard Guenther <rguenther@suse.de>
6318 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6321 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6323 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6324 TREE_THIS_NOTRAP flag.
6326 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6328 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6331 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6333 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6334 constants whose full view has discriminants specially.
6336 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6338 * gcc-interface/utils.c: Include diagnostic.h.
6339 (gnat_write_global_declarations): Output debug information for all
6340 global type declarations before finalizing the compilation unit.
6341 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6343 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6345 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6347 2011-05-25 Kai Tietz <ktietz@redhat.com>
6349 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6350 initialization instead of const/none-const pointer assignment.
6352 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6354 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6355 $(EXTRA_GNAT1_OBJS).
6356 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6357 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6358 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6359 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6360 libcommon-target.a instead of prefix.o.
6362 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6365 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6367 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6369 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6370 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6371 instead of version.o.
6373 2011-05-18 Kai Tietz <ktietz@redhat.com>
6375 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6376 boolean_false_node instead of integer_zero_node.
6377 (convert_with_check): Likewise.
6378 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6380 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6382 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6383 type of the parameter is an unconstrained array, convert the actual to
6384 the type of the formal in the In Out and Out cases as well.
6386 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6388 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6389 call build_function_type_array or build_varargs_function_type_array
6391 (create_subprog_type): Don't call build_function_type; call
6392 build_function_type_vec instead.
6394 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6396 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6397 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6398 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6400 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6402 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6404 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6405 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6407 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6409 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6411 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6413 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6414 instead of accessing TYPE_ARG_TYPES directly.
6415 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6417 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6420 * gcc-interface/gigi.h (get_variant_part): Declare.
6421 * gcc-interface/decl.c (get_variant_part): Make global.
6422 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6423 types have the same constant size, are record types and T1 has a
6424 variant part while T2 doesn't.
6426 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6428 * gcc-interface/utils.c (begin_subprog_body): Do not call
6430 (end_subprog_body): Likewise.
6432 2011-05-04 Richard Guenther <rguenther@suse.de>
6434 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6436 (pos_to_constructor): Likewise.
6438 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6439 Eric Botcazou <ebotcazou@adacore.com>
6441 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6442 of build_function_type. Adjust calls to...
6443 (build_raise_check): ...this. Do not take a void_tree parameter.
6444 Call build_function_type_list instead of build_function_type.
6445 Fix head comment and swap couple of conditional blocks.
6447 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6449 * gnatvsn.ads (Library_Version): Bump to 4.7.
6450 (Current_Year): Bump to 2011.
6452 2011-04-29 Michael Matz <matz@suse.de>
6454 * gcc-interface/misc.c (gnat_handle_option): Set
6455 warn_maybe_uninitialized.
6457 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6459 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6460 the Watson/McCabe paper.
6462 2011-04-23 Jim Meyering <meyering@redhat.com>
6464 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6466 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6468 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6471 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6473 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6475 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6476 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6477 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6478 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6479 <all>: Do not set flags on the reused DECL node coming from an alias.
6480 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6481 don't need debug info here...
6482 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6483 (gigi): Adjust calls to create_subprog_decl.
6484 (build_raise_check): Likewise.
6485 (establish_gnat_vms_condition_handler): Likewise.
6486 (Compilation_Unit_to_gnu): Likewise.
6487 (gnat_to_gnu): Likewise.
6489 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6491 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6492 (NO_REORDER_ADAFLAGS): New variable.
6493 (EXTRA_GNATTOOLS): Always define.
6494 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6495 Clean up and adjust list of files compiled with special options.
6496 * gcc-interface/Make-lang.in: Likewise.
6497 (ada/decl.o): Cosmetical change.
6498 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6500 2011-04-20 Jim Meyering <meyering@redhat.com>
6502 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6504 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6506 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6507 $(CFLAGS) on the link line.
6509 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6511 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6512 padded type built for the return type if it is unconstrained.
6514 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6516 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6518 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6520 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6521 before calling TREE_CHAIN.
6522 * gcc-interface/misc.c (gnat_init_ts): New function.
6523 (LANG_HOOKS_INIT_TS): Define.
6525 2011-04-12 Martin Jambor <mjambor@suse.cz>
6527 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6528 instead of cgraph_node.
6530 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6532 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6533 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6536 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6538 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6539 of aggregate types that contain a placeholder.
6541 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6543 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6545 (handle_type_generic_attribute): Likewise.
6547 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6550 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6552 2011-04-04 Kai Tietz <ktietz@redhat.com>
6555 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6558 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6560 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6561 type case, do not strip a padding type around the array type.
6563 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6565 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6568 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6570 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6571 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6572 code for -feliminate-unused-debug-types.
6573 (gnat_post_options): Likewise.
6575 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6577 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6578 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6581 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6583 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6584 DECL_ARTIFICIAL flag on enumeration types.
6586 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6588 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6589 fat pointer types artificial unconditionally.
6590 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6593 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6595 * gcc-interface/gigi.h (get_dummy_type): Declare.
6596 (build_dummy_unc_pointer_types): Likewise.
6597 (finish_fat_pointer_type): Likewise.
6598 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6599 fat pointer type has been built, complete it in place.
6600 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6601 and thin pointers. Remove useless variable.
6602 (finish_fat_pointer_type): Make global and move to...
6603 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6604 (get_dummy_type): New function.
6605 (build_dummy_unc_pointer_types): Likewise.
6606 (gnat_pushdecl): Propage the name to the anonymous variants only.
6607 (update_pointer_to): Only adjust the pointer types in the unconstrained
6610 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6612 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6613 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6614 if this is a Taft amendment type and the full declaration is available.
6615 * gcc-interface/trans.c (process_type): Likewise.
6616 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6617 (process_freeze_entity): Likewise.
6618 * gcc-interface/utils.c (dummy_global): New static variable.
6619 (gnat_write_global_declarations): If there are types declared as used
6620 at the global level, insert them in the global hash table.
6622 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6624 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6625 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6626 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6628 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6629 flag of the type accordingly.
6630 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6632 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6634 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6635 finalizing types when updating the pointers to the designated type.
6636 <all>: Finalize the deferred types even if we didn't defer processing
6637 of incomplete types in this invocation.
6639 2011-04-01 Olivier Hainque <hainque@adacore.com>
6640 Nicolas Setton <setton@adacore.com>
6641 Eric Botcazou <ebotcazou@adacore.com>
6643 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6644 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6646 2011-03-28 Kai Tietz <ktietz@redhat.com>
6648 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6650 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6651 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6653 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6655 2011-03-28 Tristan Gingold <gingold@adacore.com>
6658 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6659 Use ada output of gnatbind.
6660 (ada/b_gnatb.adb): Ditto.
6661 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6662 (ada.mostlyclean, ada.stage1)
6663 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6664 (ada.stagefeedback): Adjust.
6665 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6666 Use ada output of gnatbind.
6667 (b_gnatm.adb): Ditto.
6668 (b_gnatl.o, b_gnatm.o): New rules.
6670 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6672 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6673 for the padded type built to support a specified size or alignment.
6675 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6677 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6678 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6679 unconditionally to the end of the unit when the designated type is
6681 <all>: Rename local variable. Attempt to un-defer types only and do it
6682 for limited_with'ed types as well.
6683 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6684 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6685 consistently and remove redundant call to finalize_from_with_types.
6687 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6689 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6690 subprograms without a previous spec declared in the same unit.
6691 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6692 subprograms at the end of the unit instead of at the beginning.
6693 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6694 isn't public for the special handling of non-inline functions nested
6695 inside inline external functions.
6697 2011-03-25 Jeff Law <law@redhat.com>
6699 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6701 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6703 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6704 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6705 to compute Set_Size_Depends_On_Discriminant.
6706 (Layout_Type): Call it on array types in back-end layout mode.
6707 * sem_util.adb (Requires_Transient_Scope): Return true for array
6708 types only if the size depends on the value of discriminants.
6709 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6710 type if the RHS is a call to a function that returns an unconstrained
6711 type with default discriminant.
6713 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6715 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6716 non-conversion to the nominal result type at the end.
6718 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6720 * gcc-interface/trans.c (create_temporary): New function taken from...
6721 (create_init_temporary): ...here. Call it.
6722 (call_to_gnu): Create the temporary for the return value early, if any.
6723 Create it for a function with copy-in/copy-out parameters if there is
6724 no target; in other cases of copy-in/copy-out, use another temporary.
6725 Push the new binding level lazily. Add and rename local variables.
6727 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6729 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6731 (set_rm_size): Likewise.
6733 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6735 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6736 for the padded type built in order to support a specified alignment.
6737 Fix incorrect formatting.
6739 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6742 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6744 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6746 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6747 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6748 to the end of the list. Adjust recursive call. Rename local variable.
6749 If REORDER is true, reorder components of the record type.
6750 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6751 components_to_record and adjust the parameter list.
6753 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6755 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6756 disabled, use the variable for bounds of loop iteration scheme.
6758 2011-03-21 Kai Tietz <ktietz@redhat.com>
6761 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6763 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6765 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6766 out whether the expression is read-only. Short-circuit placeholder
6767 case and rename a couple of local variables.
6769 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6771 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6772 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6773 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6774 (convert): Deal with conversions from a smaller form type specially.
6776 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6778 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6779 its argument, except for the special -I- switch.
6781 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6783 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6786 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6788 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6790 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6792 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6794 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6795 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6796 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6797 Do not generate the check directly, instead instantiate the template
6798 check present in the descriptor.
6799 (make_descriptor_field): Move around.
6800 (build_vms_descriptor32): Build a template check in the POINTER field.
6801 (build_vms_descriptor): Remove useless suffixes.
6802 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6804 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6807 * targext.c: Include target files if IN_RTS is defined.
6809 2011-01-26 Richard Guenther <rguenther@suse.de>
6812 * targext.c: Include config.h.
6813 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6816 2011-01-04 Pascal Obry <obry@adacore.com>
6817 Eric Botcazou <ebotcazou@adacore.com>
6819 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6821 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6823 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6824 end-of-case on the end label and its associated gotos, if any.
6826 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6828 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6829 expressions of the parameter cache within the statement group of
6832 2011-01-04 Olivier Hainque <hainque@adacore.com>
6833 Eric Botcazou <ebotcazou@adacore.com>
6835 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6836 (set_end_locus_from_node): New function.
6837 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6838 make and the function end_locus.
6839 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6840 for the elaboration subprogram.
6841 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6842 set the end_locus of the expression as well.
6844 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6847 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
6848 variables that are referenced in exception handlers volatile.
6852 Copyright (C) 2011 Free Software Foundation, Inc.
6854 Copying and distribution of this file, with or without modification,
6855 are permitted in any medium without royalty provided the copyright
6856 notice and this notice are preserved.
6858 * gnat_rm.texi: Ramification of pragma Eliminate documentation
6859 - fix bugs in the description of Source_Trace;
6860 - get rid of UNIT_NAME;
6862 2011-08-02 Javier Miranda <miranda@adacore.com>
6865 (Build_Dispatching_Requeue): Adding support for VM targets
6866 since we cannot directly reference the Tag entity.
6867 * exp_sel.adb (Build_K): Adding support for VM targets.
6868 (Build_S_Assignment): Adding support for VM targets.
6870 (Default_Prim_Op_Position): In VM targets do not restrict availability
6871 of predefined interface primitives to compiling in Ada 2005 mode.
6872 (Is_Predefined_Interface_Primitive): In VM targets this service is not
6873 restricted to compiling in Ada 2005 mode.
6874 (Make_VM_TSD): Generate code that declares and initializes the OSD
6875 record. Needed to support dispatching calls through synchronized
6878 (Make_Predefined_Primitive_Specs): Enable generation of predefined
6879 primitives associated with synchronized interfaces.
6880 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
6881 primitives associated with synchronized interfaces.
6883 2011-08-02 Yannick Moy <moy@adacore.com>
6885 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
6886 statements hidden in SPARK if preceded by the HIDE directive
6887 (Parse_Exception_Handlers): mark each exception handler in a sequence of
6888 exception handlers as hidden in SPARK if preceded by the HIDE directive
6889 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
6890 if starting with the HIDE directive
6891 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
6892 starting with the HIDE directive; mark the declarations in a private
6893 part as hidden in SPARK if the private part starts with the HIDE
6895 * restrict.adb, restrict.ads
6896 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
6897 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
6898 argument node belongs to a part which is hidden in SPARK
6899 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
6900 parts in SPARK; protect the possibly costly call to
6901 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
6902 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
6903 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
6904 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
6906 (Scan): recognize special comment starting with '#' and followed by
6907 SPARK keyword "hide" as a HIDE directive.
6909 2011-08-02 Yannick Moy <moy@adacore.com>
6911 * types.ads, erroutc.ads: Minor reformatting.
6913 2011-08-02 Vincent Celier <celier@adacore.com>
6915 * link.c: Add response file support for cross platforms.
6917 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6919 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
6920 in an association, set parent field of copy before partial analysis.
6921 * sem_res.adb (Resolve_Slice): create reference to itype only when
6922 expansion is enabled.
6924 2011-08-02 Yannick Moy <moy@adacore.com>
6926 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
6927 for new flag denoting which subprogram bodies are in ALFA
6928 * restrict.adb, sem_ch7.adb: Update comment
6929 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6930 sem_ch9.adb, sem_res.adb: Add calls to
6931 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
6932 * sem_ch6.adb (Analyze_Function_Return): add calls to
6933 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
6934 middle of the body, and extended return.
6935 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
6936 False when missing return.
6937 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
6938 to True for subprograms whose spec is in ALFA. Remove later on the flag
6939 on the entity used for a subprogram body when there exists a separate
6941 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
6942 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
6943 False, otherwise do nothing.
6945 2011-08-02 Robert Dewar <dewar@adacore.com>
6947 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
6949 2011-08-02 Yannick Moy <moy@adacore.com>
6951 * sem_ch4.ads: minor formatting.
6953 2011-08-02 Yannick Moy <moy@adacore.com>
6955 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
6956 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
6957 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
6958 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
6959 opt.ads: cleanup of SPARK mode
6961 2011-08-02 Yannick Moy <moy@adacore.com>
6963 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
6965 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
6966 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
6968 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
6969 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
6970 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
6971 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
6973 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
6975 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
6976 functions whose return type is not in ALFA.
6977 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
6979 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
6980 parameter's type is not in ALFA.
6981 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
6984 2011-08-02 Ed Schonberg <schonberg@adacore.com>
6986 * sem_ch6 (Analyze_Expression_Function): treat the function as
6987 Inline_Always, and introduce a subprogram declaration for it when it is
6989 * inline.adb (Add_Inlined_Body): recognize bodies that come from
6990 expression functions, so that the back-end can determine whether they
6991 can in fact be inlined.
6992 * sem_util.adb (Is_Expression_Function): predicate to determine whether
6993 a function body comes from an expression function.
6995 2011-08-02 Gary Dismukes <dismukes@adacore.com>
6997 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
6998 null exclusions to test Can_Never_Be_Null on the anonymous access types
6999 of the formals rather than testing the formals themselves. Exclude this
7000 check in cases where the Old_Formal is marked as a controlling formal,
7001 to avoid issuing spurious errors for bodies completing dispatching
7002 operations (due to the flag not getting set on controlling access
7003 formals in body specs).
7004 (Find_Corresponding_Spec): When checking full and subtype conformance of
7005 subprogram bodies in instances, pass Designated and E in that order, for
7006 consistency with the expected order of the formals (New_Id followed by
7009 2011-08-02 Robert Dewar <dewar@adacore.com>
7011 * sem_ch8.adb: Minor reformatting.
7013 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7015 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7016 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7017 primitive operations of class-wide actuals.
7019 2011-08-02 Javier Miranda <miranda@adacore.com>
7021 * exp_atag.ads, exp_atag.adb
7022 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7023 since its value is implicitly passed in argument Typ.
7024 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7025 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7026 Build_Common_Dispatching_Select_Statements.
7028 2011-08-02 Robert Dewar <dewar@adacore.com>
7030 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7031 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7034 2011-08-02 Robert Dewar <dewar@adacore.com>
7036 * sem_res.adb: Minor reformatting.
7037 * sem_prag.adb: Minor reformatting.
7039 2011-08-02 Javier Miranda <miranda@adacore.com>
7041 * exp_atag.adb, exp_atags.ads
7042 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7043 by the tagged type Entity. Required to use this routine in the VM
7044 targets since we do not have available the Tag entity in the VM
7047 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7048 Ada.Tags has not been previously loaded.
7050 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7051 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7053 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7054 view of enclosing scopes. Required to handle enclosing scopes that
7055 are synchronized types whose full view is a task type.
7057 (Build_VM_TSDs): Minor code improvement to avoid generating and
7058 analyzing lists with empty nodes.
7059 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7060 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7061 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7062 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7063 (Make_Select_Specific_Data_Table): Add support for VM targets.
7064 (Make_VM_TSD): Generate code to initialize the SSD structure of
7067 2011-08-02 Yannick Moy <moy@adacore.com>
7069 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7070 cross-references section in ALI.
7071 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7072 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7074 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7075 subprogram or package entity of a node
7076 (Is_Local_Reference_Type): new function returns True for references
7077 selected in local cross-references.
7078 (Lt): function extracted from Lt in Output_References
7079 (Write_Entity_Name): function extracted from Output_References
7080 (Generate_Definition): generate reference with type 'D' for definition
7081 of objects (object declaration and parameter specification), with
7082 appropriate locations and units, for use in local cross-references.
7083 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7084 references of type 'I' for initialization in object definition.
7085 (Output_References): move part of function Lt and procedure
7086 Write_Entity_Name outside of the body. Ignore references of types 'D'
7087 and 'I' introduced for local cross-references.
7088 (Output_Local_References): new procedure to output the local
7089 cross-references sections.
7090 (Lref_Entity_Status): new array defining whether an entity is a local
7091 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7092 with 'I' type when initialization expression is present.
7093 * get_scos.adb, get_scos.ads: Correct comments and typos
7095 2011-08-02 Javier Miranda <miranda@adacore.com>
7097 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7099 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7101 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7104 2011-08-02 Vincent Celier <celier@adacore.com>
7106 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7107 (No_Space_Img): New function
7108 (Find_Excluded_Sources): When reading from a file, record the file name
7109 and the line number for each excluded source.
7110 (Mark_Excluded_Sources): When reporting an error, if the excluded
7111 sources were read from a file, include file name and line number in
7114 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7116 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7118 2011-08-02 Robert Dewar <dewar@adacore.com>
7120 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7122 2011-08-02 Javier Miranda <miranda@adacore.com>
7124 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7125 generation of TSDs to the DOTNET compiler.
7126 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7127 generation of TSDs to the DOTNET compiler.
7129 2011-08-02 Javier Miranda <miranda@adacore.com>
7131 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7132 record of all the tagged types declared inside library level package
7133 declarations, library level package bodies or library level subprograms.
7134 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7135 associated with a given tagged type.
7136 (Build_VM_TSDs): New subprogram.
7137 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7138 compilation units that are subprograms.
7139 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7140 compilation units that are package bodies.
7141 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7142 units that are a package declaration or a package instantiation.
7143 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7144 reorganization to improve the error generated by the frontend when the
7145 function Ada.Tags.Secondary_Tag is not available.
7146 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7147 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7149 2011-08-02 Javier Miranda <miranda@adacore.com>
7151 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7153 2011-08-02 Robert Dewar <dewar@adacore.com>
7155 * s-imenne.ads: Minor reformatting.
7157 2011-08-02 Robert Dewar <dewar@adacore.com>
7159 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7160 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7161 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7163 2011-08-02 Robert Dewar <dewar@adacore.com>
7165 * einfo.ads (Materialize_Entity): Document this is only for renamings
7166 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7167 required debug information in the case where we transform the object
7168 declaration into a renaming declaration.
7169 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7171 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7174 2011-08-02 Robert Dewar <dewar@adacore.com>
7176 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7177 Suppress_Init_Procs.
7178 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7179 Suppress_Initialization/Initialization_Suppressed.
7180 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7181 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7182 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7183 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7185 2011-08-02 Robert Dewar <dewar@adacore.com>
7187 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7190 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7192 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7193 only have inheritable classwide pre/postconditions.
7195 2011-08-02 Javier Miranda <miranda@adacore.com>
7197 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7198 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7199 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7200 checks if the external tag of a type is the same as the external tag
7201 of some other declaration.
7203 2011-08-02 Thomas Quinot <quinot@adacore.com>
7205 * s-taskin.ads: Minor reformatting.
7207 2011-08-02 Emmanuel Briot <briot@adacore.com>
7209 * g-comlin.adb (Display_Help): swap the order in which it prints the
7210 short help and the general usage.
7212 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7214 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7215 the aspect declarations and attach them to the generic copy for
7216 subsequent analysis.
7217 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7218 declarations of the generic tree to the new subprogram declarations.
7219 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7220 conditions that apply to a subprogram instance.
7222 2011-08-02 Robert Dewar <dewar@adacore.com>
7224 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7226 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7228 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7229 private type with a tagged full view is not derived in the immediate
7230 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7232 2011-08-02 Robert Dewar <dewar@adacore.com>
7234 * exp_ch4.adb: Minor reformatting.
7236 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7238 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7239 Ada2012 iterator, the loop will be rewritten during expansion into a
7240 while loop with a cursor and an element declaration. Do not analyze the
7241 body in this case, because if the container is for indefinite types the
7242 actual subtype of the elements will only be determined when the cursor
7243 declaration is analyzed.
7245 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7247 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7248 size/alignment related attributes in CodePeer_Mode.
7250 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7252 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7253 Prepend_Element, since this can result in the operation getting the
7254 wrong slot in the full type's dispatch table if the full type has
7255 inherited operations. The incomplete type's operation will get added
7256 to the proper position in the full type's primitives
7257 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7258 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7259 dispatching operations, since there are cases where nonprimitive
7260 subprograms can get added to the list of incomplete dependents (such
7261 as subprograms in nested packages).
7262 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7263 private part when determining whether to add a primitive with a
7264 parameter of a tagged incomplete type to the Private_Dependents list.
7265 Such primitives can also occur in the visible part, and should not have
7266 been excluded from being private dependents.
7267 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7268 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7269 list of a Taft-amendment incomplete type is a primitive before issuing
7270 an error that the full type must appear in the same unit. There are
7271 cases where nonprimitives can be in the list (such as subprograms in
7273 * sem_disp.adb (Derives_From): Use correct condition for checking that
7274 a formal's type is derived from the type of the corresponding formal in
7275 the parent subprogram (the condition was completely wrong). Add
7276 checking that was missing for controlling result types being derived
7277 from the result type of the parent operation.
7279 2011-08-02 Yannick Moy <moy@adacore.com>
7281 * errout.adb (First_Node): minor renaming
7282 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7285 2011-08-02 Yannick Moy <moy@adacore.com>
7287 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7288 before accessing operands.
7289 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7290 decide whether an initialization expression respects SPARK rules, as
7291 the plain node is the expanded one. This allows for more valid warnings
7293 * gnat_rm.texi: Minor update.
7295 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7297 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7300 2011-08-02 Robert Dewar <dewar@adacore.com>
7302 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7304 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7306 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7307 loop statements and the element renaming declaration with a block when
7308 the element type is controlled.
7310 2011-08-02 Yannick Moy <moy@adacore.com>
7312 * sinfo.ads: Minor formatting.
7314 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7316 * sem_aggr.adb (Add_Association): if the association has a box and no
7317 expression, use the Sloc of the aggregate itself for the new
7319 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7322 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7324 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7325 When a container is provided via a function call, generate a renaming
7326 of the function result. This avoids the creation of a transient scope
7327 and the premature finalization of the container.
7328 * exp_ch7.adb (Is_Container_Cursor): Removed.
7329 (Wrap_Transient_Declaration): Remove the supression of the finalization
7330 of the list controller when the declaration denotes a container cursor,
7333 2011-08-02 Yannick Moy <moy@adacore.com>
7335 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7336 node is from source, instead of the original node being from source.
7338 (Resolve_Array_Aggregate): refine the check for a static expression, to
7339 recognize also static ranges
7340 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7341 Array_Type_Declaration): postpone the test for the type being a subtype
7342 mark after the type has been resolved, so that component-selection and
7343 expanded-name are discriminated.
7344 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7345 to distinguish the case of an iteration scheme, so that an error is
7346 issed on a non-static range in SPARK except in an iteration scheme.
7347 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7348 In_Iter_Schm = True.
7349 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7350 user-defined operators so that they are allowed in renaming
7352 (Find_Selected_Component): refine the check for prefixing of operators
7353 so that they are allowed in renaming. Move the checks for restrictions
7354 on selector name after analysis discriminated between
7355 component-selection and expanded-name.
7356 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7357 concatenation argument of string type if it is static.
7358 * sem_util.adb, sem_util.ads
7359 (Check_Later_Vs_Basic_Declarations): add a new function
7360 Is_Later_Declarative_Item to decice which declarations are allowed as
7361 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7362 mode, add that renamings are considered as later items.
7363 (Enclosing_Package): new function to return the enclosing package
7364 (Enter_Name): correct the rule for homonyms in SPARK
7365 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7366 from source (result of expansion) to avoid issuing wrong warnings.
7368 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7370 * errout.adb: On anything but an expression First_Node returns its
7373 2011-08-02 Pascal Obry <obry@adacore.com>
7375 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7377 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7379 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7380 Set the associated loop as the related expression of internally
7382 * exp_ch7.adb (Is_Container_Cursor): New routine.
7383 (Wrap_Transient_Declaration): Supress the finalization of the list
7384 controller when the declaration denotes a container cursor.
7386 2011-08-02 Yannick Moy <moy@adacore.com>
7388 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7390 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7391 expression is a simple expression. This check cannot be performed in
7392 the semantics, so just drop it.
7393 (P_Index_Or_Discriminant_Constraint): move check that the index or
7394 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7395 semantics. Other cases were previously checked in the semantics.
7396 * par-ch4.adb (P_Name): move checks that a selector name is not
7397 character literal or an operator symbol to Find_Selected_Component in
7399 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7400 declarations are not placed after later declarations in a separate
7401 procedure in Sem_Util (possibly not the best choice?), to be used both
7402 during parsing, for Ada 83 mode, and during semantic analysis, for
7404 * par-endh.adb (Check_End): move check that end label is not missing
7405 to Process_End_Label in the semantics
7406 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7407 the special case for SPARK restriction
7408 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7409 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7410 parameter Force to issue the error message even on internal node (used
7411 for generated end label). Call Check_Restriction to check when an error
7412 must be issued. In SPARK mode, issue an error message even if the
7413 restriction is not set.
7414 (Check_Restriction): new procedure with an additional out parameter to
7415 inform the caller that a message has been issued
7416 * sem_aggr.adb: Minor modification of message
7417 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7418 instead of issuing an error message directly
7419 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7420 declarations are not placed after later declarations, by calling
7421 Check_Later_Vs_Basic_Declarations
7422 (Analyze_Subtype_Declaration): move here the check that an index or
7423 discriminant constraint must be a subtype mark. Change the check that
7424 a subtype of String must start at one so that it works on subtype marks.
7425 * sem_ch4.adb (Analyze_Call): move here the check that a named
7426 association cannot follow a positional one in a call
7427 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7428 instead of issuing an error message directly
7429 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7430 selector name is not a character literal or an operator symbol. Move
7431 here the check that the prefix of an expanded name cannot be a
7432 subprogram or a loop statement.
7433 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7434 procedure called from parsing and semantics to check that basic
7435 declarations are not placed after later declarations
7436 (Process_End_Label): move here the check that end label is not missing
7438 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7440 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7441 representation clause in codepeer mode, since it confuses CodePeer and
7442 does not bring useful info.
7444 2011-08-02 Ed Falis <falis@adacore.com>
7446 * init.c: initialize fp hw on MILS.
7448 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7450 * errout.adb (First_Node): for bodies, return the node itself (small
7451 optimization). For other nodes, do not check source_unit if the node
7452 comes from Standard.
7454 2011-08-02 Robert Dewar <dewar@adacore.com>
7456 * exp_ch3.adb: Minor comment additions.
7457 * sem_ch13.adb: Minor reformatting.
7459 2011-08-02 Pascal Obry <obry@adacore.com>
7461 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7463 2011-08-02 Robert Dewar <dewar@adacore.com>
7465 * sem_attr.adb: Minor reformatting.
7467 2011-08-02 Robert Dewar <dewar@adacore.com>
7469 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7470 (Has_Default_Component_Value): Removed
7471 * einfo.ads Comment updates
7472 (Has_Default_Aspect): Replaces Has_Default_Value
7473 (Has_Default_Component_Value): Removed
7475 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7477 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7478 (Get_Simple_Init_Val): Handle Default_Value aspect
7479 (Needs_Simple_Initialization): Handle Default_Value aspect
7480 * exp_ch3.ads: Needs_Simple_Initialization
7481 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7482 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7484 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7485 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7486 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7488 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7490 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7491 package containing iteration primitives.
7492 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7494 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7496 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7497 "of", pre-analyze expression in case it is a function call with
7498 finalization actions that must be placed ahead of the loop.
7499 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7500 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7502 2011-08-02 Geert Bosch <bosch@adacore.com>
7504 * cstand.adb (Create_Float_Types): Only consider C's long double for
7505 Long_Long_Float, in addition to double.
7507 2011-08-02 Robert Dewar <dewar@adacore.com>
7509 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7510 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7511 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7514 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7516 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7519 2011-08-02 Javier Miranda <miranda@adacore.com>
7521 * einfo.ads, einfo.adb
7522 (Original_Access_Type): Move this attribute to Node26 since there was
7523 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7524 which causes conflicts and breaks the generation of the .NET compiler.
7525 (Interface_Name): Add missing documentation on JGNAT only uses of
7528 2011-08-02 Geert Bosch <bosch@adacore.com>
7530 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7531 (Find_Back_End_Float_Type): Likewise
7532 (Create_Back_End_Float_Types): Likewise
7533 (Create_Float_Types): Likewise
7534 (Register_Float_Type): Likewise
7535 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7536 Nlist and split out type selection in new local Find_Base_Type function.
7537 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7539 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7541 2011-08-02 Robert Dewar <dewar@adacore.com>
7543 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7545 * opt.ads: Minor comment change.
7546 * sem_ch12.adb: Minor code reorganization.
7548 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7550 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7551 subtype's list of rep items to the list on the full subtype in the case
7552 where the lists are the same.
7554 2011-08-02 Geert Bosch <bosch@adacore.com>
7556 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7557 using the one from System.Strings, which also deallocates all strings.
7559 2011-08-02 Geert Bosch <bosch@adacore.com>
7561 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7563 * gcc-interface/Make-lang.in: Update dependencies.
7565 2011-08-02 Olivier Hainque <hainque@adacore.com>
7567 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7570 2011-08-02 Javier Miranda <miranda@adacore.com>
7572 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7573 associated with anonymous access to subprograms.
7575 2011-08-02 Geert Bosch <bosch@adacore.com>
7578 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7579 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7580 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7581 (Add_Symbol_Definition): Move to switch-c.adb
7582 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7583 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7584 (Add_Symbol_Definition): Move to switch-c.adb.
7585 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7587 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7589 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7590 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7592 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7593 (Add_Symbol_Definition): Moved from Prepcomp.
7594 * switch-c.ads: Update copyright notice. Use String_List instead of
7595 Argument_List, removing dependency on System.OS_Lib.
7597 2011-08-02 Yannick Moy <moy@adacore.com>
7599 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7600 mode on initialization expression which does not respect SPARK
7602 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7603 if the tree referenced by its argument represents an initialization
7604 expression in SPARK, suitable for initializing an object in an object
7607 2011-08-02 Javier Miranda <miranda@adacore.com>
7609 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7610 internally generated access to subprogram with its associated protected
7612 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7614 2011-08-02 Geert Bosch <bosch@adacore.com>
7616 * cstand.adb (Register_Float_Type): Print information about type to
7617 register, if the Debug_Flag_Dot_B is set.
7618 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7619 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7620 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7621 with a requested precision of more than Max_Digits digits and no more
7622 than Max_Base_Digits digits, if a range specification is present and the
7623 Predefined_Float_Types list has a suitable type to derive from.
7624 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7625 case of type completion with pragma Import
7627 (Process_Import_Predefined_Type): Processing to complete a type
7628 with pragma Import. Currently supports floating point types only.
7629 (Set_Convention_From_Pragma): Do nothing without underlying type.
7630 (Process_Convention): Guard against absence of underlying type,
7631 which may happen when importing incomplete types.
7632 (Process_Import_Or_Interface): Handle case of importing predefined
7633 types. Tweak error message.
7635 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7637 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7638 functions to previous change. Reorganize code slightly.
7640 2011-08-02 Geert Bosch <bosch@adacore.com>
7642 * back_end.ads (Register_Type_Proc): New call back procedure type for
7643 allowing the back end to provide information about available types.
7644 (Register_Back_End_Types): New procedure to register back end types.
7645 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7647 * cstand.adb (Back_End_Float_Types): New list for floating point types
7648 supported by the back end.
7649 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7650 (Copy_Float_Type): New procedure to make new copies of predefined types.
7651 (Register_Float_Type): New call back procedure to populate the BEFT list
7652 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7653 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7654 (Create_Float_Types): New procedure to create entities for floating
7655 point types predefined in Standard, and put these and any remaining
7656 BEFTs on the Predefined_Float_Types list.
7657 * stand.ads (Predefined_Float_Types): New list for predefined floating
7658 point types that do not have declarations in package Standard.
7660 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7662 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7663 entity node for the unit containing the parameter.
7664 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7665 (Add_Inlined_Subprogram): Likewise.
7666 * gcc-interface/Make-lang.in: Update dependencies.
7668 2011-08-02 Thomas Quinot <quinot@adacore.com>
7670 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7673 2011-08-02 Geert Bosch <bosch@adacore.com>
7675 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7677 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7679 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7680 computed value of Base_Type.
7682 2011-08-02 Yannick Moy <moy@adacore.com>
7684 * restrict.adb (Check_Restriction): issue an error for any use of
7685 class-wide, even if the No_Dispatch restriction is not set.
7686 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7687 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7688 when completing a private extension, the type named in the private part
7689 is not the same as that named in the visible part.
7690 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7691 of an inherited primitive operations of a tagged type or type extension
7692 that returns the tagged type.
7693 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7694 function which returns True for an implicit operation inherited by the
7695 derived type declaration for the argument type.
7696 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7699 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7701 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7702 Process_Bounds, to perform analysis with expansion of a range or an
7703 expression that is the iteration scheme for a loop.
7704 (Analyze_Iterator_Specification): If domain of iteration is given by a
7705 function call with a controlled result, as is the case if call returns
7706 a predefined container, ensure that finalization actions are properly
7708 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7710 2011-08-02 Javier Miranda <miranda@adacore.com>
7712 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7713 * gcc-interface/Make-lang.in: Update dependencies.
7715 2011-08-02 Javier Miranda <miranda@adacore.com>
7717 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7718 determine if the analysis is performed using N or Original_Node (N).
7719 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7720 functionality of routine Is_Variable avoids code duplication.
7721 * checks.adb (Determine_Range): Handle temporaries generated by
7722 Remove_Side_Effects.
7724 2011-08-02 Javier Miranda <miranda@adacore.com>
7726 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7727 expansion of the condition. Required since the previous analysis was
7728 done with expansion disabled (see Resolve_Quantified_Expression) and
7729 hence checks were not inserted and record comparisons have not been
7732 2011-08-02 Ed Falis <falis@adacore.com>
7734 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7737 2011-08-02 Bob Duff <duff@adacore.com>
7739 * opt.ads: Minor comment fix.
7741 2011-08-02 Bob Duff <duff@adacore.com>
7743 * sem_ch12.adb (Analyze_Package_Instantiation,
7744 Analyze_Subprogram_Instantiation): Turn off style checking while
7745 analyzing an instance. Whatever style checks that apply to the generic
7746 unit should apply, so it makes no sense to apply them in an instance.
7747 This was causing trouble when compiling an instance of a runtime
7748 unit that violates the -gnatyO switch.
7749 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7750 one of the two case statements, causing spurious errors.
7752 2011-08-02 Robert Dewar <dewar@adacore.com>
7754 * uname.adb: Minor reformatting.
7755 * gnatcmd.adb: Minor reformatting.
7756 * exp_attr.adb: Minor reformatting.
7758 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7760 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7761 No_Dispatching_Calls, do not look for the Assign primitive, because
7762 predefined primitives are not created in this case.
7764 2011-08-02 Bob Duff <duff@adacore.com>
7766 * stylesw.ads: Minor comment fixes.
7768 2011-08-02 Robert Dewar <dewar@adacore.com>
7770 * freeze.adb (Add_To_Result): New procedure.
7772 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7774 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7775 time, if the specific run-time routines for handling streams of strings
7776 are not available, use the default mechanism.
7778 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7780 * s-regpat.ads: Fix typo.
7782 2011-08-02 Vincent Celier <celier@adacore.com>
7784 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7785 not null, call it to create the in memory config project file without
7786 parsing an existing default config project file.
7788 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7790 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7792 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7794 * sem_elim.adb: an abstract subprogram does not need an eliminate
7795 pragma for its descendant to be eliminable.
7797 2011-08-02 Ed Falis <falis@adacore.com>
7799 * init.c: revert to handling before previous checkin for VxWorks
7800 * s-intman-vxworks.adb: delete unnecessary declarations related to
7801 using Ada interrupt facilities for handling signals.
7802 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7803 * s-intman-vxworks.ads: Import __gnat_install_handler as
7804 Initialize_Interrupts.
7805 * s-taprop-vxworks.adb: Delete Signal_Mask.
7806 (Abort_Handler): change construction of mask to unblock exception
7809 2011-08-02 Jerome Guitton <guitton@adacore.com>
7811 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7812 Debug_Raise_Exception before propagation starts.
7814 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7816 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7817 to Restriction_Check_Required.
7818 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7819 * sem_res.adb (Resolve_Call): Likewise.
7820 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7822 2011-08-02 Bob Duff <duff@adacore.com>
7824 * stylesw.ads: Update comment.
7825 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7826 * errout.ads: Remove obsolete comment.
7828 2011-08-02 Javier Miranda <miranda@adacore.com>
7830 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7831 (Set_Is_Safe_To_Reevaluate): new procedure.
7832 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7833 assignment is allowed on safe-to-reevaluate variables.
7834 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7835 temporary created to remove side effects in expressions that use
7836 the secondary stack as safe-to-reevaluate.
7837 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7838 variables that are not true constants.
7840 2011-08-02 Robert Dewar <dewar@adacore.com>
7842 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7843 sem_res.adb, sem_ch6.adb: Minor reformatting.
7845 2011-08-02 Jerome Guitton <guitton@adacore.com>
7847 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
7849 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7851 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
7852 not set Overridden_Operation if subprogram is an initialization
7855 2011-08-02 Yannick Moy <moy@adacore.com>
7857 * par-ch6.adb: Correct obsolete name in comments
7858 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
7859 which takes two message arguments (existing function takes one), with
7860 second message used for continuation.
7861 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
7862 block statements that originate from a source block statement, not
7863 generated block statements
7864 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
7865 symmetry with procedure case
7866 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
7867 function to issue an error in formal mode if a package specification
7868 contains more than one tagged type or type extension.
7869 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
7870 parameters matching formals of tagged types are objects (or ancestor
7871 type conversions of objects), not general expressions. Issue an error
7872 on view conversions that are not involving ancestor conversion of an
7874 (Resolve_Type_Conversion): in formal mode, issue an error on the
7875 operand of an ancestor type conversion which is not an object
7876 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
7877 procedure so that it works also for actuals of function calls
7878 (Is_Actual_Tagged_Parameter): new function which determines if its
7879 argument is an actual parameter of a formal of tagged type in a
7881 (Is_SPARK_Object_Reference): new function which determines if the tree
7882 referenced by its argument represents an object in SPARK
7884 2011-08-02 Robert Dewar <dewar@adacore.com>
7886 * sem_ch3.adb: Minor reformatting
7887 Minor comment addition
7888 Minor error msg text change
7890 2011-08-02 Javier Miranda <miranda@adacore.com>
7892 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
7893 function. Used to be more precise when we generate a variable plus one
7894 assignment to remove side effects in the evaluation of the Bound
7896 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
7897 of the bound expression to force its re-analysis and thus expand the
7898 associated transient scope (if required). Code cleanup replacing the
7899 previous code that declared the constant entity by an invocation to
7900 routine Force_Evaluation which centralizes this work in the frontend.
7902 2011-08-02 Robert Dewar <dewar@adacore.com>
7904 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
7905 (Base_Type): Now uses improved Is_Base_Type function
7906 * einfo.ads (Base_Type): Inline this function
7908 2011-08-02 Robert Dewar <dewar@adacore.com>
7910 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
7911 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
7913 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7915 * gcc-interface/Make-lang.in: Update dependencies.
7916 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
7919 2011-08-02 Yannick Moy <moy@adacore.com>
7921 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
7922 non-simple expression used in delta constraint
7923 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
7924 index constraint which is not a subtype mark
7925 * par.adb: With and use Restrict
7926 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
7927 mode on component type which is not a subtype mark and default
7928 expression on component
7929 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
7930 of string which does not have a lower index bound equal to 1
7931 (Array_Type_Declaration): issue an error in formal mode on index or
7932 component type which is not a subtype mark, and on aliased keyword on
7934 (Derived_Type_Declaration): issue an error in formal mode on interface,
7935 limited or abstract type
7936 (Record_Type_Declaration): issue an error in formal mode on interface
7937 (Record_Type_Definition): issue an error in formal mode on tagged types
7938 and type extensions not declared in the specification of a library unit
7939 package; on null non-tagged record; on variant part
7941 2011-08-02 Vincent Celier <celier@adacore.com>
7943 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
7944 not declared for qualified library project when Library_Name is not
7945 declared, but Library_Dir is.
7947 2011-08-02 Robert Dewar <dewar@adacore.com>
7949 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
7950 pragmas (affects aspects [Component_]Default_Value
7951 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
7952 component type for the resolution
7954 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7956 * einfo.adb (Base_Type): Tune implementation for speed.
7958 2011-08-02 Robert Dewar <dewar@adacore.com>
7960 * freeze.adb: Minor reformatting.
7962 2011-08-02 Thomas Quinot <quinot@adacore.com>
7964 * scos.ads: Update comments.
7966 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7968 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
7969 base type, because the parent may be a subtype of a private type whose
7970 convention is established in a private part.
7972 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7974 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
7975 statement in a block when the expansion of the return expression has
7976 created a finalization chain.
7977 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
7978 with the parent node.
7979 Add N_Extended_Return_Statement to handle the case where a transient
7980 object declaration appears in the Return_Object_Declarations list of
7981 an extended return statement.
7983 2011-08-02 Matthew Gingell <gingell@adacore.com>
7985 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
7986 unused parameter 'name'.
7988 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7990 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
7991 inherited operation, check whether its alias, which is the source
7992 operastion that it renames, has been marked eliminated.
7994 2011-08-02 Javier Miranda <miranda@adacore.com>
7996 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
7997 in-mode parameter whose type is an access type since it can be used to
7998 modify its designated object. Enforce code that handles as safe an
7999 access type that is not access-to-constant but it is the result of a
8000 previous removal of side-effects.
8001 (Remove_Side_Effects): Minor code reorganization of cases which require
8002 no action. Done to incorporate documentation on new cases uncovered
8003 working in this ticket: no action needed if this routine was invoked
8004 too early and the nodes are not yet decorated.
8005 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8006 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8007 were issued with actuals that are implicitly provided by
8010 2011-08-02 Robert Dewar <dewar@adacore.com>
8012 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8014 2011-08-02 Yannick Moy <moy@adacore.com>
8016 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8017 to issue an error in formal mode on attribute not supported in this mode
8018 (Analyze_Attribute): issue errors on standard attributes not supported
8020 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8021 comment, and issue error in formal mode on modulus which is not a power
8023 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8025 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8027 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8028 operator on modular type (except 'not').
8030 2011-08-02 Robert Dewar <dewar@adacore.com>
8032 * gnat_rm.texi: Minor reformatting.
8034 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8036 * s-osinte-linux.ads: Minor comment update and reformatting.
8037 * i-cexten.ads: Make this unit pure, as for its parent.
8038 Will allow its usage in more contexts if needed.
8040 2011-08-02 Robert Dewar <dewar@adacore.com>
8042 * s-utf_32.ads: Minor comment fix.
8044 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8046 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8047 operation of a tagged synchronized type, handle the case where the
8048 controlling argument is overloaded.
8050 2011-08-02 Yannick Moy <moy@adacore.com>
8052 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8053 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8054 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8055 SPARK mode and formal verification mode on processing SPARK restriction
8056 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8057 requiring consistency checking.
8059 2011-08-02 Robert Dewar <dewar@adacore.com>
8061 * sem_res.adb: Minor reformatting.
8063 2011-08-02 Robert Dewar <dewar@adacore.com>
8065 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8066 a-cforse.ads: Remove unneeded with of Ada.Containers
8067 Remove commented out pragma Inline's
8068 Move specifications of new subprograms to the actual specs
8070 2011-08-02 Yannick Moy <moy@adacore.com>
8072 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8073 a-cforse.ads: Update comments.
8075 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8077 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8079 2011-08-02 Robert Dewar <dewar@adacore.com>
8081 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8082 a-cforse.ads, a-cofove.ads: Minor reformatting.
8084 2011-08-02 Claire Dross <dross@adacore.com>
8086 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8087 a-cofove.ads: Add comments.
8089 2011-08-02 Yannick Moy <moy@adacore.com>
8091 * gnat_rm.texi: Document formal containers.
8093 2011-08-02 Emmanuel Briot <briot@adacore.com>
8095 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8098 2011-08-02 Robert Dewar <dewar@adacore.com>
8100 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8103 2011-08-02 Robert Dewar <dewar@adacore.com>
8105 * aspects.adb: New aspects Default_Value and Default_Component_Value
8106 New format of Aspect_Names table checks for omitted entries
8107 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8108 handling of boolean aspects for derived types.
8109 New aspects Default_Value and Default_Component_Value
8110 New format of Aspect_Names table checks for omitted entries
8111 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8112 (Has_Default_Value): New flag
8113 (Has_Default_Component_Value): New flag
8114 (Has_Default_Value): New flag
8115 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8117 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8118 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8119 Default_Value and Default_Component_Value
8120 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8121 New aspects Default_Value and Default_Component_Value
8122 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8123 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8125 2011-08-02 Vincent Celier <celier@adacore.com>
8127 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8128 inherit library kind.
8130 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8132 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8135 2011-08-02 Robert Dewar <dewar@adacore.com>
8137 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8139 2011-08-02 Yannick Moy <moy@adacore.com>
8141 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8143 2011-08-02 Robert Dewar <dewar@adacore.com>
8145 * impunit.adb: Add comment.
8147 2011-08-02 Yannick Moy <moy@adacore.com>
8149 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8150 qualification of aggregates in formal mode
8151 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8153 (Resolve_Aggregate): complete the test that an aggregate is adequately
8154 qualified in formal mode
8156 2011-08-02 Pascal Obry <obry@adacore.com>
8158 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8159 * mlib-prj.adb: Supress warning when compiling binder generated file.
8160 (Build_Library): Supress all warnings when compiling the binder
8163 2011-08-02 Yannick Moy <moy@adacore.com>
8165 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8167 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8168 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8169 Add with/use clauses to make Check_Formal_Restriction visible
8171 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8173 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8174 in-parameters when type of the generic formal is private in the generic
8175 spec and non-private in the body.
8177 2011-08-02 Claire Dross <dross@adacore.com>
8179 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8180 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8181 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8182 * impunit.adb, Makefile.rtl: Take new files into account.
8184 2011-08-02 Robert Dewar <dewar@adacore.com>
8186 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8187 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8189 2011-08-02 Yannick Moy <moy@adacore.com>
8191 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8193 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8194 matching static array bounds, taking into account the special case of
8196 * sem_ch3.adb: Typo in comment.
8198 2011-08-02 Yannick Moy <moy@adacore.com>
8200 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8201 which issues an error in formal mode if its argument node is originally
8203 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8204 has a discriminant specification so that it does not include the case
8206 (Derived_Type_Declaration): move here the test that a derived type has a
8207 discriminant specification
8208 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8209 first element of a component association before accessing its choices
8210 (presence of component association is not enough)
8211 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8212 declaration is a library item before accessing the next element in a
8213 list, as library items are not member of lists
8214 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8215 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8216 Check_Formal_Restriction whenever possible.
8218 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8220 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8221 reference when needed.
8223 2011-08-02 Bob Duff <duff@adacore.com>
8225 * gnat_ugn.texi: Fix typo.
8227 2011-08-02 Vincent Celier <celier@adacore.com>
8229 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8230 archive file name. Do not use the full path name of archives for Open
8233 2011-08-02 Robert Dewar <dewar@adacore.com>
8235 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8236 Analyze_Aspect_Specifications
8238 (Analyze_Aspect_Specifications): New handling for boolean aspects
8239 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8240 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8241 sequence for Analyze_Aspect_Specifications
8242 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8243 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8245 2011-08-02 Robert Dewar <dewar@adacore.com>
8247 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8248 aspects, since these no longer exist.
8250 2011-08-02 Robert Dewar <dewar@adacore.com>
8252 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8253 semicolon, do not try to see if there are aspects following it.
8254 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8257 2011-08-02 Robert Dewar <dewar@adacore.com>
8259 * sem_ch8.adb, aspects.ads: Minor reformatting.
8261 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8263 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8264 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8266 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8268 2011-08-02 Yannick Moy <moy@adacore.com>
8270 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8271 mode on subprogram declaration outside of package specification, unless
8272 it is followed by a pragma Import
8273 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8274 Access_Type_Declaration): issue error in formal mode on access type
8275 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8277 (Analyze_Object_Declaration): issue error in formal mode on object
8278 declaration which does not respect SPARK restrictions
8279 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8280 declaration which does not respect SPARK restrictions
8281 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8282 error in formal mode on digits or delta constraint
8283 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8284 decimal fixed point type
8285 (Derived_Type_Declaration): issue error in formal mode on derived type
8286 other than type extensions of tagged record types
8287 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8288 with check on access definition
8289 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8290 mode on protected definition.
8291 (Analyze_Task_Definition): issue error in formal mode on task definition
8293 2011-08-02 Robert Dewar <dewar@adacore.com>
8295 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8297 2011-08-02 Javier Miranda <miranda@adacore.com>
8299 * sem_ch6.adb (Can_Override_Operator): New function.
8300 (Verify_Overriding_Indicator): Add missing code to check overriding
8301 indicator in operators. Fixes regression.
8302 (Check_Overriding_Indicator): Minor reformating after replacing the
8303 code that evaluates if the subprogram can override an operator by
8304 invocations to the above new function.
8306 (Write_Field26_Name): Add missing code to ensure that, following
8307 the documentation in einfo.ads, this field is not shown as attribute
8308 "Static_Initialization" on non-dispatching functions.
8310 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8312 * sem_res.adb (Resolve_Call): A call to
8313 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8314 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8315 i.e., when the second parameter is of type Time_Span.
8317 2011-08-02 Vincent Celier <celier@adacore.com>
8319 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8320 with an archive instead of -L<library dir> -l<library name>.
8322 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8324 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8325 mark the base types In_Use in addition to making the operations
8328 2011-08-02 Ed Falis <falis@adacore.com>
8330 * init.c: add and setup __gnat_signal_mask for the exception signals
8331 * s-inmaop-vxworks.adb: new file.
8332 * s-intman-vxworks.adb: remove unnecessary initializations and
8334 * s-intman-vxworks.ads: remove unnecessary variable
8335 * s-taprop-vxworks.adb: simplify signal initialization
8337 2011-08-02 Robert Dewar <dewar@adacore.com>
8339 * sem_ch8.adb: Minor code reorganization, comment updates.
8341 2011-08-02 Robert Dewar <dewar@adacore.com>
8343 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8344 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8346 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8347 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8349 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8351 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8352 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8353 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8354 use_type_clauses, to handle more efficiently use_type and use_all_type
8356 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8357 Ada2012 Use_All_Type clause.
8358 (Use_Class_Wide_Operations): new procedure.
8360 2011-08-02 Robert Dewar <dewar@adacore.com>
8362 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8363 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8364 expression to expression function.
8366 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8368 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8369 if types are compatible.
8371 2011-08-02 Yannick Moy <moy@adacore.com>
8373 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8374 returns True if its argument array types have same dimension and same
8375 static bounds at each index.
8376 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8377 OUT or IN OUT paramaters which are not view conversions in SPARK.
8378 (Resolve_Arithmetic_Op): issue an error in formal mode on
8379 multiplication or division with operands of fixed point types which are
8380 not qualified or explicitly converted.
8381 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8382 Boolean or array type (except String) operands.
8383 (Resolve_Equality_Op): issue an error in formal mode on equality
8384 operators for array types other than String with non-matching static
8386 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8387 for array types with non-matching static bounds. Factorize the code in
8388 Matching_Static_Array_Bounds.
8389 (Resolve_Qualified_Expression): issue an error in formal mode on
8390 qualified expressions for array types with non-matching static bounds.
8391 (Resolve_Type_Conversion): issue an error in formal mode on type
8392 conversion for array types with non-matching static bounds
8394 2011-08-02 Robert Dewar <dewar@adacore.com>
8396 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8398 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8400 * par-ch9.adb: save location of entry for proper error message.
8402 2011-08-02 Javier Miranda <miranda@adacore.com>
8404 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8405 (Use_Full_View) which permits this routine to climb through the
8406 ancestors using the full-view of private parents.
8407 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8408 Use_Full_View to true in calls to Is_Ancestor.
8409 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8410 true in call to Is_Ancestor.
8411 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8412 Use_Full_View to true in call to Is_Ancestor.
8413 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8414 call to Is_Ancestor.
8415 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8416 Use_Full_View to true in calls to Is_Ancestor.
8417 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8418 Make_Select_Specific_Data_Table, Register_Primitive,
8419 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8420 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8421 to true in call to Is_Ancestor.
8422 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8423 Use_Full_View to true in calls to Is_Ancestor.
8425 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8426 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8428 2011-08-02 Robert Dewar <dewar@adacore.com>
8430 * gnat_rm.texi: Minor reformatting.
8431 * sem_prag.adb: Minor reformatting.
8433 2011-08-02 Tristan Gingold <gingold@adacore.com>
8435 * vms_data.ads: Add VMS qualifier for -gnateP.
8437 2011-08-02 Robert Dewar <dewar@adacore.com>
8439 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8440 * par-ch7.adb (P_Package): Proper placement of aspects for package
8442 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8443 (End_Statements): Add Is_Sloc parameterr
8444 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8445 (Check_End): Ad Is_Sloc parameter
8446 (End_Statements): Add Is_Sloc parameterr
8448 2011-08-02 Vincent Celier <celier@adacore.com>
8450 * ug_words: Add VMS qualifier equivalent to -gnateP:
8451 /SYMBOL_PREPROCESSING.
8453 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8455 * gnat-style.texi: For hexadecimal numeric literals the typical
8456 grouping of digits is 4 to represent 2 bytes.
8457 A procedure spec which is split into several lines is indented two
8460 2011-08-02 Yannick Moy <moy@adacore.com>
8462 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8463 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8464 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8466 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8467 choice in array aggregate
8468 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8470 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8471 positional and named aggregate for record, or others in record
8472 aggregate, or multiple choice in record aggregate
8473 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8474 array operands to logical operations AND, OR and XOR do not have the
8475 same static lower and higher bounds
8476 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8478 2011-08-01 Robert Dewar <dewar@adacore.com>
8480 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8481 Replaces Last_Source_Node_In_Sequence.
8482 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8483 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8484 parens and blank in string (this was inconsistently implemented).
8486 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8487 blank in string (this was inconsistently implemented).
8489 (Set_Global_Switches): Set formal mode switches appropriately
8490 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8492 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8493 call Set_Error_Msg_Lang to set "spark" as language name.
8494 * par.adb: Remove unnecessary call to set formal language for errout
8495 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8496 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8498 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8499 calls to it, moved after resolution so that types are known
8500 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8501 result of concatenation is not of type String
8502 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8503 concatenation is not properly restricted
8504 * gnat_rm.texi: Add doc on pragma Spark_95.
8505 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8506 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8507 * gcc-interface/Make-lang.in: Update dependencies.
8509 2011-08-01 Javier Miranda <miranda@adacore.com>
8511 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8512 condition that detects if the overridden operation must replace an
8515 2011-08-01 Javier Miranda <miranda@adacore.com>
8517 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8518 code declarations inserted by Insert_Actions in each alternative of the
8519 N_Case_Expression node.
8521 2011-08-01 Robert Dewar <dewar@adacore.com>
8523 * sem_ch6.adb: Minor code reorganization.
8524 * sem_util.adb: Minor reformatting.
8526 2011-08-01 Pascal Obry <obry@adacore.com>
8528 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8529 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8531 2011-08-01 Yannick Moy <moy@adacore.com>
8533 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8534 literal or operator symbol which is prefixed
8535 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8536 mode on access attributes.
8537 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8538 that concatenation operands are properly restricted in formal mode
8539 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8540 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8541 result of the concatenation has a type different from String.
8542 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8543 Analyze_Quantified_Expression, Analyze_Slice,
8544 Analyze_Null): issue an error in formal mode on unsupported constructs
8546 (Analyze_Block_Statement): only issue error on source block statement
8547 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8548 function which returns the last node in a list of nodes for which
8549 Comes_From_Source returns True, if any
8550 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8551 Last_Source_Node_In_Sequence
8552 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8553 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8554 mode on unsupported constructs
8555 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8556 rest of the actions may be needed later on since the error is marked as
8558 * sinfo.ads: Typos in comments.
8560 2011-08-01 Pascal Obry <obry@adacore.com>
8562 * projects.texi: Minor editing.
8564 2011-08-01 Yannick Moy <moy@adacore.com>
8566 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8567 insertion character ~~
8568 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8569 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8570 with insertion character ~~
8571 (Set_Msg_Text): treat insertion character ~~
8572 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8573 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8574 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8575 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8576 errors related to the formal language restriction not serious
8577 (insertion character |).
8578 * par.adb (Par): set formal language for error messages if needed
8579 * sem_ch6.adb (Check_Missing_Return): take into account possible
8580 generated statements at the end of the function
8581 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8582 enumeration value to define a new pragma SPARK_95
8583 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8584 SPARK_Version): new type and variables to store the SPARK version
8586 (SPARK_Mode): return True when SPARK_Version is set
8587 * par-prag.adb: Correct indentation
8588 (Prag): take Pragma_SPARK_95 into account
8589 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8592 2011-08-01 Robert Dewar <dewar@adacore.com>
8594 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8595 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8596 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8598 2011-08-01 Pascal Obry <obry@adacore.com>
8600 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8601 Target_Name to Get_Path call.
8602 (Parse_Single_Project): Likewise.
8603 (Post_Parse_Context_Clause): Likewise.
8604 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8605 Call Initialise_Project_Path with the proper Target_Name.
8606 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8608 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8609 with the proper Target_Name.
8610 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8612 (Parse_Project_And_Apply_Config): Likewise.
8613 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8614 This is fine as this part of the code is supporting only native
8616 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8617 is fine as this part of the code is supporting only native compilation.
8619 2011-08-01 Yannick Moy <moy@adacore.com>
8621 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8622 of homonym, unless the homonym is one of the cases allowed in SPARK
8623 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8624 package declaration occurring after a body.
8626 2011-08-01 Robert Dewar <dewar@adacore.com>
8628 * checks.adb, exp_ch4.adb: Minor reformatting.
8630 2011-08-01 Javier Miranda <miranda@adacore.com>
8632 * einfo.ads (Access_Disp_Table): Fix documentation.
8633 (Dispatch_Table_Wrappers): Fix documentation.
8635 2011-08-01 Pascal Obry <obry@adacore.com>
8637 * prj-env.adb, prj-env.ads: Minor reformatting.
8639 2011-08-01 Yannick Moy <moy@adacore.com>
8641 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8642 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8643 procedures out of these packages.
8644 * errout.ads, errout.adb
8645 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8646 procedures in of this package
8647 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8648 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8649 on misplaced later vs initial declarations, like in Ada 83
8650 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8651 formal mode on attribute of private type whose full type declaration
8653 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8654 package declaration inside a package specification
8655 (Analyze_Full_Type_Declaration): issue error in formal mode on
8656 controlled type or discriminant type
8657 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8658 user-defined operator means that it should come from the source
8659 (New_Overloaded_Entity): issue error in formal mode on overloaded
8661 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8663 2011-08-01 Thomas Quinot <quinot@adacore.com>
8665 * atree.adb: Minor reformatting.
8666 * checks.adb: Minor reformatting.
8668 2011-08-01 Vincent Celier <celier@adacore.com>
8670 * s-parame-vms-ia64.ads: Fix typo in comment
8672 * s-parame-vms-restrict.ads: Removed, unused.
8674 2011-08-01 Javier Miranda <miranda@adacore.com>
8677 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8679 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8680 * sem_ch3.ads, sem_ch3.adb
8681 (Is_Constant_Bound): New extended version of the subprogram that was
8682 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8683 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8684 * sem_aux.ads (Constant_Value): Fix typo in comment.
8685 * checks.adb (Generate_Index_Checks): New implementation which, for
8686 array objects with constant bounds, generates the runtime check
8687 referencing the bounds of the array type. For other cases this routine
8688 provides its previous behavior obtaining such values from the array
8690 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8692 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8693 we cannot have semantic interpretations of the new node.
8695 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8697 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8700 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8702 * sem_ch8.adb: Minor code editing.
8703 * s-vxwext.adb: Remove trailing space.
8704 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8705 consistency with other files.
8707 2011-08-01 Thomas Quinot <quinot@adacore.com>
8709 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8711 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8713 * par-ch10.adb: reject parameterized expressions as compilation unit.
8714 * sem_ch4.adb: handle properly conditional expression with overloaded
8715 then_clause and no else_clause.
8717 2011-08-01 Tristan Gingold <gingold@adacore.com>
8719 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8720 like done by System.Aux_DEC.
8721 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8723 2011-08-01 Yannick Moy <moy@adacore.com>
8725 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8726 missing label at end of declaration (subprogram or package)
8727 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8728 of positional and named parameter association
8729 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8730 Error_Msg_SP which adds a prefix to the error message giving the name
8731 of the formal language analyzed
8732 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8733 access result type in subprogram, unconstrained array as result type,.
8734 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8736 * sem_ch8.adb: Code clean up.
8738 2011-08-01 Javier Miranda <miranda@adacore.com>
8740 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8741 * einfo.ads (Access_Disp_Table): Fix documentation.
8742 (Dispatch_Table_Wrappers): Fix documentation.
8743 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8744 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8745 to enforce the documentation of this attribute.
8746 (Set_Is_Interface): Cleanup the assertion.
8747 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8748 the Underlying_Type entity before reading attribute Access_Disp_Table.
8749 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8750 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8751 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8752 the Underlying_Type entity before reading attribute Access_Disp_Table.
8753 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8754 Locate the Underlying_Type entity before reading attribute
8757 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8759 * s-poosiz.ads: Additional overriding indicators.
8761 2011-08-01 Yannick Moy <moy@adacore.com>
8763 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8765 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8766 parameter specification does not include a subtype mark.
8767 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8768 formal mode on abstract subprogram.
8769 (Analyze_Subprogram_Specification): issue error in formal mode on
8770 user-defined operator.
8771 (Process_Formals): issue error in formal mode on access parameter and
8773 * sem_ch9.adb (Analyze_Abort_Statement,
8774 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8775 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8776 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8777 Analyze_Requeue, Analyze_Selective_Accept,
8778 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8779 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8780 issue error in formal mode on user-defined raise statement.
8782 2011-08-01 Thomas Quinot <quinot@adacore.com>
8784 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8785 declaration being hidden when overriding an implicit inherited
8787 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8788 (-gnats), do not complain about a source file that contains only a
8791 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8793 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8794 variable if already set.
8796 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8798 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8799 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8800 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8801 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8802 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8803 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8804 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8805 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8806 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8807 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8808 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8809 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8810 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8811 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8812 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8813 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8814 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8815 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8816 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8817 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8818 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8819 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8820 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8821 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8822 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8823 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8824 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8825 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8826 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8827 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8828 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8829 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8830 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8831 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8832 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8833 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8834 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8835 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8836 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8837 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8838 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8839 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8840 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8841 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8842 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8843 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
8844 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
8845 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
8846 s-osinte-mingw.ads: Update to GPLv3 run-time license.
8847 Use GNAT instead of GNARL.
8849 2011-08-01 Bob Duff <duff@adacore.com>
8851 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
8852 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
8853 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
8856 2011-08-01 Yannick Moy <moy@adacore.com>
8858 * debug.adb (d.D) reverve flag for the SPARK mode
8859 (d.E) reverve flag for SPARK generation mode
8860 (d.F) reverve flag for Why generation mode
8861 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
8862 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
8863 functions which return True when the corresponding modes are set
8864 (Formal_Language): return "spark" or "alfa" when in formal verification
8866 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
8867 Error_Msg to prefix the error message with a tag giving the formal
8869 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
8870 message with a tag giving the formal language
8871 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
8873 (Analyze_Case_Statement): issue error in formal mode on case statement
8874 with a single "others" case alternative
8875 (Analyze_Exit_Statement): issue errors in formal mode on exit
8876 statements which do not respect SPARK restrictions
8877 (Analyze_Goto_Statement): issue error in formal mode on goto statement
8878 (Check_Unreachable_Code): always issue an error (not a warning) in
8879 formal mode on unreachable code (concerns both code after an infinite
8880 loop and after an unconditional jump, both not allowed in SPARK)
8881 * sem_ch6.adb (Analyze_Return_Statement): add call to
8882 Set_Return_Present for a procedure containing a return statement
8883 (already done for functions in Analyze_Function_Return)
8884 (Analyze_Function_Return): issue error in formal mode on extended
8885 return or if return is not last statement in function
8886 (Check_Missing_Return): issue error in formal mode if function does
8887 not end with return or if procedure contains a return
8888 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
8889 function to detect if there is an inner scope of its parameter S which
8892 2011-08-01 Thomas Quinot <quinot@adacore.com>
8894 * sem_ch6.ads: Minor reformatting.
8896 2011-08-01 Javier Miranda <miranda@adacore.com>
8898 * sem_util.adb (Abstract_Interface_List): Complete condition when
8899 processing private type declarations to avoid reading unavailable
8901 (Is_Synchronized_Tagged_Type): Complete condition when processing
8902 private extension declaration nodes to avoid reading unavailable
8905 2011-08-01 Thomas Quinot <quinot@adacore.com>
8907 * sem_ch3.adb: Minor reformatting.
8909 2011-08-01 Thomas Quinot <quinot@adacore.com>
8911 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
8912 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
8913 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
8914 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
8915 for VMS, instead parametrize the common implementation with
8916 System.Parameters declarations.
8918 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
8920 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
8922 2011-08-01 Tristan Gingold <gingold@adacore.com>
8924 * seh_init.c: Fix SEH handler installation on win64.
8926 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8928 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
8929 double analysis of an anonymous access to subprogram, because it can
8930 lead to improper sharing of profiles and a back-end crash.
8932 2011-08-01 Robert Dewar <dewar@adacore.com>
8934 * make.adb, sem_ch4.adb: Minor reformatting.
8935 * gcc-interface/Make-lang.in: Update dependencies.
8936 * sem_util.adb, exp_ch5.adb: Minor reformatting.
8938 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8940 * gnat_rm.texi: Fix definition of Long_Integer.
8942 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8944 * exp_aggr.adb: check limit size of static aggregate unconditionally,
8945 to prevent storage exhaustion.
8946 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
8947 finalized is a function body, insert the cleanup code before the final
8948 return statement, to prevent spurious warnings.
8949 * s-pooglo.ads: add overriding indicator.
8951 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8953 * sem_ch4.adb (Operator_Check): improve error message when both a
8954 with_clause and a use_clause are needed to make operator usage legal.
8955 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
8956 determine whether a compilation unit is visible within an other,
8957 either through a with_clause in the current unit, or a with_clause in
8958 its library unit or one one of its parents.
8960 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8962 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
8963 over an arbitrary expression of an array or container type.
8964 * lib-xref.adb: clarify comment.
8966 2011-08-01 Bob Duff <duff@adacore.com>
8968 * einfo.ads: Minor reformatting.
8969 * debug.adb: Minor comment improvement.
8971 2011-08-01 Javier Miranda <miranda@adacore.com>
8973 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
8974 consider hidden subprograms as valid candidates.
8976 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8978 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
8980 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
8982 * gnat_ugn.texi: Fix typo.
8984 2011-08-01 Robert Dewar <dewar@adacore.com>
8986 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
8987 lib-xref.adb: Minor reformatting
8989 2011-08-01 Gary Dismukes <dismukes@adacore.com>
8991 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
8992 when to generate a call to Move_Final_List.
8993 (Has_Controlled_Parts): Remove this function.
8995 2011-08-01 Geert Bosch <bosch@adacore.com>
8997 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9000 2011-08-01 Thomas Quinot <quinot@adacore.com>
9002 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9003 explicit raise of a predefined exception as Comes_From_Source if the
9004 original N_Raise_Statement comes from source.
9006 2011-08-01 Robert Dewar <dewar@adacore.com>
9008 * sinfo.ads: Add comment.
9009 * sem_ch6.adb: Minor reformatting.
9011 2011-08-01 Robert Dewar <dewar@adacore.com>
9013 * freeze.adb (Freeze_Entity): Refine check for bad component size
9014 clause to avoid rejecting confirming clause when atomic/aliased present.
9016 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9018 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9019 better determine whether an entity reference is a write.
9020 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9022 * lib-xref.adb (Output_References): Do no suppress a read reference at
9023 the same location as an immediately preceeding modify-reference, to
9024 handle properly in-out actuals.
9026 2011-08-01 Tristan Gingold <gingold@adacore.com>
9028 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9030 2011-08-01 Quentin Ochem <ochem@adacore.com>
9032 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9033 heap to compute the result.
9035 2011-08-01 Robert Dewar <dewar@adacore.com>
9037 * atree.ads: Minor reformatting.
9039 2011-08-01 Emmanuel Briot <briot@adacore.com>
9041 * g-expect.adb (Get_Command_Output): Fix memory leak.
9043 2011-08-01 Geert Bosch <bosch@adacore.com>
9045 * cstand.adb (P_Float_Type): New procedure to print the definition of
9046 predefined fpt types.
9047 (P_Mixed_Name): New procedure to print a name using mixed case
9048 (Print_Standard): Use P_Float_Type for printing floating point types
9049 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9050 precision IEEE float.
9052 2011-08-01 Thomas Quinot <quinot@adacore.com>
9054 * sem_ch3.adb: Minor reformatting.
9056 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9058 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9059 the completion of a generic function, insert the new body rather than
9060 rewriting the original.
9062 2011-08-01 Yannick Moy <moy@adacore.com>
9064 * sinfo.ads, errout.ads: Typos in comments.
9066 2011-08-01 Robert Dewar <dewar@adacore.com>
9068 * par-endh.adb: Minor reformatting.
9070 2011-08-01 Robert Dewar <dewar@adacore.com>
9072 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9073 (Pre_Post_Aspects): New subtype.
9074 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9075 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9076 * par-ch7.adb (P_Package): Remove Decl parameter
9077 (P_Package): Handle new syntax for aspects (before IS)
9078 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9080 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9081 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9082 (P_Package): Remove Decl parameter
9083 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9085 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9087 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9088 * sinfo.ads: Document new syntax for aspects in packages etc.
9089 * sprint.adb: Handle new syntax of aspects before IS in package
9091 2011-08-01 Thomas Quinot <quinot@adacore.com>
9093 * atree.ads: Minor reformatting.
9094 * sem_prag.adb: Minor reformatting.
9096 2011-08-01 Robert Dewar <dewar@adacore.com>
9098 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9099 case expr alternative.
9101 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9103 * sem_ch12.adb: Fix typo.
9105 2011-08-01 Geert Bosch <bosch@adacore.com>
9107 * sem_prag.adb (Check_No_Link_Name): New procedure.
9108 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9109 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9110 instead of Standard_Long_Long_Float_Size global. Preparation for
9111 eventual removal of per type constants.
9112 * exp_util.ads (Get_Stream_Size): New function returning the stream
9113 size value of subtype E.
9114 * exp_util.adb (Get_Stream_Size): Implement new function.
9115 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9117 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9119 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9121 2011-08-01 Geert Bosch <bosch@adacore.com>
9123 * cstand.adb: Fix comments.
9124 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9127 2011-08-01 Robert Dewar <dewar@adacore.com>
9129 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9131 2011-08-01 Geert Bosch <bosch@adacore.com>
9133 * atree.ads: Fix comment.
9135 2011-08-01 Robert Dewar <dewar@adacore.com>
9137 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9138 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9139 * par.adb: Add with for Namet.Sp.
9140 * par-tchk.adb: Minor reformatting.
9142 2011-08-01 Vincent Celier <celier@adacore.com>
9144 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9145 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9146 of the init procedure of a SAL.
9147 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9150 2011-08-01 Thomas Quinot <quinot@adacore.com>
9152 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9155 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9157 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9159 2011-08-01 Thomas Quinot <quinot@adacore.com>
9161 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9162 conformant with its spec (return True only for types that have
9163 an overriding Initialize primitive operation that prevents them from
9164 having preelaborable initialization).
9165 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9166 initialization for controlled types in Ada 2005 or later mode.
9168 2011-08-01 Robert Dewar <dewar@adacore.com>
9170 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9172 (Same_Aspect): New function.
9173 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9174 Type_Invariant, Precondition, Postcondition.
9175 * snames.ads-tmpl: Add Name_Type_Invariant.
9177 2011-08-01 Robert Dewar <dewar@adacore.com>
9179 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9181 (Freeze_All_Ent): Fix error in handling inherited aspects.
9182 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9183 already analyzed, but don't skip entire processing of a declaration,
9184 that's wrong in some cases of declarations being rewritten.
9185 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9186 Don't delay for integer, string literals
9187 Treat predicates in usual manner for delay, remove special case code,
9189 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9190 (Build_Predicate_Function): Update saved expression in aspect
9191 (Build_Invariant_Procedure): Update saved expression in aspect
9192 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9193 of replacement of discriminant references if the reference is simple.
9195 2011-08-01 Robert Dewar <dewar@adacore.com>
9197 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9198 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9199 Static_Predicate and Dynamic_Predicate.
9200 (Build_Predicate_Function): Add processing for Static_Predicate
9201 and Dynamic_Predicate.
9202 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9203 (From_Static_Predicate): New flag
9204 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9206 2011-08-01 Robert Dewar <dewar@adacore.com>
9208 * usage.adb: Documentation cleanup for Ada version modes in usage.
9209 * expander.adb: Minor reformatting.
9211 2011-08-01 Robert Dewar <dewar@adacore.com>
9213 * atree.ads: Minor comment fix.
9214 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9215 a-witeio.ads, sem_prag.adb: Minor reformatting.
9217 2011-08-01 Doug Rupp <rupp@adacore.com>
9219 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9220 pointers. Use descrip.h header file for convenience. Add some
9223 2011-08-01 Robert Dewar <dewar@adacore.com>
9225 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9226 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9227 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9229 (Check_Aspect_At_End_Of_Declarations): New procedure
9230 (Analye_Aspect_Specification): Minor changes for above procedures
9231 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9232 specification node as well.
9234 2011-08-01 Pascal Obry <obry@adacore.com>
9236 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9237 Windows files. Use GetFilesAttributes() in this case to check for file
9238 existence instead of returning with an error code.
9240 2011-08-01 Vincent Celier <celier@adacore.com>
9242 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9243 High is above Source length.
9245 2011-08-01 Robert Dewar <dewar@adacore.com>
9247 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9249 2011-08-01 Robert Dewar <dewar@adacore.com>
9251 * aspects.ads (Boolean_Aspects): New subtype.
9252 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9253 for derived types in cases where the parent type and derived type have
9255 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9256 with aspects when parent type also has aspects.
9257 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9258 boolean expression at this point).
9259 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9260 accordance with final decision on the Ada 2012 feature.
9261 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9263 2011-08-01 Matthew Heaney <heaney@adacore.com>
9265 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9267 2011-08-01 Pascal Obry <obry@adacore.com>
9269 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9270 Fix Replace_Slice when High is above current string size.
9271 (Replace_Slice): Fix DL computation when High is above current
9274 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9276 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9278 2011-08-01 Matthew Heaney <heaney@adacore.com>
9280 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9283 2011-08-01 Pascal Obry <obry@adacore.com>
9285 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9288 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9290 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9291 access to protected subprograms in generic bodies.
9292 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9293 protected type, indicate that the convention of the subprogram is
9294 Convention_Protected, because it may be used in subsequent declarations
9295 within the protected declaration.
9297 2011-08-01 Vincent Celier <celier@adacore.com>
9299 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9300 and "final" procedures when the name of the library is "ada", to avoid
9301 duplicate symbols "adainit" and "adafinal" in executables.
9303 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9305 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9306 quantified expression that appears within a postcondition and uses the
9307 Ada2012 'Result attribute.
9309 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9311 * init.c (__gnat_error_handler): Cast reason to int.
9312 (__gnat_install_handler): Explain sa_sigaction use.
9314 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9316 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9317 subprogram has copy-in copy-out parameters, try to promote the mode of
9318 the return type if it is passed in registers.
9320 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9322 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9323 left operand as addressable.
9325 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9327 * gcc-interface/gigi.h (build_function_stub): Remove.
9328 (build_return_expr): Likewise.
9329 (convert_vms_descriptor): Declare.
9330 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9331 (build_function_stub): Move to...
9332 * gcc-interface/utils2.c (build_return_expr): Move to...
9333 * gcc-interface/trans.c (build_function_stub): ...here.
9334 (build_return_expr): ...here.
9335 (Subprogram_Body_to_gnu): Add local variable for language_function.
9336 Disconnect the parameter attributes cache, if any, once done with it.
9337 Call end_subprog_body only after setting the end_locus.
9338 Build the stub associated with the function, if any, at the very end.
9339 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9340 variables and streamline control flow.
9342 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9345 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9348 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9351 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9352 Assign to act.sa_sigaction.
9353 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9354 current->return_address to char * before arithmetic.
9356 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9358 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9359 Correct argument types.
9360 Extract code from reason.
9361 (__gnat_install_handler): Assign to act.sa_sigaction.
9363 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9365 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9366 (GNAT1_OBJS): ...here.
9368 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9371 * g-socthi-mingw.adb (Fill): Fix formatting.
9373 * gcc-interface/gigi.h: Move around comment.
9375 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9378 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9380 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9383 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9385 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9387 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9388 range comparison if Pmode is SImode.
9390 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9391 Eric Botcazou <ebotcazou@adacore.com>
9393 * adadecode.c: Wrap up in extern "C" block.
9394 * adadecode.h: Likewise.
9395 * adaint.c: Likewise. Remove 'const' keyword.
9396 * adaint.h: Likewise.
9398 * atree.h: Likewise.
9400 * cstreams.c: Likewise.
9404 * final.c: Likewise.
9406 * initialize.c: Likewise.
9408 * namet.h: Likewise.
9409 * nlists.h: Likewise.
9410 * raise.c: Likewise.
9411 * raise.h: Likewise.
9412 * repinfo.h: Likewise.
9413 * seh_init.c: Likewise.
9414 * targext.c: Likewise.
9415 * tracebak.c: Likewise.
9416 * uintp.h: Likewise.
9417 * urealp.h: Likewise.
9418 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9419 * xsinfo.adb: Likewise.
9420 * xsnamest.adb: Likewise.
9421 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9422 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9423 * gcc-interface/misc.c: Likewise.
9424 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9425 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9426 ada/targext.o here...
9427 (GNAT_ADA_OBJS): ...and not here.
9428 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9429 (GNATBIND_OBJS): Reorder.
9431 2011-07-07 Richard Henderson <rth@redhat.com>
9433 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9434 dwarf2out_frame_init.
9436 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9438 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9440 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9443 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9445 2011-07-06 Richard Guenther <rguenther@suse.de>
9447 * gcc-interface/misc.c (gnat_init): Merge calls to
9448 build_common_tree_nodes and build_common_tree_nodes_2.
9449 Re-initialize boolean_false_node.
9451 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9452 Olivier Hainque <hainque@adacore.com>
9453 Nicolas Setton <setton@adacore.com>
9455 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9456 the type according to the ARTIFICIAL_P parameter.
9457 (create_type_decl): Likewise.
9458 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9460 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9462 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9463 (gnatbind): Likewise.
9465 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9467 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9469 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9471 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9472 local variable throughout. Remove useless call to Base_Type.
9473 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9474 Take it also into account for the volatileness of the field. Set the
9475 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9477 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9479 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9480 on a dereference built for a by-ref object if it has an address clause.
9482 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9484 * einfo.ads (Address_Taken): Document use for the second argument of
9485 Asm_Input and Asm_Output attributes.
9486 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9487 argument is an entity name, then set Address_Taken on it.
9488 <Attribute_Asm_Output>: Likewise.
9489 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9490 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9491 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9492 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9494 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9497 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9499 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9501 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9502 (ada/utils.o): Update dependencies.
9503 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9504 ../../../libcpp/libcpp.a.
9505 * gcc-interface/utils.c: Include common/common-target.h.
9506 (process_attributes): Use targetm_common.have_named_sections.
9508 2011-06-07 Richard Guenther <rguenther@suse.de>
9510 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9513 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9515 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9516 TREE_THIS_NOTRAP flag.
9518 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9520 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9523 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9525 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9526 constants whose full view has discriminants specially.
9528 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9530 * gcc-interface/utils.c: Include diagnostic.h.
9531 (gnat_write_global_declarations): Output debug information for all
9532 global type declarations before finalizing the compilation unit.
9533 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9535 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9537 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9539 2011-05-25 Kai Tietz <ktietz@redhat.com>
9541 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9542 initialization instead of const/none-const pointer assignment.
9544 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9546 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9547 $(EXTRA_GNAT1_OBJS).
9548 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9549 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9550 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9551 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9552 libcommon-target.a instead of prefix.o.
9554 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9557 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9559 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9561 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9562 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9563 instead of version.o.
9565 2011-05-18 Kai Tietz <ktietz@redhat.com>
9567 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9568 boolean_false_node instead of integer_zero_node.
9569 (convert_with_check): Likewise.
9570 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9572 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9574 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9575 type of the parameter is an unconstrained array, convert the actual to
9576 the type of the formal in the In Out and Out cases as well.
9578 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9580 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9581 call build_function_type_array or build_varargs_function_type_array
9583 (create_subprog_type): Don't call build_function_type; call
9584 build_function_type_vec instead.
9586 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9588 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9589 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9590 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9592 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9594 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9596 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9597 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9599 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9601 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9603 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9605 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9606 instead of accessing TYPE_ARG_TYPES directly.
9607 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9609 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9612 * gcc-interface/gigi.h (get_variant_part): Declare.
9613 * gcc-interface/decl.c (get_variant_part): Make global.
9614 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9615 types have the same constant size, are record types and T1 has a
9616 variant part while T2 doesn't.
9618 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9620 * gcc-interface/utils.c (begin_subprog_body): Do not call
9622 (end_subprog_body): Likewise.
9624 2011-05-04 Richard Guenther <rguenther@suse.de>
9626 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9628 (pos_to_constructor): Likewise.
9630 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9631 Eric Botcazou <ebotcazou@adacore.com>
9633 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9634 of build_function_type. Adjust calls to...
9635 (build_raise_check): ...this. Do not take a void_tree parameter.
9636 Call build_function_type_list instead of build_function_type.
9637 Fix head comment and swap couple of conditional blocks.
9639 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9641 * gnatvsn.ads (Library_Version): Bump to 4.7.
9642 (Current_Year): Bump to 2011.
9644 2011-04-29 Michael Matz <matz@suse.de>
9646 * gcc-interface/misc.c (gnat_handle_option): Set
9647 warn_maybe_uninitialized.
9649 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9651 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9652 the Watson/McCabe paper.
9654 2011-04-23 Jim Meyering <meyering@redhat.com>
9656 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9658 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9660 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9663 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9665 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9667 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9668 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9669 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9670 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9671 <all>: Do not set flags on the reused DECL node coming from an alias.
9672 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9673 don't need debug info here...
9674 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9675 (gigi): Adjust calls to create_subprog_decl.
9676 (build_raise_check): Likewise.
9677 (establish_gnat_vms_condition_handler): Likewise.
9678 (Compilation_Unit_to_gnu): Likewise.
9679 (gnat_to_gnu): Likewise.
9681 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9683 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9684 (NO_REORDER_ADAFLAGS): New variable.
9685 (EXTRA_GNATTOOLS): Always define.
9686 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9687 Clean up and adjust list of files compiled with special options.
9688 * gcc-interface/Make-lang.in: Likewise.
9689 (ada/decl.o): Cosmetical change.
9690 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9692 2011-04-20 Jim Meyering <meyering@redhat.com>
9694 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9696 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9698 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9699 $(CFLAGS) on the link line.
9701 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9703 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9704 padded type built for the return type if it is unconstrained.
9706 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9708 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9710 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9712 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9713 before calling TREE_CHAIN.
9714 * gcc-interface/misc.c (gnat_init_ts): New function.
9715 (LANG_HOOKS_INIT_TS): Define.
9717 2011-04-12 Martin Jambor <mjambor@suse.cz>
9719 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9720 instead of cgraph_node.
9722 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9724 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9725 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9728 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9730 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9731 of aggregate types that contain a placeholder.
9733 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9735 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9737 (handle_type_generic_attribute): Likewise.
9739 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9742 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9744 2011-04-04 Kai Tietz <ktietz@redhat.com>
9747 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9750 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9752 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9753 type case, do not strip a padding type around the array type.
9755 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9757 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9760 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9762 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9763 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9764 code for -feliminate-unused-debug-types.
9765 (gnat_post_options): Likewise.
9767 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9769 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9770 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9773 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9775 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9776 DECL_ARTIFICIAL flag on enumeration types.
9778 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9780 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9781 fat pointer types artificial unconditionally.
9782 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9785 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9787 * gcc-interface/gigi.h (get_dummy_type): Declare.
9788 (build_dummy_unc_pointer_types): Likewise.
9789 (finish_fat_pointer_type): Likewise.
9790 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9791 fat pointer type has been built, complete it in place.
9792 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9793 and thin pointers. Remove useless variable.
9794 (finish_fat_pointer_type): Make global and move to...
9795 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9796 (get_dummy_type): New function.
9797 (build_dummy_unc_pointer_types): Likewise.
9798 (gnat_pushdecl): Propage the name to the anonymous variants only.
9799 (update_pointer_to): Only adjust the pointer types in the unconstrained
9802 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9804 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9805 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9806 if this is a Taft amendment type and the full declaration is available.
9807 * gcc-interface/trans.c (process_type): Likewise.
9808 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9809 (process_freeze_entity): Likewise.
9810 * gcc-interface/utils.c (dummy_global): New static variable.
9811 (gnat_write_global_declarations): If there are types declared as used
9812 at the global level, insert them in the global hash table.
9814 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9816 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9817 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9818 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9820 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9821 flag of the type accordingly.
9822 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9824 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9826 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9827 finalizing types when updating the pointers to the designated type.
9828 <all>: Finalize the deferred types even if we didn't defer processing
9829 of incomplete types in this invocation.
9831 2011-04-01 Olivier Hainque <hainque@adacore.com>
9832 Nicolas Setton <setton@adacore.com>
9833 Eric Botcazou <ebotcazou@adacore.com>
9835 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9836 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9838 2011-03-28 Kai Tietz <ktietz@redhat.com>
9840 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9842 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9843 * system-mingw.ads (System): Change ZCX_By_Default default to True.
9845 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
9847 2011-03-28 Tristan Gingold <gingold@adacore.com>
9850 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
9851 Use ada output of gnatbind.
9852 (ada/b_gnatb.adb): Ditto.
9853 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
9854 (ada.mostlyclean, ada.stage1)
9855 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
9856 (ada.stagefeedback): Adjust.
9857 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
9858 Use ada output of gnatbind.
9859 (b_gnatm.adb): Ditto.
9860 (b_gnatl.o, b_gnatm.o): New rules.
9862 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9864 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9865 for the padded type built to support a specified size or alignment.
9867 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9869 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
9870 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9871 unconditionally to the end of the unit when the designated type is
9873 <all>: Rename local variable. Attempt to un-defer types only and do it
9874 for limited_with'ed types as well.
9875 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
9876 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
9877 consistently and remove redundant call to finalize_from_with_types.
9879 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
9881 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
9882 subprograms without a previous spec declared in the same unit.
9883 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
9884 subprograms at the end of the unit instead of at the beginning.
9885 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
9886 isn't public for the special handling of non-inline functions nested
9887 inside inline external functions.
9889 2011-03-25 Jeff Law <law@redhat.com>
9891 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
9893 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9895 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
9896 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
9897 to compute Set_Size_Depends_On_Discriminant.
9898 (Layout_Type): Call it on array types in back-end layout mode.
9899 * sem_util.adb (Requires_Transient_Scope): Return true for array
9900 types only if the size depends on the value of discriminants.
9901 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
9902 type if the RHS is a call to a function that returns an unconstrained
9903 type with default discriminant.
9905 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
9907 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
9908 non-conversion to the nominal result type at the end.
9910 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9912 * gcc-interface/trans.c (create_temporary): New function taken from...
9913 (create_init_temporary): ...here. Call it.
9914 (call_to_gnu): Create the temporary for the return value early, if any.
9915 Create it for a function with copy-in/copy-out parameters if there is
9916 no target; in other cases of copy-in/copy-out, use another temporary.
9917 Push the new binding level lazily. Add and rename local variables.
9919 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9921 * gcc-interface/decl.c (validate_size): Improve comments and tweak
9923 (set_rm_size): Likewise.
9925 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
9927 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
9928 for the padded type built in order to support a specified alignment.
9929 Fix incorrect formatting.
9931 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9934 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
9936 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9938 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
9939 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
9940 to the end of the list. Adjust recursive call. Rename local variable.
9941 If REORDER is true, reorder components of the record type.
9942 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
9943 components_to_record and adjust the parameter list.
9945 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
9947 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
9948 disabled, use the variable for bounds of loop iteration scheme.
9950 2011-03-21 Kai Tietz <ktietz@redhat.com>
9953 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
9955 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9957 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
9958 out whether the expression is read-only. Short-circuit placeholder
9959 case and rename a couple of local variables.
9961 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
9963 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
9964 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
9965 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
9966 (convert): Deal with conversions from a smaller form type specially.
9968 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
9970 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
9971 its argument, except for the special -I- switch.
9973 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
9975 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
9978 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
9980 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
9982 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
9984 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
9986 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
9987 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
9988 instead of GNAT_FORMAL. Protect the expression against multiple uses.
9989 Do not generate the check directly, instead instantiate the template
9990 check present in the descriptor.
9991 (make_descriptor_field): Move around.
9992 (build_vms_descriptor32): Build a template check in the POINTER field.
9993 (build_vms_descriptor): Remove useless suffixes.
9994 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
9996 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
9999 * targext.c: Include target files if IN_RTS is defined.
10001 2011-01-26 Richard Guenther <rguenther@suse.de>
10004 * targext.c: Include config.h.
10005 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10008 2011-01-04 Pascal Obry <obry@adacore.com>
10009 Eric Botcazou <ebotcazou@adacore.com>
10011 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10013 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10015 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10016 end-of-case on the end label and its associated gotos, if any.
10018 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10020 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10021 expressions of the parameter cache within the statement group of
10022 the CICO mechanism.
10024 2011-01-04 Olivier Hainque <hainque@adacore.com>
10025 Eric Botcazou <ebotcazou@adacore.com>
10027 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10028 (set_end_locus_from_node): New function.
10029 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10030 make and the function end_locus.
10031 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10032 for the elaboration subprogram.
10033 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10034 set the end_locus of the expression as well.
10036 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10039 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10040 variables that are referenced in exception handlers volatile.
10044 Copyright (C) 2011 Free Software Foundation, Inc.
10046 Copying and distribution of this file, with or without modification,
10047 are permitted in any medium without royalty provided the copyright
10048 notice and this notice are preserved.