1 2011-08-05 Robert Dewar <dewar@adacore.com>
3 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
4 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
6 a-comutr.ads, lib-xref.adb: Minor reformatting.
8 2011-08-05 Robert Dewar <dewar@adacore.com>
10 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
11 warning if there is an exception handler present.
13 2011-08-05 Pascal Obry <obry@adacore.com>
15 * a-iteint.ads: Fix copyright year.
17 2011-08-05 Thomas Quinot <quinot@adacore.com>
19 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
20 statement SCO for a USE clause or a representation clause.
22 2011-08-05 Yannick Moy <moy@adacore.com>
24 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
25 between body and spec for stub.
26 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
27 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
28 pragma precondition or postcondition, for which the enclosing
29 subprogram or package in the AST is not the desired one, return empty.
31 2011-08-05 Thomas Quinot <quinot@adacore.com>
33 * g-expect.adb: Minor reformatting.
35 2011-08-05 Bob Duff <duff@adacore.com>
37 * a-fihema.adb: Comment out OS_Lib.
39 2011-08-05 Matthew Heaney <heaney@adacore.com>
41 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
42 (unbounded multiway tree containers) and a-iteint.ads.
43 * a-comutr.ads, a-comutr.adb:
44 This is the new Ada 2012 unit for unbounded multiway tree containers
45 * a-cimutr.ads, a-cimutr.adb
46 This is the new Ada 2012 unit for indefinite multiway tree containers
47 * a-iteint.ads: New file.
49 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
51 * gcc-interface/Makefile.in (raise-gcc.o): Search
54 2011-08-05 Bob Duff <duff@adacore.com>
56 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
58 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
60 2011-08-05 Ed Schonberg <schonberg@adacore.com>
62 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
63 general indexing aspects of Ada2012. Called when analyzing indexed
64 components when other interpretations fail.
65 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
66 in an expression context where overloading is meaningful. This excludes
67 the occurrence in an aspect specification (efficiency only).
68 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
69 related to iterators can be set by an attribute specification, but
71 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
72 Constant_Indexing and Variable_Indexing.
73 (Check_Indexing_Functions): New procedure to perform legality checks.
74 Additional semantic checks at end of declarations.
76 2011-08-05 Sergey Rybin <rybin@adacore.com>
78 * tree_io.ads: Update ASIS_Version_Number because of the change of the
79 order of calling Tree_Write/Tree_Read routines made for aspects.
81 2011-08-05 Bob Duff <duff@adacore.com>
83 * a-fihema.adb (Finalize): Fix race condition.
85 2011-08-05 Yannick Moy <moy@adacore.com>
87 * sem_ch12.adb (Analyze_Package_Instantiation,
88 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
91 2011-08-05 Ed Schonberg <schonberg@adacore.com>
93 * sem_type.adb (Specific_Type): in an instance, the type-specific
94 operand of an equality check that involves null may have a private
95 type. Use full view to determine legality of construct.
97 2011-08-05 Vincent Celier <celier@adacore.com>
99 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
100 delete or close the file when the call to gnatmake was successful.
102 2011-08-05 Yannick Moy <moy@adacore.com>
104 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
105 Global_Discard_Names.
107 2011-08-05 Ed Schonberg <schonberg@adacore.com>
109 * sinfo.ads: comments on use of entity field for aspect specifications.
111 2011-08-05 Ed Schonberg <schonberg@adacore.com>
113 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
114 node is not itself an entity but a selected component, it is a
115 rewritten parameterless call to an en enclosing synchronized operation,
116 and this expansion will be performed again in the instance, so there is
117 no global information to preserve.
119 2011-08-05 Javier Miranda <miranda@adacore.com>
121 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
122 for renamings of predefined primitives.
123 (In_Predef_Prims_DT): New subprogram.
125 2011-08-05 Ed Schonberg <schonberg@adacore.com>
127 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
128 possible interpretation of name is a reference type, add an
129 interpretation that is the designated type of the reference
130 discriminant of that type.
131 * sem_res.adb (resolve): If the interpretation imposed by context is an
132 implicit dereference, rewrite the node as the deference of the
133 reference discriminant.
134 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
135 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
136 parent type or base type.
137 * sem_ch4.adb (Process_Indexed_Component,
138 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
139 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
140 Check for implicit dereference.
141 (List_Operand_Interps): Indicate when an implicit dereference is
143 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
145 2011-08-05 Thomas Quinot <quinot@adacore.com>
147 * scos.ads: Update documentation of SCO table. Pragma statements can now
148 be marked as disabled (using 'p' instead of 'P' as the statement kind).
149 * par_sco.ads, par_sco.adb: Implement the above change.
150 (Process_Decisions_Defer): Generate a P decision for the first parameter
151 of a dyadic pragma Debug.
152 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
154 * put_scos.adb: Code simplification based on above change.
157 2011-08-05 Robert Dewar <dewar@adacore.com>
159 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
160 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
161 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
162 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
164 2011-08-05 Bob Duff <duff@adacore.com>
166 * a-stunau.ads, g-spipat.adb: Update comments.
168 2011-08-05 Bob Duff <duff@adacore.com>
170 * a-fihema.ads: Minor comment fix.
171 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
173 (Attach, Detach): Remove some unnecessary code.
174 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
176 2011-08-05 Bob Duff <duff@adacore.com>
178 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
179 allocation for Objects component. This simplifies the code somewhat. It
180 is also a little more efficient in the not-so-unusual case where there
181 are no controlled objects allocated.
182 Make Finalization_Started flag atomic.
183 (Finalize): Avoid unnecessary detachment of items from the list.
184 (pcol): Minor cleanup.
186 2011-08-05 Ed Schonberg <schonberg@adacore.com>
188 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
189 package whose name is the same as that of the generic unit, or its
192 2011-08-05 Bob Duff <duff@adacore.com>
194 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
195 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
198 2011-08-05 Arnaud Charlet <charlet@adacore.com>
200 * make.adb (Linking_Phase): No longer need to set source search path
201 before calling gnatlink in CodePeer mode.
202 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
203 gcc in CodePeer mode, since the binder generated file no longer has a
205 * switch.ads, switch.adb (Is_Language_Switch): Removed.
206 * switch-c.adb: Update comment.
208 2011-08-05 Thomas Quinot <quinot@adacore.com>
210 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
212 2011-08-05 Nicolas Roche <roche@adacore.com>
214 * gnat_ugn.texi: Fix minor syntax error issue.
216 2011-08-05 Vincent Celier <celier@adacore.com>
218 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
219 delete or close the file when the call to gnatmake returns a non
220 successful return code.
222 2011-08-05 Ed Schonberg <schonberg@adacore.com>
224 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
225 check, indicate that the copy of the original node does not come from
226 source, to prevent an infinite recursion of the expansion.
228 2011-08-05 Johannes Kanig <kanig@adacore.com>
230 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
231 VC generation for subprogram bodies.
233 2011-08-05 Yannick Moy <moy@adacore.com>
236 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
237 the base type with the smallest allowed base type.
239 2011-08-05 Sergey Rybin <rybin@adacore.com>
241 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
244 2011-08-05 Ed Schonberg <schonberg@adacore.com>
246 * sem_ch12.ads: minor comment updates.
248 2011-08-05 Ed Schonberg <schonberg@adacore.com>
250 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
251 instantiation and a formal package the compiler generates a package
252 renaming declaration so that the generic name within the declaration
253 is interpreted as a renaming of the instance. At the end of a formal
254 package declaration, this renaming must become invisible.
256 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
258 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
259 comparison and rely on concrete entities instead.
261 2011-08-05 Ed Schonberg <schonberg@adacore.com>
263 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
264 and discriminants, to indicate that the type has an access discriminant
265 that supports implicit dereference.
266 * snames.ads-tmpl: Add names of aspects and attributes related to
267 Ada2012 iterators: constant_indexing, default_iterator,
268 iterator_element, implicit_dereference, variable_indexing.
269 * aspects.ads, aspects.adb: entries for iterator-related aspects.
270 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
271 iterator-related aspects.
272 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
274 2011-08-05 Sergey Rybin <rybin@adacore.com>
276 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
277 metrics in gnatmetric to cover new kinds of coupling mentrics.
279 2011-08-05 Steve Baird <baird@adacore.com>
281 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
282 of calling the user-defined main subprogram.
283 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
284 is set) Call_Main_Subprogram ahead of, as opposed to
286 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
287 generation of a "with" of the user-defined main subprogram.
288 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
289 (which is now called from Gen_Main instead).
291 2011-08-05 Emmanuel Briot <briot@adacore.com>
293 * projects.texi: Added reference to the Makefile package.
295 2011-08-05 Thomas Quinot <quinot@adacore.com>
297 * exp_ch7.adb: Minor comment rewording.
299 2011-08-05 Ed Falis <falis@adacore.com>
301 * env.c: Fix comment.
303 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
305 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
306 character comparison and rely on concrete entities instead.
308 2011-08-05 Ed Schonberg <schonberg@adacore.com>
310 * sem_ch3.adb: (Check_Private_Overriding): better error message,
311 suggested by AI95-0068.
313 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
315 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
316 the two potential initialization calls. This accounts for any
317 access-before-elaboration checks which may precede the initialization
319 (Next_Suitable_Statement): New routine. Returns the next real statement
320 after the input node while skipping generated checks.
321 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
322 with comment on usage.
323 Do not generate Elaborate_All when the trigger is a finalization call
324 coming from a type init proc.
325 (Check_Elab_Call): Propagate the initialization procedure context to
326 subsequent calls to Check_A_Call.
327 (Check_Internal_Call_Continue): Propagate the initialization procedure
328 context to subsequent calls to Check_Elab_Call.
329 (Is_Finalization_Procedure): New routine. Returns True if the input
330 entity denotes a [Deep_]Finalize routine.
331 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
332 along with comment on usage.
334 2011-08-05 Vadim Godunko <godunko@adacore.com>
336 * s-atocou.ads: Add list of supported platforms.
338 2011-08-05 Yannick Moy <moy@adacore.com>
340 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
342 * opt.ads (Disable_ALI_File): new Boolean flag
343 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
345 2011-08-05 Ed Falis <falis@adacore.com>
347 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
348 environ is properly defined.
350 2011-08-05 Vincent Celier <celier@adacore.com>
352 * make.adb (Compilation_Phase): Exit immediately when all objects have
353 been found up to date, to avoid multiple exit messages.
354 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
355 same project for languages with no compiler.
356 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
358 2011-08-05 Robert Dewar <dewar@adacore.com>
360 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
361 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
362 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
363 s-atocou-builtin.adb: Minor reformatting.
365 2011-08-05 Yannick Moy <moy@adacore.com>
367 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
368 if the node to wrap is a pragma check, this node and enclosed
369 expression are not expanded, so do not apply any transformations here.
370 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
371 introducing transient scopes.
373 2011-08-05 Jose Ruiz <ruiz@adacore.com>
375 * adaint.c (__gnat_set_writable, __gnat_set_readable,
376 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
377 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
378 routine is available, so we use the default implementation of these
380 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
381 support for copying attributes on VxWorks 6.
383 2011-08-05 Yannick Moy <moy@adacore.com>
385 * debug.adb: Remove use of -gnatd.D.
386 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
387 * opt.ads: Simplify variables for ALFA mode, to keep one only
388 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
391 2011-08-05 Vincent Celier <celier@adacore.com>
393 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
394 Builder'Default_Switches.
396 2011-08-05 Vincent Celier <celier@adacore.com>
398 * makeusg.adb: Add lines for --create-map-file switches.
400 2011-08-05 Ed Schonberg <schonberg@adacore.com>
402 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
403 profile is incomplete and the full view is available, replace it with
405 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
406 incomplete, freezing the subprogram is delayed until the full view is
408 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
409 fixed-point multiplication operator and the predefined operator is
410 resolved in favor of the user-defined one.
412 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
414 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
417 2011-08-04 Ed Schonberg <schonberg@adacore.com>
419 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
420 whether a type lacks user-defined Read or Write operations, or has a
421 component that lacks them.
422 * sem_attr.adb (Check_Stream_Attribute): if restriction
423 No_Default_Stream_Attributes is active, verify that all subcomponent
424 types of the target have user-defined stream operations, and report
426 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
427 * exp_strm.adb: Build_Elementary_Input_Call,
428 Build_Elementary_Write_Call): remove checks for restriction
429 No_Default_Stream_Attributes, now checked in semantics.
431 2011-08-04 Vincent Celier <celier@adacore.com>
433 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
434 switches on the command line, look for all valid --RTS switches in the
435 Builder switches and for each language use the first runtime name found
437 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
438 command line and there is no auto-configuration.
439 (Runtime_Name_Set_For): New function.
441 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
443 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
444 elaborate initialization expression for variable Abort when processing
445 a package body or a declaration.
446 (Create_Finalizer): Propagate the package context when creating the
447 exception-related variables.
448 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
449 For_Package along with usage comment.
451 2011-08-04 Arnaud Charlet <charlet@adacore.com>
453 * gcc-interface/Makefile.in: Clean up targets.
454 Enable new package for atomic counters and copy-on-write implementation
455 of unbounded strings on x86 platforms.
456 * gcc-interface/Make-lang.in: Update dependencies.
458 2011-08-04 Robert Dewar <dewar@adacore.com>
460 * exp_ch7.adb: Minor reformatting.
462 2011-08-04 Robert Dewar <dewar@adacore.com>
464 * exp_strm.adb: Minor reformatting.
466 2011-08-04 Vadim Godunko <godunko@adacore.com>
468 * s-atocou.adb: Replace by dummy version and use on targets where atomic
469 operations are not supported.
470 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
471 * s-atocou-x86.adb: New file.
472 * Makefile.rtl: Add s-atocou.o file
474 2011-08-04 Arnaud Charlet <charlet@adacore.com>
476 * make.adb (Compile): Move setting of CodePeer_Mode to ...
477 (Compilation_Phase): ... here.
478 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
480 2011-08-04 Thomas Quinot <quinot@adacore.com>
482 * Make-generated.in: Fix minor typo in comment.
484 2011-08-04 Thomas Quinot <quinot@adacore.com>
486 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
489 2011-08-04 Robert Dewar <dewar@adacore.com>
491 * a-coinho.adb: Minor reformatting.
493 2011-08-04 Robert Dewar <dewar@adacore.com>
495 * a-coinho.ads: Minor reformatting.
497 2011-08-04 Vadim Godunko <godunko@adacore.com>
499 * s-atocou.ads, s-atocou.adb: New files.
500 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
501 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
502 direct use of GCC's atomic builtins and replace them by use of new
503 atomic counter package.
505 2011-08-04 Ed Schonberg <schonberg@adacore.com>
507 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
509 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
511 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
512 with a call to Get_External_Tag.
513 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
514 subprogram usage. Remove the guard against package declarations and
515 bodies since Build_Cleanup_Statements is no longer invoked in that
517 (Build_Components): Initialize Tagged_Type_Stmts when the context
518 contains at least one library-level tagged type.
519 (Build_Finalizer): New local variables Has_Tagged_Types and
520 Tagged_Type_Stmts along with associated comments on usage. Update the
521 logic to include tagged type processing.
522 (Create_Finalizer): Insert all library-level tagged type unregistration
523 code before the jump block circuitry.
524 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
525 (Expand_N_Package_Declaration): Remove the call to
526 Build_Cleanup_Statements.
527 (Process_Tagged_Type_Declaration): New routine. Generate a call to
528 unregister the external tag of a tagged type.
529 (Processing_Actions): Reimplemented to handle tagged types.
530 (Process_Declarations): Detect the declaration of a library-level
531 tagged type and carry out the appropriate actions.
532 (Unregister_Tagged_Types): Removed. The machinery has been directly
533 merged with Build_Finalizer.
535 2011-08-04 Robert Dewar <dewar@adacore.com>
537 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
538 gnatls.adb, exp_ch3.adb: Minor reformatting.
540 2011-08-04 Marc Sango <sango@adacore.com>
542 * sem_attr.adb (Analyze_Attribute): Replace the message
543 "invisible attribute of}" of the spark restriction violation in
544 attribute reference by the simple message "invisible attribute of type".
545 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
546 two insertion characters: '&' and '}'.
548 2011-08-04 Vadim Godunko <godunko@adacore.com>
550 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
551 * a-coinho.ads, a-coinho.adb: New file.
552 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
554 2011-08-04 Nicolas Roche <roche@adacore.com>
556 * alfa_test.adb: Not all ali files are containing alfa information even
557 if compiled with -gnatd.F. So suppress warning about missing ALFA
560 2011-08-04 Yannick Moy <moy@adacore.com>
562 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
564 * put_alfa.adb: Check that scope name is not empty.
566 2011-08-04 Ed Schonberg <schonberg@adacore.com>
568 * exp_ch3.adb (Stream_Operation_Ok): new predicate
569 Needs_Elementary_Stream_Operation, to determine whether user-defined
570 Read and Write attributes are available for the elementary components
571 of the given type. If only the predefined attributes are available,
572 then when restriction No_Default_Stream_Attributes is active the
573 predefined stream attributes for the composite type cannot be created.
575 2011-08-04 Robert Dewar <dewar@adacore.com>
577 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
578 Put routines in alpha order
580 2011-08-04 Jose Ruiz <ruiz@adacore.com>
582 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
583 * gcc-interface/Make-lang.in: Update dependencies.
585 2011-08-04 Arnaud Charlet <charlet@adacore.com>
587 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
588 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
591 2011-08-04 Robert Dewar <dewar@adacore.com>
593 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
594 lib-xref-alfa.adb: Minor reformatting.
596 2011-08-04 Marc Sango <sango@adacore.com>
598 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
599 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
600 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
603 2011-08-04 Tristan Gingold <gingold@adacore.com>
605 * bindgen.adb (Gen_Adainit_C): Remove.
606 (Gen_Adafinal_C): Ditto.
607 (Gen_Elab_Externals_C): Ditto.
608 (Gen_Elab_Calls_C): Ditto.
609 (Gen_Elab_Order_C): Ditto.
610 (Gen_Elab_Defs_C): Ditto.
611 (Gen_Finalize_Library_C): Ditto.
612 (Gen_Finalize_Library_Defs_C): Ditto.
614 (Gen_Output_File_C): Ditto.
615 (Gen_Restrictions_C): Ditto.
616 (Gen_Versions_C): Ditto.
617 (Write_Info_Ada_C): Ditto.
618 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
619 (Gen_Output_File): Do not force Ada_Bind_File anymore.
620 Always call Gen_Output_File_Ada.
621 * gnatlink.adb (Begin_Info): Now a constant.
623 (Ada_Bind_File): Remove
624 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
625 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
626 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
627 * opt.ads (Ada_Bind_File): Remove.
629 2011-08-04 Thomas Quinot <quinot@adacore.com>
631 * projects.texi: Document target-specific directory in default project
634 2011-08-04 Thomas Quinot <quinot@adacore.com>
636 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
639 2011-08-04 Yannick Moy <moy@adacore.com>
641 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
642 opt.ads, lib-xref.ads: Code clean up.
644 2011-08-04 Yannick Moy <moy@adacore.com>
646 * gnat_rm.texi: Update description of Test_Case
647 * gnat_ugn.texi: Typo.
649 2011-08-04 Ed Falis <falis@adacore.com>
651 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
653 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
655 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
656 it is of type Root_Controlled. This action eliminates fields Prev and
657 Next from type equality.
659 2011-08-04 Yannick Moy <moy@adacore.com>
661 * lib-xref-alfa.adb: Correct typo.
663 2011-08-04 Matthew Heaney <heaney@adacore.com>
665 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
668 2011-08-04 Yannick Moy <moy@adacore.com>
670 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
671 (Analyze_Pragma): allow static string expression for name of Test_Case,
672 instead of simply string literals.
673 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
676 2011-08-04 Vincent Celier <celier@adacore.com>
678 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
679 case suffixes to find truncated main sources.
681 2011-08-04 Tristan Gingold <gingold@adacore.com>
683 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
684 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
685 (Compute_Current_Task): Ditto.
687 2011-08-04 Tristan Gingold <gingold@adacore.com>
689 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
691 2011-08-04 Yannick Moy <moy@adacore.com>
693 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
694 library-level constant.
695 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
696 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
697 used as selector of parameter association, in ALFA mode.
699 2011-08-04 Robert Dewar <dewar@adacore.com>
701 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
702 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
705 2011-08-04 Arnaud Charlet <charlet@adacore.com>
707 * make.adb (Linking_Phase): Set source search path before calling
708 gnatlink in CodePeer mode.
710 2011-08-04 Javier Miranda <miranda@adacore.com>
712 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
713 Remove code which takes care of building TSDs.
714 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
715 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
716 the accessibility check in VM targets.
717 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
718 (Building_Static_DT): Now returns false for VM targets.
719 (Build_VM_TSDs): Removed.
720 (Expand_Interface_Conversion): Generate missing runtime check for
721 conversions to interface types whose target type is unknown at compile
723 (Make_VM_TSD): Add missing code to disable the generation of calls to
724 Check_TSD if the tagged type is not defined at library level, or not
725 has a representation clause specifying its external tag, or -gnatdQ is
727 * exp_disp.ads (Build_VM_TSDs): Removed.
728 (Make_VM_TSDs): Spec relocated from exp_disp.adb
729 * sem_disp.adb (Check_Dispatching_Operation): No code required to
730 register primitives in the dispatch tables in VM targets.
731 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
732 initialization of class-wide interface objects in VM targets.
733 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
736 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
738 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
739 when dotnet-ld cannot be found.
741 2011-08-04 Arnaud Charlet <charlet@adacore.com>
743 * bindgen.adb: Simplify significantly generation of binder body file in
745 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
746 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
749 2011-08-04 Yannick Moy <moy@adacore.com>
751 * sem_prag.adb, sem.ads: Code cleanup.
753 2011-08-04 Tristan Gingold <gingold@adacore.com>
755 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
756 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
758 * s-stusta.adb (Print): Adjust after changes in s-stausa.
759 * gnat_ugn.texi: Update dynamic stack usage section.
761 2011-08-04 Steve Baird <baird@adacore.com>
763 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
764 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
765 contains only a call to the user-defined main subprogram.
766 (Gen_Main_Ada) - If CodePeer_Mode is set, then
767 call the "wrapper" subprogram instead of directly
768 calling the user-defined main subprogram.
770 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
772 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
773 alternatives of a case statement for controlled objects. Rename local
774 variable A to Dead_Alt.
775 (Expand_N_If_Statement): Check the then and else statements of an if
776 statement for controlled objects. Check the then statements of all
777 elsif parts of an if statement for controlled objects.
778 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
780 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
781 detects a loop associated with the expansion of an array object.
782 Augment the processing of the loop statements to account for a possible
783 wrap done by Process_Statements_For_Controlled_Objects.
784 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
785 statements and abortable part of an asynchronous select for controlled
787 (Expand_N_Conditional_Entry_Call): Check the else statements of a
788 conditional entry call for controlled objects.
789 (Expand_N_Selective_Accept): Check the alternatives of a selective
790 accept for controlled objects.
791 (Expand_N_Timed_Entry_Call): Check the entry call and delay
792 alternatives of a timed entry call for controlled objects.
793 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
794 exception handler for controlled objects.
795 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
796 Add formal parameter Nested_Constructs along with its associated
798 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
799 Requires_Cleanup_Actions.
800 (Process_Statements_For_Controlled_Objects): New routine.
801 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
802 routine. Inspect a node which contains a non-handled sequence of
803 statements for controlled objects. If such an object is found, the
804 statements are wrapped in a block.
806 2011-08-04 Bob Duff <duff@adacore.com>
808 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
809 need to compare with Class_Wide_Type (T2), in order to get at the
810 original class-wide type node.
811 * sem_type.ads (Covers): Improve the comment.
812 * einfo.ads (Class_Wide_Type): Improve the comment.
813 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
814 the type of the Deref.
816 2011-08-04 Yannick Moy <moy@adacore.com>
818 * gnat_rm.texi: Document that Test_Case pragma can only appear on
819 separate declarations.
820 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
821 check identifier of pragma argument.
822 (Chain_TC): check that no other test case associated to the same entity
824 (Check_Test_Case): disallow test case inside subprogram body
825 (Analyze_Pragma): correct call to check identifier and not argument
826 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
827 function gets name from test case pragma.
829 2011-08-04 Yannick Moy <moy@adacore.com>
831 * gnat_rm.texi: Document new pragma and aspect.
832 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
833 (No_Duplicates_Allowed): new constant array defining whether duplicates
834 aspects of each kind can appear on the same declaration.
835 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
836 field, which points to a node holding the previous Spec_PPC_List.
837 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
838 through the indirection with Contract.
839 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
840 * par-prag.adb (Prag): do nothing on Test_Case pragma
841 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
843 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
844 component Ensures of Test_Case.
845 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
846 (Analyze_Generic_Subprogram_Declaration,
847 Analyze_Subprogram_Instantiation,
848 Analyze_Abstract_Subprogram_Declaration,
849 Analyze_Subprogram_Body_Helper,
850 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
851 insert contract in subprogram node at point of definition
853 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
854 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
856 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
857 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
858 similar to the analysis of pre/post
859 (Derive_Subprogram): insert contract in subprogram node at point of
861 * sem_prag.adb, sem_prag.ads
862 (Check_Arg_Is_String_Literal, Check_Identifier):
863 new checking procedures to be called in treatment of pragmas
864 (Check_Test_Case): new procedure to check that a Test_Case aspect or
865 pragma is well-formed. This does not check currently that 'Result is
866 used only in the Ensures component of a Test_Case.
867 (Analyze_Pragma): add case for Test_Case
868 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
869 components of a Test_Case.
870 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
871 expressions in the 3rd (and 4th if present) arguments of a Test_Case
872 pragma, treated as spec expressions.
873 (Sig_Flags): add value -1 for Test_Case.
874 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
875 Get_Requires_From_Test_Case_Pragma): getters for both expression
876 components of a Test_Case.
877 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
878 indirection between an entry or [generic] subprogram entity and its
879 pre/post + test-cases.
880 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
881 get/set for fields of an N_Contract node.
882 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
883 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
884 names and pragma for Test_Case.
885 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
887 2011-08-04 Vincent Celier <celier@adacore.com>
889 * gnat_ugn.texi: Improve documentation of gnatmake switch
892 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
894 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
895 type). Initialize Atyp to the appropriate type which is later checked
896 for completion. Rewrite the assertion associated with private type
899 2011-08-04 Ed Falis <falis@adacore.com>
901 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
902 initialize the number of CPUs.
904 2011-08-04 Ed Schonberg <schonberg@adacore.com>
906 * sem_type.adb (Disambiguate): New subsidiary routine
907 In_Same_Declaration_List, to implement AI05-0020: a user-defined
908 equality on an anonymous access type whose designated type is private
909 does not lead to an ambiguity with the universal access equality
910 operator in the body or child units of the defining package. The same
911 is true for a multiplication operator on a private type completed with
914 2011-08-04 Javier Miranda <miranda@adacore.com>
916 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
917 (Normalize_Scalars_Config): Removed.
919 (Register_Opt_Config_Switches): Remove registering config values of
920 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
921 (Restore_Opt_Config_Switches): Remove code which restores the values of
922 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
923 Init_Or_Norm_Scalars.
924 (Save_Opt_Config_Switches): Remove code which saves values of
925 Init_Or_Norm_Scalars and Normalize_Scalars.
926 (Set_Opt_Config_Switches): Remove code which restores config values of
927 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
928 Init_Or_Norm_Scalars.
930 2011-08-04 Yannick Moy <moy@adacore.com>
932 * frontend.adb (Frontend): remove previous patch to avoid full
933 qualification in ALFA mode.
934 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
935 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
936 unique name for an entity, which could be used to identify the entity
937 across compilation units.
939 2011-08-04 Thomas Quinot <quinot@adacore.com>
942 (Initialize_Default_Project_Path): Add target specific directory
943 ($prefix/$target/lib/gnat) in front of project path in all cases
944 (making gnatmake's behaviour consistent with gprbuild).
945 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
946 Pass target name from Sdefault to project subsystem.
947 * gnatls.adb: Show new target specific default project directory.
949 2011-08-04 Johannes Kanig <kanig@adacore.com>
951 * cstand.adb: Add Information to Identifier in Standard
952 (Identifer_For): Set Entity to the corresponding entity
954 2011-08-04 Sergey Rybin <rybin@adacore.com>
956 * gnat_ugn.texi: Update doc on gnatcheck.
958 2011-08-04 Yannick Moy <moy@adacore.com>
960 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
963 2011-08-04 Yannick Moy <moy@adacore.com>
965 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
966 performing expansion.
967 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
968 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
969 it is not called in ALFA mode.
971 2011-08-04 Emmanuel Briot <briot@adacore.com>
973 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
974 after all, so removed.
976 2011-08-04 Sergey Rybin <rybin@adacore.com>
978 * vms_data.ads: Add missing VMS qualifiers.
980 2011-08-04 Emmanuel Briot <briot@adacore.com>
982 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
983 the list of files on the command line after processing it through
986 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
988 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
989 processing for .NET/JVM. These targets can now benefit from
990 Raise_From_Controlled_Operation and they share the same processing with
992 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
993 These targets need transient scopes in order to properly finalize short
994 lived controlled objects.
995 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
996 NET/JVM. These targets can now benefit from
997 Raise_From_Controlled_Operation and they share the same processing with
1000 2011-08-04 Geert Bosch <bosch@adacore.com>
1002 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1004 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1006 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1007 Expand_Record_Aggregate, to determine whether aggregate must be
1008 expanded into assignments. This is the case if the ancestor part is
1009 private, regarless of the setting of the flag Has_Private_Ancestor.
1011 2011-08-04 Ed Falis <falis@adacore.com>
1013 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1015 2011-08-04 Bob Duff <duff@adacore.com>
1017 * sinfo.ads: Fix comment.
1019 2011-08-04 Steve Baird <baird@adacore.com>
1021 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1022 choose a package name in much the same way as is
1023 done for JGNAT when VM_Target /= No_VM, except that
1024 a slightly more distinctive prefix string is used.
1026 2011-08-04 Emmanuel Briot <briot@adacore.com>
1028 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1029 gnatmake command line.
1030 This behavior was never documented (and was supported only because of
1031 an early bug in the code). This case might lead to ambiguous cases
1032 (between unit names and truncated base names without suffixes).
1034 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1036 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1037 Remove the external tag of a tagged type from the internal hash table.
1038 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1039 expanded usage of the routine. Strenghten the check for Is_Master. Add
1040 processing for tagged types.
1041 (Build_Finalizer): Create all the necessary lists used in finalizer
1042 creation when the processed context is a package that may contain
1044 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1045 Requires_Cleanup_Actions.
1046 (Expand_N_Package_Body): Package bodies may need clean up code
1047 depending on whether they contain tagged types.
1048 (Expand_N_Package_Declaration): Package declarations may need clean up
1049 code depending on whether they contain tagged types.
1050 (Unregister_Tagged_Types): New routine. Search through a list of
1051 declarations or statements, looking for non-abstract Ada tagged types.
1052 For each such type, generate code to unregister the external tag.
1053 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1054 Requires_Cleanup_Actions.
1055 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1056 through a list of declarations or statements looking for non-abstract
1057 Ada tagged types or controlled objects.
1058 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1059 Requires_Cleanup_Actions.
1060 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1061 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1064 2011-08-04 Vincent Celier <celier@adacore.com>
1066 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1067 has Ada sources, not project Project, because if the root project
1068 Project has no sources of its own, all projects will be deemed without
1071 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1073 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1074 of the No_Param_Proc acc-to-subp type used for initialization of
1075 __gnat_finalize_library_objects so that it's declared at library level
1076 rather than nested inside of the adainit routine.
1078 2011-08-04 Javier Miranda <miranda@adacore.com>
1080 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1081 if the tagged type has a representation clause which specifies its
1084 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1086 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1087 Remove previous procedure with that name.
1088 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1090 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1091 subtype mark, the ancestor cannot have unknown discriminants.
1092 (Resolve_Record_Aggregate): if the type has invisible components
1093 because of a private ancestor, the aggregate is illegal.
1095 2011-08-04 Vincent Celier <celier@adacore.com>
1097 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1098 account switches -gnat2005, -gnat12 and -gnat2012.
1100 2011-08-04 Bob Duff <duff@adacore.com>
1102 * s-tasdeb.ads: Minor comment fix.
1104 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1106 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1108 * switch.ads, switch.adb (Is_Language_Switch): New function.
1110 2011-08-04 Vincent Celier <celier@adacore.com>
1112 * switch-c.adb: Minor comment addition.
1114 2011-08-04 Vincent Celier <celier@adacore.com>
1116 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1117 ending with '=' is followed by a space (missing file name).
1119 2011-08-04 Pascal Obry <obry@adacore.com>
1121 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1123 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1125 * sem_ch12.adb (Analyze_Associations): New routine
1126 Check_Overloaded_Formal_Subprogram to reject a formal package when
1127 there is a named association or a box initialisation for an overloaded
1128 formal subprogram of the corresponding generic.
1130 2011-08-04 Yannick Moy <moy@adacore.com>
1132 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1133 * get_alfa.adb, put_alfa.adb: Read and write new component of
1135 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1137 2011-08-04 Pascal Obry <obry@adacore.com>
1139 * urealp.adb: Minor reformatting.
1141 2011-08-04 Tristan Gingold <gingold@adacore.com>
1143 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1144 Handle the case when Cleanup_Protected_Object returns Empty.
1146 2011-08-04 Yannick Moy <moy@adacore.com>
1148 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1150 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1152 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1153 call, ignore functions.
1155 2011-08-04 Geert Bosch <bosch@adacore.com>
1157 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1160 2011-08-04 Emmanuel Briot <briot@adacore.com>
1162 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1163 as an index for Builder'Switches. This conforms to the documentation.
1164 * make.adb (Insert_Project_Sources): avoid duplicate code
1166 2011-08-04 Emmanuel Briot <briot@adacore.com>
1168 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1169 name on the command line (for instance "../dummy"), never assume it can
1172 2011-08-04 Tristan Gingold <gingold@adacore.com>
1174 * bindgen.adb: Remove code the reference or create the
1175 Break_Start/__gnat_break_start procedure.
1176 * s-stalib.adb (Break_Start): Removed.
1178 2011-08-04 Emmanuel Briot <briot@adacore.com>
1180 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1181 shared with gprbuild.
1183 2011-08-04 Yannick Moy <moy@adacore.com>
1185 * par-ch4.adb (P_Primary): preferentially issue an error message about
1186 a missing parenthesis arount a conditional or case expression in Ada
1187 2012 mode, if we detect that the alignment is not correct for a
1190 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1192 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1193 tag-to-class-wide conversion as needing finalization actions.
1194 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1195 a tag-to-class-wide conversion as needing finalization actions.
1196 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1197 conversion does not need finalization actions.
1198 (Is_Tag_To_CW_Conversion): New routine.
1199 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1200 whether an object is the result of a tag-to-class-wide conversion.
1202 2011-08-04 Yannick Moy <moy@adacore.com>
1204 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1205 the left-hand-side and right-hand-side of a conjunct are inserted when
1206 translating a pre- or postcondition
1207 * sem_ch6.adb: Correct typo in comment
1209 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1211 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1212 Unchecked_Conversion and Unchecked_Deallocation.
1214 2011-08-04 Thomas Quinot <quinot@adacore.com>
1216 * make.adb: Minor reformatting.
1218 2011-08-04 Emmanuel Briot <briot@adacore.com>
1220 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1221 sources in the project and its imported projects, but not in the whole
1224 2011-08-04 Emmanuel Briot <briot@adacore.com>
1226 * make.adb: Remove debug trace.
1228 2011-08-04 Vincent Celier <celier@adacore.com>
1230 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1231 path in canonical form, to be able to compare path names on platforms
1232 such as Windows or Darwin.
1234 2011-08-04 Thomas Quinot <quinot@adacore.com>
1236 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1237 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1238 * scos.ads: Update documentation accordingly.
1239 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1242 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1244 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1245 attribute only if prefix type is scalar.
1247 2011-08-04 Emmanuel Briot <briot@adacore.com>
1249 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1250 in gnatmake for specifying mains on the command line that do not belong
1251 to the main project. These mains must currently all belong to the same
1253 (Ultimate_Extension_Of): removed, since duplicated
1254 Ultimate_Extending_Project.
1256 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1258 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1260 (CodePeer_Mode_String): New.
1261 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1263 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1264 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1265 mode, since no useful elaboration subprogram is needed by CodePeer.
1266 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1267 In this mode, compile binder file with -gnatC and do stop after this
1270 2011-08-04 Vincent Celier <celier@adacore.com>
1272 * exp_ch7.adb: Minor comment fix.
1274 2011-08-04 Robert Dewar <dewar@adacore.com>
1276 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1277 exp_ch4.adb, makeutl.adb: Minor reformatting.
1279 2011-08-04 Emmanuel Briot <briot@adacore.com>
1281 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1282 Create several new subprograms to move code out of Make. This makes the
1283 code more readable, removes code duplication, and is a preparation work
1284 for adding support for aggregate projects.
1286 2011-08-04 Tristan Gingold <gingold@adacore.com>
1288 * s-po32gl.ads, s-po32gl.adb: New files.
1289 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1290 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1291 (Build_Finalization_Collection): Use it.
1292 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1293 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1295 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1296 * gcc-interface/Make-lang.in: Update dependencies.
1298 2011-08-04 Emmanuel Briot <briot@adacore.com>
1300 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1303 2011-08-04 Emmanuel Briot <briot@adacore.com>
1305 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1306 command line is not a file name, also check whether it could be a unit
1309 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1311 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1312 the header of the finalization routine.
1313 If the unit has no finalizer but is a body whose spec has one, then
1314 generate the decrement of the elaboration entity only.
1315 If the unit has a finalizer and is a spec, then do not generate the
1316 decrement of the elaboration entity.
1317 (Gen_Finalize_Library_C): Likewise.
1319 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1321 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1322 (Bounds_Size_Expression): Removed.
1323 (Double_Alignment_Of): New subsidiary routine.
1324 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1325 for a hole in the dope vector of unconstrained arrays due to different
1326 index and element alignments.
1328 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1330 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1331 raise program_error because body has not been seen yet.
1333 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1335 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1338 2011-08-04 Vincent Celier <celier@adacore.com>
1340 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1342 2011-08-04 Yannick Moy <moy@adacore.com>
1344 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1345 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1347 2011-08-04 Thomas Quinot <quinot@adacore.com>
1349 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1350 instantiation in RCI.
1352 2011-08-04 Emmanuel Briot <briot@adacore.com>
1354 * make.adb: Share more code with gprbuild
1356 2011-08-04 Emmanuel Briot <briot@adacore.com>
1358 * projects.texi: Added documentation for the IDE'Gnat project file
1361 2011-08-04 Nicolas Roche <roche@adacore.com>
1363 * gnat_rm.texi: Minor editing.
1365 2011-08-04 Javier Miranda <miranda@adacore.com>
1367 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1368 and the library case for VM targets.
1369 (Gen_Adainit_Ada): Likewise.
1371 2011-08-04 Robert Dewar <dewar@adacore.com>
1373 * g-altive.ads: Minor comment updates.
1374 * prj-nmsc.adb: Minor reformatting.
1376 2011-08-04 Javier Miranda <miranda@adacore.com>
1379 (Normalize_Scalars_Config): Value of the configuration switch set by
1380 pragma Normalize_Scalars when it appears in the gnat.adc file.
1381 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1382 to save and restore settings of this pragma.
1384 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1385 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1387 2011-08-04 Vincent Celier <celier@adacore.com>
1389 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1391 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1393 * makeutl.adb: Minor reformatting.
1395 2011-08-04 Olivier Hainque <hainque@adacore.com>
1397 * g-altive.ads: Update comments to reflect that only the soft
1398 binding is available today.
1400 2011-08-04 Robert Dewar <dewar@adacore.com>
1402 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1403 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1404 * gcc-interface/Make-lang.in: Update dependencies.
1406 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1408 * prj-env.adb: Remove local debug traces.
1410 2011-08-04 Yannick Moy <moy@adacore.com>
1412 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1413 was used instead of Hi_OK, which could cause a read of an uninitialized
1414 value later on. Detected while working on the new warning.
1415 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1417 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1418 in more cases, in order to detect more unreferenced values.
1419 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1420 object for expression, if any.
1422 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1424 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1425 the operand types instead of the Esize.
1427 2011-08-04 Steve Baird <baird@adacore.com>
1429 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1430 enable CodePeer_Mode.
1431 * bindusg.adb (Display): Add help message describing -P binder switch.
1432 * gnat_ugn.texi: Document -P binder switch.
1433 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1434 user-defined main program directly.
1435 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1436 user-defined main program in the context clause of the package body.
1438 2011-08-04 Yannick Moy <moy@adacore.com>
1440 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1441 duplicate of Defining_Entity
1442 (Get_Unique_Entity_For_Decl): rename function into
1443 Unique_Defining_Entity
1444 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1445 (Formal_Proof_On): remove synthesized flag
1446 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1447 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1448 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1449 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1450 Annotate (Formal_Proof)
1452 2011-08-04 Emmanuel Briot <briot@adacore.com>
1454 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1455 source files with non-standard naming schemes, in imported projects
1457 2011-08-04 Emmanuel Briot <briot@adacore.com>
1459 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1460 specified on the gprbuild command line, we need to compile all units
1461 within that file, not just the first one we find
1462 Fix error message for mains that are not found.
1464 2011-08-04 Thomas Quinot <quinot@adacore.com>
1466 * sem_ch6.adb: Update comment.
1467 * sem_ch12.adb: Minor reformatting.
1469 2011-08-04 Bob Duff <duff@adacore.com>
1471 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1472 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1473 race condition whose symptom is to fail to lock Parent. That, in turn,
1474 causes Parent.Awake_Count to be accessed without locking Parent, which
1475 causes another race condition whose symptom is that Parent.Awake_Count
1476 can be off by 1 (either too high or too low). The solution is to lock
1477 Parent unconditionally, and then lock Acceptor, before reading
1478 Acceptor.Terminate_Alternative.
1480 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1482 * debug.adb: Update comment.
1484 2011-08-04 Robert Dewar <dewar@adacore.com>
1486 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1487 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1488 exp_ch6.adb: Minor reformatting.
1490 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1492 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1495 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1497 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1499 2011-08-04 Thomas Quinot <quinot@adacore.com>
1501 * sinfo.ads: Minor reformatting.
1503 2011-08-04 Emmanuel Briot <briot@adacore.com>
1505 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1506 even if there is no location.
1508 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1510 * sem_res.adb, sem_ch4.adb: move check for restriction
1511 No_Task_Hierarchy to resolve_allocator.
1513 2011-08-04 Thomas Quinot <quinot@adacore.com>
1515 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1516 This flag of N_Pragma nodes is not used, remove it as well as all of
1517 the associated circuitry.
1519 2011-08-04 Javier Miranda <miranda@adacore.com>
1521 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1522 runtime check on duplicated externa tags
1523 * debug.adb Document switch -gnatdQ.
1525 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1527 * a-fihema.ads: Minor typo fix.
1529 2011-08-04 Yannick Moy <moy@adacore.com>
1531 * sem_ch10.adb: Minor comment update.
1533 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1535 * einfo.adb: Update the node field usage to reflect the renaming of
1536 Return_Flag to Return_ Flag_Or_Transient_Decl.
1537 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1538 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1539 (Write_Field15_Name): Change Return_Flag to
1540 Return_Flag_Or_Transient_Decl.
1541 * einfo.ads: Rename node field Return_Flag to
1542 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1543 occurrences in entities.
1544 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1545 associated Inline pragma.
1546 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1547 associated Inline pragma.
1548 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1550 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1551 Return_Flag and Set_Return_Flag.
1552 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1553 objects generated for controlled transients declared inside an
1554 Exception_With_Actions. Update the calls to Return_Flag.
1555 (Process_Object_Declaration): Add code to add a null guard for hook
1556 objects generated for controlled transients declared inside an
1557 Exception_With_Actions. Update related comment.
1558 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1559 objects generated for controlled transients declared inside an
1560 Exception_With_Actions. Update the calls to Return_Flag.
1561 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1563 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1565 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1566 positional aggregate.
1568 2011-08-04 Vincent Celier <celier@adacore.com>
1570 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1571 SLOC only for pragmas.
1573 2011-08-04 Emmanuel Briot <briot@adacore.com>
1575 * projects.texi: Minor typo fix.
1577 2011-08-04 Emmanuel Briot <briot@adacore.com>
1579 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1580 on case-sensitive file systems.
1582 2011-08-04 Thomas Quinot <quinot@adacore.com>
1584 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1585 nested in a disabled pragma.
1586 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1587 enclosing pragma, if any, for X decisions.
1589 2011-08-04 Thomas Quinot <quinot@adacore.com>
1591 * sem_prag.adb: Minor reformatting.
1593 2011-08-04 Vincent Celier <celier@adacore.com>
1595 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1596 allowed in no run time mode.
1598 2011-08-04 Vincent Celier <celier@adacore.com>
1600 * make.adb (Check): When -gnatc is used, check for the source file
1601 inside the ALI file with a canonical case file name.
1603 2011-08-04 Emmanuel Briot <briot@adacore.com>
1605 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1606 overriding the separator.
1608 2011-08-04 Robert Dewar <dewar@adacore.com>
1610 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1611 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1613 2011-08-04 Robert Dewar <dewar@adacore.com>
1615 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1617 2011-08-04 Yannick Moy <moy@adacore.com>
1619 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1620 'Result only appears in postcondition of function.
1622 2011-08-04 Thomas Quinot <quinot@adacore.com>
1624 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1625 external tag, include the value of the external tag in the exception
1628 2011-08-04 Yannick Moy <moy@adacore.com>
1630 * sem_attr.adb (Result): modify error message for misplaced 'Result
1632 2011-08-04 Sergey Rybin <rybin@adacore.com>
1634 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1635 clear that the second argument must be an identifier.
1637 2011-08-04 Thomas Quinot <quinot@adacore.com>
1639 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1640 -fpreserve-control-flow, insert an IF statement on the barrier
1641 condition to ensure that a conditional branch instruction is generated.
1643 2011-08-04 Emmanuel Briot <briot@adacore.com>
1645 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1646 (Processing_Flags.Ignore_Missing_With): new flag.
1648 2011-08-04 Emmanuel Briot <briot@adacore.com>
1650 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1651 Source_List_File on case-insensitive systems where the file is actually
1652 on a case-sensitive file system (NFS,...).
1654 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1656 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1657 function return contains a controlled [extension] aggregate and the
1658 return statement is not part of a handled sequence of statements, wrap
1659 the return in a block. This ensures that all controlled temporaries
1660 generated during aggregate resolution will be picked up by the
1661 finalization machinery.
1663 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1665 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1666 components, freeze type before resolution, to ensure that default
1667 initializations are present for all components.
1668 * sem_res.adb (Resolve_Actuals): the designated object of an
1669 accces-to-constant type is a legal actual in a call to an
1670 initialization procedure.
1672 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1674 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1675 N_Unchecked_Type_Conversion to the possible containers of a renamed
1678 2011-08-04 Yannick Moy <moy@adacore.com>
1680 * par-ch13.adb (Aspect_Specifications_Present): recognize
1681 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1682 is issued in Strict mode.
1683 * par.adb: Fix typos in comments.
1685 2011-08-04 Yannick Moy <moy@adacore.com>
1687 * sem_attr.adb (Result): modify error message to take into account Post
1688 aspect when compiling Ada 2012 (or newer) code.
1690 2011-08-04 Nicolas Roche <roche@adacore.com>
1692 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
1693 remove need for GCC exceptions.
1695 2011-08-04 Vincent Celier <celier@adacore.com>
1697 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1698 project, not the source file name.
1699 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1700 excluded, continue looking. This excluded source will only be returned
1701 if there is no other source with the same base name that is not locally
1704 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1706 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1707 private and one of the operands is a real literal, use a qualified
1708 expression rather than a conversion which is not meaningful to the
1711 2011-08-04 Yannick Moy <moy@adacore.com>
1713 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1714 corresponding aspect X'Class are allowed, proceed with analysis of the
1715 aspect instead of skipping it.
1717 2011-08-04 Tristan Gingold <gingold@adacore.com>
1719 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1720 This will allow to have an Ada implementation for the subprogram.
1722 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1724 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1725 completion and aspects are present, apply them to the entity for the
1726 type which is currently the partial view, but which is the one that
1728 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1729 applies to a partial view, indicate that the full view has predicates
1730 and delayed aspects.
1731 (Replace_Type_Reference): Handle properly predicates that apply to the
1732 full view of a private completion.
1734 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1736 * layout.adb (Layout_Type): For composite types, do not set Esize.
1737 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1739 (Size_Known): Look at the RM size of components instead of the Esize.
1740 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1741 issue warning and activate Implicit_Packing.
1742 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1743 if the Esize is not known.
1744 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1745 for elementary types only.
1746 (Analyze_Record_Representation_Clause): Look at the RM size instead
1747 of the Esize to issue errors.
1748 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1750 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
1752 Look at the RM size instead of the Esize for types if the latter is
1754 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1756 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1758 * sem_type.adb: proper handling of equality not involving anonymous
1761 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1763 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1764 Vis_Decls. When creating a library-level finalizer for a package spec,
1765 both the declaration and body of the finalizer are inserted either in
1766 the visible or private declarations of the package spec.
1768 2011-08-04 Javier Miranda <miranda@adacore.com>
1770 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1771 use of the full-view of a type when invoking Is_Ancestor.
1772 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1773 the full-view of private parents is requested, then use also the
1774 full-view of the parent of the first derivation.
1776 2011-08-04 Tristan Gingold <gingold@adacore.com>
1778 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1779 instead of the locally imported procedure.
1780 * s-taprop-mingw.adb (Enter_Task): Ditto.
1781 * s-valrea.adb (Scan_Real): Ditto.
1782 * s-imgrea.adb (Set_Image_Real): Ditto.
1783 * s-flocon.ads: Make the package pure.
1785 2011-08-04 Thomas Quinot <quinot@adacore.com>
1787 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1788 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1789 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1790 New subprogram, moved here from...
1791 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1792 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1793 rewriting of the last argument into a procedure call statement here...
1794 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1797 2011-08-04 Thomas Quinot <quinot@adacore.com>
1799 * par_sco.adb: Minor reformatting.
1801 2011-08-04 Robert Dewar <dewar@adacore.com>
1803 * erroutc.adb: Minor reformatting.
1805 2011-08-04 Thomas Quinot <quinot@adacore.com>
1807 * par_sco.adb: Comment update.
1809 2011-08-04 Tristan Gingold <gingold@adacore.com>
1811 * s-flocon.ads: New file.
1812 * g-flocon.ads: Now a renaming of s-flocon.
1813 * Makefile.rtl: Add s-flocon.o
1815 2011-08-04 Javier Miranda <miranda@adacore.com>
1817 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1818 constrained, do not attempt to build a subtype of it.
1820 2011-08-04 Yannick Moy <moy@adacore.com>
1822 * errout.ads Change comments: remove 'R'M as an example where quotes
1823 are needed; add ALFA as another case where quotes are not needed
1824 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1825 case where quotes are not needed.
1826 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1827 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1828 Remove all occurrences of 'A'L'F'A
1830 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1832 * sem_ch13.adb: check legality of invariant pragma.
1834 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1836 * bindgen.adb: Add comments.
1838 2011-08-04 Yannick Moy <moy@adacore.com>
1840 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1842 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1843 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1845 2011-08-04 Robert Dewar <dewar@adacore.com>
1847 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1848 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1849 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1851 2011-08-04 Thomas Quinot <quinot@adacore.com>
1853 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1855 2011-08-04 Thomas Quinot <quinot@adacore.com>
1858 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1861 2011-08-04 Robert Dewar <dewar@adacore.com>
1863 * einfo.ads, exp_ch4.adb: Minor reformatting.
1865 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1867 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1869 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1871 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1872 type in all cases to compute list of primitive operations, because full
1873 view may be an itype that is not attached to the list of declarations.
1875 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1877 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1878 library has already been finalized.
1879 (Gen_Adafinal_C): Likewise.
1880 (Gen_Adainit_Ada): Generate an early return if the library has
1881 already been elaborated.
1882 (Gen_Adainit_C): Likewise.
1883 (Gen_Output_File_Ada): Generate an elaboration flag.
1884 (Gen_Output_File_C): Likewise.
1886 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1888 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1889 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1890 built in the first place.
1891 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1892 for CodePeer because Finalize_Address was not built to begin with.
1893 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1895 2011-08-04 Pascal Obry <obry@adacore.com>
1897 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1898 filenames, this ensures unicity of filenames across processes.
1900 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1902 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1903 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1904 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1905 Add False as the actual to From_Abort in the generated call to
1906 Raise_From_Controlled_Operation.
1908 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1910 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
1911 so that the ali file name can be retrieved from outside of this package.
1912 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
1913 doing nothing in the general case, but used to update the object file
1914 timestamp if directly generated by the backend.
1915 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
1916 to a later time than the ali file one.
1918 2011-08-04 Yannick Moy <moy@adacore.com>
1920 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
1921 entities whose body contains an Annotate pragma which forces formal
1923 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
1924 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
1925 Mark_Non_ALFA_Subprogram to pass in a message and node.
1926 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
1927 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
1928 surrounding subprogram.
1929 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
1930 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
1931 as not in ALFA is annotated with Formal_Proof being On, then an error
1932 is issued based on the additional parameters for message and node.
1933 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
1934 * gcc-interface/Make-lang.in: Update dependencies.
1936 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1938 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
1939 Finalize_Address when CodePeer is enabled.
1941 2011-08-04 Pascal Obry <obry@adacore.com>
1943 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
1944 the latter returns a pointer to a static buffer which is deallocated
1945 at the end of the routine.
1947 2011-08-04 Yannick Moy <moy@adacore.com>
1949 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
1950 after index creation; mark unconstrained base array type generated as
1951 being in/not in ALFA as well
1952 (Make_Index): mark subtype created as in/not in ALFA
1953 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
1954 over a loop as in/not in ALFA, depending on its type and form of loop
1957 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1959 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
1960 directly to False on .NET and JVM.
1962 2011-08-04 Yannick Moy <moy@adacore.com>
1964 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
1965 constraint that subtype must come from source code to be in ALFA, so
1966 that anonymous subtypes can be in ALFA too.
1968 2011-08-04 Yannick Moy <moy@adacore.com>
1970 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
1971 reference for ALFA mode.
1972 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
1973 procedure public so as to use it from formal verification back-end.
1975 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1977 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
1978 invalid checks of the Parameter, making Remove_Switch not working
1981 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1983 * targparm.ads: Update header: no run-time exception is needed on this
1986 2011-08-04 Vincent Celier <celier@adacore.com>
1988 * a-fihema.adb: Use System.IO instead of GNAT.IO
1990 2011-08-04 Thomas Quinot <quinot@adacore.com>
1992 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
1993 are forbidden in Compiler_Unit mode.
1995 2011-08-04 Robert Dewar <dewar@adacore.com>
1997 * sem_util.adb: Minor reformatting.
1999 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2001 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2002 library-level finalizers.
2003 (Gen_Finalize_Library_C): Update the import string for library-level
2005 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2006 library-level finalizer.
2007 * exp_ch7.adb: Remove with and use clauses for Stringt.
2008 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2009 Spec_Decl. Add local variable Body_Id. The names of library-level
2010 finalizers are now manually fully qualified and are no longer external.
2011 A single name is now capable of servicing .NET, JVM and non-VM targets.
2012 Pragma Export is no longer required to provide visibility for the name.
2013 (Create_Finalizer_String): Removed.
2014 (New_Finalizer_Name): New routine which mimics New_..._Name.
2016 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2018 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2019 elaboration counter to Standard_Short_Integer.
2020 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2021 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2022 (Gen_Elab_Externals_C): Likewise.
2024 2011-08-04 Ed Falis <falis@adacore.com>
2026 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2027 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2028 system-vxworks-mips.ads, system-vxworks-x86.ads
2029 (Always_Compatible_Rep): set to False for all VxWorks targets.
2031 2011-08-04 Robert Dewar <dewar@adacore.com>
2033 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2034 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2035 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2036 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2037 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2038 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2039 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2040 Minor reformatting and code reorganization.
2042 2011-08-04 Emmanuel Briot <briot@adacore.com>
2044 * projects.texi: Added doc for aggregate projects.
2046 2011-08-04 Emmanuel Briot <briot@adacore.com>
2048 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2049 Add support for overriding the Project_Path in aggregate projects.
2051 2011-08-04 Robert Dewar <dewar@adacore.com>
2053 * a-cofove.ads: Minor reformatting.
2055 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2057 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2058 on the generated code.
2059 (Build_Finalize_Statements): Update the comment on the generated code.
2060 (Build_Initialize_Statements): Update the comment on the generated code.
2061 (Build_Object_Declarations): Add local variable Result. The object
2062 declarations are now built in sequence.
2063 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2066 2011-08-04 Robert Dewar <dewar@adacore.com>
2068 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2070 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2072 * einfo.ads (Elaboration_Entity): Document new definition and use.
2073 (Elaboration_Entity_Required): Adjust to above change.
2074 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2075 * exp_ch12.adb: And with and use for Snames.
2076 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2077 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2078 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2079 <Check_Unit_Name>: Deal with N_Expanded_Name.
2080 <Attribute_Elaborated>: Extend to all unit names.
2081 * sem_elab.adb: And with and use for Uintp.
2082 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2083 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2084 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2085 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2086 from Gen_Adainit_Ada.
2087 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2088 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2089 case, do not call System.Standard_Library.Adafinal; instead call
2090 finalize_library if needed.
2091 (Gen_Adafinal_C): Likewise.
2092 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2093 non-main program case.
2094 (Gen_Adainit_C): Generate a couple of external declarations here.
2095 In the main program case, set SSL.Finalize_Library_Objects.
2096 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2097 (Gen_Elab_Calls_C): Likewise.
2098 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2099 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2100 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2102 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2103 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2105 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2106 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2107 of external declarations. Â Call Gen_Finalize_Library_C.
2109 2011-08-04 Emmanuel Briot <briot@adacore.com>
2111 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2112 Compute_Compilation_Phases): new subprogram.
2113 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2114 The number of mains as well as the various compilation phases that
2115 need to be run are now project tree specific, since various
2116 aggregated trees might have different requirements. In particular,
2117 they do not all require bind or link phases.
2119 2011-08-04 Emmanuel Briot <briot@adacore.com>
2121 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2122 (Project_Tree_Appdata): New type.
2123 It is now possible to associate application-specific data to a project
2124 tree. In particular, this is used in the gprbuild builder to avoid a
2125 number of global tables and htables, especially now that there can be
2126 several project trees loaded at once because of aggregate projects.
2127 (Debug_Name): new procedure.
2128 * projects.texi: Clarify syntax of "**" for Source_Dirs
2130 2011-08-03 Emmanuel Briot <briot@adacore.com>
2132 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2133 the "roots" for a main.
2134 (Fill_From_Project): add support for aggregate projects. Main units
2135 in aggregated projects are now automatically added in the list of
2136 files to build (although this fails later on in gprbuild, because
2137 these files are not using the root proejct tree, so this needs
2139 * gcc-interface/Make-lang.in: Update dependencies.
2141 2011-08-03 Yannick Moy <moy@adacore.com>
2143 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2144 conditional expression in ALFA.
2145 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2146 expressions as not in ALFA.
2148 2011-08-03 Robert Dewar <dewar@adacore.com>
2150 * a-cofove.adb: Minor reformatting.
2152 2011-08-03 Emmanuel Briot <briot@adacore.com>
2154 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2155 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2157 These packages are more logically placed in the Queue package, since
2158 they manipulate the queue. It is also likely that they can be adapted
2159 for gnatmake, thus sharing more code.
2160 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2161 that we could move the above.
2163 2011-08-03 Emmanuel Briot <briot@adacore.com>
2165 * errutil.adb (Finalize): clean up the list of error messages on exit.
2166 Calling this subprogram multiple times will no longer show duplicate
2167 error messages on stderr.
2169 2011-08-03 Emmanuel Briot <briot@adacore.com>
2171 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2172 Getopt_Switches when we have already define a command line
2175 2011-08-03 Yannick Moy <moy@adacore.com>
2177 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2178 in ALFA. Instead, they are considered as assertions to prove.
2179 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2180 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2181 if they have no ELSE part, or if they occur in pre- and postconditions,
2182 where the Condition cannot have side-effects in ALFA
2183 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2184 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2185 Instead, include type conversion between scalar types in ALFA.
2186 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2187 if-and-only-if its type is in ALFA.
2189 2011-08-03 Thomas Quinot <quinot@adacore.com>
2191 * scos.adb, get_scos.adb, put_scos.adb
2192 New code letter for decisions: G (entry guard)
2194 (Traverse_Subprogram_Body): Rename to...
2195 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2196 (Traverse_Protected_Body): New subprogram
2197 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2198 protected bodies and entry bodies.
2200 2011-08-03 Yannick Moy <moy@adacore.com>
2202 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2203 entities with get/set subprograms, which is set on procedure entities
2204 generated by the compiler for a postcondition.
2205 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2206 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2207 entity for a declaration
2208 (Get_Unique_Entity_For_Decl): new function returning an entity which
2209 represents a declaration, so that matching spec and body have the same
2212 2011-08-03 Robert Dewar <dewar@adacore.com>
2214 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2215 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2217 2011-08-03 Yannick Moy <moy@adacore.com>
2219 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2220 library-level because retriction No_Implicit_Dynamic_Code in the
2221 front-end prevents its definition as a local subprogram
2222 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2223 for reuse in other contexts
2224 (Traverse_Declarations_Or_Statements,
2225 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2226 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2227 procedures take a callback parameter to be called on all declarations
2229 (Traverse_All_Compilation_Units): new generic function to traverse a
2230 compilation unit and call a callback parameter on all declarations
2232 2011-08-03 Javier Miranda <miranda@adacore.com>
2234 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2235 in Java since they are always enclosed in a namespace that
2236 differentiates them, and overloaded entities are supported by the VM.
2238 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2240 * checks.adb (Determine_Range): If a computed bound of an operation is
2241 outside the range of the base type of the expression, and overflow
2242 checks are enabled, the result is unknown and cannot be used for any
2243 subsequent constant folding.
2244 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2245 unknown, so is the result of the comparison.
2247 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2249 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2250 From_Abort. When finalization was triggered by an abort, propagate
2251 Standard'Abort_Signal rather than Program_Error.
2252 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2254 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2255 From_Abort. When finalization was triggered by an abort, propagate
2256 Standard'Abort_Signal rather than Program_Error.
2257 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2259 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2260 Abort_Id. Update the calls to Build_Object_Declarations and
2261 Build_Raise_Statement to include Abort_Id.
2262 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2263 calls to Build_Object_Declarations and Build_Raise_Statement to include
2265 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2266 calls to Build_Object_Declarations and Build_Raise_Statement to include
2268 (Build_Components): Create an entity for Abort_Id when exceptions are
2269 allowed on the target.
2270 (Build_Finalizer): New local variable Abort_Id.
2271 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2272 calls to Build_Object_Declarations and Build_Raise_Statement to include
2274 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2275 declaration of flag Abort_Id to preserve the original abort status
2276 before finalization code is executed.
2277 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2278 runtime routine Raise_From_Controlled_Operation.
2279 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2280 Abort_Id. Update the call to Build_Object_Declarations to include
2281 Abort_Id. Update the layout of the finalizer body.
2282 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2283 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2284 clunky code to create all flags and objects related to
2285 exception propagation and replace it with a call to
2286 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2288 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2289 Add new formal Abort_Id and associated comment on its use.
2290 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2292 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2293 Remove the clunky code to create all flags and objects related to
2294 exception propagation and replace it with a call to
2295 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2297 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2299 * s-tassta.adb: Fix minor typos.
2301 2011-08-03 Robert Dewar <dewar@adacore.com>
2303 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2304 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2306 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2308 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2309 to packages. This ensures that the finalizer body will not end up
2310 inside the freeze node.
2311 (Process_Declarations): Add code to detect whether a freeze node has a
2312 nested finalization collection.
2314 2011-08-03 Pascal Obry <obry@adacore.com>
2316 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2317 (Current_Session): Return a not null access to Session_Type.
2318 (Default_Session): Likewise.
2320 2011-08-03 Robert Dewar <dewar@adacore.com>
2322 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2323 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2325 2011-08-03 Pascal Obry <obry@adacore.com>
2327 * g-awk.ads: Minor comment fix.
2329 2011-08-03 Sergey Rybin <rybin@adacore.com>
2331 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2332 the tree structure related to discriminant constraints.
2333 Original_Discriminant cannot be used any more for computing the
2334 defining name for the reference to a discriminant.
2336 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2338 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2339 function is not visibly tagged, this is not a dispatching call and
2340 therfore is not Tag_Indeterminate, even if the function is marked as
2341 dispatching on result.
2343 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2345 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2346 (Expand_N_Free_Statement): Add a guard to protect against run-times
2347 which do not support controlled types.
2348 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2349 against run-times which do not support controlled types.
2350 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2351 against run-times which do not support controlled types.
2352 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2353 against run-times which do not support controlled types.
2354 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2355 protect against run-times which do not support controlled types.
2357 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2359 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2360 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2362 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2364 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2365 modified in the source, to prevent spurious warnings when compiling
2368 2011-08-03 Thomas Quinot <quinot@adacore.com>
2370 * a-except-2005.adb: Minor reformatting.
2372 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2374 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2375 is a renaming declaration in the private part of a package, do not emit
2376 a warning that the with_clause could be moved because the renaming may
2377 be used in the body or in a child unit.
2379 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2381 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2382 Propagate the Comes_From_Source attribute from the original return
2383 object to the renaming.
2385 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2387 * exp_ch7.adb (Build_Raise_Statement): Do not call
2388 Raise_From_Controlled_Operation when this routine is not present in
2389 the run-time library.
2390 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2391 libraries (Ravenscar), tasks are non-terminating, and protected objects
2392 and tasks can only appear at library level, so we do not want
2393 finalization of protected objects nor tasks.
2394 * exp_intr.adb: Minor clarification in comment.
2395 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2396 Gen_Output_File_C): Remove references to finalization of library-level
2397 objects when using restricted run-time libraries.
2399 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2401 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2402 Original_Discriminant only if the parent type is a generic formal.
2404 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2406 * exp_ch13.adb: Add with and use clause for Targparm;
2407 (Expand_N_Free_Statement): Prevent the generation of a custom
2408 Deallocate on .NET/JVM targets since this requires pools and address
2410 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2411 .NET/JVM targets, attach the newly allocated object to the access
2412 type's finalization collection. Do not generate a call to
2413 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2414 exist in the runtime.
2415 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2416 create a custom Allocate for object that do not require initialization.
2417 Attach a newly allocated object to the access type's finalization
2418 collection on .NET/JVM.
2419 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2420 assignment of controlled types on .NET/JVM. The two hidden pointers
2421 Prev and Next and stored and later restored after the assignment takes
2423 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2424 kludge for .NET/JVM to recognize a particular piece of code coming from
2425 Heap_Management and change the call to Finalize into Deep_Finalize.
2426 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2427 finalization collections on .NET/JVM only for types derived from
2428 Controlled. Separate the association of storage pools with a collection
2429 and only allow it on non-.NET/JVM targets.
2430 (Make_Attach_Call): New routine.
2431 (Make_Detach_Call): New routine.
2432 (Process_Object_Declarations): Suppress the generation of
2433 build-in-place return object clean up code on .NET/JVM since it uses
2435 * exp_ch7.ads (Make_Attach_Call): New routine.
2436 (Make_Detach_Call): New routine.
2437 * exp_intr.adb Add with and use clause for Targparm.
2438 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2439 on .NET/JVM targets.
2440 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2441 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2442 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2443 names used in finalization.
2445 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2447 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2448 (Attach, Detach): Lock the current task when chaining an object onto a
2451 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2453 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2454 Rewritten to create the message strings when the exception is not
2455 raised by an abort during finalization.
2456 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2457 Raise_From_Controlled_Operation and update its associated comment.
2458 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2459 Ada.Finalization.Heap_Management provides key functionality
2460 associated with controlled objects on the heap, their creation,
2461 finalization and reclamation. Type Finalization_Collection is
2462 effectively a wrapper which sits ontop of a storage pool and performs
2463 all necessary bookkeeping for all the objects it contains. Each
2464 access-to-controlled or access-to-class-wide type receives a collection
2465 as part of its expansion. The compiler generates buffer code and
2466 invokes Allocate / Deallocate to create and destroy allocated
2468 * a-finali.adb ("="): Removed.
2469 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2470 fields Prev and Next.
2471 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2472 A library unit with at least one controlled object on the library level
2473 has a special finalizer which is invoked by the binder. To signal this,
2474 ali files carry field PF.
2475 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2476 associated comment on field usage.
2477 * a-tags.adb (Get_RC_Offset): Removed.
2478 (Needs_Finalization): New routine.
2479 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2480 Dispatch tables now carry field Needs_Finalization which provides
2481 runtime indication whether a type is controlled or has controlled
2482 components or both. Remove field RC_Offset.
2483 (Get_RC_Offset): Removed along with its associated pragma Export.
2484 Since tagged types with controlled components no longer carry hidden
2485 field _controller, the special mechanism to retrieve its location is no
2487 (Needs_Finalization): New routine.
2488 * atree.ads, atree.adb (Elist24): New routine.
2489 (Set_Elist24): New routine.
2490 * atree.h: Add a define clause for Elist24.
2491 * bindgen.adb New library-level variable Lib_Final_Built.
2492 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2493 presence of a VM target, the routine generates calls to the proper
2494 library finalization routine.
2495 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2496 targets. Set the correct library finalization routine depending on
2497 whether the library has controlled objects or this is a VM compilation.
2498 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2499 to library-level finalizers of compiled units in reverse order of
2500 elaboration. It also produces exception management code and reraises a
2501 potential exception after all units have been finalized.
2502 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2503 library-level finalizers of compiled units in reverse order of
2505 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2506 definitions of all library-level finalizers available to the compilation
2507 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2509 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2510 System.Standard_Library.Adafinal directly. If the library needs
2511 finalization actions, create the sequence of finalization calls.
2512 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2513 Generate a with clause for System.Soft_Links when compiling for a VM.
2514 Remove the code which imports System.Standard_Library.Adafinal as
2515 Do_Finalize. Generate the library finalization routine.
2516 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2517 If the library needs finalization actions, create all the definitions
2518 of library- level finalizers.
2519 (Has_Finalizer): New routine. Determines whether at least one compiled
2520 unit has a library-level finalizer.
2521 Add type Qualification_Mode.
2522 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2523 * einfo.adb: New usage of field 15 as Return_Flag.
2524 Remove Finalization_Chain_Entity from the usages of field 19.
2525 Remove Associated_Final_Chain from the usages of field 23.
2526 New usage of field 23 as Associated_Collection.
2527 New usage of field 24 as Finalizer.
2528 New usage of flag 252 as Is_Processed_Transient.
2529 (Associated_Final_Chain): Removed.
2530 (Associated_Collection): New routine.
2531 (Finalization_Chain_Entity): Removed.
2532 (Finalizer): New routine.
2533 (Is_Finalizer): New routine.
2534 (Is_Processed_Transient): New routine.
2535 (Return_Flag): New routine.
2536 (Set_Associated_Final_Chain): Removed.
2537 (Set_Associated_Collection): New routine.
2538 (Set_Finalization_Chain_Entity): Removed.
2539 (Set_Finalizer): New routine.
2540 (Set_Is_Processed_Transient): New routine.
2541 (Set_Return_Flag): New routine.
2542 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2544 (Write_Field8_Name): Alphabetize the output.
2545 (Write_Field11_Name): Alphabetize the output.
2546 (Write_Field12_Name): Alphabetize the output.
2547 (Write_Field13_Name): Alphabetize the output.
2548 (Write_Field14_Name): Alphabetize the output.
2549 (Write_Field15_Name): Alphabetize the output.
2550 (Write_Field16_Name): Alphabetize the output.
2551 (Write_Field17_Name): Alphabetize the output.
2552 (Write_Field18_Name): Alphabetize the output.
2553 (Write_Field19_Name): Alphabetize the output. Remove the output of
2554 Finalization_Chain_Entity.
2555 (Write_Field20_Name): Alphabetize the output.
2556 (Write_Field21_Name): Alphabetize the output.
2557 (Write_Field22_Name): Alphabetize the output.
2558 (Write_Field23_Name): Alphabetize the output. Remove the output of
2559 Associated_Final_Chain. Add output for Associated_Collection.
2560 (Write_Field24_Name): Alphabetize the output.
2561 (Write_Field25_Name): Add output for Finalizer.
2562 (Write_Field26_Name): Alphabetize the output.
2563 (Write_Field27_Name): Alphabetize the output.
2564 (Write_Field28_Name): Alphabetize the output.
2565 * einfo.ads: Add new field description for Associated_Collection and
2567 Remove Associated_Final_Chain and its uses in nodes.
2568 Remove Finalization_Chain_Entity and its uses in nodes.
2569 Add new field description for Finalizer and its uses in nodes.
2570 Add new synthesized attribute Is_Finalizer.
2571 Add new flag description for Is_Processed_Transient and its uses in
2573 Add new field description for Return_Flag and its uses in nodes.
2574 (Associated_Final_Chain): Removed along with its pragma Inline.
2575 (Associated_Collection): New routine and pragma Inline.
2576 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2577 (Finalizer): New routine and pragma Inline.
2578 (Is_Finalizer): New routine and pragma Inline.
2579 (Is_Processed_Transient): New routine and pragma Inline.
2580 (Return_Flag): New routine and pragma Inline.
2581 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2582 (Set_Associated_Collection): New routine and pragma Inline.
2583 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2584 (Set_Finalizer): New routine and pragma Inline.
2585 (Set_Is_Processed_Transient): New routine and pragma Inline.
2586 (Set_Return_Flag): New routine and pragma Inline.
2587 * exp_aggr.adb: Alphabetize subprograms.
2588 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2589 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2590 associated comments. Remove local variables External_Final_List and
2592 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2593 Ancestor. Remove the retrieval of finalization lists. Update the call to
2595 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2596 lists. Update the call to Late_Expansion.
2597 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2598 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2599 (Gen_Assign): Remove the retrieval of the finalization list used to
2600 build the assignment. Update the calls to Make_Init_Call and
2602 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2603 Remove the mechanism to determine attachment levels and finalization
2604 list retrieval. Remove the processing for coextensions.
2605 (Init_Controller): Removed. Controllers no longer exist.
2606 (Late_Expansion): Remove formals Flist and Obj along with their
2607 associated comments. Update the calls to Build_Record_Aggr_Code and
2608 Build_Array_Aggr_Code.
2609 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2610 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2611 appear in entry bodies, protected subprograms and task bodies.
2612 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2613 * exp_ch3.adb (Add_Final_Chain): Removed.
2614 (Build_Array_Init_Proc): Alphabetize local variables.
2615 (Build_Assignment): Alphabetize local variables. Update the call to
2617 (Build_Class_Wide_Master): Rename local variables to better reflect
2619 (Build_Discriminant_Assignments): Code reformatting.
2620 (Build_Init_Call_Thru): Code reformatting.
2621 (Build_Init_Procedure): Code reformatting. Generate a special version
2622 of Deep_Finalize which is capable of finalizing all initialized
2623 components and ignore the rest.
2624 (Build_Init_Statements): Rename local variables to better reflect their
2626 Reimplement the mechanism to include the creation and update of an index
2627 variable called a "counter". It is used as a bookmark for tracing
2628 initialized and non-initialized components.
2629 (Build_Initialization_Call): Remove local variable Controller_Typ.
2630 Alphabetize all local variables. Remove the initialization of the
2631 record controller and update the call to Make_Init_Call.
2632 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2633 New local variable Counter.
2634 (Constrain_Array): Alphabetize.
2635 (Expand_Freeze_Array_Type): Create a collection instead of a
2637 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2638 Finalize_Address which is used in conjunction with allocated controlled
2640 (Expand_N_Object_Declaration): Remove the creation of a finalization
2641 list for anonymous access types. Update the calls to Make_Init_Call and
2643 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2644 retrieval of finalization lists. Remove the expansion of the record
2645 controller. Create TSS primitive Finalize_Address used in conjunction
2646 with controlled objects on the heap. Create finalization collections
2647 for access-to-controlled record components.
2648 (Expand_Record_Controller): Removed.
2649 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2650 class-wide types now requires additional processing. Create
2651 finalization collections for access-to-controlled types.
2652 (Increment_Counter): New routine.
2653 (Make_Counter): New routine.
2654 (Make_Eq_If): Remove the mention of Name_uController.
2655 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2656 types coming from System.Finalization_Root.
2657 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2658 (Predefined_Primitive_Bodies): There is no longer need to skip types
2659 coming from System.Finalization_Root.
2660 (Stream_Operation_OK): Do not generate stream routines for
2661 type Ada.Finalization.Heap_Management.Finalization_Collection.
2662 * exp_ch3.ads: Alphabetize subprograms.
2663 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2664 Add with and use clause for Lib.
2665 (Complete_Coextension_Finalization): Removed.
2666 (Complete_Controlled_Allocation): New routine. Create a finalization
2667 collection for anonymous access-to-controlled types. Create a custom
2668 Allocate which interfaces with the back end and the machinery in
2670 (Expand_Allocator_Expression): Add necessary calls to
2671 Complete_Controlled_Allocation. Remove the retrieval of finalization
2672 lists. Update the calls to Make_Adjust_Call. Generate a call to
2673 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2674 the associated collection.
2675 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2676 Code clean up. Remove the retrieval of finalization lists and
2678 Update the call to Make_Init_Call. Generate a call to
2679 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2680 the associated collection.
2681 (Get_Allocator_Final_List): Removed. Finalization lists are not
2683 (Suitable_Element): Remove the mention of Name_uController.
2684 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2685 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2686 the left hand side, carry out the assignment and adjust the left hand
2688 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2689 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2690 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2691 BIP_Collection and BIPcollection.
2692 (Build_Heap_Allocator): New routine used to allocate the return object
2693 of a build-in-place function onto a collection.
2694 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2695 (Expand_Call): Do not replace direct calls to Deep routines with their
2697 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2698 and update their occurrences. Add a special return flag to monitor the
2699 [ab]normal execution of the function. The flag is set right before the
2701 Rewrite the mechanism used to allocate a build-in-place return object
2702 on the heap or on a storage pool.
2703 (Is_Direct_Deep_Call): New routine.
2704 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2705 build-in-place function call instead of a final list. Build a call to
2706 Set_Finalize_Address_Ptr to decorate the associated collection.
2707 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2708 order to name the build-in-place function call's result for later
2709 finalization. Add a collection to a build-in-place function call
2710 instead of a final list.
2711 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2712 build-in-place function call instead of a final list. Remove the code
2713 which moves one final list and transforms it into the actual in a
2714 nested build-in-place call.
2715 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2716 build-in-place function call instead of a final list.
2717 (Move_Final_List): Removed.
2718 (Needs_BIP_Collection): New routine.
2719 (Needs_BIP_Final_List): Removed.
2720 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2721 enumeration type BIP_Formal_Kind.
2722 Update the related comment.
2723 (Needs_BIP_Collection): New routine.
2724 (Needs_BIP_Final_List): Removed.
2725 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2726 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2727 majority of subprograms in this unit. Add Name_Finalize_Address to
2728 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2729 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2730 statements for an array type.
2731 (Build_Adjust_Statements): Create the adjust statements for a record
2733 (Build_Cleanup_Statements): New routine. A procedure which given any
2734 construct containing asynchronous calls, references to _master, or is a
2735 task body, a task allocation or a protected body produces the necessary
2736 runtime calls to clean up these constructs.
2737 (Build_Exception_Handler): New routine.
2738 (Build_Final_List): Removed.
2739 (Build_Finalization_Collection): New routine. A core procedure which
2740 creates a collection to service heap allocated controlled objects
2741 associated with an access-to-controlled type.
2742 (Build_Finalize_Statements): Create the finalization statements for a
2744 (Build_Finalizer): New routine. A core procedure which given any
2745 construct with declarations and/or statements detects all objects which
2746 need any type of clean up (controlled objects, protected objects) and
2747 generates all necessary code to clean up the said objects in the proper
2749 (Build_Finalizer_Call): New routine.
2750 (Build_Initialize_Statements): Create the initialization statements for
2751 an array type. The generated routine contains code to finalize partially
2753 (Build_Object_Declarations): New routine.
2754 (Build_Raise_Statement): New routine.
2755 (Clean_Simple_Protected_Objects): Removed.
2756 (Controller_Component): Removed.
2757 (Enclosing_Function): New routine.
2758 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2759 either declarations or statements or both.
2760 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2761 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2763 (Find_Final_List): Removed.
2764 (Global_Flist_Ref): Removed.
2765 (In_Finalization_Root): Removed.
2766 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2767 scope in terms of tree nodes. Process all transient variables within
2769 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2770 generated after the adjust.
2771 (Make_Attach_Call): Removed.
2772 (Make_Call): New routine.
2773 (Make_Clean): Removed.
2774 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2776 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2778 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2780 (Make_Final_Call): Modified to simply create a call to either
2781 Deep_Finalize or Finalize.
2782 (Make_Finalize_Address_Body): New routine.
2783 (Make_Finalize_Address_Stmts): New routine. A function which produces
2784 TSS primitive Finalize_Address used in conjunction with heap allocated
2786 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2787 (Make_Init_Call): Rewritten. There is no longer an attach call
2788 generated after initialization.
2789 (Make_Local_Deep_Finalize): New routine.
2790 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2791 (Make_Transient_Block): Remove the finalization list retrieval and
2793 (Needs_Finalization): Moved to Exp_Util.
2794 (Parent_Field_Type): New routine.
2795 (Preprocess_Components): New routine.
2796 (Process_Transient_Objects): New routine.
2797 (Wrap_HSS_In_Block): New routine.
2798 (Wrap_Transient_Declaration): Remove finalization list management and
2799 controller insertion.
2800 (Wrap_Transient_Expression): Code reformatting.
2801 (Wrap_Transient_Statement): Code reformatting.
2802 * exp_ch7.ads (Build_Final_List): Removed.
2803 (Build_Finalization_Collection): New routine.
2804 (Build_Raise_Statement): New routine.
2805 (Controller_Component): Removed.
2806 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2807 (Find_Final_List): Removed.
2808 (In_Finalization_Root): Removed.
2809 (Is_Simple_Protected_Type): Update related comment.
2810 (Make_Adjust_Call): New parameter profile and associated comments.
2811 (Make_Attach_Call): Removed.
2812 (Make_Final_Call): New parameter profile and associated comments.
2813 (Make_Finalize_Address_Body): New routine.
2814 (Make_Init_Call): New parameter profile and associated comments.
2815 (Make_Local_Deep_Finalize): New routine.
2816 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2817 (Needs_Finalization): Moved to Exp_Util.
2818 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2819 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2820 (Find_Protection_Type): Moved to Exp_Util.
2821 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2822 (Make_DT): Update sequence of dispatch table initialization. Remove the
2823 initialization of field RC_Offset. Add initialization of field Needs_
2825 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2826 Reimplement how an object is first finalized, then deallocated.
2827 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2829 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2830 Register TSS_Finalize_Address with type TSS_Names.
2831 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2832 procedure provides the interface between an allocation / deallocation
2833 and the support machinery in Ada.Finalization.Heap_Management.
2834 (Find_Init_Call): Code reformatting.
2835 (Find_Init_Call_In_List): Code reformatting.
2836 (Find_Protection_Type): Moved from Exp_Ch9.
2837 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2838 (Has_Controlled_Coextensions): Removed.
2839 (Has_Controlled_Objects): New routine.
2840 (In_Library_Level_Package_Body): New routine.
2841 (Insert_Action_After): New routine.
2842 (Is_Finalizable_Transient): New routine. This predicate determines
2843 whether an object declaration is one of the many variants of controlled
2845 (Is_Null_Access_BIP_Func_Call): New routine.
2846 (Is_Non_BIP_Func_Call): New routine.
2847 (Is_Related_To_Func_Return): New routine.
2848 (Needs_Finalization): Moved from Exp_Ch7.
2849 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2850 (Find_Protection_Type): Moved from Exp_Ch9.
2851 (Has_Controlled_Coextensions): Removed.
2852 (Has_Controlled_Objects): New routine.
2853 (In_Library_Level_Package_Body): New routine.
2854 (Insert_Action_After): New routine.
2855 (Is_Finalizable_Transient): New routine.
2856 (Is_Null_Access_BIP_Func_Call): New routine.
2857 (Is_Non_BIP_Func_Call): New routine.
2858 (Is_Related_To_Func_Return): New routine.
2859 (Needs_Finalization): Moved from Exp_ch7.
2860 * expander.adb (Expand): Add a case for N_Free_Statement.
2861 * freeze.adb (Freeze_All): Replace the generation of a finalization
2862 list with a collection for access-to-controlled types.
2863 (Freeze_Entity): Code reformatting.
2864 (Freeze_Record_Type): Remove the freezing of a record controller
2866 (Freeze_Subprogram): Code reformatting.
2867 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2869 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2870 has a library-level finalizer.
2871 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2872 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2873 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2874 files. Add a-fihema to the list of object files.
2876 Alphabetize the associations in type Is_Parameterless_Attribute.
2877 * rtsfind.ads: Ada.Finalization_List.Controller and
2878 System.Finalization_Implementation are no longer a GNAT unit.
2879 Update the range of type Ada_Finalization_Child. Remove the following
2880 recoverable entities:
2882 RE_Attach_To_Final_List
2886 RE_Finalizable_Ptr_Ptr
2887 RE_Global_Final_List
2888 RE_Limited_Record_Controller
2891 RE_Record_Controller
2892 RE_Simple_List_Controller
2894 Add the following recoverable entities:
2896 RE_Add_Offset_To_Address
2900 RE_Exception_Identity
2901 RE_Finalization_Collection
2902 RE_Finalization_Collection_Ptr
2903 RE_Needs_Finalization
2904 RE_Save_Library_Occurrence
2905 RE_Set_Finalize_Address_Ptr
2906 RE_Set_Storage_Pool_Ptr
2908 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
2910 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
2911 (First_Stored_Discriminant): Remove the mention of Name_uController.
2912 * sem_aux.ads: Comment reformatting.
2913 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
2914 to redecorate an already existing class-wide type.
2915 (Decorate_Tagged_Type): New parameter profile and associated comment.
2916 Create a "shadow class-wide type" for a shadow entity.
2917 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
2918 of the final chain along with the associated comment.
2919 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
2920 Full_Desig and set it to the full view of the designated type.
2921 Initialize the finalization collection to empty.
2922 (Build_Derived_Record_Type): Alphabetize local variables. Code
2924 (Collect_Fixed_Components): Remove the mention of Name_uController.
2925 (Create_Constrained_Components): Remove the mention of Name_uController.
2926 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
2927 class-wide type of a shadow entity.
2928 (Process_Full_View): Update the machinery which marks type
2929 Limited_Controlled's entity as limited.
2930 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
2931 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
2932 list, instead make a collection build-in-place formal.
2933 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
2934 a designated type in order to establish a match between the renaming
2935 and the renamed entity.
2936 (Find_Selected_Component): Add guard to prevent spurious exceptions
2937 from being raised on .NET/JVM.
2938 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
2939 to the list of primitive that need special processing. Update arrays
2940 C_Names and D_Names.
2941 (Replace_Types): Handle class-wide types.
2942 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
2943 different parameter profile, look at the first formal.
2944 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
2945 use clauses for Exp_Util.
2946 * sem_res.adb: Remove with and use clauses for Elists.
2947 (Propagate_Coextensions): Removed.
2948 (Resolve_Allocator): Do not propagate the list of coextensions from one
2949 allocator to another.
2950 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
2951 Deaccessed_T to Desig_Typ.
2952 (Enter_Name): Remove the mention of Name_uController.
2953 (Gather_Components): Remove the mention of Name_uController.
2954 (Incomplete_Or_Private_View): New routine.
2955 (Is_Coextension_Root): Removed.
2956 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
2957 * sem_util.ads (Incomplete_Or_Private_View): New routine.
2958 (Is_Coextension_Root): Removed.
2959 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
2960 Controlled types are now derived from a null tagged record. Remove
2961 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
2962 * sinfo.adb (Coextensions): Removed.
2963 (Set_Coextensions): Removed.
2964 * sinfo.ads: Remove Coextensions from the explanation of node fields
2965 and its uses in nodes.
2966 Update the field usage of N_Allocator.
2967 (Coextensions): Removed along with its pragma Inline.
2968 (Set_Coextensions): Removed along with its pragma Inline.
2969 * snames.ads-tmpl: Remove names
2974 Name_uLocal_Final_List
2975 Name_Finalization_Root
2982 Name_Finalize_Address
2983 * s-pooglo.adb (Allocate): Add overriding indicator.
2984 (Deallocate): Add overriding indicator.
2985 (Storage_Size): Add overriding indicator.
2986 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
2987 than Finalize_Global_List.
2988 (Null_Finalize_Global_List): Removed.
2989 (Save_Library_Occurrence): New routine.
2990 * s-soflin.ads: Remove variable Finalize_Global_List along with its
2991 initialization. Add variable Finalize_Library_Objects along with its
2992 pragma Export. Add variables Library_Exception and
2993 Library_Exception_Set along with their pragma Export.
2994 (Null_Finalize_Global_List): Removed.
2995 (Save_Library_Occurrence): New routine.
2996 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
2997 rather than Finalize_Global_List.
2998 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
2999 of the constructed node.
3001 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3003 * link.c: Include "auto-host.h" before system headers.
3005 2011-08-03 Vincent Celier <celier@adacore.com>
3007 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3008 that are not extended. Do not check if a library project that is
3009 extended should be regenerated. Do not add to table Library_Paths the
3010 libraries that are in extended projects. Link only with libraries that
3011 are in libray projects that are not extended.
3012 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3013 for a library project that is extended.
3015 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3017 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3018 conforming subprogram renamings that appear to be completions if they
3019 are not fully conformant.
3020 Such renamings are homographs but not completions.
3021 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3022 names in a subprogram renaming that appears in an instance.
3024 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3026 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3027 not immutably limited, build actual subtype from expression to provide
3028 proper bounds to caller.
3030 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3032 * sem_ch8.adb: Minor comment correction.
3034 2011-08-03 Thomas Quinot <quinot@adacore.com>
3036 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3037 returning a limited array, use an extended return statement.
3039 2011-08-03 Vincent Celier <celier@adacore.com>
3041 * make.adb (Initialize): If --subdirs= is used, but no project file is
3042 specified, attempt to create the specify subdir if it does not already
3043 exist and use it as the object directory as if -D had been specified.
3045 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3047 * s-tpopsp-vms.adb: New file.
3048 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3049 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3051 2011-08-03 Emmanuel Briot <briot@adacore.com>
3053 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3056 2011-08-03 Yannick Moy <moy@adacore.com>
3058 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3059 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3060 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3061 detect that an array has static bounds.
3063 2011-08-03 Thomas Quinot <quinot@adacore.com>
3065 * exp_dist.adb: Minor reformatting.
3067 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3069 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3070 (ATCB_Key): Removed, not always used.
3072 2011-08-03 Emmanuel Briot <briot@adacore.com>
3074 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3075 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3076 most remaining global variables.
3078 2011-08-03 Robert Dewar <dewar@adacore.com>
3080 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3081 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3084 2011-08-03 Javier Miranda <miranda@adacore.com>
3086 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3087 that must be passed by copy in VM targets.
3089 2011-08-03 Emmanuel Briot <briot@adacore.com>
3091 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3092 duplicates a similar htable now in the project tree.
3094 2011-08-03 Claire Dross <dross@adacore.com>
3096 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3097 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3098 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3099 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3100 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3101 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3102 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3105 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3107 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3108 (ATCB_Key): Removed, not always used.
3109 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3111 * s-tpopsp-tls.adb: New file.
3112 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3113 x86/x64/ia64/powerpc/sparc Linux.
3115 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3117 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3118 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3120 2011-08-03 Thomas Quinot <quinot@adacore.com>
3122 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3123 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3124 Fix type selection for mapping integer types to PolyORB types.
3126 2011-08-03 Bob Duff <duff@adacore.com>
3128 * sem_ch7.adb: Minor comment clarification.
3130 2011-08-03 Bob Duff <duff@adacore.com>
3132 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3133 an error analyzing a choice, skip further processing. Further
3134 processing could cause a crash or cascade errors.
3136 2011-08-03 Emmanuel Briot <briot@adacore.com>
3138 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3139 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3140 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3141 prj-env.ads (Shared_Project_Tree_Data): new type
3142 An aggregate project and its aggregated trees need to share the common
3143 data structures used for lists of strings, packages,... This makes the
3144 code simpler since otherwise we have to pass the root tree (also used
3145 for the configuration file data) in addition to the current project
3146 tree. This also avoids ambiguities as to which tree should be used.
3147 And finally this saves a bit of memory.
3148 (For_Every_Project_Imported): new parameter Tree.
3149 Since aggregated projects are using a different tree, we need to let
3150 the caller know which tree to use to manipulate the returned project.
3152 2011-08-03 Robert Dewar <dewar@adacore.com>
3154 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3155 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3156 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3157 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3159 2011-08-03 Javier Miranda <miranda@adacore.com>
3161 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3162 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3164 2011-08-03 Bob Duff <duff@adacore.com>
3166 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3169 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3171 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3172 g-sehash.ads: Fix typo. Update header.
3174 2011-08-03 Thomas Quinot <quinot@adacore.com>
3176 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3179 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3181 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3182 prefixes of private types along with records, since the selector may be
3184 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3185 private types along with records, since the selector may be a
3188 2011-08-03 Emmanuel Briot <briot@adacore.com>
3190 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3192 2011-08-03 Javier Miranda <miranda@adacore.com>
3194 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3195 Tagged_Type_Expansion.
3197 2011-08-03 Yannick Moy <moy@adacore.com>
3200 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3201 concatenation is the name of a constant
3203 2011-08-03 Emmanuel Briot <briot@adacore.com>
3205 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3206 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3207 (Process_Declarative_Items): new parameter Child_Env.
3209 2011-08-03 Yannick Moy <moy@adacore.com>
3211 * alfa.ads Update format of ALFA section in ALI file in order to add a
3212 mapping from bodies to specs when both are present
3213 (ALFA_Scope_Record): add components for spec file/scope
3214 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3216 (Collect_ALFA): after all scopes have been collected, fill in the spec
3217 information when relevant
3218 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3221 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3223 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3224 code unit to decide whether to add internally generated subprograms.
3226 2011-08-03 Javier Miranda <miranda@adacore.com>
3228 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3230 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3233 2011-08-03 Emmanuel Briot <briot@adacore.com>
3235 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3236 code with Makeutl.Get_Switches.
3237 * prj-tree.adb: Update comment.
3239 2011-08-03 Thomas Quinot <quinot@adacore.com>
3241 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3242 subprogram with a limited formal that does not support external
3245 2011-08-03 Yannick Moy <moy@adacore.com>
3247 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3249 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3250 not from current unit in two phases, because it is not possible to
3251 change the table while iterating over its content.
3252 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3254 2011-08-03 Sergey Rybin <rybin@adacore.com>
3256 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3257 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3259 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3261 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3262 and the component type is composite, this is ambiguous for predefined
3263 concatenation, but if the node is not overloaded and the entity is a use
3264 -defined function its profile can be used to resolve that aggregate.
3266 2011-08-03 Robert Dewar <dewar@adacore.com>
3268 * exp_ch4.adb: Minor code cleanup.
3270 2011-08-03 Thomas Quinot <quinot@adacore.com>
3272 * exp_dist.adb: Do not generate distribution stubs if serious errors
3273 have been diagnosed.
3275 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3277 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3278 the first formal of a primitive operation, go to the base type to
3279 handle properly an access to a derived type with constrained
3281 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3282 user-defined function that is only use-visible.
3284 2011-08-03 Robert Dewar <dewar@adacore.com>
3286 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3287 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3288 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3289 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3290 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3291 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3292 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3293 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3295 2011-08-03 Robert Dewar <dewar@adacore.com>
3297 * repinfo.adb (List_Mechanism): Add handling of
3298 Convention_Ada_Pass_By_XXX.
3299 * sem_mech.adb (Set_Mechanism): Ditto.
3300 * sem_prag.adb (Process_Convention): Add entries for
3301 Convention_Ada_Pass_By_XXX.
3302 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3304 2011-08-03 Pascal Obry <obry@adacore.com>
3306 * makeutl.adb: Minor reformatting.
3308 2011-08-03 Vincent Celier <celier@adacore.com>
3311 (Get_File_Name) If the file cannot be found when there are no config
3312 pragmas file and May_Fail is True, return No_File instead of the file
3313 name, to be consistent.
3315 2011-08-03 Pascal Obry <obry@adacore.com>
3317 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3320 2011-08-03 Javier Miranda <miranda@adacore.com>
3323 (Same_Representation): In VM targets the representation of arrays with
3324 aliased components differs from arrays with non-aliased components.
3326 2011-08-03 Emmanuel Briot <briot@adacore.com>
3328 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3329 not systematically lower case attribute indexes that contain no "."
3330 Fix definition of several Naming attributes, which take
3331 a unit name as index and therefore should be case insensitive.
3332 Minor refactoring (reduce length of variable names).
3334 2011-08-03 Emmanuel Briot <briot@adacore.com>
3336 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3338 2011-08-03 Emmanuel Briot <briot@adacore.com>
3340 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3341 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3342 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3343 prj-tree.ads (Prj.Tree.Environment): new type.
3345 2011-08-03 Emmanuel Briot <briot@adacore.com>
3347 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3348 prj-tree.adb, prj-tree.ads (Environment): new type.
3350 2011-08-03 Emmanuel Briot <briot@adacore.com>
3352 * prj-tree.ads: Remove unused variable.
3354 2011-08-03 Yannick Moy <moy@adacore.com>
3356 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3357 issuing messages related to SPARK restriction violation.
3359 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3361 * sem_ch6.adb: guard against error nodes in return statements.
3363 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3365 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3366 a warning can only appear on a configuration file, so emit warning
3367 without further checks.
3369 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3371 * s-interr.ads: add overriding keyword.
3373 2011-08-03 Geert Bosch <bosch@adacore.com>
3375 * exp_attr.adb: Fix minor typo.
3377 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3379 * par-ch4.adb: improve error recovery.
3381 2011-08-03 Emmanuel Briot <briot@adacore.com>
3383 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3384 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3387 2011-08-03 Emmanuel Briot <briot@adacore.com>
3389 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3390 "external" as an attribute name in aggregate projects.
3392 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3394 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3395 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3396 from 0, so we need to adjust.
3398 2011-08-03 Emmanuel Briot <briot@adacore.com>
3400 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3401 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3403 2011-08-03 Yannick Moy <moy@adacore.com>
3405 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3406 restriction on overloaded entity if the entity is not an operator.
3408 2011-08-03 Yannick Moy <moy@adacore.com>
3410 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3411 restrict.ads: Rename remaining Check_Formal_Restriction* into
3412 Check_SPARK_Restriction*.
3414 2011-08-03 Emmanuel Briot <briot@adacore.com>
3416 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3417 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3419 (Project_Empty): removed
3420 (Empty_Project): new parameter Qualifier
3421 This is used to have fields specific to aggregate projects, cleaner
3422 New field to store the list of aggregated projects.
3423 (Check_Aggregate_Project): removed
3424 (Process_Aggregated_Projects, Free): new subprograms.
3426 2011-08-03 Olivier Hainque <hainque@adacore.com>
3428 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3430 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3432 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3433 explicit dereference of an unconstrained type, create a constrained
3434 subtype for it, as is done for function calls that return an
3437 2011-08-03 Thomas Quinot <quinot@adacore.com>
3439 * g-pehage.adb (Finalize): Avoid possible double-free.
3441 2011-08-03 Steve Baird <baird@adacore.com>
3443 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3444 Elab_Spec/Body attrs in CodePeer_Mode.
3446 2011-08-03 Javier Miranda <miranda@adacore.com>
3448 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3449 low bound is not known at compile time but they have no others choice.
3450 Done because in this case the bounds can be obtained directly from the
3453 2011-08-03 Ed Falis <falis@adacore.com>
3455 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3456 on VxWorks SMP. Remove unusable constant ANY_CPU.
3458 2011-08-03 Emmanuel Briot <briot@adacore.com>
3460 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3461 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3462 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3463 Prj.Env.Initialize_Empty): new subprograms
3464 (Get_Env, Find_Project): remove parameter Target_Name.
3466 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3468 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3469 as a condition for the delayed call to Derived_Subprograms done for the
3470 case of the rewriting of a derived type that constrains the
3471 discriminants of its parent type.
3472 Avoids redundant subprogram derivations for private subtype derivations.
3474 2011-08-03 Javier Miranda <miranda@adacore.com>
3476 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3477 Build_Record_Aggr_Code.
3478 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3479 discriminants in extension aggregates.
3481 2011-08-03 Emmanuel Briot <briot@adacore.com>
3483 * prj-pp.adb (Print): also output project qualifiers, since in
3484 particular "aggregate" is mandatory in an aggregate project.
3486 2011-08-03 Emmanuel Briot <briot@adacore.com>
3488 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3489 (Debug_Output): new function.
3491 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3493 * gnat_ugn.texi: Document -Wstack-usage.
3494 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3496 2011-08-03 Thomas Quinot <quinot@adacore.com>
3498 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3499 have keyword LIMITED.
3501 2011-08-03 Yannick Moy <moy@adacore.com>
3503 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3504 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3505 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3506 section (does not happen in compiler, only if code directly calls
3508 * get_alfa.adb, get_alfa.ads: New files.
3509 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3511 * lib-xref-alfa.adb: New file.
3512 * lib-xref.adb, lib-xref.ads
3513 (Xref_Entry): redefine information needed in cross-references for ALFA.
3514 Push ALFA treatments in separated local package.
3515 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3516 identifiers. Return entity of package body instead of spec. Return
3517 Empty for a scope with no location.
3518 (Generate_Reference): adapt to new components for ALFA information.
3519 Remove the need for D references on definitions.
3520 (Is_Local_Reference): moved to ALFA local package
3521 (Output_References): extract subfunction as Extract_Source_Name
3522 (Output_Local_References): remove procedure, replaced by filtering of
3523 cross-references in package ALFA and printing in Put_ALFA.
3524 (Write_Entity_Name): remove procedure
3525 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3526 print exact name of entity as it appears in source file
3527 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3528 * put_alfa.adb, put_alfa.ads: New files.
3529 * xref_lib.adb (Search_Xref): protect read of cross-references against
3530 reading other sections of the ALI file, in gnatxref
3531 (Search): protect read of cross-references against reading other
3532 sections of the ALI file, in gnatfind.
3533 * gcc-interface/Make-lang.in: Update dependencies.
3535 2011-08-03 Thomas Quinot <quinot@adacore.com>
3537 * sem_ch3.adb: Minor reformatting.
3539 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3541 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3542 raising an exception.
3544 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3546 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3547 type, always use 1 as the lower bound or string, even if lower bound of
3548 context is not static, to handle properly null strings in a non-static
3551 2011-08-03 Bob Duff <duff@adacore.com>
3553 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3554 always legal on the right-hand side of an assignment statement; there
3555 is always an applicable index constraint in this case. Therefore, the
3556 check for Pkind = N_Assignment_Statement is now unconditional -- it
3557 doesn't depend on whether Is_Constrained (Typ).
3559 2011-08-03 Robert Dewar <dewar@adacore.com>
3561 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3563 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3565 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3566 for an itype created within a generic unit.
3568 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3570 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3571 suppresses all inlining.
3573 2011-08-03 Robert Dewar <dewar@adacore.com>
3575 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3576 exp_aggr.adb: Minor reformatting.
3578 2011-08-03 Thomas Quinot <quinot@adacore.com>
3580 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3581 tagged assignment when discriminant checks are suppressed. This is
3582 useless and extremely costly in terms of static stack usage.
3584 2011-08-03 Bob Duff <duff@adacore.com>
3586 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3587 of generics, because this leads to the wrong entity in the wrong scope,
3588 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3590 (Process_Interface_Name): Follow Alias for instances of generics, to
3591 correct for the above change.
3593 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3595 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3596 is an integer literal it is always safe to replace the reference. In
3597 addition, if the reference appears in the generated code for an object
3598 declaration it is necessary to copy because otherwise the reference
3599 might be to the uninitilized value of the discriminant of the object
3602 2011-08-03 Pascal Obry <obry@adacore.com>
3604 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3605 ACL used, in this case we want to check for ending .exe, not .exe
3606 anywhere in the path.
3608 2011-08-03 Sergey Rybin <rybin@adacore.com>
3610 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3611 the tree structure (semantic decoration of references to record
3614 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3616 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3617 choices of a named array aggregate, bail out when any choices are
3618 marked as Errors_Posted.
3620 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3622 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3623 in which entity is frozen, to handle properly loop variables in
3626 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3628 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3629 subtype is not static, compute the upper bound using attributes, to
3630 handle properly index types that are not integer types.
3632 2011-08-03 Bob Duff <duff@adacore.com>
3634 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3635 Update copyright notice.
3637 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3639 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3640 Original_Discriminant if within an instance.
3641 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3643 2011-08-03 Thomas Quinot <quinot@adacore.com>
3645 * einfo.ads: Minor reformatting.
3647 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3649 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3650 composite type with an unfrozen subcomponent, in the profile of a
3651 primitive operation.
3653 2011-08-03 Robert Dewar <dewar@adacore.com>
3655 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3657 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3659 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3660 unconstrained type with discriminants is initialized with an aggregate,
3661 use the constrained subtype of the aggregate as the type of the object,
3662 because it is immutable, and this allows the back-end to generate no
3663 code for the object declaration.
3665 2011-08-03 Robert Dewar <dewar@adacore.com>
3667 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3668 comparison operand is variable, and turns out to be zero or negative.
3670 2011-08-03 Javier Miranda <miranda@adacore.com>
3673 (Expand_Dispatching_Constructor_Call): Disable expansion of
3674 code required for native targets. Done to avoid generating
3675 references to unavailable runtime entities in VM targets.
3677 (Expand_N_Object_Declaration): Add missing support to handle
3678 the explicit initialization of class-wide interface objects.
3681 2011-08-03 Matthew Heaney <heaney@adacore.com>
3683 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3685 2011-08-03 Matthew Heaney <heaney@adacore.com>
3687 * a-cbdlli.adb (Splice): move source items from first to last
3689 2011-08-03 Yannick Moy <moy@adacore.com>
3691 * sem_util.ads: comment added.
3693 2011-08-03 Javier Miranda <miranda@adacore.com>
3696 (Expand_Record_Aggregate): In VM targets disable the expansion into
3697 assignments of aggregates whose type is not known at compile time.
3699 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3701 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3702 protected entries and task entries, to build the proper renaming
3703 declaration for entry formals, used in debugging.
3704 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3705 parameters in the same way.
3707 2011-08-02 Robert Dewar <dewar@adacore.com>
3709 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3710 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3711 code reorganization.
3713 2011-08-02 Robert Dewar <dewar@adacore.com>
3715 * debug.adb: Debug flag d.P to suppress length comparison optimization
3716 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3717 comparison of Length by comparing First/Last instead.
3719 2011-08-02 Matthew Heaney <heaney@adacore.com>
3721 * a-cobove.ads: Code clean up.
3723 2011-08-02 Vincent Celier <celier@adacore.com>
3725 * adaint.c (file_names_case_sensitive_cache): New static int.
3726 (__gnat_get_file_names_case_sensitive): Cache the return value in
3727 file_names_case_sensitive_cache at the first invocation, to avoid
3728 multiple calls to getenv.
3730 2011-08-02 Bob Duff <duff@adacore.com>
3732 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3734 2011-08-02 Yannick Moy <moy@adacore.com>
3736 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3737 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3738 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3739 indicate that we are in a precondition or postcondition. This is used in
3740 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3741 decide whether to flag the spec or body of the current subprogram as
3744 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
3746 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3748 * a-extiin.ads: New file.
3750 2011-08-02 Bob Duff <duff@adacore.com>
3752 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3753 now raises Name_Error instead of Use_Error in certain cases. The other
3754 parts of this AI were already implemented properly.
3756 2011-08-02 Vincent Celier <celier@adacore.com>
3758 * link.c: Only import "auto-host.h" when building the gnattools.
3760 2011-08-02 Yannick Moy <moy@adacore.com>
3762 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3763 which calls a local subprogram, so extract subprogram
3764 from Mark_Non_ALFA_Subprogram_Body.
3766 2011-08-02 Javier Miranda <miranda@adacore.com>
3769 (Extract_Dispatching_Call): If the type of the dispatching object is an
3770 access type then return an explicit dereference in the Object out-mode
3773 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3775 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3776 compatibility checks for all indexes of an array subtype, not just the
3777 first. Reset Has_Dynamic_Range_Check on the subtype before each
3778 potential check to ensure that Insert_Range_Checks will not elide any
3779 of the dynamic checks.
3781 2011-08-02 Yannick Moy <moy@adacore.com>
3783 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3784 SPARK restriction at parsing time.
3785 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3786 directive only if the SPARK restriction is set for this unit.
3788 2011-08-02 Yannick Moy <moy@adacore.com>
3790 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3791 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3792 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3793 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3794 Mark_Non_ALFA_Subprogram_Body.
3795 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3798 2011-08-02 Yannick Moy <moy@adacore.com>
3800 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3803 2011-08-02 Robert Dewar <dewar@adacore.com>
3805 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3806 exp_ch3.adb: Minor reformatting.
3808 2011-08-02 Emmanuel Briot <briot@adacore.com>
3810 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3811 files, not any regular file.
3812 (__gnat_locate_file_with_predicate): new subprogram.
3814 2011-08-02 Yannick Moy <moy@adacore.com>
3816 * sinfo.adb, sinfo.ads: Restrict the use of flags
3817 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3818 nodes, plus N_Subtype_Declaration for the 2nd one.
3820 2011-08-02 Sergey Rybin <rybin@adacore.com>
3822 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3823 - fix bugs in the description of Source_Trace;
3824 - get rid of UNIT_NAME;
3826 2011-08-02 Javier Miranda <miranda@adacore.com>
3829 (Build_Dispatching_Requeue): Adding support for VM targets
3830 since we cannot directly reference the Tag entity.
3831 * exp_sel.adb (Build_K): Adding support for VM targets.
3832 (Build_S_Assignment): Adding support for VM targets.
3834 (Default_Prim_Op_Position): In VM targets do not restrict availability
3835 of predefined interface primitives to compiling in Ada 2005 mode.
3836 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3837 restricted to compiling in Ada 2005 mode.
3838 (Make_VM_TSD): Generate code that declares and initializes the OSD
3839 record. Needed to support dispatching calls through synchronized
3842 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3843 primitives associated with synchronized interfaces.
3844 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3845 primitives associated with synchronized interfaces.
3847 2011-08-02 Yannick Moy <moy@adacore.com>
3849 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3850 statements hidden in SPARK if preceded by the HIDE directive
3851 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3852 exception handlers as hidden in SPARK if preceded by the HIDE directive
3853 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3854 if starting with the HIDE directive
3855 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3856 starting with the HIDE directive; mark the declarations in a private
3857 part as hidden in SPARK if the private part starts with the HIDE
3859 * restrict.adb, restrict.ads
3860 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3861 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3862 argument node belongs to a part which is hidden in SPARK
3863 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3864 parts in SPARK; protect the possibly costly call to
3865 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3866 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3867 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3868 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3870 (Scan): recognize special comment starting with '#' and followed by
3871 SPARK keyword "hide" as a HIDE directive.
3873 2011-08-02 Yannick Moy <moy@adacore.com>
3875 * types.ads, erroutc.ads: Minor reformatting.
3877 2011-08-02 Vincent Celier <celier@adacore.com>
3879 * link.c: Add response file support for cross platforms.
3881 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3883 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3884 in an association, set parent field of copy before partial analysis.
3885 * sem_res.adb (Resolve_Slice): create reference to itype only when
3886 expansion is enabled.
3888 2011-08-02 Yannick Moy <moy@adacore.com>
3890 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3891 for new flag denoting which subprogram bodies are in ALFA
3892 * restrict.adb, sem_ch7.adb: Update comment
3893 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3894 sem_ch9.adb, sem_res.adb: Add calls to
3895 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3896 * sem_ch6.adb (Analyze_Function_Return): add calls to
3897 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3898 middle of the body, and extended return.
3899 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3900 False when missing return.
3901 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3902 to True for subprograms whose spec is in ALFA. Remove later on the flag
3903 on the entity used for a subprogram body when there exists a separate
3905 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3906 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3907 False, otherwise do nothing.
3909 2011-08-02 Robert Dewar <dewar@adacore.com>
3911 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
3913 2011-08-02 Yannick Moy <moy@adacore.com>
3915 * sem_ch4.ads: minor formatting.
3917 2011-08-02 Yannick Moy <moy@adacore.com>
3919 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
3920 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
3921 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
3922 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
3923 opt.ads: cleanup of SPARK mode
3925 2011-08-02 Yannick Moy <moy@adacore.com>
3927 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
3929 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
3930 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
3932 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
3933 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
3934 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
3935 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
3937 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
3939 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
3940 functions whose return type is not in ALFA.
3941 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
3943 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
3944 parameter's type is not in ALFA.
3945 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
3948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3950 * sem_ch6 (Analyze_Expression_Function): treat the function as
3951 Inline_Always, and introduce a subprogram declaration for it when it is
3953 * inline.adb (Add_Inlined_Body): recognize bodies that come from
3954 expression functions, so that the back-end can determine whether they
3955 can in fact be inlined.
3956 * sem_util.adb (Is_Expression_Function): predicate to determine whether
3957 a function body comes from an expression function.
3959 2011-08-02 Gary Dismukes <dismukes@adacore.com>
3961 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
3962 null exclusions to test Can_Never_Be_Null on the anonymous access types
3963 of the formals rather than testing the formals themselves. Exclude this
3964 check in cases where the Old_Formal is marked as a controlling formal,
3965 to avoid issuing spurious errors for bodies completing dispatching
3966 operations (due to the flag not getting set on controlling access
3967 formals in body specs).
3968 (Find_Corresponding_Spec): When checking full and subtype conformance of
3969 subprogram bodies in instances, pass Designated and E in that order, for
3970 consistency with the expected order of the formals (New_Id followed by
3973 2011-08-02 Robert Dewar <dewar@adacore.com>
3975 * sem_ch8.adb: Minor reformatting.
3977 2011-08-02 Ed Schonberg <schonberg@adacore.com>
3979 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
3980 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
3981 primitive operations of class-wide actuals.
3983 2011-08-02 Javier Miranda <miranda@adacore.com>
3985 * exp_atag.ads, exp_atag.adb
3986 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
3987 since its value is implicitly passed in argument Typ.
3988 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
3989 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
3990 Build_Common_Dispatching_Select_Statements.
3992 2011-08-02 Robert Dewar <dewar@adacore.com>
3994 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
3995 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
3998 2011-08-02 Robert Dewar <dewar@adacore.com>
4000 * sem_res.adb: Minor reformatting.
4001 * sem_prag.adb: Minor reformatting.
4003 2011-08-02 Javier Miranda <miranda@adacore.com>
4005 * exp_atag.adb, exp_atags.ads
4006 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4007 by the tagged type Entity. Required to use this routine in the VM
4008 targets since we do not have available the Tag entity in the VM
4011 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4012 Ada.Tags has not been previously loaded.
4014 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4015 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4017 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4018 view of enclosing scopes. Required to handle enclosing scopes that
4019 are synchronized types whose full view is a task type.
4021 (Build_VM_TSDs): Minor code improvement to avoid generating and
4022 analyzing lists with empty nodes.
4023 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4024 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4025 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4026 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4027 (Make_Select_Specific_Data_Table): Add support for VM targets.
4028 (Make_VM_TSD): Generate code to initialize the SSD structure of
4031 2011-08-02 Yannick Moy <moy@adacore.com>
4033 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4034 cross-references section in ALI.
4035 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4036 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4038 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4039 subprogram or package entity of a node
4040 (Is_Local_Reference_Type): new function returns True for references
4041 selected in local cross-references.
4042 (Lt): function extracted from Lt in Output_References
4043 (Write_Entity_Name): function extracted from Output_References
4044 (Generate_Definition): generate reference with type 'D' for definition
4045 of objects (object declaration and parameter specification), with
4046 appropriate locations and units, for use in local cross-references.
4047 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4048 references of type 'I' for initialization in object definition.
4049 (Output_References): move part of function Lt and procedure
4050 Write_Entity_Name outside of the body. Ignore references of types 'D'
4051 and 'I' introduced for local cross-references.
4052 (Output_Local_References): new procedure to output the local
4053 cross-references sections.
4054 (Lref_Entity_Status): new array defining whether an entity is a local
4055 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4056 with 'I' type when initialization expression is present.
4057 * get_scos.adb, get_scos.ads: Correct comments and typos
4059 2011-08-02 Javier Miranda <miranda@adacore.com>
4061 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4063 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4065 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4068 2011-08-02 Vincent Celier <celier@adacore.com>
4070 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4071 (No_Space_Img): New function
4072 (Find_Excluded_Sources): When reading from a file, record the file name
4073 and the line number for each excluded source.
4074 (Mark_Excluded_Sources): When reporting an error, if the excluded
4075 sources were read from a file, include file name and line number in
4078 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4080 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4082 2011-08-02 Robert Dewar <dewar@adacore.com>
4084 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4086 2011-08-02 Javier Miranda <miranda@adacore.com>
4088 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4089 generation of TSDs to the DOTNET compiler.
4090 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4091 generation of TSDs to the DOTNET compiler.
4093 2011-08-02 Javier Miranda <miranda@adacore.com>
4095 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4096 record of all the tagged types declared inside library level package
4097 declarations, library level package bodies or library level subprograms.
4098 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4099 associated with a given tagged type.
4100 (Build_VM_TSDs): New subprogram.
4101 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4102 compilation units that are subprograms.
4103 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4104 compilation units that are package bodies.
4105 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4106 units that are a package declaration or a package instantiation.
4107 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4108 reorganization to improve the error generated by the frontend when the
4109 function Ada.Tags.Secondary_Tag is not available.
4110 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4111 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4113 2011-08-02 Javier Miranda <miranda@adacore.com>
4115 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4117 2011-08-02 Robert Dewar <dewar@adacore.com>
4119 * s-imenne.ads: Minor reformatting.
4121 2011-08-02 Robert Dewar <dewar@adacore.com>
4123 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4124 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4125 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4127 2011-08-02 Robert Dewar <dewar@adacore.com>
4129 * einfo.ads (Materialize_Entity): Document this is only for renamings
4130 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4131 required debug information in the case where we transform the object
4132 declaration into a renaming declaration.
4133 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4135 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4138 2011-08-02 Robert Dewar <dewar@adacore.com>
4140 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4141 Suppress_Init_Procs.
4142 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4143 Suppress_Initialization/Initialization_Suppressed.
4144 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4145 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4146 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4147 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4149 2011-08-02 Robert Dewar <dewar@adacore.com>
4151 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4154 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4156 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4157 only have inheritable classwide pre/postconditions.
4159 2011-08-02 Javier Miranda <miranda@adacore.com>
4161 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4162 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4163 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4164 checks if the external tag of a type is the same as the external tag
4165 of some other declaration.
4167 2011-08-02 Thomas Quinot <quinot@adacore.com>
4169 * s-taskin.ads: Minor reformatting.
4171 2011-08-02 Emmanuel Briot <briot@adacore.com>
4173 * g-comlin.adb (Display_Help): swap the order in which it prints the
4174 short help and the general usage.
4176 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4178 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4179 the aspect declarations and attach them to the generic copy for
4180 subsequent analysis.
4181 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4182 declarations of the generic tree to the new subprogram declarations.
4183 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4184 conditions that apply to a subprogram instance.
4186 2011-08-02 Robert Dewar <dewar@adacore.com>
4188 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4190 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4192 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4193 private type with a tagged full view is not derived in the immediate
4194 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4196 2011-08-02 Robert Dewar <dewar@adacore.com>
4198 * exp_ch4.adb: Minor reformatting.
4200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4202 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4203 Ada2012 iterator, the loop will be rewritten during expansion into a
4204 while loop with a cursor and an element declaration. Do not analyze the
4205 body in this case, because if the container is for indefinite types the
4206 actual subtype of the elements will only be determined when the cursor
4207 declaration is analyzed.
4209 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4211 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4212 size/alignment related attributes in CodePeer_Mode.
4214 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4216 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4217 Prepend_Element, since this can result in the operation getting the
4218 wrong slot in the full type's dispatch table if the full type has
4219 inherited operations. The incomplete type's operation will get added
4220 to the proper position in the full type's primitives
4221 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4222 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4223 dispatching operations, since there are cases where nonprimitive
4224 subprograms can get added to the list of incomplete dependents (such
4225 as subprograms in nested packages).
4226 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4227 private part when determining whether to add a primitive with a
4228 parameter of a tagged incomplete type to the Private_Dependents list.
4229 Such primitives can also occur in the visible part, and should not have
4230 been excluded from being private dependents.
4231 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4232 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4233 list of a Taft-amendment incomplete type is a primitive before issuing
4234 an error that the full type must appear in the same unit. There are
4235 cases where nonprimitives can be in the list (such as subprograms in
4237 * sem_disp.adb (Derives_From): Use correct condition for checking that
4238 a formal's type is derived from the type of the corresponding formal in
4239 the parent subprogram (the condition was completely wrong). Add
4240 checking that was missing for controlling result types being derived
4241 from the result type of the parent operation.
4243 2011-08-02 Yannick Moy <moy@adacore.com>
4245 * errout.adb (First_Node): minor renaming
4246 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4249 2011-08-02 Yannick Moy <moy@adacore.com>
4251 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4252 before accessing operands.
4253 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4254 decide whether an initialization expression respects SPARK rules, as
4255 the plain node is the expanded one. This allows for more valid warnings
4257 * gnat_rm.texi: Minor update.
4259 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4261 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4264 2011-08-02 Robert Dewar <dewar@adacore.com>
4266 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4268 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4270 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4271 loop statements and the element renaming declaration with a block when
4272 the element type is controlled.
4274 2011-08-02 Yannick Moy <moy@adacore.com>
4276 * sinfo.ads: Minor formatting.
4278 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4280 * sem_aggr.adb (Add_Association): if the association has a box and no
4281 expression, use the Sloc of the aggregate itself for the new
4283 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4286 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4288 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4289 When a container is provided via a function call, generate a renaming
4290 of the function result. This avoids the creation of a transient scope
4291 and the premature finalization of the container.
4292 * exp_ch7.adb (Is_Container_Cursor): Removed.
4293 (Wrap_Transient_Declaration): Remove the supression of the finalization
4294 of the list controller when the declaration denotes a container cursor,
4297 2011-08-02 Yannick Moy <moy@adacore.com>
4299 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4300 node is from source, instead of the original node being from source.
4302 (Resolve_Array_Aggregate): refine the check for a static expression, to
4303 recognize also static ranges
4304 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4305 Array_Type_Declaration): postpone the test for the type being a subtype
4306 mark after the type has been resolved, so that component-selection and
4307 expanded-name are discriminated.
4308 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4309 to distinguish the case of an iteration scheme, so that an error is
4310 issed on a non-static range in SPARK except in an iteration scheme.
4311 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4312 In_Iter_Schm = True.
4313 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4314 user-defined operators so that they are allowed in renaming
4316 (Find_Selected_Component): refine the check for prefixing of operators
4317 so that they are allowed in renaming. Move the checks for restrictions
4318 on selector name after analysis discriminated between
4319 component-selection and expanded-name.
4320 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4321 concatenation argument of string type if it is static.
4322 * sem_util.adb, sem_util.ads
4323 (Check_Later_Vs_Basic_Declarations): add a new function
4324 Is_Later_Declarative_Item to decice which declarations are allowed as
4325 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4326 mode, add that renamings are considered as later items.
4327 (Enclosing_Package): new function to return the enclosing package
4328 (Enter_Name): correct the rule for homonyms in SPARK
4329 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4330 from source (result of expansion) to avoid issuing wrong warnings.
4332 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4334 * errout.adb: On anything but an expression First_Node returns its
4337 2011-08-02 Pascal Obry <obry@adacore.com>
4339 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4341 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4343 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4344 Set the associated loop as the related expression of internally
4346 * exp_ch7.adb (Is_Container_Cursor): New routine.
4347 (Wrap_Transient_Declaration): Supress the finalization of the list
4348 controller when the declaration denotes a container cursor.
4350 2011-08-02 Yannick Moy <moy@adacore.com>
4352 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4354 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4355 expression is a simple expression. This check cannot be performed in
4356 the semantics, so just drop it.
4357 (P_Index_Or_Discriminant_Constraint): move check that the index or
4358 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4359 semantics. Other cases were previously checked in the semantics.
4360 * par-ch4.adb (P_Name): move checks that a selector name is not
4361 character literal or an operator symbol to Find_Selected_Component in
4363 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4364 declarations are not placed after later declarations in a separate
4365 procedure in Sem_Util (possibly not the best choice?), to be used both
4366 during parsing, for Ada 83 mode, and during semantic analysis, for
4368 * par-endh.adb (Check_End): move check that end label is not missing
4369 to Process_End_Label in the semantics
4370 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4371 the special case for SPARK restriction
4372 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4373 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4374 parameter Force to issue the error message even on internal node (used
4375 for generated end label). Call Check_Restriction to check when an error
4376 must be issued. In SPARK mode, issue an error message even if the
4377 restriction is not set.
4378 (Check_Restriction): new procedure with an additional out parameter to
4379 inform the caller that a message has been issued
4380 * sem_aggr.adb: Minor modification of message
4381 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4382 instead of issuing an error message directly
4383 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4384 declarations are not placed after later declarations, by calling
4385 Check_Later_Vs_Basic_Declarations
4386 (Analyze_Subtype_Declaration): move here the check that an index or
4387 discriminant constraint must be a subtype mark. Change the check that
4388 a subtype of String must start at one so that it works on subtype marks.
4389 * sem_ch4.adb (Analyze_Call): move here the check that a named
4390 association cannot follow a positional one in a call
4391 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4392 instead of issuing an error message directly
4393 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4394 selector name is not a character literal or an operator symbol. Move
4395 here the check that the prefix of an expanded name cannot be a
4396 subprogram or a loop statement.
4397 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4398 procedure called from parsing and semantics to check that basic
4399 declarations are not placed after later declarations
4400 (Process_End_Label): move here the check that end label is not missing
4402 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4404 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4405 representation clause in codepeer mode, since it confuses CodePeer and
4406 does not bring useful info.
4408 2011-08-02 Ed Falis <falis@adacore.com>
4410 * init.c: initialize fp hw on MILS.
4412 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4414 * errout.adb (First_Node): for bodies, return the node itself (small
4415 optimization). For other nodes, do not check source_unit if the node
4416 comes from Standard.
4418 2011-08-02 Robert Dewar <dewar@adacore.com>
4420 * exp_ch3.adb: Minor comment additions.
4421 * sem_ch13.adb: Minor reformatting.
4423 2011-08-02 Pascal Obry <obry@adacore.com>
4425 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4427 2011-08-02 Robert Dewar <dewar@adacore.com>
4429 * sem_attr.adb: Minor reformatting.
4431 2011-08-02 Robert Dewar <dewar@adacore.com>
4433 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4434 (Has_Default_Component_Value): Removed
4435 * einfo.ads Comment updates
4436 (Has_Default_Aspect): Replaces Has_Default_Value
4437 (Has_Default_Component_Value): Removed
4439 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4441 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4442 (Get_Simple_Init_Val): Handle Default_Value aspect
4443 (Needs_Simple_Initialization): Handle Default_Value aspect
4444 * exp_ch3.ads: Needs_Simple_Initialization
4445 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4446 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4448 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4449 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4450 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4452 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4454 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4455 package containing iteration primitives.
4456 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4458 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4460 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4461 "of", pre-analyze expression in case it is a function call with
4462 finalization actions that must be placed ahead of the loop.
4463 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4464 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4466 2011-08-02 Geert Bosch <bosch@adacore.com>
4468 * cstand.adb (Create_Float_Types): Only consider C's long double for
4469 Long_Long_Float, in addition to double.
4471 2011-08-02 Robert Dewar <dewar@adacore.com>
4473 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4474 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4475 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4480 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4483 2011-08-02 Javier Miranda <miranda@adacore.com>
4485 * einfo.ads, einfo.adb
4486 (Original_Access_Type): Move this attribute to Node26 since there was
4487 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4488 which causes conflicts and breaks the generation of the .NET compiler.
4489 (Interface_Name): Add missing documentation on JGNAT only uses of
4492 2011-08-02 Geert Bosch <bosch@adacore.com>
4494 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4495 (Find_Back_End_Float_Type): Likewise
4496 (Create_Back_End_Float_Types): Likewise
4497 (Create_Float_Types): Likewise
4498 (Register_Float_Type): Likewise
4499 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4500 Nlist and split out type selection in new local Find_Base_Type function.
4501 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4503 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4505 2011-08-02 Robert Dewar <dewar@adacore.com>
4507 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4509 * opt.ads: Minor comment change.
4510 * sem_ch12.adb: Minor code reorganization.
4512 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4514 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4515 subtype's list of rep items to the list on the full subtype in the case
4516 where the lists are the same.
4518 2011-08-02 Geert Bosch <bosch@adacore.com>
4520 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4521 using the one from System.Strings, which also deallocates all strings.
4523 2011-08-02 Geert Bosch <bosch@adacore.com>
4525 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4527 * gcc-interface/Make-lang.in: Update dependencies.
4529 2011-08-02 Olivier Hainque <hainque@adacore.com>
4531 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4534 2011-08-02 Javier Miranda <miranda@adacore.com>
4536 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4537 associated with anonymous access to subprograms.
4539 2011-08-02 Geert Bosch <bosch@adacore.com>
4542 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4543 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4544 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4545 (Add_Symbol_Definition): Move to switch-c.adb
4546 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4547 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4548 (Add_Symbol_Definition): Move to switch-c.adb.
4549 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4551 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4553 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4554 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4556 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4557 (Add_Symbol_Definition): Moved from Prepcomp.
4558 * switch-c.ads: Update copyright notice. Use String_List instead of
4559 Argument_List, removing dependency on System.OS_Lib.
4561 2011-08-02 Yannick Moy <moy@adacore.com>
4563 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4564 mode on initialization expression which does not respect SPARK
4566 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4567 if the tree referenced by its argument represents an initialization
4568 expression in SPARK, suitable for initializing an object in an object
4571 2011-08-02 Javier Miranda <miranda@adacore.com>
4573 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4574 internally generated access to subprogram with its associated protected
4576 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4578 2011-08-02 Geert Bosch <bosch@adacore.com>
4580 * cstand.adb (Register_Float_Type): Print information about type to
4581 register, if the Debug_Flag_Dot_B is set.
4582 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4583 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4584 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4585 with a requested precision of more than Max_Digits digits and no more
4586 than Max_Base_Digits digits, if a range specification is present and the
4587 Predefined_Float_Types list has a suitable type to derive from.
4588 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4589 case of type completion with pragma Import
4591 (Process_Import_Predefined_Type): Processing to complete a type
4592 with pragma Import. Currently supports floating point types only.
4593 (Set_Convention_From_Pragma): Do nothing without underlying type.
4594 (Process_Convention): Guard against absence of underlying type,
4595 which may happen when importing incomplete types.
4596 (Process_Import_Or_Interface): Handle case of importing predefined
4597 types. Tweak error message.
4599 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4601 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4602 functions to previous change. Reorganize code slightly.
4604 2011-08-02 Geert Bosch <bosch@adacore.com>
4606 * back_end.ads (Register_Type_Proc): New call back procedure type for
4607 allowing the back end to provide information about available types.
4608 (Register_Back_End_Types): New procedure to register back end types.
4609 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4611 * cstand.adb (Back_End_Float_Types): New list for floating point types
4612 supported by the back end.
4613 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4614 (Copy_Float_Type): New procedure to make new copies of predefined types.
4615 (Register_Float_Type): New call back procedure to populate the BEFT list
4616 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4617 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4618 (Create_Float_Types): New procedure to create entities for floating
4619 point types predefined in Standard, and put these and any remaining
4620 BEFTs on the Predefined_Float_Types list.
4621 * stand.ads (Predefined_Float_Types): New list for predefined floating
4622 point types that do not have declarations in package Standard.
4624 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4626 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4627 entity node for the unit containing the parameter.
4628 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4629 (Add_Inlined_Subprogram): Likewise.
4630 * gcc-interface/Make-lang.in: Update dependencies.
4632 2011-08-02 Thomas Quinot <quinot@adacore.com>
4634 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4637 2011-08-02 Geert Bosch <bosch@adacore.com>
4639 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4641 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4643 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4644 computed value of Base_Type.
4646 2011-08-02 Yannick Moy <moy@adacore.com>
4648 * restrict.adb (Check_Restriction): issue an error for any use of
4649 class-wide, even if the No_Dispatch restriction is not set.
4650 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4651 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4652 when completing a private extension, the type named in the private part
4653 is not the same as that named in the visible part.
4654 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4655 of an inherited primitive operations of a tagged type or type extension
4656 that returns the tagged type.
4657 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4658 function which returns True for an implicit operation inherited by the
4659 derived type declaration for the argument type.
4660 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4663 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4665 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4666 Process_Bounds, to perform analysis with expansion of a range or an
4667 expression that is the iteration scheme for a loop.
4668 (Analyze_Iterator_Specification): If domain of iteration is given by a
4669 function call with a controlled result, as is the case if call returns
4670 a predefined container, ensure that finalization actions are properly
4672 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4674 2011-08-02 Javier Miranda <miranda@adacore.com>
4676 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4677 * gcc-interface/Make-lang.in: Update dependencies.
4679 2011-08-02 Javier Miranda <miranda@adacore.com>
4681 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4682 determine if the analysis is performed using N or Original_Node (N).
4683 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4684 functionality of routine Is_Variable avoids code duplication.
4685 * checks.adb (Determine_Range): Handle temporaries generated by
4686 Remove_Side_Effects.
4688 2011-08-02 Javier Miranda <miranda@adacore.com>
4690 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4691 expansion of the condition. Required since the previous analysis was
4692 done with expansion disabled (see Resolve_Quantified_Expression) and
4693 hence checks were not inserted and record comparisons have not been
4696 2011-08-02 Ed Falis <falis@adacore.com>
4698 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4701 2011-08-02 Bob Duff <duff@adacore.com>
4703 * opt.ads: Minor comment fix.
4705 2011-08-02 Bob Duff <duff@adacore.com>
4707 * sem_ch12.adb (Analyze_Package_Instantiation,
4708 Analyze_Subprogram_Instantiation): Turn off style checking while
4709 analyzing an instance. Whatever style checks that apply to the generic
4710 unit should apply, so it makes no sense to apply them in an instance.
4711 This was causing trouble when compiling an instance of a runtime
4712 unit that violates the -gnatyO switch.
4713 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4714 one of the two case statements, causing spurious errors.
4716 2011-08-02 Robert Dewar <dewar@adacore.com>
4718 * uname.adb: Minor reformatting.
4719 * gnatcmd.adb: Minor reformatting.
4720 * exp_attr.adb: Minor reformatting.
4722 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4724 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4725 No_Dispatching_Calls, do not look for the Assign primitive, because
4726 predefined primitives are not created in this case.
4728 2011-08-02 Bob Duff <duff@adacore.com>
4730 * stylesw.ads: Minor comment fixes.
4732 2011-08-02 Robert Dewar <dewar@adacore.com>
4734 * freeze.adb (Add_To_Result): New procedure.
4736 2011-08-02 Jose Ruiz <ruiz@adacore.com>
4738 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4739 time, if the specific run-time routines for handling streams of strings
4740 are not available, use the default mechanism.
4742 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4744 * s-regpat.ads: Fix typo.
4746 2011-08-02 Vincent Celier <celier@adacore.com>
4748 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4749 not null, call it to create the in memory config project file without
4750 parsing an existing default config project file.
4752 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4754 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4756 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4758 * sem_elim.adb: an abstract subprogram does not need an eliminate
4759 pragma for its descendant to be eliminable.
4761 2011-08-02 Ed Falis <falis@adacore.com>
4763 * init.c: revert to handling before previous checkin for VxWorks
4764 * s-intman-vxworks.adb: delete unnecessary declarations related to
4765 using Ada interrupt facilities for handling signals.
4766 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4767 * s-intman-vxworks.ads: Import __gnat_install_handler as
4768 Initialize_Interrupts.
4769 * s-taprop-vxworks.adb: Delete Signal_Mask.
4770 (Abort_Handler): change construction of mask to unblock exception
4773 2011-08-02 Jerome Guitton <guitton@adacore.com>
4775 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4776 Debug_Raise_Exception before propagation starts.
4778 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4780 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4781 to Restriction_Check_Required.
4782 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4783 * sem_res.adb (Resolve_Call): Likewise.
4784 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4786 2011-08-02 Bob Duff <duff@adacore.com>
4788 * stylesw.ads: Update comment.
4789 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4790 * errout.ads: Remove obsolete comment.
4792 2011-08-02 Javier Miranda <miranda@adacore.com>
4794 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4795 (Set_Is_Safe_To_Reevaluate): new procedure.
4796 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4797 assignment is allowed on safe-to-reevaluate variables.
4798 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4799 temporary created to remove side effects in expressions that use
4800 the secondary stack as safe-to-reevaluate.
4801 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4802 variables that are not true constants.
4804 2011-08-02 Robert Dewar <dewar@adacore.com>
4806 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4807 sem_res.adb, sem_ch6.adb: Minor reformatting.
4809 2011-08-02 Jerome Guitton <guitton@adacore.com>
4811 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4813 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4815 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4816 not set Overridden_Operation if subprogram is an initialization
4819 2011-08-02 Yannick Moy <moy@adacore.com>
4821 * par-ch6.adb: Correct obsolete name in comments
4822 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4823 which takes two message arguments (existing function takes one), with
4824 second message used for continuation.
4825 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4826 block statements that originate from a source block statement, not
4827 generated block statements
4828 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4829 symmetry with procedure case
4830 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4831 function to issue an error in formal mode if a package specification
4832 contains more than one tagged type or type extension.
4833 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4834 parameters matching formals of tagged types are objects (or ancestor
4835 type conversions of objects), not general expressions. Issue an error
4836 on view conversions that are not involving ancestor conversion of an
4838 (Resolve_Type_Conversion): in formal mode, issue an error on the
4839 operand of an ancestor type conversion which is not an object
4840 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4841 procedure so that it works also for actuals of function calls
4842 (Is_Actual_Tagged_Parameter): new function which determines if its
4843 argument is an actual parameter of a formal of tagged type in a
4845 (Is_SPARK_Object_Reference): new function which determines if the tree
4846 referenced by its argument represents an object in SPARK
4848 2011-08-02 Robert Dewar <dewar@adacore.com>
4850 * sem_ch3.adb: Minor reformatting
4851 Minor comment addition
4852 Minor error msg text change
4854 2011-08-02 Javier Miranda <miranda@adacore.com>
4856 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4857 function. Used to be more precise when we generate a variable plus one
4858 assignment to remove side effects in the evaluation of the Bound
4860 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4861 of the bound expression to force its re-analysis and thus expand the
4862 associated transient scope (if required). Code cleanup replacing the
4863 previous code that declared the constant entity by an invocation to
4864 routine Force_Evaluation which centralizes this work in the frontend.
4866 2011-08-02 Robert Dewar <dewar@adacore.com>
4868 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4869 (Base_Type): Now uses improved Is_Base_Type function
4870 * einfo.ads (Base_Type): Inline this function
4872 2011-08-02 Robert Dewar <dewar@adacore.com>
4874 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4875 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4877 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4879 * gcc-interface/Make-lang.in: Update dependencies.
4880 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4883 2011-08-02 Yannick Moy <moy@adacore.com>
4885 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4886 non-simple expression used in delta constraint
4887 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4888 index constraint which is not a subtype mark
4889 * par.adb: With and use Restrict
4890 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4891 mode on component type which is not a subtype mark and default
4892 expression on component
4893 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4894 of string which does not have a lower index bound equal to 1
4895 (Array_Type_Declaration): issue an error in formal mode on index or
4896 component type which is not a subtype mark, and on aliased keyword on
4898 (Derived_Type_Declaration): issue an error in formal mode on interface,
4899 limited or abstract type
4900 (Record_Type_Declaration): issue an error in formal mode on interface
4901 (Record_Type_Definition): issue an error in formal mode on tagged types
4902 and type extensions not declared in the specification of a library unit
4903 package; on null non-tagged record; on variant part
4905 2011-08-02 Vincent Celier <celier@adacore.com>
4907 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
4908 not declared for qualified library project when Library_Name is not
4909 declared, but Library_Dir is.
4911 2011-08-02 Robert Dewar <dewar@adacore.com>
4913 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
4914 pragmas (affects aspects [Component_]Default_Value
4915 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
4916 component type for the resolution
4918 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4920 * einfo.adb (Base_Type): Tune implementation for speed.
4922 2011-08-02 Robert Dewar <dewar@adacore.com>
4924 * freeze.adb: Minor reformatting.
4926 2011-08-02 Thomas Quinot <quinot@adacore.com>
4928 * scos.ads: Update comments.
4930 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4932 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
4933 base type, because the parent may be a subtype of a private type whose
4934 convention is established in a private part.
4936 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4938 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
4939 statement in a block when the expansion of the return expression has
4940 created a finalization chain.
4941 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
4942 with the parent node.
4943 Add N_Extended_Return_Statement to handle the case where a transient
4944 object declaration appears in the Return_Object_Declarations list of
4945 an extended return statement.
4947 2011-08-02 Matthew Gingell <gingell@adacore.com>
4949 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
4950 unused parameter 'name'.
4952 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4954 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
4955 inherited operation, check whether its alias, which is the source
4956 operastion that it renames, has been marked eliminated.
4958 2011-08-02 Javier Miranda <miranda@adacore.com>
4960 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
4961 in-mode parameter whose type is an access type since it can be used to
4962 modify its designated object. Enforce code that handles as safe an
4963 access type that is not access-to-constant but it is the result of a
4964 previous removal of side-effects.
4965 (Remove_Side_Effects): Minor code reorganization of cases which require
4966 no action. Done to incorporate documentation on new cases uncovered
4967 working in this ticket: no action needed if this routine was invoked
4968 too early and the nodes are not yet decorated.
4969 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
4970 to routine Remove_Side_Effects by calls to Force_Evaluation since they
4971 were issued with actuals that are implicitly provided by
4974 2011-08-02 Robert Dewar <dewar@adacore.com>
4976 * sem_ch3.adb, sem_res.adb: Minor reformatting.
4978 2011-08-02 Yannick Moy <moy@adacore.com>
4980 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
4981 to issue an error in formal mode on attribute not supported in this mode
4982 (Analyze_Attribute): issue errors on standard attributes not supported
4984 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
4985 comment, and issue error in formal mode on modulus which is not a power
4987 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
4989 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
4991 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
4992 operator on modular type (except 'not').
4994 2011-08-02 Robert Dewar <dewar@adacore.com>
4996 * gnat_rm.texi: Minor reformatting.
4998 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5000 * s-osinte-linux.ads: Minor comment update and reformatting.
5001 * i-cexten.ads: Make this unit pure, as for its parent.
5002 Will allow its usage in more contexts if needed.
5004 2011-08-02 Robert Dewar <dewar@adacore.com>
5006 * s-utf_32.ads: Minor comment fix.
5008 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5010 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5011 operation of a tagged synchronized type, handle the case where the
5012 controlling argument is overloaded.
5014 2011-08-02 Yannick Moy <moy@adacore.com>
5016 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5017 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5018 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5019 SPARK mode and formal verification mode on processing SPARK restriction
5020 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5021 requiring consistency checking.
5023 2011-08-02 Robert Dewar <dewar@adacore.com>
5025 * sem_res.adb: Minor reformatting.
5027 2011-08-02 Robert Dewar <dewar@adacore.com>
5029 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5030 a-cforse.ads: Remove unneeded with of Ada.Containers
5031 Remove commented out pragma Inline's
5032 Move specifications of new subprograms to the actual specs
5034 2011-08-02 Yannick Moy <moy@adacore.com>
5036 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5037 a-cforse.ads: Update comments.
5039 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5041 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5043 2011-08-02 Robert Dewar <dewar@adacore.com>
5045 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5046 a-cforse.ads, a-cofove.ads: Minor reformatting.
5048 2011-08-02 Claire Dross <dross@adacore.com>
5050 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5051 a-cofove.ads: Add comments.
5053 2011-08-02 Yannick Moy <moy@adacore.com>
5055 * gnat_rm.texi: Document formal containers.
5057 2011-08-02 Emmanuel Briot <briot@adacore.com>
5059 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5062 2011-08-02 Robert Dewar <dewar@adacore.com>
5064 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5067 2011-08-02 Robert Dewar <dewar@adacore.com>
5069 * aspects.adb: New aspects Default_Value and Default_Component_Value
5070 New format of Aspect_Names table checks for omitted entries
5071 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5072 handling of boolean aspects for derived types.
5073 New aspects Default_Value and Default_Component_Value
5074 New format of Aspect_Names table checks for omitted entries
5075 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5076 (Has_Default_Value): New flag
5077 (Has_Default_Component_Value): New flag
5078 (Has_Default_Value): New flag
5079 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5081 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5082 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5083 Default_Value and Default_Component_Value
5084 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5085 New aspects Default_Value and Default_Component_Value
5086 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5087 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5089 2011-08-02 Vincent Celier <celier@adacore.com>
5091 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5092 inherit library kind.
5094 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5096 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5099 2011-08-02 Robert Dewar <dewar@adacore.com>
5101 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5103 2011-08-02 Yannick Moy <moy@adacore.com>
5105 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5107 2011-08-02 Robert Dewar <dewar@adacore.com>
5109 * impunit.adb: Add comment.
5111 2011-08-02 Yannick Moy <moy@adacore.com>
5113 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5114 qualification of aggregates in formal mode
5115 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5117 (Resolve_Aggregate): complete the test that an aggregate is adequately
5118 qualified in formal mode
5120 2011-08-02 Pascal Obry <obry@adacore.com>
5122 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5123 * mlib-prj.adb: Supress warning when compiling binder generated file.
5124 (Build_Library): Supress all warnings when compiling the binder
5127 2011-08-02 Yannick Moy <moy@adacore.com>
5129 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5131 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5132 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5133 Add with/use clauses to make Check_Formal_Restriction visible
5135 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5137 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5138 in-parameters when type of the generic formal is private in the generic
5139 spec and non-private in the body.
5141 2011-08-02 Claire Dross <dross@adacore.com>
5143 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5144 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5145 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5146 * impunit.adb, Makefile.rtl: Take new files into account.
5148 2011-08-02 Robert Dewar <dewar@adacore.com>
5150 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5151 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5153 2011-08-02 Yannick Moy <moy@adacore.com>
5155 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5157 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5158 matching static array bounds, taking into account the special case of
5160 * sem_ch3.adb: Typo in comment.
5162 2011-08-02 Yannick Moy <moy@adacore.com>
5164 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5165 which issues an error in formal mode if its argument node is originally
5167 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5168 has a discriminant specification so that it does not include the case
5170 (Derived_Type_Declaration): move here the test that a derived type has a
5171 discriminant specification
5172 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5173 first element of a component association before accessing its choices
5174 (presence of component association is not enough)
5175 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5176 declaration is a library item before accessing the next element in a
5177 list, as library items are not member of lists
5178 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5179 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5180 Check_Formal_Restriction whenever possible.
5182 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5184 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5185 reference when needed.
5187 2011-08-02 Bob Duff <duff@adacore.com>
5189 * gnat_ugn.texi: Fix typo.
5191 2011-08-02 Vincent Celier <celier@adacore.com>
5193 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5194 archive file name. Do not use the full path name of archives for Open
5197 2011-08-02 Robert Dewar <dewar@adacore.com>
5199 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5200 Analyze_Aspect_Specifications
5202 (Analyze_Aspect_Specifications): New handling for boolean aspects
5203 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5204 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5205 sequence for Analyze_Aspect_Specifications
5206 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5207 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5209 2011-08-02 Robert Dewar <dewar@adacore.com>
5211 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5212 aspects, since these no longer exist.
5214 2011-08-02 Robert Dewar <dewar@adacore.com>
5216 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5217 semicolon, do not try to see if there are aspects following it.
5218 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5221 2011-08-02 Robert Dewar <dewar@adacore.com>
5223 * sem_ch8.adb, aspects.ads: Minor reformatting.
5225 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5227 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5228 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5230 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5232 2011-08-02 Yannick Moy <moy@adacore.com>
5234 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5235 mode on subprogram declaration outside of package specification, unless
5236 it is followed by a pragma Import
5237 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5238 Access_Type_Declaration): issue error in formal mode on access type
5239 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5241 (Analyze_Object_Declaration): issue error in formal mode on object
5242 declaration which does not respect SPARK restrictions
5243 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5244 declaration which does not respect SPARK restrictions
5245 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5246 error in formal mode on digits or delta constraint
5247 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5248 decimal fixed point type
5249 (Derived_Type_Declaration): issue error in formal mode on derived type
5250 other than type extensions of tagged record types
5251 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5252 with check on access definition
5253 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5254 mode on protected definition.
5255 (Analyze_Task_Definition): issue error in formal mode on task definition
5257 2011-08-02 Robert Dewar <dewar@adacore.com>
5259 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5261 2011-08-02 Javier Miranda <miranda@adacore.com>
5263 * sem_ch6.adb (Can_Override_Operator): New function.
5264 (Verify_Overriding_Indicator): Add missing code to check overriding
5265 indicator in operators. Fixes regression.
5266 (Check_Overriding_Indicator): Minor reformating after replacing the
5267 code that evaluates if the subprogram can override an operator by
5268 invocations to the above new function.
5270 (Write_Field26_Name): Add missing code to ensure that, following
5271 the documentation in einfo.ads, this field is not shown as attribute
5272 "Static_Initialization" on non-dispatching functions.
5274 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5276 * sem_res.adb (Resolve_Call): A call to
5277 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5278 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5279 i.e., when the second parameter is of type Time_Span.
5281 2011-08-02 Vincent Celier <celier@adacore.com>
5283 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5284 with an archive instead of -L<library dir> -l<library name>.
5286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5288 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5289 mark the base types In_Use in addition to making the operations
5292 2011-08-02 Ed Falis <falis@adacore.com>
5294 * init.c: add and setup __gnat_signal_mask for the exception signals
5295 * s-inmaop-vxworks.adb: new file.
5296 * s-intman-vxworks.adb: remove unnecessary initializations and
5298 * s-intman-vxworks.ads: remove unnecessary variable
5299 * s-taprop-vxworks.adb: simplify signal initialization
5301 2011-08-02 Robert Dewar <dewar@adacore.com>
5303 * sem_ch8.adb: Minor code reorganization, comment updates.
5305 2011-08-02 Robert Dewar <dewar@adacore.com>
5307 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5308 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5310 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5311 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5313 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5315 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5316 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5317 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5318 use_type_clauses, to handle more efficiently use_type and use_all_type
5320 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5321 Ada2012 Use_All_Type clause.
5322 (Use_Class_Wide_Operations): new procedure.
5324 2011-08-02 Robert Dewar <dewar@adacore.com>
5326 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5327 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5328 expression to expression function.
5330 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5332 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5333 if types are compatible.
5335 2011-08-02 Yannick Moy <moy@adacore.com>
5337 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5338 returns True if its argument array types have same dimension and same
5339 static bounds at each index.
5340 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5341 OUT or IN OUT paramaters which are not view conversions in SPARK.
5342 (Resolve_Arithmetic_Op): issue an error in formal mode on
5343 multiplication or division with operands of fixed point types which are
5344 not qualified or explicitly converted.
5345 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5346 Boolean or array type (except String) operands.
5347 (Resolve_Equality_Op): issue an error in formal mode on equality
5348 operators for array types other than String with non-matching static
5350 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5351 for array types with non-matching static bounds. Factorize the code in
5352 Matching_Static_Array_Bounds.
5353 (Resolve_Qualified_Expression): issue an error in formal mode on
5354 qualified expressions for array types with non-matching static bounds.
5355 (Resolve_Type_Conversion): issue an error in formal mode on type
5356 conversion for array types with non-matching static bounds
5358 2011-08-02 Robert Dewar <dewar@adacore.com>
5360 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5362 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5364 * par-ch9.adb: save location of entry for proper error message.
5366 2011-08-02 Javier Miranda <miranda@adacore.com>
5368 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5369 (Use_Full_View) which permits this routine to climb through the
5370 ancestors using the full-view of private parents.
5371 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5372 Use_Full_View to true in calls to Is_Ancestor.
5373 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5374 true in call to Is_Ancestor.
5375 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5376 Use_Full_View to true in call to Is_Ancestor.
5377 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5378 call to Is_Ancestor.
5379 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5380 Use_Full_View to true in calls to Is_Ancestor.
5381 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5382 Make_Select_Specific_Data_Table, Register_Primitive,
5383 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5384 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5385 to true in call to Is_Ancestor.
5386 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5387 Use_Full_View to true in calls to Is_Ancestor.
5389 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5390 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5392 2011-08-02 Robert Dewar <dewar@adacore.com>
5394 * gnat_rm.texi: Minor reformatting.
5395 * sem_prag.adb: Minor reformatting.
5397 2011-08-02 Tristan Gingold <gingold@adacore.com>
5399 * vms_data.ads: Add VMS qualifier for -gnateP.
5401 2011-08-02 Robert Dewar <dewar@adacore.com>
5403 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5404 * par-ch7.adb (P_Package): Proper placement of aspects for package
5406 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5407 (End_Statements): Add Is_Sloc parameterr
5408 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5409 (Check_End): Ad Is_Sloc parameter
5410 (End_Statements): Add Is_Sloc parameterr
5412 2011-08-02 Vincent Celier <celier@adacore.com>
5414 * ug_words: Add VMS qualifier equivalent to -gnateP:
5415 /SYMBOL_PREPROCESSING.
5417 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5419 * gnat-style.texi: For hexadecimal numeric literals the typical
5420 grouping of digits is 4 to represent 2 bytes.
5421 A procedure spec which is split into several lines is indented two
5424 2011-08-02 Yannick Moy <moy@adacore.com>
5426 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5427 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5428 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5430 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5431 choice in array aggregate
5432 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5434 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5435 positional and named aggregate for record, or others in record
5436 aggregate, or multiple choice in record aggregate
5437 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5438 array operands to logical operations AND, OR and XOR do not have the
5439 same static lower and higher bounds
5440 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5442 2011-08-01 Robert Dewar <dewar@adacore.com>
5444 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5445 Replaces Last_Source_Node_In_Sequence.
5446 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5447 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5448 parens and blank in string (this was inconsistently implemented).
5450 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5451 blank in string (this was inconsistently implemented).
5453 (Set_Global_Switches): Set formal mode switches appropriately
5454 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5456 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5457 call Set_Error_Msg_Lang to set "spark" as language name.
5458 * par.adb: Remove unnecessary call to set formal language for errout
5459 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5460 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5462 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5463 calls to it, moved after resolution so that types are known
5464 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5465 result of concatenation is not of type String
5466 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5467 concatenation is not properly restricted
5468 * gnat_rm.texi: Add doc on pragma Spark_95.
5469 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5470 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5471 * gcc-interface/Make-lang.in: Update dependencies.
5473 2011-08-01 Javier Miranda <miranda@adacore.com>
5475 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5476 condition that detects if the overridden operation must replace an
5479 2011-08-01 Javier Miranda <miranda@adacore.com>
5481 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5482 code declarations inserted by Insert_Actions in each alternative of the
5483 N_Case_Expression node.
5485 2011-08-01 Robert Dewar <dewar@adacore.com>
5487 * sem_ch6.adb: Minor code reorganization.
5488 * sem_util.adb: Minor reformatting.
5490 2011-08-01 Pascal Obry <obry@adacore.com>
5492 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5493 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5495 2011-08-01 Yannick Moy <moy@adacore.com>
5497 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5498 literal or operator symbol which is prefixed
5499 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5500 mode on access attributes.
5501 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5502 that concatenation operands are properly restricted in formal mode
5503 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5504 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5505 result of the concatenation has a type different from String.
5506 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5507 Analyze_Quantified_Expression, Analyze_Slice,
5508 Analyze_Null): issue an error in formal mode on unsupported constructs
5510 (Analyze_Block_Statement): only issue error on source block statement
5511 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5512 function which returns the last node in a list of nodes for which
5513 Comes_From_Source returns True, if any
5514 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5515 Last_Source_Node_In_Sequence
5516 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5517 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5518 mode on unsupported constructs
5519 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5520 rest of the actions may be needed later on since the error is marked as
5522 * sinfo.ads: Typos in comments.
5524 2011-08-01 Pascal Obry <obry@adacore.com>
5526 * projects.texi: Minor editing.
5528 2011-08-01 Yannick Moy <moy@adacore.com>
5530 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5531 insertion character ~~
5532 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5533 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5534 with insertion character ~~
5535 (Set_Msg_Text): treat insertion character ~~
5536 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5537 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5538 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5539 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5540 errors related to the formal language restriction not serious
5541 (insertion character |).
5542 * par.adb (Par): set formal language for error messages if needed
5543 * sem_ch6.adb (Check_Missing_Return): take into account possible
5544 generated statements at the end of the function
5545 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5546 enumeration value to define a new pragma SPARK_95
5547 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5548 SPARK_Version): new type and variables to store the SPARK version
5550 (SPARK_Mode): return True when SPARK_Version is set
5551 * par-prag.adb: Correct indentation
5552 (Prag): take Pragma_SPARK_95 into account
5553 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5556 2011-08-01 Robert Dewar <dewar@adacore.com>
5558 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5559 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5560 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5562 2011-08-01 Pascal Obry <obry@adacore.com>
5564 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5565 Target_Name to Get_Path call.
5566 (Parse_Single_Project): Likewise.
5567 (Post_Parse_Context_Clause): Likewise.
5568 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5569 Call Initialise_Project_Path with the proper Target_Name.
5570 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5572 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5573 with the proper Target_Name.
5574 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5576 (Parse_Project_And_Apply_Config): Likewise.
5577 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5578 This is fine as this part of the code is supporting only native
5580 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5581 is fine as this part of the code is supporting only native compilation.
5583 2011-08-01 Yannick Moy <moy@adacore.com>
5585 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5586 of homonym, unless the homonym is one of the cases allowed in SPARK
5587 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5588 package declaration occurring after a body.
5590 2011-08-01 Robert Dewar <dewar@adacore.com>
5592 * checks.adb, exp_ch4.adb: Minor reformatting.
5594 2011-08-01 Javier Miranda <miranda@adacore.com>
5596 * einfo.ads (Access_Disp_Table): Fix documentation.
5597 (Dispatch_Table_Wrappers): Fix documentation.
5599 2011-08-01 Pascal Obry <obry@adacore.com>
5601 * prj-env.adb, prj-env.ads: Minor reformatting.
5603 2011-08-01 Yannick Moy <moy@adacore.com>
5605 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5606 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5607 procedures out of these packages.
5608 * errout.ads, errout.adb
5609 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5610 procedures in of this package
5611 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5612 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5613 on misplaced later vs initial declarations, like in Ada 83
5614 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5615 formal mode on attribute of private type whose full type declaration
5617 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5618 package declaration inside a package specification
5619 (Analyze_Full_Type_Declaration): issue error in formal mode on
5620 controlled type or discriminant type
5621 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5622 user-defined operator means that it should come from the source
5623 (New_Overloaded_Entity): issue error in formal mode on overloaded
5625 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5627 2011-08-01 Thomas Quinot <quinot@adacore.com>
5629 * atree.adb: Minor reformatting.
5630 * checks.adb: Minor reformatting.
5632 2011-08-01 Vincent Celier <celier@adacore.com>
5634 * s-parame-vms-ia64.ads: Fix typo in comment
5636 * s-parame-vms-restrict.ads: Removed, unused.
5638 2011-08-01 Javier Miranda <miranda@adacore.com>
5641 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5643 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5644 * sem_ch3.ads, sem_ch3.adb
5645 (Is_Constant_Bound): New extended version of the subprogram that was
5646 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5647 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5648 * sem_aux.ads (Constant_Value): Fix typo in comment.
5649 * checks.adb (Generate_Index_Checks): New implementation which, for
5650 array objects with constant bounds, generates the runtime check
5651 referencing the bounds of the array type. For other cases this routine
5652 provides its previous behavior obtaining such values from the array
5654 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5656 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5657 we cannot have semantic interpretations of the new node.
5659 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5661 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5664 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5666 * sem_ch8.adb: Minor code editing.
5667 * s-vxwext.adb: Remove trailing space.
5668 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5669 consistency with other files.
5671 2011-08-01 Thomas Quinot <quinot@adacore.com>
5673 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5675 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5677 * par-ch10.adb: reject parameterized expressions as compilation unit.
5678 * sem_ch4.adb: handle properly conditional expression with overloaded
5679 then_clause and no else_clause.
5681 2011-08-01 Tristan Gingold <gingold@adacore.com>
5683 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5684 like done by System.Aux_DEC.
5685 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5687 2011-08-01 Yannick Moy <moy@adacore.com>
5689 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5690 missing label at end of declaration (subprogram or package)
5691 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5692 of positional and named parameter association
5693 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5694 Error_Msg_SP which adds a prefix to the error message giving the name
5695 of the formal language analyzed
5696 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5697 access result type in subprogram, unconstrained array as result type,.
5698 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5700 * sem_ch8.adb: Code clean up.
5702 2011-08-01 Javier Miranda <miranda@adacore.com>
5704 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5705 * einfo.ads (Access_Disp_Table): Fix documentation.
5706 (Dispatch_Table_Wrappers): Fix documentation.
5707 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5708 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5709 to enforce the documentation of this attribute.
5710 (Set_Is_Interface): Cleanup the assertion.
5711 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5712 the Underlying_Type entity before reading attribute Access_Disp_Table.
5713 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5714 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5715 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5716 the Underlying_Type entity before reading attribute Access_Disp_Table.
5717 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5718 Locate the Underlying_Type entity before reading attribute
5721 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5723 * s-poosiz.ads: Additional overriding indicators.
5725 2011-08-01 Yannick Moy <moy@adacore.com>
5727 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5729 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5730 parameter specification does not include a subtype mark.
5731 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5732 formal mode on abstract subprogram.
5733 (Analyze_Subprogram_Specification): issue error in formal mode on
5734 user-defined operator.
5735 (Process_Formals): issue error in formal mode on access parameter and
5737 * sem_ch9.adb (Analyze_Abort_Statement,
5738 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5739 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5740 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5741 Analyze_Requeue, Analyze_Selective_Accept,
5742 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5743 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5744 issue error in formal mode on user-defined raise statement.
5746 2011-08-01 Thomas Quinot <quinot@adacore.com>
5748 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5749 declaration being hidden when overriding an implicit inherited
5751 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5752 (-gnats), do not complain about a source file that contains only a
5755 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5757 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5758 variable if already set.
5760 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5762 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5763 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5764 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5765 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5766 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5767 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5768 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5769 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5770 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5771 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5772 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5773 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5774 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5775 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5776 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5777 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5778 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5779 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5780 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5781 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5782 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5783 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5784 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5785 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5786 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5787 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5788 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5789 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5790 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5791 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5792 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5793 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5794 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5795 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5796 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5797 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5798 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5799 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5800 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5801 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5802 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5803 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5804 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5805 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5806 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5807 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5808 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5809 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5810 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5811 Use GNAT instead of GNARL.
5813 2011-08-01 Bob Duff <duff@adacore.com>
5815 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5816 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5817 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5820 2011-08-01 Yannick Moy <moy@adacore.com>
5822 * debug.adb (d.D) reverve flag for the SPARK mode
5823 (d.E) reverve flag for SPARK generation mode
5824 (d.F) reverve flag for Why generation mode
5825 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
5826 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5827 functions which return True when the corresponding modes are set
5828 (Formal_Language): return "spark" or "alfa" when in formal verification
5830 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5831 Error_Msg to prefix the error message with a tag giving the formal
5833 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5834 message with a tag giving the formal language
5835 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5837 (Analyze_Case_Statement): issue error in formal mode on case statement
5838 with a single "others" case alternative
5839 (Analyze_Exit_Statement): issue errors in formal mode on exit
5840 statements which do not respect SPARK restrictions
5841 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5842 (Check_Unreachable_Code): always issue an error (not a warning) in
5843 formal mode on unreachable code (concerns both code after an infinite
5844 loop and after an unconditional jump, both not allowed in SPARK)
5845 * sem_ch6.adb (Analyze_Return_Statement): add call to
5846 Set_Return_Present for a procedure containing a return statement
5847 (already done for functions in Analyze_Function_Return)
5848 (Analyze_Function_Return): issue error in formal mode on extended
5849 return or if return is not last statement in function
5850 (Check_Missing_Return): issue error in formal mode if function does
5851 not end with return or if procedure contains a return
5852 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5853 function to detect if there is an inner scope of its parameter S which
5856 2011-08-01 Thomas Quinot <quinot@adacore.com>
5858 * sem_ch6.ads: Minor reformatting.
5860 2011-08-01 Javier Miranda <miranda@adacore.com>
5862 * sem_util.adb (Abstract_Interface_List): Complete condition when
5863 processing private type declarations to avoid reading unavailable
5865 (Is_Synchronized_Tagged_Type): Complete condition when processing
5866 private extension declaration nodes to avoid reading unavailable
5869 2011-08-01 Thomas Quinot <quinot@adacore.com>
5871 * sem_ch3.adb: Minor reformatting.
5873 2011-08-01 Thomas Quinot <quinot@adacore.com>
5875 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5876 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5877 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5878 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5879 for VMS, instead parametrize the common implementation with
5880 System.Parameters declarations.
5882 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5884 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5886 2011-08-01 Tristan Gingold <gingold@adacore.com>
5888 * seh_init.c: Fix SEH handler installation on win64.
5890 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5892 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5893 double analysis of an anonymous access to subprogram, because it can
5894 lead to improper sharing of profiles and a back-end crash.
5896 2011-08-01 Robert Dewar <dewar@adacore.com>
5898 * make.adb, sem_ch4.adb: Minor reformatting.
5899 * gcc-interface/Make-lang.in: Update dependencies.
5900 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5902 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5904 * gnat_rm.texi: Fix definition of Long_Integer.
5906 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5908 * exp_aggr.adb: check limit size of static aggregate unconditionally,
5909 to prevent storage exhaustion.
5910 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
5911 finalized is a function body, insert the cleanup code before the final
5912 return statement, to prevent spurious warnings.
5913 * s-pooglo.ads: add overriding indicator.
5915 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5917 * sem_ch4.adb (Operator_Check): improve error message when both a
5918 with_clause and a use_clause are needed to make operator usage legal.
5919 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
5920 determine whether a compilation unit is visible within an other,
5921 either through a with_clause in the current unit, or a with_clause in
5922 its library unit or one one of its parents.
5924 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5926 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
5927 over an arbitrary expression of an array or container type.
5928 * lib-xref.adb: clarify comment.
5930 2011-08-01 Bob Duff <duff@adacore.com>
5932 * einfo.ads: Minor reformatting.
5933 * debug.adb: Minor comment improvement.
5935 2011-08-01 Javier Miranda <miranda@adacore.com>
5937 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
5938 consider hidden subprograms as valid candidates.
5940 2011-08-01 Arnaud Charlet <charlet@adacore.com>
5942 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
5944 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
5946 * gnat_ugn.texi: Fix typo.
5948 2011-08-01 Robert Dewar <dewar@adacore.com>
5950 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
5951 lib-xref.adb: Minor reformatting
5953 2011-08-01 Gary Dismukes <dismukes@adacore.com>
5955 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
5956 when to generate a call to Move_Final_List.
5957 (Has_Controlled_Parts): Remove this function.
5959 2011-08-01 Geert Bosch <bosch@adacore.com>
5961 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
5964 2011-08-01 Thomas Quinot <quinot@adacore.com>
5966 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
5967 explicit raise of a predefined exception as Comes_From_Source if the
5968 original N_Raise_Statement comes from source.
5970 2011-08-01 Robert Dewar <dewar@adacore.com>
5972 * sinfo.ads: Add comment.
5973 * sem_ch6.adb: Minor reformatting.
5975 2011-08-01 Robert Dewar <dewar@adacore.com>
5977 * freeze.adb (Freeze_Entity): Refine check for bad component size
5978 clause to avoid rejecting confirming clause when atomic/aliased present.
5980 2011-08-01 Ed Schonberg <schonberg@adacore.com>
5982 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
5983 better determine whether an entity reference is a write.
5984 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
5986 * lib-xref.adb (Output_References): Do no suppress a read reference at
5987 the same location as an immediately preceeding modify-reference, to
5988 handle properly in-out actuals.
5990 2011-08-01 Tristan Gingold <gingold@adacore.com>
5992 * env.c (__gnat_setenv) [VMS]: Refine previous change.
5994 2011-08-01 Quentin Ochem <ochem@adacore.com>
5996 * i-cstrin.adb (New_String): Changed implementation, now uses only the
5997 heap to compute the result.
5999 2011-08-01 Robert Dewar <dewar@adacore.com>
6001 * atree.ads: Minor reformatting.
6003 2011-08-01 Emmanuel Briot <briot@adacore.com>
6005 * g-expect.adb (Get_Command_Output): Fix memory leak.
6007 2011-08-01 Geert Bosch <bosch@adacore.com>
6009 * cstand.adb (P_Float_Type): New procedure to print the definition of
6010 predefined fpt types.
6011 (P_Mixed_Name): New procedure to print a name using mixed case
6012 (Print_Standard): Use P_Float_Type for printing floating point types
6013 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6014 precision IEEE float.
6016 2011-08-01 Thomas Quinot <quinot@adacore.com>
6018 * sem_ch3.adb: Minor reformatting.
6020 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6022 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6023 the completion of a generic function, insert the new body rather than
6024 rewriting the original.
6026 2011-08-01 Yannick Moy <moy@adacore.com>
6028 * sinfo.ads, errout.ads: Typos in comments.
6030 2011-08-01 Robert Dewar <dewar@adacore.com>
6032 * par-endh.adb: Minor reformatting.
6034 2011-08-01 Robert Dewar <dewar@adacore.com>
6036 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6037 (Pre_Post_Aspects): New subtype.
6038 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6039 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6040 * par-ch7.adb (P_Package): Remove Decl parameter
6041 (P_Package): Handle new syntax for aspects (before IS)
6042 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6044 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6045 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6046 (P_Package): Remove Decl parameter
6047 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6049 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6051 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6052 * sinfo.ads: Document new syntax for aspects in packages etc.
6053 * sprint.adb: Handle new syntax of aspects before IS in package
6055 2011-08-01 Thomas Quinot <quinot@adacore.com>
6057 * atree.ads: Minor reformatting.
6058 * sem_prag.adb: Minor reformatting.
6060 2011-08-01 Robert Dewar <dewar@adacore.com>
6062 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6063 case expr alternative.
6065 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6067 * sem_ch12.adb: Fix typo.
6069 2011-08-01 Geert Bosch <bosch@adacore.com>
6071 * sem_prag.adb (Check_No_Link_Name): New procedure.
6072 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6073 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6074 instead of Standard_Long_Long_Float_Size global. Preparation for
6075 eventual removal of per type constants.
6076 * exp_util.ads (Get_Stream_Size): New function returning the stream
6077 size value of subtype E.
6078 * exp_util.adb (Get_Stream_Size): Implement new function.
6079 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6081 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6083 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6085 2011-08-01 Geert Bosch <bosch@adacore.com>
6087 * cstand.adb: Fix comments.
6088 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6091 2011-08-01 Robert Dewar <dewar@adacore.com>
6093 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6095 2011-08-01 Geert Bosch <bosch@adacore.com>
6097 * atree.ads: Fix comment.
6099 2011-08-01 Robert Dewar <dewar@adacore.com>
6101 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6102 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6103 * par.adb: Add with for Namet.Sp.
6104 * par-tchk.adb: Minor reformatting.
6106 2011-08-01 Vincent Celier <celier@adacore.com>
6108 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6109 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6110 of the init procedure of a SAL.
6111 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6114 2011-08-01 Thomas Quinot <quinot@adacore.com>
6116 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6119 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6121 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6123 2011-08-01 Thomas Quinot <quinot@adacore.com>
6125 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6126 conformant with its spec (return True only for types that have
6127 an overriding Initialize primitive operation that prevents them from
6128 having preelaborable initialization).
6129 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6130 initialization for controlled types in Ada 2005 or later mode.
6132 2011-08-01 Robert Dewar <dewar@adacore.com>
6134 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6136 (Same_Aspect): New function.
6137 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6138 Type_Invariant, Precondition, Postcondition.
6139 * snames.ads-tmpl: Add Name_Type_Invariant.
6141 2011-08-01 Robert Dewar <dewar@adacore.com>
6143 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6145 (Freeze_All_Ent): Fix error in handling inherited aspects.
6146 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6147 already analyzed, but don't skip entire processing of a declaration,
6148 that's wrong in some cases of declarations being rewritten.
6149 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6150 Don't delay for integer, string literals
6151 Treat predicates in usual manner for delay, remove special case code,
6153 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6154 (Build_Predicate_Function): Update saved expression in aspect
6155 (Build_Invariant_Procedure): Update saved expression in aspect
6156 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6157 of replacement of discriminant references if the reference is simple.
6159 2011-08-01 Robert Dewar <dewar@adacore.com>
6161 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6162 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6163 Static_Predicate and Dynamic_Predicate.
6164 (Build_Predicate_Function): Add processing for Static_Predicate
6165 and Dynamic_Predicate.
6166 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6167 (From_Static_Predicate): New flag
6168 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6170 2011-08-01 Robert Dewar <dewar@adacore.com>
6172 * usage.adb: Documentation cleanup for Ada version modes in usage.
6173 * expander.adb: Minor reformatting.
6175 2011-08-01 Robert Dewar <dewar@adacore.com>
6177 * atree.ads: Minor comment fix.
6178 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6179 a-witeio.ads, sem_prag.adb: Minor reformatting.
6181 2011-08-01 Doug Rupp <rupp@adacore.com>
6183 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6184 pointers. Use descrip.h header file for convenience. Add some
6187 2011-08-01 Robert Dewar <dewar@adacore.com>
6189 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6190 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6191 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6193 (Check_Aspect_At_End_Of_Declarations): New procedure
6194 (Analye_Aspect_Specification): Minor changes for above procedures
6195 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6196 specification node as well.
6198 2011-08-01 Pascal Obry <obry@adacore.com>
6200 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6201 Windows files. Use GetFilesAttributes() in this case to check for file
6202 existence instead of returning with an error code.
6204 2011-08-01 Vincent Celier <celier@adacore.com>
6206 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6207 High is above Source length.
6209 2011-08-01 Robert Dewar <dewar@adacore.com>
6211 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6213 2011-08-01 Robert Dewar <dewar@adacore.com>
6215 * aspects.ads (Boolean_Aspects): New subtype.
6216 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6217 for derived types in cases where the parent type and derived type have
6219 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6220 with aspects when parent type also has aspects.
6221 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6222 boolean expression at this point).
6223 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6224 accordance with final decision on the Ada 2012 feature.
6225 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6227 2011-08-01 Matthew Heaney <heaney@adacore.com>
6229 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6231 2011-08-01 Pascal Obry <obry@adacore.com>
6233 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6234 Fix Replace_Slice when High is above current string size.
6235 (Replace_Slice): Fix DL computation when High is above current
6238 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6240 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6242 2011-08-01 Matthew Heaney <heaney@adacore.com>
6244 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6247 2011-08-01 Pascal Obry <obry@adacore.com>
6249 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6252 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6254 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6255 access to protected subprograms in generic bodies.
6256 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6257 protected type, indicate that the convention of the subprogram is
6258 Convention_Protected, because it may be used in subsequent declarations
6259 within the protected declaration.
6261 2011-08-01 Vincent Celier <celier@adacore.com>
6263 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6264 and "final" procedures when the name of the library is "ada", to avoid
6265 duplicate symbols "adainit" and "adafinal" in executables.
6267 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6269 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6270 quantified expression that appears within a postcondition and uses the
6271 Ada2012 'Result attribute.
6273 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6275 * init.c (__gnat_error_handler): Cast reason to int.
6276 (__gnat_install_handler): Explain sa_sigaction use.
6278 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6280 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6281 subprogram has copy-in copy-out parameters, try to promote the mode of
6282 the return type if it is passed in registers.
6284 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6286 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6287 left operand as addressable.
6289 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6291 * gcc-interface/gigi.h (build_function_stub): Remove.
6292 (build_return_expr): Likewise.
6293 (convert_vms_descriptor): Declare.
6294 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6295 (build_function_stub): Move to...
6296 * gcc-interface/utils2.c (build_return_expr): Move to...
6297 * gcc-interface/trans.c (build_function_stub): ...here.
6298 (build_return_expr): ...here.
6299 (Subprogram_Body_to_gnu): Add local variable for language_function.
6300 Disconnect the parameter attributes cache, if any, once done with it.
6301 Call end_subprog_body only after setting the end_locus.
6302 Build the stub associated with the function, if any, at the very end.
6303 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6304 variables and streamline control flow.
6306 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6309 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6312 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6315 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6316 Assign to act.sa_sigaction.
6317 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6318 current->return_address to char * before arithmetic.
6320 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6322 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6323 Correct argument types.
6324 Extract code from reason.
6325 (__gnat_install_handler): Assign to act.sa_sigaction.
6327 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6329 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6330 (GNAT1_OBJS): ...here.
6332 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6335 * g-socthi-mingw.adb (Fill): Fix formatting.
6337 * gcc-interface/gigi.h: Move around comment.
6339 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6342 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6344 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6347 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6349 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6351 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6352 range comparison if Pmode is SImode.
6354 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6355 Eric Botcazou <ebotcazou@adacore.com>
6357 * adadecode.c: Wrap up in extern "C" block.
6358 * adadecode.h: Likewise.
6359 * adaint.c: Likewise. Remove 'const' keyword.
6360 * adaint.h: Likewise.
6362 * atree.h: Likewise.
6364 * cstreams.c: Likewise.
6368 * final.c: Likewise.
6370 * initialize.c: Likewise.
6372 * namet.h: Likewise.
6373 * nlists.h: Likewise.
6374 * raise.c: Likewise.
6375 * raise.h: Likewise.
6376 * repinfo.h: Likewise.
6377 * seh_init.c: Likewise.
6378 * targext.c: Likewise.
6379 * tracebak.c: Likewise.
6380 * uintp.h: Likewise.
6381 * urealp.h: Likewise.
6382 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6383 * xsinfo.adb: Likewise.
6384 * xsnamest.adb: Likewise.
6385 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6386 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6387 * gcc-interface/misc.c: Likewise.
6388 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6389 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6390 ada/targext.o here...
6391 (GNAT_ADA_OBJS): ...and not here.
6392 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6393 (GNATBIND_OBJS): Reorder.
6395 2011-07-07 Richard Henderson <rth@redhat.com>
6397 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6398 dwarf2out_frame_init.
6400 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6402 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6404 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6407 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6409 2011-07-06 Richard Guenther <rguenther@suse.de>
6411 * gcc-interface/misc.c (gnat_init): Merge calls to
6412 build_common_tree_nodes and build_common_tree_nodes_2.
6413 Re-initialize boolean_false_node.
6415 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6416 Olivier Hainque <hainque@adacore.com>
6417 Nicolas Setton <setton@adacore.com>
6419 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6420 the type according to the ARTIFICIAL_P parameter.
6421 (create_type_decl): Likewise.
6422 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6424 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6426 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6427 (gnatbind): Likewise.
6429 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6431 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6433 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6435 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6436 local variable throughout. Remove useless call to Base_Type.
6437 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6438 Take it also into account for the volatileness of the field. Set the
6439 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6441 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6443 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6444 on a dereference built for a by-ref object if it has an address clause.
6446 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6448 * einfo.ads (Address_Taken): Document use for the second argument of
6449 Asm_Input and Asm_Output attributes.
6450 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6451 argument is an entity name, then set Address_Taken on it.
6452 <Attribute_Asm_Output>: Likewise.
6453 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6454 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6455 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6456 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6458 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6461 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6463 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6465 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6466 (ada/utils.o): Update dependencies.
6467 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6468 ../../../libcpp/libcpp.a.
6469 * gcc-interface/utils.c: Include common/common-target.h.
6470 (process_attributes): Use targetm_common.have_named_sections.
6472 2011-06-07 Richard Guenther <rguenther@suse.de>
6474 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6477 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6479 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6480 TREE_THIS_NOTRAP flag.
6482 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6484 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6487 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6489 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6490 constants whose full view has discriminants specially.
6492 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6494 * gcc-interface/utils.c: Include diagnostic.h.
6495 (gnat_write_global_declarations): Output debug information for all
6496 global type declarations before finalizing the compilation unit.
6497 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6499 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6501 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6503 2011-05-25 Kai Tietz <ktietz@redhat.com>
6505 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6506 initialization instead of const/none-const pointer assignment.
6508 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6510 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6511 $(EXTRA_GNAT1_OBJS).
6512 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6513 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6514 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6515 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6516 libcommon-target.a instead of prefix.o.
6518 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6521 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6523 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6525 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6526 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6527 instead of version.o.
6529 2011-05-18 Kai Tietz <ktietz@redhat.com>
6531 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6532 boolean_false_node instead of integer_zero_node.
6533 (convert_with_check): Likewise.
6534 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6536 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6538 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6539 type of the parameter is an unconstrained array, convert the actual to
6540 the type of the formal in the In Out and Out cases as well.
6542 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6544 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6545 call build_function_type_array or build_varargs_function_type_array
6547 (create_subprog_type): Don't call build_function_type; call
6548 build_function_type_vec instead.
6550 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6552 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6553 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6554 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6556 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6558 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6560 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6561 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6563 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6565 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6567 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6569 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6570 instead of accessing TYPE_ARG_TYPES directly.
6571 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6573 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6576 * gcc-interface/gigi.h (get_variant_part): Declare.
6577 * gcc-interface/decl.c (get_variant_part): Make global.
6578 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6579 types have the same constant size, are record types and T1 has a
6580 variant part while T2 doesn't.
6582 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6584 * gcc-interface/utils.c (begin_subprog_body): Do not call
6586 (end_subprog_body): Likewise.
6588 2011-05-04 Richard Guenther <rguenther@suse.de>
6590 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6592 (pos_to_constructor): Likewise.
6594 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
6595 Eric Botcazou <ebotcazou@adacore.com>
6597 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6598 of build_function_type. Adjust calls to...
6599 (build_raise_check): ...this. Do not take a void_tree parameter.
6600 Call build_function_type_list instead of build_function_type.
6601 Fix head comment and swap couple of conditional blocks.
6603 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6605 * gnatvsn.ads (Library_Version): Bump to 4.7.
6606 (Current_Year): Bump to 2011.
6608 2011-04-29 Michael Matz <matz@suse.de>
6610 * gcc-interface/misc.c (gnat_handle_option): Set
6611 warn_maybe_uninitialized.
6613 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6615 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6616 the Watson/McCabe paper.
6618 2011-04-23 Jim Meyering <meyering@redhat.com>
6620 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6622 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6624 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6627 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6629 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6631 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6632 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6633 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6634 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6635 <all>: Do not set flags on the reused DECL node coming from an alias.
6636 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6637 don't need debug info here...
6638 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6639 (gigi): Adjust calls to create_subprog_decl.
6640 (build_raise_check): Likewise.
6641 (establish_gnat_vms_condition_handler): Likewise.
6642 (Compilation_Unit_to_gnu): Likewise.
6643 (gnat_to_gnu): Likewise.
6645 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6647 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6648 (NO_REORDER_ADAFLAGS): New variable.
6649 (EXTRA_GNATTOOLS): Always define.
6650 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6651 Clean up and adjust list of files compiled with special options.
6652 * gcc-interface/Make-lang.in: Likewise.
6653 (ada/decl.o): Cosmetical change.
6654 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6656 2011-04-20 Jim Meyering <meyering@redhat.com>
6658 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6660 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6662 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6663 $(CFLAGS) on the link line.
6665 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6667 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6668 padded type built for the return type if it is unconstrained.
6670 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6672 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6674 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6676 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6677 before calling TREE_CHAIN.
6678 * gcc-interface/misc.c (gnat_init_ts): New function.
6679 (LANG_HOOKS_INIT_TS): Define.
6681 2011-04-12 Martin Jambor <mjambor@suse.cz>
6683 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6684 instead of cgraph_node.
6686 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6688 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6689 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6692 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6694 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6695 of aggregate types that contain a placeholder.
6697 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6699 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6701 (handle_type_generic_attribute): Likewise.
6703 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6706 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6708 2011-04-04 Kai Tietz <ktietz@redhat.com>
6711 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6714 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6716 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6717 type case, do not strip a padding type around the array type.
6719 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6721 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6724 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6726 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6727 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6728 code for -feliminate-unused-debug-types.
6729 (gnat_post_options): Likewise.
6731 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6733 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6734 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6737 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6739 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6740 DECL_ARTIFICIAL flag on enumeration types.
6742 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6744 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6745 fat pointer types artificial unconditionally.
6746 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6749 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6751 * gcc-interface/gigi.h (get_dummy_type): Declare.
6752 (build_dummy_unc_pointer_types): Likewise.
6753 (finish_fat_pointer_type): Likewise.
6754 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6755 fat pointer type has been built, complete it in place.
6756 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6757 and thin pointers. Remove useless variable.
6758 (finish_fat_pointer_type): Make global and move to...
6759 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6760 (get_dummy_type): New function.
6761 (build_dummy_unc_pointer_types): Likewise.
6762 (gnat_pushdecl): Propage the name to the anonymous variants only.
6763 (update_pointer_to): Only adjust the pointer types in the unconstrained
6766 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6768 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6769 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6770 if this is a Taft amendment type and the full declaration is available.
6771 * gcc-interface/trans.c (process_type): Likewise.
6772 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6773 (process_freeze_entity): Likewise.
6774 * gcc-interface/utils.c (dummy_global): New static variable.
6775 (gnat_write_global_declarations): If there are types declared as used
6776 at the global level, insert them in the global hash table.
6778 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6780 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6781 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6782 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6784 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6785 flag of the type accordingly.
6786 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6788 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6790 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6791 finalizing types when updating the pointers to the designated type.
6792 <all>: Finalize the deferred types even if we didn't defer processing
6793 of incomplete types in this invocation.
6795 2011-04-01 Olivier Hainque <hainque@adacore.com>
6796 Nicolas Setton <setton@adacore.com>
6797 Eric Botcazou <ebotcazou@adacore.com>
6799 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6800 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6802 2011-03-28 Kai Tietz <ktietz@redhat.com>
6804 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6806 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6807 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6809 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6811 2011-03-28 Tristan Gingold <gingold@adacore.com>
6814 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6815 Use ada output of gnatbind.
6816 (ada/b_gnatb.adb): Ditto.
6817 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6818 (ada.mostlyclean, ada.stage1)
6819 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6820 (ada.stagefeedback): Adjust.
6821 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6822 Use ada output of gnatbind.
6823 (b_gnatm.adb): Ditto.
6824 (b_gnatl.o, b_gnatm.o): New rules.
6826 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6828 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6829 for the padded type built to support a specified size or alignment.
6831 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6833 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6834 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6835 unconditionally to the end of the unit when the designated type is
6837 <all>: Rename local variable. Attempt to un-defer types only and do it
6838 for limited_with'ed types as well.
6839 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6840 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6841 consistently and remove redundant call to finalize_from_with_types.
6843 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6845 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6846 subprograms without a previous spec declared in the same unit.
6847 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6848 subprograms at the end of the unit instead of at the beginning.
6849 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6850 isn't public for the special handling of non-inline functions nested
6851 inside inline external functions.
6853 2011-03-25 Jeff Law <law@redhat.com>
6855 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6857 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6859 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6860 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6861 to compute Set_Size_Depends_On_Discriminant.
6862 (Layout_Type): Call it on array types in back-end layout mode.
6863 * sem_util.adb (Requires_Transient_Scope): Return true for array
6864 types only if the size depends on the value of discriminants.
6865 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6866 type if the RHS is a call to a function that returns an unconstrained
6867 type with default discriminant.
6869 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6871 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6872 non-conversion to the nominal result type at the end.
6874 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6876 * gcc-interface/trans.c (create_temporary): New function taken from...
6877 (create_init_temporary): ...here. Call it.
6878 (call_to_gnu): Create the temporary for the return value early, if any.
6879 Create it for a function with copy-in/copy-out parameters if there is
6880 no target; in other cases of copy-in/copy-out, use another temporary.
6881 Push the new binding level lazily. Add and rename local variables.
6883 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6885 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6887 (set_rm_size): Likewise.
6889 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6891 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6892 for the padded type built in order to support a specified alignment.
6893 Fix incorrect formatting.
6895 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6898 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6900 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6902 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6903 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6904 to the end of the list. Adjust recursive call. Rename local variable.
6905 If REORDER is true, reorder components of the record type.
6906 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6907 components_to_record and adjust the parameter list.
6909 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6911 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
6912 disabled, use the variable for bounds of loop iteration scheme.
6914 2011-03-21 Kai Tietz <ktietz@redhat.com>
6917 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
6919 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6921 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
6922 out whether the expression is read-only. Short-circuit placeholder
6923 case and rename a couple of local variables.
6925 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
6927 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
6928 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
6929 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
6930 (convert): Deal with conversions from a smaller form type specially.
6932 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
6934 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
6935 its argument, except for the special -I- switch.
6937 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
6939 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
6942 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
6944 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
6946 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
6948 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
6950 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
6951 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
6952 instead of GNAT_FORMAL. Protect the expression against multiple uses.
6953 Do not generate the check directly, instead instantiate the template
6954 check present in the descriptor.
6955 (make_descriptor_field): Move around.
6956 (build_vms_descriptor32): Build a template check in the POINTER field.
6957 (build_vms_descriptor): Remove useless suffixes.
6958 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
6960 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
6963 * targext.c: Include target files if IN_RTS is defined.
6965 2011-01-26 Richard Guenther <rguenther@suse.de>
6968 * targext.c: Include config.h.
6969 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
6972 2011-01-04 Pascal Obry <obry@adacore.com>
6973 Eric Botcazou <ebotcazou@adacore.com>
6975 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
6977 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6979 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
6980 end-of-case on the end label and its associated gotos, if any.
6982 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
6984 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
6985 expressions of the parameter cache within the statement group of
6988 2011-01-04 Olivier Hainque <hainque@adacore.com>
6989 Eric Botcazou <ebotcazou@adacore.com>
6991 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
6992 (set_end_locus_from_node): New function.
6993 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
6994 make and the function end_locus.
6995 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
6996 for the elaboration subprogram.
6997 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
6998 set the end_locus of the expression as well.
7000 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7003 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7004 variables that are referenced in exception handlers volatile.
7008 Copyright (C) 2011 Free Software Foundation, Inc.
7010 Copying and distribution of this file, with or without modification,
7011 are permitted in any medium without royalty provided the copyright
7012 notice and this notice are preserved.
7014 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7015 - fix bugs in the description of Source_Trace;
7016 - get rid of UNIT_NAME;
7018 2011-08-02 Javier Miranda <miranda@adacore.com>
7021 (Build_Dispatching_Requeue): Adding support for VM targets
7022 since we cannot directly reference the Tag entity.
7023 * exp_sel.adb (Build_K): Adding support for VM targets.
7024 (Build_S_Assignment): Adding support for VM targets.
7026 (Default_Prim_Op_Position): In VM targets do not restrict availability
7027 of predefined interface primitives to compiling in Ada 2005 mode.
7028 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7029 restricted to compiling in Ada 2005 mode.
7030 (Make_VM_TSD): Generate code that declares and initializes the OSD
7031 record. Needed to support dispatching calls through synchronized
7034 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7035 primitives associated with synchronized interfaces.
7036 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7037 primitives associated with synchronized interfaces.
7039 2011-08-02 Yannick Moy <moy@adacore.com>
7041 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7042 statements hidden in SPARK if preceded by the HIDE directive
7043 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7044 exception handlers as hidden in SPARK if preceded by the HIDE directive
7045 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7046 if starting with the HIDE directive
7047 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7048 starting with the HIDE directive; mark the declarations in a private
7049 part as hidden in SPARK if the private part starts with the HIDE
7051 * restrict.adb, restrict.ads
7052 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7053 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7054 argument node belongs to a part which is hidden in SPARK
7055 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7056 parts in SPARK; protect the possibly costly call to
7057 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7058 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7059 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7060 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7062 (Scan): recognize special comment starting with '#' and followed by
7063 SPARK keyword "hide" as a HIDE directive.
7065 2011-08-02 Yannick Moy <moy@adacore.com>
7067 * types.ads, erroutc.ads: Minor reformatting.
7069 2011-08-02 Vincent Celier <celier@adacore.com>
7071 * link.c: Add response file support for cross platforms.
7073 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7075 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7076 in an association, set parent field of copy before partial analysis.
7077 * sem_res.adb (Resolve_Slice): create reference to itype only when
7078 expansion is enabled.
7080 2011-08-02 Yannick Moy <moy@adacore.com>
7082 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7083 for new flag denoting which subprogram bodies are in ALFA
7084 * restrict.adb, sem_ch7.adb: Update comment
7085 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7086 sem_ch9.adb, sem_res.adb: Add calls to
7087 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7088 * sem_ch6.adb (Analyze_Function_Return): add calls to
7089 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7090 middle of the body, and extended return.
7091 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7092 False when missing return.
7093 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7094 to True for subprograms whose spec is in ALFA. Remove later on the flag
7095 on the entity used for a subprogram body when there exists a separate
7097 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7098 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7099 False, otherwise do nothing.
7101 2011-08-02 Robert Dewar <dewar@adacore.com>
7103 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7105 2011-08-02 Yannick Moy <moy@adacore.com>
7107 * sem_ch4.ads: minor formatting.
7109 2011-08-02 Yannick Moy <moy@adacore.com>
7111 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7112 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7113 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7114 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7115 opt.ads: cleanup of SPARK mode
7117 2011-08-02 Yannick Moy <moy@adacore.com>
7119 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7121 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7122 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7124 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7125 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7126 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7127 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7129 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7131 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7132 functions whose return type is not in ALFA.
7133 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7135 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7136 parameter's type is not in ALFA.
7137 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7140 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7142 * sem_ch6 (Analyze_Expression_Function): treat the function as
7143 Inline_Always, and introduce a subprogram declaration for it when it is
7145 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7146 expression functions, so that the back-end can determine whether they
7147 can in fact be inlined.
7148 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7149 a function body comes from an expression function.
7151 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7153 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7154 null exclusions to test Can_Never_Be_Null on the anonymous access types
7155 of the formals rather than testing the formals themselves. Exclude this
7156 check in cases where the Old_Formal is marked as a controlling formal,
7157 to avoid issuing spurious errors for bodies completing dispatching
7158 operations (due to the flag not getting set on controlling access
7159 formals in body specs).
7160 (Find_Corresponding_Spec): When checking full and subtype conformance of
7161 subprogram bodies in instances, pass Designated and E in that order, for
7162 consistency with the expected order of the formals (New_Id followed by
7165 2011-08-02 Robert Dewar <dewar@adacore.com>
7167 * sem_ch8.adb: Minor reformatting.
7169 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7171 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7172 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7173 primitive operations of class-wide actuals.
7175 2011-08-02 Javier Miranda <miranda@adacore.com>
7177 * exp_atag.ads, exp_atag.adb
7178 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7179 since its value is implicitly passed in argument Typ.
7180 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7181 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7182 Build_Common_Dispatching_Select_Statements.
7184 2011-08-02 Robert Dewar <dewar@adacore.com>
7186 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7187 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7190 2011-08-02 Robert Dewar <dewar@adacore.com>
7192 * sem_res.adb: Minor reformatting.
7193 * sem_prag.adb: Minor reformatting.
7195 2011-08-02 Javier Miranda <miranda@adacore.com>
7197 * exp_atag.adb, exp_atags.ads
7198 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7199 by the tagged type Entity. Required to use this routine in the VM
7200 targets since we do not have available the Tag entity in the VM
7203 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7204 Ada.Tags has not been previously loaded.
7206 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7207 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7209 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7210 view of enclosing scopes. Required to handle enclosing scopes that
7211 are synchronized types whose full view is a task type.
7213 (Build_VM_TSDs): Minor code improvement to avoid generating and
7214 analyzing lists with empty nodes.
7215 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7216 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7217 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7218 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7219 (Make_Select_Specific_Data_Table): Add support for VM targets.
7220 (Make_VM_TSD): Generate code to initialize the SSD structure of
7223 2011-08-02 Yannick Moy <moy@adacore.com>
7225 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7226 cross-references section in ALI.
7227 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7228 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7230 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7231 subprogram or package entity of a node
7232 (Is_Local_Reference_Type): new function returns True for references
7233 selected in local cross-references.
7234 (Lt): function extracted from Lt in Output_References
7235 (Write_Entity_Name): function extracted from Output_References
7236 (Generate_Definition): generate reference with type 'D' for definition
7237 of objects (object declaration and parameter specification), with
7238 appropriate locations and units, for use in local cross-references.
7239 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7240 references of type 'I' for initialization in object definition.
7241 (Output_References): move part of function Lt and procedure
7242 Write_Entity_Name outside of the body. Ignore references of types 'D'
7243 and 'I' introduced for local cross-references.
7244 (Output_Local_References): new procedure to output the local
7245 cross-references sections.
7246 (Lref_Entity_Status): new array defining whether an entity is a local
7247 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7248 with 'I' type when initialization expression is present.
7249 * get_scos.adb, get_scos.ads: Correct comments and typos
7251 2011-08-02 Javier Miranda <miranda@adacore.com>
7253 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7255 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7257 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7260 2011-08-02 Vincent Celier <celier@adacore.com>
7262 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7263 (No_Space_Img): New function
7264 (Find_Excluded_Sources): When reading from a file, record the file name
7265 and the line number for each excluded source.
7266 (Mark_Excluded_Sources): When reporting an error, if the excluded
7267 sources were read from a file, include file name and line number in
7270 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7272 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7274 2011-08-02 Robert Dewar <dewar@adacore.com>
7276 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7278 2011-08-02 Javier Miranda <miranda@adacore.com>
7280 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7281 generation of TSDs to the DOTNET compiler.
7282 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7283 generation of TSDs to the DOTNET compiler.
7285 2011-08-02 Javier Miranda <miranda@adacore.com>
7287 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7288 record of all the tagged types declared inside library level package
7289 declarations, library level package bodies or library level subprograms.
7290 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7291 associated with a given tagged type.
7292 (Build_VM_TSDs): New subprogram.
7293 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7294 compilation units that are subprograms.
7295 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7296 compilation units that are package bodies.
7297 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7298 units that are a package declaration or a package instantiation.
7299 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7300 reorganization to improve the error generated by the frontend when the
7301 function Ada.Tags.Secondary_Tag is not available.
7302 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7303 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7305 2011-08-02 Javier Miranda <miranda@adacore.com>
7307 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7309 2011-08-02 Robert Dewar <dewar@adacore.com>
7311 * s-imenne.ads: Minor reformatting.
7313 2011-08-02 Robert Dewar <dewar@adacore.com>
7315 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7316 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7317 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7319 2011-08-02 Robert Dewar <dewar@adacore.com>
7321 * einfo.ads (Materialize_Entity): Document this is only for renamings
7322 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7323 required debug information in the case where we transform the object
7324 declaration into a renaming declaration.
7325 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7327 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7330 2011-08-02 Robert Dewar <dewar@adacore.com>
7332 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7333 Suppress_Init_Procs.
7334 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7335 Suppress_Initialization/Initialization_Suppressed.
7336 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7337 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7338 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7339 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7341 2011-08-02 Robert Dewar <dewar@adacore.com>
7343 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7346 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7348 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7349 only have inheritable classwide pre/postconditions.
7351 2011-08-02 Javier Miranda <miranda@adacore.com>
7353 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7354 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7355 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7356 checks if the external tag of a type is the same as the external tag
7357 of some other declaration.
7359 2011-08-02 Thomas Quinot <quinot@adacore.com>
7361 * s-taskin.ads: Minor reformatting.
7363 2011-08-02 Emmanuel Briot <briot@adacore.com>
7365 * g-comlin.adb (Display_Help): swap the order in which it prints the
7366 short help and the general usage.
7368 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7370 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7371 the aspect declarations and attach them to the generic copy for
7372 subsequent analysis.
7373 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7374 declarations of the generic tree to the new subprogram declarations.
7375 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7376 conditions that apply to a subprogram instance.
7378 2011-08-02 Robert Dewar <dewar@adacore.com>
7380 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7382 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7384 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7385 private type with a tagged full view is not derived in the immediate
7386 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7388 2011-08-02 Robert Dewar <dewar@adacore.com>
7390 * exp_ch4.adb: Minor reformatting.
7392 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7394 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7395 Ada2012 iterator, the loop will be rewritten during expansion into a
7396 while loop with a cursor and an element declaration. Do not analyze the
7397 body in this case, because if the container is for indefinite types the
7398 actual subtype of the elements will only be determined when the cursor
7399 declaration is analyzed.
7401 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7403 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7404 size/alignment related attributes in CodePeer_Mode.
7406 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7408 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7409 Prepend_Element, since this can result in the operation getting the
7410 wrong slot in the full type's dispatch table if the full type has
7411 inherited operations. The incomplete type's operation will get added
7412 to the proper position in the full type's primitives
7413 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7414 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7415 dispatching operations, since there are cases where nonprimitive
7416 subprograms can get added to the list of incomplete dependents (such
7417 as subprograms in nested packages).
7418 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7419 private part when determining whether to add a primitive with a
7420 parameter of a tagged incomplete type to the Private_Dependents list.
7421 Such primitives can also occur in the visible part, and should not have
7422 been excluded from being private dependents.
7423 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7424 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7425 list of a Taft-amendment incomplete type is a primitive before issuing
7426 an error that the full type must appear in the same unit. There are
7427 cases where nonprimitives can be in the list (such as subprograms in
7429 * sem_disp.adb (Derives_From): Use correct condition for checking that
7430 a formal's type is derived from the type of the corresponding formal in
7431 the parent subprogram (the condition was completely wrong). Add
7432 checking that was missing for controlling result types being derived
7433 from the result type of the parent operation.
7435 2011-08-02 Yannick Moy <moy@adacore.com>
7437 * errout.adb (First_Node): minor renaming
7438 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7441 2011-08-02 Yannick Moy <moy@adacore.com>
7443 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7444 before accessing operands.
7445 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7446 decide whether an initialization expression respects SPARK rules, as
7447 the plain node is the expanded one. This allows for more valid warnings
7449 * gnat_rm.texi: Minor update.
7451 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7453 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7456 2011-08-02 Robert Dewar <dewar@adacore.com>
7458 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7460 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7462 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7463 loop statements and the element renaming declaration with a block when
7464 the element type is controlled.
7466 2011-08-02 Yannick Moy <moy@adacore.com>
7468 * sinfo.ads: Minor formatting.
7470 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7472 * sem_aggr.adb (Add_Association): if the association has a box and no
7473 expression, use the Sloc of the aggregate itself for the new
7475 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7478 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7480 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7481 When a container is provided via a function call, generate a renaming
7482 of the function result. This avoids the creation of a transient scope
7483 and the premature finalization of the container.
7484 * exp_ch7.adb (Is_Container_Cursor): Removed.
7485 (Wrap_Transient_Declaration): Remove the supression of the finalization
7486 of the list controller when the declaration denotes a container cursor,
7489 2011-08-02 Yannick Moy <moy@adacore.com>
7491 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7492 node is from source, instead of the original node being from source.
7494 (Resolve_Array_Aggregate): refine the check for a static expression, to
7495 recognize also static ranges
7496 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7497 Array_Type_Declaration): postpone the test for the type being a subtype
7498 mark after the type has been resolved, so that component-selection and
7499 expanded-name are discriminated.
7500 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7501 to distinguish the case of an iteration scheme, so that an error is
7502 issed on a non-static range in SPARK except in an iteration scheme.
7503 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7504 In_Iter_Schm = True.
7505 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7506 user-defined operators so that they are allowed in renaming
7508 (Find_Selected_Component): refine the check for prefixing of operators
7509 so that they are allowed in renaming. Move the checks for restrictions
7510 on selector name after analysis discriminated between
7511 component-selection and expanded-name.
7512 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7513 concatenation argument of string type if it is static.
7514 * sem_util.adb, sem_util.ads
7515 (Check_Later_Vs_Basic_Declarations): add a new function
7516 Is_Later_Declarative_Item to decice which declarations are allowed as
7517 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7518 mode, add that renamings are considered as later items.
7519 (Enclosing_Package): new function to return the enclosing package
7520 (Enter_Name): correct the rule for homonyms in SPARK
7521 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7522 from source (result of expansion) to avoid issuing wrong warnings.
7524 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7526 * errout.adb: On anything but an expression First_Node returns its
7529 2011-08-02 Pascal Obry <obry@adacore.com>
7531 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7533 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7535 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7536 Set the associated loop as the related expression of internally
7538 * exp_ch7.adb (Is_Container_Cursor): New routine.
7539 (Wrap_Transient_Declaration): Supress the finalization of the list
7540 controller when the declaration denotes a container cursor.
7542 2011-08-02 Yannick Moy <moy@adacore.com>
7544 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7546 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7547 expression is a simple expression. This check cannot be performed in
7548 the semantics, so just drop it.
7549 (P_Index_Or_Discriminant_Constraint): move check that the index or
7550 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7551 semantics. Other cases were previously checked in the semantics.
7552 * par-ch4.adb (P_Name): move checks that a selector name is not
7553 character literal or an operator symbol to Find_Selected_Component in
7555 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7556 declarations are not placed after later declarations in a separate
7557 procedure in Sem_Util (possibly not the best choice?), to be used both
7558 during parsing, for Ada 83 mode, and during semantic analysis, for
7560 * par-endh.adb (Check_End): move check that end label is not missing
7561 to Process_End_Label in the semantics
7562 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7563 the special case for SPARK restriction
7564 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7565 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7566 parameter Force to issue the error message even on internal node (used
7567 for generated end label). Call Check_Restriction to check when an error
7568 must be issued. In SPARK mode, issue an error message even if the
7569 restriction is not set.
7570 (Check_Restriction): new procedure with an additional out parameter to
7571 inform the caller that a message has been issued
7572 * sem_aggr.adb: Minor modification of message
7573 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7574 instead of issuing an error message directly
7575 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7576 declarations are not placed after later declarations, by calling
7577 Check_Later_Vs_Basic_Declarations
7578 (Analyze_Subtype_Declaration): move here the check that an index or
7579 discriminant constraint must be a subtype mark. Change the check that
7580 a subtype of String must start at one so that it works on subtype marks.
7581 * sem_ch4.adb (Analyze_Call): move here the check that a named
7582 association cannot follow a positional one in a call
7583 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7584 instead of issuing an error message directly
7585 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7586 selector name is not a character literal or an operator symbol. Move
7587 here the check that the prefix of an expanded name cannot be a
7588 subprogram or a loop statement.
7589 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7590 procedure called from parsing and semantics to check that basic
7591 declarations are not placed after later declarations
7592 (Process_End_Label): move here the check that end label is not missing
7594 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7596 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7597 representation clause in codepeer mode, since it confuses CodePeer and
7598 does not bring useful info.
7600 2011-08-02 Ed Falis <falis@adacore.com>
7602 * init.c: initialize fp hw on MILS.
7604 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7606 * errout.adb (First_Node): for bodies, return the node itself (small
7607 optimization). For other nodes, do not check source_unit if the node
7608 comes from Standard.
7610 2011-08-02 Robert Dewar <dewar@adacore.com>
7612 * exp_ch3.adb: Minor comment additions.
7613 * sem_ch13.adb: Minor reformatting.
7615 2011-08-02 Pascal Obry <obry@adacore.com>
7617 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7619 2011-08-02 Robert Dewar <dewar@adacore.com>
7621 * sem_attr.adb: Minor reformatting.
7623 2011-08-02 Robert Dewar <dewar@adacore.com>
7625 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7626 (Has_Default_Component_Value): Removed
7627 * einfo.ads Comment updates
7628 (Has_Default_Aspect): Replaces Has_Default_Value
7629 (Has_Default_Component_Value): Removed
7631 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7633 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7634 (Get_Simple_Init_Val): Handle Default_Value aspect
7635 (Needs_Simple_Initialization): Handle Default_Value aspect
7636 * exp_ch3.ads: Needs_Simple_Initialization
7637 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7638 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7640 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7641 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7642 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7644 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7646 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7647 package containing iteration primitives.
7648 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7650 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7652 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7653 "of", pre-analyze expression in case it is a function call with
7654 finalization actions that must be placed ahead of the loop.
7655 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7656 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7658 2011-08-02 Geert Bosch <bosch@adacore.com>
7660 * cstand.adb (Create_Float_Types): Only consider C's long double for
7661 Long_Long_Float, in addition to double.
7663 2011-08-02 Robert Dewar <dewar@adacore.com>
7665 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7666 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7667 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7670 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7672 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7675 2011-08-02 Javier Miranda <miranda@adacore.com>
7677 * einfo.ads, einfo.adb
7678 (Original_Access_Type): Move this attribute to Node26 since there was
7679 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7680 which causes conflicts and breaks the generation of the .NET compiler.
7681 (Interface_Name): Add missing documentation on JGNAT only uses of
7684 2011-08-02 Geert Bosch <bosch@adacore.com>
7686 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7687 (Find_Back_End_Float_Type): Likewise
7688 (Create_Back_End_Float_Types): Likewise
7689 (Create_Float_Types): Likewise
7690 (Register_Float_Type): Likewise
7691 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7692 Nlist and split out type selection in new local Find_Base_Type function.
7693 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7695 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7697 2011-08-02 Robert Dewar <dewar@adacore.com>
7699 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7701 * opt.ads: Minor comment change.
7702 * sem_ch12.adb: Minor code reorganization.
7704 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7706 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7707 subtype's list of rep items to the list on the full subtype in the case
7708 where the lists are the same.
7710 2011-08-02 Geert Bosch <bosch@adacore.com>
7712 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7713 using the one from System.Strings, which also deallocates all strings.
7715 2011-08-02 Geert Bosch <bosch@adacore.com>
7717 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7719 * gcc-interface/Make-lang.in: Update dependencies.
7721 2011-08-02 Olivier Hainque <hainque@adacore.com>
7723 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7726 2011-08-02 Javier Miranda <miranda@adacore.com>
7728 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7729 associated with anonymous access to subprograms.
7731 2011-08-02 Geert Bosch <bosch@adacore.com>
7734 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7735 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7736 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7737 (Add_Symbol_Definition): Move to switch-c.adb
7738 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7739 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7740 (Add_Symbol_Definition): Move to switch-c.adb.
7741 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7743 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7745 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7746 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7748 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7749 (Add_Symbol_Definition): Moved from Prepcomp.
7750 * switch-c.ads: Update copyright notice. Use String_List instead of
7751 Argument_List, removing dependency on System.OS_Lib.
7753 2011-08-02 Yannick Moy <moy@adacore.com>
7755 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7756 mode on initialization expression which does not respect SPARK
7758 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7759 if the tree referenced by its argument represents an initialization
7760 expression in SPARK, suitable for initializing an object in an object
7763 2011-08-02 Javier Miranda <miranda@adacore.com>
7765 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7766 internally generated access to subprogram with its associated protected
7768 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7770 2011-08-02 Geert Bosch <bosch@adacore.com>
7772 * cstand.adb (Register_Float_Type): Print information about type to
7773 register, if the Debug_Flag_Dot_B is set.
7774 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7775 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7776 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7777 with a requested precision of more than Max_Digits digits and no more
7778 than Max_Base_Digits digits, if a range specification is present and the
7779 Predefined_Float_Types list has a suitable type to derive from.
7780 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7781 case of type completion with pragma Import
7783 (Process_Import_Predefined_Type): Processing to complete a type
7784 with pragma Import. Currently supports floating point types only.
7785 (Set_Convention_From_Pragma): Do nothing without underlying type.
7786 (Process_Convention): Guard against absence of underlying type,
7787 which may happen when importing incomplete types.
7788 (Process_Import_Or_Interface): Handle case of importing predefined
7789 types. Tweak error message.
7791 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7793 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7794 functions to previous change. Reorganize code slightly.
7796 2011-08-02 Geert Bosch <bosch@adacore.com>
7798 * back_end.ads (Register_Type_Proc): New call back procedure type for
7799 allowing the back end to provide information about available types.
7800 (Register_Back_End_Types): New procedure to register back end types.
7801 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7803 * cstand.adb (Back_End_Float_Types): New list for floating point types
7804 supported by the back end.
7805 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7806 (Copy_Float_Type): New procedure to make new copies of predefined types.
7807 (Register_Float_Type): New call back procedure to populate the BEFT list
7808 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7809 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7810 (Create_Float_Types): New procedure to create entities for floating
7811 point types predefined in Standard, and put these and any remaining
7812 BEFTs on the Predefined_Float_Types list.
7813 * stand.ads (Predefined_Float_Types): New list for predefined floating
7814 point types that do not have declarations in package Standard.
7816 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7818 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7819 entity node for the unit containing the parameter.
7820 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7821 (Add_Inlined_Subprogram): Likewise.
7822 * gcc-interface/Make-lang.in: Update dependencies.
7824 2011-08-02 Thomas Quinot <quinot@adacore.com>
7826 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7829 2011-08-02 Geert Bosch <bosch@adacore.com>
7831 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7833 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7835 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7836 computed value of Base_Type.
7838 2011-08-02 Yannick Moy <moy@adacore.com>
7840 * restrict.adb (Check_Restriction): issue an error for any use of
7841 class-wide, even if the No_Dispatch restriction is not set.
7842 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7843 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7844 when completing a private extension, the type named in the private part
7845 is not the same as that named in the visible part.
7846 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7847 of an inherited primitive operations of a tagged type or type extension
7848 that returns the tagged type.
7849 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7850 function which returns True for an implicit operation inherited by the
7851 derived type declaration for the argument type.
7852 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7855 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7857 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7858 Process_Bounds, to perform analysis with expansion of a range or an
7859 expression that is the iteration scheme for a loop.
7860 (Analyze_Iterator_Specification): If domain of iteration is given by a
7861 function call with a controlled result, as is the case if call returns
7862 a predefined container, ensure that finalization actions are properly
7864 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7866 2011-08-02 Javier Miranda <miranda@adacore.com>
7868 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7869 * gcc-interface/Make-lang.in: Update dependencies.
7871 2011-08-02 Javier Miranda <miranda@adacore.com>
7873 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7874 determine if the analysis is performed using N or Original_Node (N).
7875 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7876 functionality of routine Is_Variable avoids code duplication.
7877 * checks.adb (Determine_Range): Handle temporaries generated by
7878 Remove_Side_Effects.
7880 2011-08-02 Javier Miranda <miranda@adacore.com>
7882 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7883 expansion of the condition. Required since the previous analysis was
7884 done with expansion disabled (see Resolve_Quantified_Expression) and
7885 hence checks were not inserted and record comparisons have not been
7888 2011-08-02 Ed Falis <falis@adacore.com>
7890 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7893 2011-08-02 Bob Duff <duff@adacore.com>
7895 * opt.ads: Minor comment fix.
7897 2011-08-02 Bob Duff <duff@adacore.com>
7899 * sem_ch12.adb (Analyze_Package_Instantiation,
7900 Analyze_Subprogram_Instantiation): Turn off style checking while
7901 analyzing an instance. Whatever style checks that apply to the generic
7902 unit should apply, so it makes no sense to apply them in an instance.
7903 This was causing trouble when compiling an instance of a runtime
7904 unit that violates the -gnatyO switch.
7905 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7906 one of the two case statements, causing spurious errors.
7908 2011-08-02 Robert Dewar <dewar@adacore.com>
7910 * uname.adb: Minor reformatting.
7911 * gnatcmd.adb: Minor reformatting.
7912 * exp_attr.adb: Minor reformatting.
7914 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7916 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
7917 No_Dispatching_Calls, do not look for the Assign primitive, because
7918 predefined primitives are not created in this case.
7920 2011-08-02 Bob Duff <duff@adacore.com>
7922 * stylesw.ads: Minor comment fixes.
7924 2011-08-02 Robert Dewar <dewar@adacore.com>
7926 * freeze.adb (Add_To_Result): New procedure.
7928 2011-08-02 Jose Ruiz <ruiz@adacore.com>
7930 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
7931 time, if the specific run-time routines for handling streams of strings
7932 are not available, use the default mechanism.
7934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7936 * s-regpat.ads: Fix typo.
7938 2011-08-02 Vincent Celier <celier@adacore.com>
7940 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
7941 not null, call it to create the in memory config project file without
7942 parsing an existing default config project file.
7944 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7946 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
7948 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7950 * sem_elim.adb: an abstract subprogram does not need an eliminate
7951 pragma for its descendant to be eliminable.
7953 2011-08-02 Ed Falis <falis@adacore.com>
7955 * init.c: revert to handling before previous checkin for VxWorks
7956 * s-intman-vxworks.adb: delete unnecessary declarations related to
7957 using Ada interrupt facilities for handling signals.
7958 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
7959 * s-intman-vxworks.ads: Import __gnat_install_handler as
7960 Initialize_Interrupts.
7961 * s-taprop-vxworks.adb: Delete Signal_Mask.
7962 (Abort_Handler): change construction of mask to unblock exception
7965 2011-08-02 Jerome Guitton <guitton@adacore.com>
7967 * a-except-2005.adb (Raise_From_Signal_Handler): Call
7968 Debug_Raise_Exception before propagation starts.
7970 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7972 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
7973 to Restriction_Check_Required.
7974 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
7975 * sem_res.adb (Resolve_Call): Likewise.
7976 * sem_attr.adb (Check_Stream_Attribute): Likewise.
7978 2011-08-02 Bob Duff <duff@adacore.com>
7980 * stylesw.ads: Update comment.
7981 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
7982 * errout.ads: Remove obsolete comment.
7984 2011-08-02 Javier Miranda <miranda@adacore.com>
7986 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
7987 (Set_Is_Safe_To_Reevaluate): new procedure.
7988 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
7989 assignment is allowed on safe-to-reevaluate variables.
7990 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
7991 temporary created to remove side effects in expressions that use
7992 the secondary stack as safe-to-reevaluate.
7993 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
7994 variables that are not true constants.
7996 2011-08-02 Robert Dewar <dewar@adacore.com>
7998 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
7999 sem_res.adb, sem_ch6.adb: Minor reformatting.
8001 2011-08-02 Jerome Guitton <guitton@adacore.com>
8003 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8005 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8007 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8008 not set Overridden_Operation if subprogram is an initialization
8011 2011-08-02 Yannick Moy <moy@adacore.com>
8013 * par-ch6.adb: Correct obsolete name in comments
8014 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8015 which takes two message arguments (existing function takes one), with
8016 second message used for continuation.
8017 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8018 block statements that originate from a source block statement, not
8019 generated block statements
8020 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8021 symmetry with procedure case
8022 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8023 function to issue an error in formal mode if a package specification
8024 contains more than one tagged type or type extension.
8025 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8026 parameters matching formals of tagged types are objects (or ancestor
8027 type conversions of objects), not general expressions. Issue an error
8028 on view conversions that are not involving ancestor conversion of an
8030 (Resolve_Type_Conversion): in formal mode, issue an error on the
8031 operand of an ancestor type conversion which is not an object
8032 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8033 procedure so that it works also for actuals of function calls
8034 (Is_Actual_Tagged_Parameter): new function which determines if its
8035 argument is an actual parameter of a formal of tagged type in a
8037 (Is_SPARK_Object_Reference): new function which determines if the tree
8038 referenced by its argument represents an object in SPARK
8040 2011-08-02 Robert Dewar <dewar@adacore.com>
8042 * sem_ch3.adb: Minor reformatting
8043 Minor comment addition
8044 Minor error msg text change
8046 2011-08-02 Javier Miranda <miranda@adacore.com>
8048 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8049 function. Used to be more precise when we generate a variable plus one
8050 assignment to remove side effects in the evaluation of the Bound
8052 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8053 of the bound expression to force its re-analysis and thus expand the
8054 associated transient scope (if required). Code cleanup replacing the
8055 previous code that declared the constant entity by an invocation to
8056 routine Force_Evaluation which centralizes this work in the frontend.
8058 2011-08-02 Robert Dewar <dewar@adacore.com>
8060 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8061 (Base_Type): Now uses improved Is_Base_Type function
8062 * einfo.ads (Base_Type): Inline this function
8064 2011-08-02 Robert Dewar <dewar@adacore.com>
8066 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8067 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8069 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8071 * gcc-interface/Make-lang.in: Update dependencies.
8072 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8075 2011-08-02 Yannick Moy <moy@adacore.com>
8077 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8078 non-simple expression used in delta constraint
8079 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8080 index constraint which is not a subtype mark
8081 * par.adb: With and use Restrict
8082 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8083 mode on component type which is not a subtype mark and default
8084 expression on component
8085 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8086 of string which does not have a lower index bound equal to 1
8087 (Array_Type_Declaration): issue an error in formal mode on index or
8088 component type which is not a subtype mark, and on aliased keyword on
8090 (Derived_Type_Declaration): issue an error in formal mode on interface,
8091 limited or abstract type
8092 (Record_Type_Declaration): issue an error in formal mode on interface
8093 (Record_Type_Definition): issue an error in formal mode on tagged types
8094 and type extensions not declared in the specification of a library unit
8095 package; on null non-tagged record; on variant part
8097 2011-08-02 Vincent Celier <celier@adacore.com>
8099 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8100 not declared for qualified library project when Library_Name is not
8101 declared, but Library_Dir is.
8103 2011-08-02 Robert Dewar <dewar@adacore.com>
8105 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8106 pragmas (affects aspects [Component_]Default_Value
8107 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8108 component type for the resolution
8110 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8112 * einfo.adb (Base_Type): Tune implementation for speed.
8114 2011-08-02 Robert Dewar <dewar@adacore.com>
8116 * freeze.adb: Minor reformatting.
8118 2011-08-02 Thomas Quinot <quinot@adacore.com>
8120 * scos.ads: Update comments.
8122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8124 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8125 base type, because the parent may be a subtype of a private type whose
8126 convention is established in a private part.
8128 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8130 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8131 statement in a block when the expansion of the return expression has
8132 created a finalization chain.
8133 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8134 with the parent node.
8135 Add N_Extended_Return_Statement to handle the case where a transient
8136 object declaration appears in the Return_Object_Declarations list of
8137 an extended return statement.
8139 2011-08-02 Matthew Gingell <gingell@adacore.com>
8141 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8142 unused parameter 'name'.
8144 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8146 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8147 inherited operation, check whether its alias, which is the source
8148 operastion that it renames, has been marked eliminated.
8150 2011-08-02 Javier Miranda <miranda@adacore.com>
8152 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8153 in-mode parameter whose type is an access type since it can be used to
8154 modify its designated object. Enforce code that handles as safe an
8155 access type that is not access-to-constant but it is the result of a
8156 previous removal of side-effects.
8157 (Remove_Side_Effects): Minor code reorganization of cases which require
8158 no action. Done to incorporate documentation on new cases uncovered
8159 working in this ticket: no action needed if this routine was invoked
8160 too early and the nodes are not yet decorated.
8161 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8162 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8163 were issued with actuals that are implicitly provided by
8166 2011-08-02 Robert Dewar <dewar@adacore.com>
8168 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8170 2011-08-02 Yannick Moy <moy@adacore.com>
8172 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8173 to issue an error in formal mode on attribute not supported in this mode
8174 (Analyze_Attribute): issue errors on standard attributes not supported
8176 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8177 comment, and issue error in formal mode on modulus which is not a power
8179 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8181 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8183 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8184 operator on modular type (except 'not').
8186 2011-08-02 Robert Dewar <dewar@adacore.com>
8188 * gnat_rm.texi: Minor reformatting.
8190 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8192 * s-osinte-linux.ads: Minor comment update and reformatting.
8193 * i-cexten.ads: Make this unit pure, as for its parent.
8194 Will allow its usage in more contexts if needed.
8196 2011-08-02 Robert Dewar <dewar@adacore.com>
8198 * s-utf_32.ads: Minor comment fix.
8200 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8202 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8203 operation of a tagged synchronized type, handle the case where the
8204 controlling argument is overloaded.
8206 2011-08-02 Yannick Moy <moy@adacore.com>
8208 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8209 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8210 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8211 SPARK mode and formal verification mode on processing SPARK restriction
8212 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8213 requiring consistency checking.
8215 2011-08-02 Robert Dewar <dewar@adacore.com>
8217 * sem_res.adb: Minor reformatting.
8219 2011-08-02 Robert Dewar <dewar@adacore.com>
8221 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8222 a-cforse.ads: Remove unneeded with of Ada.Containers
8223 Remove commented out pragma Inline's
8224 Move specifications of new subprograms to the actual specs
8226 2011-08-02 Yannick Moy <moy@adacore.com>
8228 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8229 a-cforse.ads: Update comments.
8231 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8233 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8235 2011-08-02 Robert Dewar <dewar@adacore.com>
8237 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8238 a-cforse.ads, a-cofove.ads: Minor reformatting.
8240 2011-08-02 Claire Dross <dross@adacore.com>
8242 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8243 a-cofove.ads: Add comments.
8245 2011-08-02 Yannick Moy <moy@adacore.com>
8247 * gnat_rm.texi: Document formal containers.
8249 2011-08-02 Emmanuel Briot <briot@adacore.com>
8251 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8254 2011-08-02 Robert Dewar <dewar@adacore.com>
8256 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8259 2011-08-02 Robert Dewar <dewar@adacore.com>
8261 * aspects.adb: New aspects Default_Value and Default_Component_Value
8262 New format of Aspect_Names table checks for omitted entries
8263 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8264 handling of boolean aspects for derived types.
8265 New aspects Default_Value and Default_Component_Value
8266 New format of Aspect_Names table checks for omitted entries
8267 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8268 (Has_Default_Value): New flag
8269 (Has_Default_Component_Value): New flag
8270 (Has_Default_Value): New flag
8271 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8273 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8274 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8275 Default_Value and Default_Component_Value
8276 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8277 New aspects Default_Value and Default_Component_Value
8278 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8279 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8281 2011-08-02 Vincent Celier <celier@adacore.com>
8283 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8284 inherit library kind.
8286 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8288 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8291 2011-08-02 Robert Dewar <dewar@adacore.com>
8293 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8295 2011-08-02 Yannick Moy <moy@adacore.com>
8297 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8299 2011-08-02 Robert Dewar <dewar@adacore.com>
8301 * impunit.adb: Add comment.
8303 2011-08-02 Yannick Moy <moy@adacore.com>
8305 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8306 qualification of aggregates in formal mode
8307 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8309 (Resolve_Aggregate): complete the test that an aggregate is adequately
8310 qualified in formal mode
8312 2011-08-02 Pascal Obry <obry@adacore.com>
8314 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8315 * mlib-prj.adb: Supress warning when compiling binder generated file.
8316 (Build_Library): Supress all warnings when compiling the binder
8319 2011-08-02 Yannick Moy <moy@adacore.com>
8321 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8323 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8324 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8325 Add with/use clauses to make Check_Formal_Restriction visible
8327 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8329 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8330 in-parameters when type of the generic formal is private in the generic
8331 spec and non-private in the body.
8333 2011-08-02 Claire Dross <dross@adacore.com>
8335 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8336 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8337 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8338 * impunit.adb, Makefile.rtl: Take new files into account.
8340 2011-08-02 Robert Dewar <dewar@adacore.com>
8342 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8343 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8345 2011-08-02 Yannick Moy <moy@adacore.com>
8347 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8349 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8350 matching static array bounds, taking into account the special case of
8352 * sem_ch3.adb: Typo in comment.
8354 2011-08-02 Yannick Moy <moy@adacore.com>
8356 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8357 which issues an error in formal mode if its argument node is originally
8359 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8360 has a discriminant specification so that it does not include the case
8362 (Derived_Type_Declaration): move here the test that a derived type has a
8363 discriminant specification
8364 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8365 first element of a component association before accessing its choices
8366 (presence of component association is not enough)
8367 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8368 declaration is a library item before accessing the next element in a
8369 list, as library items are not member of lists
8370 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8371 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8372 Check_Formal_Restriction whenever possible.
8374 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8376 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8377 reference when needed.
8379 2011-08-02 Bob Duff <duff@adacore.com>
8381 * gnat_ugn.texi: Fix typo.
8383 2011-08-02 Vincent Celier <celier@adacore.com>
8385 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8386 archive file name. Do not use the full path name of archives for Open
8389 2011-08-02 Robert Dewar <dewar@adacore.com>
8391 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8392 Analyze_Aspect_Specifications
8394 (Analyze_Aspect_Specifications): New handling for boolean aspects
8395 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8396 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8397 sequence for Analyze_Aspect_Specifications
8398 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8399 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8401 2011-08-02 Robert Dewar <dewar@adacore.com>
8403 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8404 aspects, since these no longer exist.
8406 2011-08-02 Robert Dewar <dewar@adacore.com>
8408 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8409 semicolon, do not try to see if there are aspects following it.
8410 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8413 2011-08-02 Robert Dewar <dewar@adacore.com>
8415 * sem_ch8.adb, aspects.ads: Minor reformatting.
8417 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8419 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8420 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8422 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8424 2011-08-02 Yannick Moy <moy@adacore.com>
8426 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8427 mode on subprogram declaration outside of package specification, unless
8428 it is followed by a pragma Import
8429 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8430 Access_Type_Declaration): issue error in formal mode on access type
8431 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8433 (Analyze_Object_Declaration): issue error in formal mode on object
8434 declaration which does not respect SPARK restrictions
8435 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8436 declaration which does not respect SPARK restrictions
8437 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8438 error in formal mode on digits or delta constraint
8439 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8440 decimal fixed point type
8441 (Derived_Type_Declaration): issue error in formal mode on derived type
8442 other than type extensions of tagged record types
8443 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8444 with check on access definition
8445 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8446 mode on protected definition.
8447 (Analyze_Task_Definition): issue error in formal mode on task definition
8449 2011-08-02 Robert Dewar <dewar@adacore.com>
8451 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8453 2011-08-02 Javier Miranda <miranda@adacore.com>
8455 * sem_ch6.adb (Can_Override_Operator): New function.
8456 (Verify_Overriding_Indicator): Add missing code to check overriding
8457 indicator in operators. Fixes regression.
8458 (Check_Overriding_Indicator): Minor reformating after replacing the
8459 code that evaluates if the subprogram can override an operator by
8460 invocations to the above new function.
8462 (Write_Field26_Name): Add missing code to ensure that, following
8463 the documentation in einfo.ads, this field is not shown as attribute
8464 "Static_Initialization" on non-dispatching functions.
8466 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8468 * sem_res.adb (Resolve_Call): A call to
8469 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8470 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8471 i.e., when the second parameter is of type Time_Span.
8473 2011-08-02 Vincent Celier <celier@adacore.com>
8475 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8476 with an archive instead of -L<library dir> -l<library name>.
8478 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8480 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8481 mark the base types In_Use in addition to making the operations
8484 2011-08-02 Ed Falis <falis@adacore.com>
8486 * init.c: add and setup __gnat_signal_mask for the exception signals
8487 * s-inmaop-vxworks.adb: new file.
8488 * s-intman-vxworks.adb: remove unnecessary initializations and
8490 * s-intman-vxworks.ads: remove unnecessary variable
8491 * s-taprop-vxworks.adb: simplify signal initialization
8493 2011-08-02 Robert Dewar <dewar@adacore.com>
8495 * sem_ch8.adb: Minor code reorganization, comment updates.
8497 2011-08-02 Robert Dewar <dewar@adacore.com>
8499 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8500 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8502 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8503 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8505 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8507 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8508 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8509 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8510 use_type_clauses, to handle more efficiently use_type and use_all_type
8512 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8513 Ada2012 Use_All_Type clause.
8514 (Use_Class_Wide_Operations): new procedure.
8516 2011-08-02 Robert Dewar <dewar@adacore.com>
8518 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8519 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8520 expression to expression function.
8522 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8524 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8525 if types are compatible.
8527 2011-08-02 Yannick Moy <moy@adacore.com>
8529 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8530 returns True if its argument array types have same dimension and same
8531 static bounds at each index.
8532 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8533 OUT or IN OUT paramaters which are not view conversions in SPARK.
8534 (Resolve_Arithmetic_Op): issue an error in formal mode on
8535 multiplication or division with operands of fixed point types which are
8536 not qualified or explicitly converted.
8537 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8538 Boolean or array type (except String) operands.
8539 (Resolve_Equality_Op): issue an error in formal mode on equality
8540 operators for array types other than String with non-matching static
8542 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8543 for array types with non-matching static bounds. Factorize the code in
8544 Matching_Static_Array_Bounds.
8545 (Resolve_Qualified_Expression): issue an error in formal mode on
8546 qualified expressions for array types with non-matching static bounds.
8547 (Resolve_Type_Conversion): issue an error in formal mode on type
8548 conversion for array types with non-matching static bounds
8550 2011-08-02 Robert Dewar <dewar@adacore.com>
8552 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8554 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8556 * par-ch9.adb: save location of entry for proper error message.
8558 2011-08-02 Javier Miranda <miranda@adacore.com>
8560 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8561 (Use_Full_View) which permits this routine to climb through the
8562 ancestors using the full-view of private parents.
8563 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8564 Use_Full_View to true in calls to Is_Ancestor.
8565 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8566 true in call to Is_Ancestor.
8567 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8568 Use_Full_View to true in call to Is_Ancestor.
8569 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8570 call to Is_Ancestor.
8571 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8572 Use_Full_View to true in calls to Is_Ancestor.
8573 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8574 Make_Select_Specific_Data_Table, Register_Primitive,
8575 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8576 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8577 to true in call to Is_Ancestor.
8578 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8579 Use_Full_View to true in calls to Is_Ancestor.
8581 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8582 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8584 2011-08-02 Robert Dewar <dewar@adacore.com>
8586 * gnat_rm.texi: Minor reformatting.
8587 * sem_prag.adb: Minor reformatting.
8589 2011-08-02 Tristan Gingold <gingold@adacore.com>
8591 * vms_data.ads: Add VMS qualifier for -gnateP.
8593 2011-08-02 Robert Dewar <dewar@adacore.com>
8595 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8596 * par-ch7.adb (P_Package): Proper placement of aspects for package
8598 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8599 (End_Statements): Add Is_Sloc parameterr
8600 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8601 (Check_End): Ad Is_Sloc parameter
8602 (End_Statements): Add Is_Sloc parameterr
8604 2011-08-02 Vincent Celier <celier@adacore.com>
8606 * ug_words: Add VMS qualifier equivalent to -gnateP:
8607 /SYMBOL_PREPROCESSING.
8609 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8611 * gnat-style.texi: For hexadecimal numeric literals the typical
8612 grouping of digits is 4 to represent 2 bytes.
8613 A procedure spec which is split into several lines is indented two
8616 2011-08-02 Yannick Moy <moy@adacore.com>
8618 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8619 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8620 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8622 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8623 choice in array aggregate
8624 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8626 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8627 positional and named aggregate for record, or others in record
8628 aggregate, or multiple choice in record aggregate
8629 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8630 array operands to logical operations AND, OR and XOR do not have the
8631 same static lower and higher bounds
8632 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8634 2011-08-01 Robert Dewar <dewar@adacore.com>
8636 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8637 Replaces Last_Source_Node_In_Sequence.
8638 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8639 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8640 parens and blank in string (this was inconsistently implemented).
8642 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8643 blank in string (this was inconsistently implemented).
8645 (Set_Global_Switches): Set formal mode switches appropriately
8646 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8648 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8649 call Set_Error_Msg_Lang to set "spark" as language name.
8650 * par.adb: Remove unnecessary call to set formal language for errout
8651 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8652 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8654 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8655 calls to it, moved after resolution so that types are known
8656 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8657 result of concatenation is not of type String
8658 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8659 concatenation is not properly restricted
8660 * gnat_rm.texi: Add doc on pragma Spark_95.
8661 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8662 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8663 * gcc-interface/Make-lang.in: Update dependencies.
8665 2011-08-01 Javier Miranda <miranda@adacore.com>
8667 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8668 condition that detects if the overridden operation must replace an
8671 2011-08-01 Javier Miranda <miranda@adacore.com>
8673 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8674 code declarations inserted by Insert_Actions in each alternative of the
8675 N_Case_Expression node.
8677 2011-08-01 Robert Dewar <dewar@adacore.com>
8679 * sem_ch6.adb: Minor code reorganization.
8680 * sem_util.adb: Minor reformatting.
8682 2011-08-01 Pascal Obry <obry@adacore.com>
8684 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8685 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8687 2011-08-01 Yannick Moy <moy@adacore.com>
8689 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8690 literal or operator symbol which is prefixed
8691 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8692 mode on access attributes.
8693 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8694 that concatenation operands are properly restricted in formal mode
8695 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8696 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8697 result of the concatenation has a type different from String.
8698 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8699 Analyze_Quantified_Expression, Analyze_Slice,
8700 Analyze_Null): issue an error in formal mode on unsupported constructs
8702 (Analyze_Block_Statement): only issue error on source block statement
8703 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8704 function which returns the last node in a list of nodes for which
8705 Comes_From_Source returns True, if any
8706 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8707 Last_Source_Node_In_Sequence
8708 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8709 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8710 mode on unsupported constructs
8711 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8712 rest of the actions may be needed later on since the error is marked as
8714 * sinfo.ads: Typos in comments.
8716 2011-08-01 Pascal Obry <obry@adacore.com>
8718 * projects.texi: Minor editing.
8720 2011-08-01 Yannick Moy <moy@adacore.com>
8722 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8723 insertion character ~~
8724 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8725 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8726 with insertion character ~~
8727 (Set_Msg_Text): treat insertion character ~~
8728 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8729 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8730 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8731 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8732 errors related to the formal language restriction not serious
8733 (insertion character |).
8734 * par.adb (Par): set formal language for error messages if needed
8735 * sem_ch6.adb (Check_Missing_Return): take into account possible
8736 generated statements at the end of the function
8737 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8738 enumeration value to define a new pragma SPARK_95
8739 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8740 SPARK_Version): new type and variables to store the SPARK version
8742 (SPARK_Mode): return True when SPARK_Version is set
8743 * par-prag.adb: Correct indentation
8744 (Prag): take Pragma_SPARK_95 into account
8745 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8748 2011-08-01 Robert Dewar <dewar@adacore.com>
8750 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8751 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8752 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8754 2011-08-01 Pascal Obry <obry@adacore.com>
8756 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8757 Target_Name to Get_Path call.
8758 (Parse_Single_Project): Likewise.
8759 (Post_Parse_Context_Clause): Likewise.
8760 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8761 Call Initialise_Project_Path with the proper Target_Name.
8762 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8764 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8765 with the proper Target_Name.
8766 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8768 (Parse_Project_And_Apply_Config): Likewise.
8769 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8770 This is fine as this part of the code is supporting only native
8772 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8773 is fine as this part of the code is supporting only native compilation.
8775 2011-08-01 Yannick Moy <moy@adacore.com>
8777 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8778 of homonym, unless the homonym is one of the cases allowed in SPARK
8779 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8780 package declaration occurring after a body.
8782 2011-08-01 Robert Dewar <dewar@adacore.com>
8784 * checks.adb, exp_ch4.adb: Minor reformatting.
8786 2011-08-01 Javier Miranda <miranda@adacore.com>
8788 * einfo.ads (Access_Disp_Table): Fix documentation.
8789 (Dispatch_Table_Wrappers): Fix documentation.
8791 2011-08-01 Pascal Obry <obry@adacore.com>
8793 * prj-env.adb, prj-env.ads: Minor reformatting.
8795 2011-08-01 Yannick Moy <moy@adacore.com>
8797 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8798 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8799 procedures out of these packages.
8800 * errout.ads, errout.adb
8801 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8802 procedures in of this package
8803 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8804 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8805 on misplaced later vs initial declarations, like in Ada 83
8806 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8807 formal mode on attribute of private type whose full type declaration
8809 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8810 package declaration inside a package specification
8811 (Analyze_Full_Type_Declaration): issue error in formal mode on
8812 controlled type or discriminant type
8813 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8814 user-defined operator means that it should come from the source
8815 (New_Overloaded_Entity): issue error in formal mode on overloaded
8817 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8819 2011-08-01 Thomas Quinot <quinot@adacore.com>
8821 * atree.adb: Minor reformatting.
8822 * checks.adb: Minor reformatting.
8824 2011-08-01 Vincent Celier <celier@adacore.com>
8826 * s-parame-vms-ia64.ads: Fix typo in comment
8828 * s-parame-vms-restrict.ads: Removed, unused.
8830 2011-08-01 Javier Miranda <miranda@adacore.com>
8833 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8835 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8836 * sem_ch3.ads, sem_ch3.adb
8837 (Is_Constant_Bound): New extended version of the subprogram that was
8838 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8839 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8840 * sem_aux.ads (Constant_Value): Fix typo in comment.
8841 * checks.adb (Generate_Index_Checks): New implementation which, for
8842 array objects with constant bounds, generates the runtime check
8843 referencing the bounds of the array type. For other cases this routine
8844 provides its previous behavior obtaining such values from the array
8846 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8848 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8849 we cannot have semantic interpretations of the new node.
8851 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8853 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8856 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8858 * sem_ch8.adb: Minor code editing.
8859 * s-vxwext.adb: Remove trailing space.
8860 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8861 consistency with other files.
8863 2011-08-01 Thomas Quinot <quinot@adacore.com>
8865 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8867 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8869 * par-ch10.adb: reject parameterized expressions as compilation unit.
8870 * sem_ch4.adb: handle properly conditional expression with overloaded
8871 then_clause and no else_clause.
8873 2011-08-01 Tristan Gingold <gingold@adacore.com>
8875 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8876 like done by System.Aux_DEC.
8877 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8879 2011-08-01 Yannick Moy <moy@adacore.com>
8881 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8882 missing label at end of declaration (subprogram or package)
8883 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8884 of positional and named parameter association
8885 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8886 Error_Msg_SP which adds a prefix to the error message giving the name
8887 of the formal language analyzed
8888 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8889 access result type in subprogram, unconstrained array as result type,.
8890 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8892 * sem_ch8.adb: Code clean up.
8894 2011-08-01 Javier Miranda <miranda@adacore.com>
8896 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8897 * einfo.ads (Access_Disp_Table): Fix documentation.
8898 (Dispatch_Table_Wrappers): Fix documentation.
8899 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8900 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8901 to enforce the documentation of this attribute.
8902 (Set_Is_Interface): Cleanup the assertion.
8903 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8904 the Underlying_Type entity before reading attribute Access_Disp_Table.
8905 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8906 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8907 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
8908 the Underlying_Type entity before reading attribute Access_Disp_Table.
8909 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
8910 Locate the Underlying_Type entity before reading attribute
8913 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8915 * s-poosiz.ads: Additional overriding indicators.
8917 2011-08-01 Yannick Moy <moy@adacore.com>
8919 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
8921 (Analyze_Iteration_Scheme): issue error in formal mode when loop
8922 parameter specification does not include a subtype mark.
8923 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
8924 formal mode on abstract subprogram.
8925 (Analyze_Subprogram_Specification): issue error in formal mode on
8926 user-defined operator.
8927 (Process_Formals): issue error in formal mode on access parameter and
8929 * sem_ch9.adb (Analyze_Abort_Statement,
8930 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
8931 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
8932 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
8933 Analyze_Requeue, Analyze_Selective_Accept,
8934 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
8935 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
8936 issue error in formal mode on user-defined raise statement.
8938 2011-08-01 Thomas Quinot <quinot@adacore.com>
8940 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
8941 declaration being hidden when overriding an implicit inherited
8943 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
8944 (-gnats), do not complain about a source file that contains only a
8947 2011-08-01 Ed Schonberg <schonberg@adacore.com>
8949 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
8950 variable if already set.
8952 2011-08-01 Arnaud Charlet <charlet@adacore.com>
8954 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
8955 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
8956 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
8957 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
8958 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
8959 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
8960 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
8961 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
8962 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
8963 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
8964 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
8965 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
8966 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
8967 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
8968 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
8969 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
8970 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
8971 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
8972 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
8973 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
8974 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
8975 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
8976 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
8977 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
8978 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
8979 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
8980 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
8981 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
8982 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
8983 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
8984 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
8985 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
8986 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
8987 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
8988 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
8989 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
8990 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
8991 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
8992 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
8993 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
8994 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
8995 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
8996 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
8997 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
8998 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
8999 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9000 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9001 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9002 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9003 Use GNAT instead of GNARL.
9005 2011-08-01 Bob Duff <duff@adacore.com>
9007 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9008 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9009 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9012 2011-08-01 Yannick Moy <moy@adacore.com>
9014 * debug.adb (d.D) reverve flag for the SPARK mode
9015 (d.E) reverve flag for SPARK generation mode
9016 (d.F) reverve flag for Why generation mode
9017 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9018 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9019 functions which return True when the corresponding modes are set
9020 (Formal_Language): return "spark" or "alfa" when in formal verification
9022 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9023 Error_Msg to prefix the error message with a tag giving the formal
9025 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9026 message with a tag giving the formal language
9027 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9029 (Analyze_Case_Statement): issue error in formal mode on case statement
9030 with a single "others" case alternative
9031 (Analyze_Exit_Statement): issue errors in formal mode on exit
9032 statements which do not respect SPARK restrictions
9033 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9034 (Check_Unreachable_Code): always issue an error (not a warning) in
9035 formal mode on unreachable code (concerns both code after an infinite
9036 loop and after an unconditional jump, both not allowed in SPARK)
9037 * sem_ch6.adb (Analyze_Return_Statement): add call to
9038 Set_Return_Present for a procedure containing a return statement
9039 (already done for functions in Analyze_Function_Return)
9040 (Analyze_Function_Return): issue error in formal mode on extended
9041 return or if return is not last statement in function
9042 (Check_Missing_Return): issue error in formal mode if function does
9043 not end with return or if procedure contains a return
9044 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9045 function to detect if there is an inner scope of its parameter S which
9048 2011-08-01 Thomas Quinot <quinot@adacore.com>
9050 * sem_ch6.ads: Minor reformatting.
9052 2011-08-01 Javier Miranda <miranda@adacore.com>
9054 * sem_util.adb (Abstract_Interface_List): Complete condition when
9055 processing private type declarations to avoid reading unavailable
9057 (Is_Synchronized_Tagged_Type): Complete condition when processing
9058 private extension declaration nodes to avoid reading unavailable
9061 2011-08-01 Thomas Quinot <quinot@adacore.com>
9063 * sem_ch3.adb: Minor reformatting.
9065 2011-08-01 Thomas Quinot <quinot@adacore.com>
9067 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9068 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9069 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9070 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9071 for VMS, instead parametrize the common implementation with
9072 System.Parameters declarations.
9074 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9076 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9078 2011-08-01 Tristan Gingold <gingold@adacore.com>
9080 * seh_init.c: Fix SEH handler installation on win64.
9082 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9084 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9085 double analysis of an anonymous access to subprogram, because it can
9086 lead to improper sharing of profiles and a back-end crash.
9088 2011-08-01 Robert Dewar <dewar@adacore.com>
9090 * make.adb, sem_ch4.adb: Minor reformatting.
9091 * gcc-interface/Make-lang.in: Update dependencies.
9092 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9094 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9096 * gnat_rm.texi: Fix definition of Long_Integer.
9098 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9100 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9101 to prevent storage exhaustion.
9102 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9103 finalized is a function body, insert the cleanup code before the final
9104 return statement, to prevent spurious warnings.
9105 * s-pooglo.ads: add overriding indicator.
9107 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9109 * sem_ch4.adb (Operator_Check): improve error message when both a
9110 with_clause and a use_clause are needed to make operator usage legal.
9111 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9112 determine whether a compilation unit is visible within an other,
9113 either through a with_clause in the current unit, or a with_clause in
9114 its library unit or one one of its parents.
9116 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9118 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9119 over an arbitrary expression of an array or container type.
9120 * lib-xref.adb: clarify comment.
9122 2011-08-01 Bob Duff <duff@adacore.com>
9124 * einfo.ads: Minor reformatting.
9125 * debug.adb: Minor comment improvement.
9127 2011-08-01 Javier Miranda <miranda@adacore.com>
9129 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9130 consider hidden subprograms as valid candidates.
9132 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9134 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9136 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9138 * gnat_ugn.texi: Fix typo.
9140 2011-08-01 Robert Dewar <dewar@adacore.com>
9142 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9143 lib-xref.adb: Minor reformatting
9145 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9147 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9148 when to generate a call to Move_Final_List.
9149 (Has_Controlled_Parts): Remove this function.
9151 2011-08-01 Geert Bosch <bosch@adacore.com>
9153 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9156 2011-08-01 Thomas Quinot <quinot@adacore.com>
9158 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9159 explicit raise of a predefined exception as Comes_From_Source if the
9160 original N_Raise_Statement comes from source.
9162 2011-08-01 Robert Dewar <dewar@adacore.com>
9164 * sinfo.ads: Add comment.
9165 * sem_ch6.adb: Minor reformatting.
9167 2011-08-01 Robert Dewar <dewar@adacore.com>
9169 * freeze.adb (Freeze_Entity): Refine check for bad component size
9170 clause to avoid rejecting confirming clause when atomic/aliased present.
9172 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9174 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9175 better determine whether an entity reference is a write.
9176 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9178 * lib-xref.adb (Output_References): Do no suppress a read reference at
9179 the same location as an immediately preceeding modify-reference, to
9180 handle properly in-out actuals.
9182 2011-08-01 Tristan Gingold <gingold@adacore.com>
9184 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9186 2011-08-01 Quentin Ochem <ochem@adacore.com>
9188 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9189 heap to compute the result.
9191 2011-08-01 Robert Dewar <dewar@adacore.com>
9193 * atree.ads: Minor reformatting.
9195 2011-08-01 Emmanuel Briot <briot@adacore.com>
9197 * g-expect.adb (Get_Command_Output): Fix memory leak.
9199 2011-08-01 Geert Bosch <bosch@adacore.com>
9201 * cstand.adb (P_Float_Type): New procedure to print the definition of
9202 predefined fpt types.
9203 (P_Mixed_Name): New procedure to print a name using mixed case
9204 (Print_Standard): Use P_Float_Type for printing floating point types
9205 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9206 precision IEEE float.
9208 2011-08-01 Thomas Quinot <quinot@adacore.com>
9210 * sem_ch3.adb: Minor reformatting.
9212 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9214 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9215 the completion of a generic function, insert the new body rather than
9216 rewriting the original.
9218 2011-08-01 Yannick Moy <moy@adacore.com>
9220 * sinfo.ads, errout.ads: Typos in comments.
9222 2011-08-01 Robert Dewar <dewar@adacore.com>
9224 * par-endh.adb: Minor reformatting.
9226 2011-08-01 Robert Dewar <dewar@adacore.com>
9228 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9229 (Pre_Post_Aspects): New subtype.
9230 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9231 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9232 * par-ch7.adb (P_Package): Remove Decl parameter
9233 (P_Package): Handle new syntax for aspects (before IS)
9234 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9236 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9237 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9238 (P_Package): Remove Decl parameter
9239 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9241 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9243 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9244 * sinfo.ads: Document new syntax for aspects in packages etc.
9245 * sprint.adb: Handle new syntax of aspects before IS in package
9247 2011-08-01 Thomas Quinot <quinot@adacore.com>
9249 * atree.ads: Minor reformatting.
9250 * sem_prag.adb: Minor reformatting.
9252 2011-08-01 Robert Dewar <dewar@adacore.com>
9254 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9255 case expr alternative.
9257 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9259 * sem_ch12.adb: Fix typo.
9261 2011-08-01 Geert Bosch <bosch@adacore.com>
9263 * sem_prag.adb (Check_No_Link_Name): New procedure.
9264 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9265 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9266 instead of Standard_Long_Long_Float_Size global. Preparation for
9267 eventual removal of per type constants.
9268 * exp_util.ads (Get_Stream_Size): New function returning the stream
9269 size value of subtype E.
9270 * exp_util.adb (Get_Stream_Size): Implement new function.
9271 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9273 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9275 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9277 2011-08-01 Geert Bosch <bosch@adacore.com>
9279 * cstand.adb: Fix comments.
9280 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9283 2011-08-01 Robert Dewar <dewar@adacore.com>
9285 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9287 2011-08-01 Geert Bosch <bosch@adacore.com>
9289 * atree.ads: Fix comment.
9291 2011-08-01 Robert Dewar <dewar@adacore.com>
9293 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9294 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9295 * par.adb: Add with for Namet.Sp.
9296 * par-tchk.adb: Minor reformatting.
9298 2011-08-01 Vincent Celier <celier@adacore.com>
9300 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9301 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9302 of the init procedure of a SAL.
9303 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9306 2011-08-01 Thomas Quinot <quinot@adacore.com>
9308 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9311 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9313 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9315 2011-08-01 Thomas Quinot <quinot@adacore.com>
9317 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9318 conformant with its spec (return True only for types that have
9319 an overriding Initialize primitive operation that prevents them from
9320 having preelaborable initialization).
9321 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9322 initialization for controlled types in Ada 2005 or later mode.
9324 2011-08-01 Robert Dewar <dewar@adacore.com>
9326 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9328 (Same_Aspect): New function.
9329 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9330 Type_Invariant, Precondition, Postcondition.
9331 * snames.ads-tmpl: Add Name_Type_Invariant.
9333 2011-08-01 Robert Dewar <dewar@adacore.com>
9335 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9337 (Freeze_All_Ent): Fix error in handling inherited aspects.
9338 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9339 already analyzed, but don't skip entire processing of a declaration,
9340 that's wrong in some cases of declarations being rewritten.
9341 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9342 Don't delay for integer, string literals
9343 Treat predicates in usual manner for delay, remove special case code,
9345 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9346 (Build_Predicate_Function): Update saved expression in aspect
9347 (Build_Invariant_Procedure): Update saved expression in aspect
9348 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9349 of replacement of discriminant references if the reference is simple.
9351 2011-08-01 Robert Dewar <dewar@adacore.com>
9353 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9354 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9355 Static_Predicate and Dynamic_Predicate.
9356 (Build_Predicate_Function): Add processing for Static_Predicate
9357 and Dynamic_Predicate.
9358 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9359 (From_Static_Predicate): New flag
9360 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9362 2011-08-01 Robert Dewar <dewar@adacore.com>
9364 * usage.adb: Documentation cleanup for Ada version modes in usage.
9365 * expander.adb: Minor reformatting.
9367 2011-08-01 Robert Dewar <dewar@adacore.com>
9369 * atree.ads: Minor comment fix.
9370 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9371 a-witeio.ads, sem_prag.adb: Minor reformatting.
9373 2011-08-01 Doug Rupp <rupp@adacore.com>
9375 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9376 pointers. Use descrip.h header file for convenience. Add some
9379 2011-08-01 Robert Dewar <dewar@adacore.com>
9381 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9382 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9383 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9385 (Check_Aspect_At_End_Of_Declarations): New procedure
9386 (Analye_Aspect_Specification): Minor changes for above procedures
9387 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9388 specification node as well.
9390 2011-08-01 Pascal Obry <obry@adacore.com>
9392 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9393 Windows files. Use GetFilesAttributes() in this case to check for file
9394 existence instead of returning with an error code.
9396 2011-08-01 Vincent Celier <celier@adacore.com>
9398 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9399 High is above Source length.
9401 2011-08-01 Robert Dewar <dewar@adacore.com>
9403 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9405 2011-08-01 Robert Dewar <dewar@adacore.com>
9407 * aspects.ads (Boolean_Aspects): New subtype.
9408 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9409 for derived types in cases where the parent type and derived type have
9411 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9412 with aspects when parent type also has aspects.
9413 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9414 boolean expression at this point).
9415 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9416 accordance with final decision on the Ada 2012 feature.
9417 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9419 2011-08-01 Matthew Heaney <heaney@adacore.com>
9421 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9423 2011-08-01 Pascal Obry <obry@adacore.com>
9425 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9426 Fix Replace_Slice when High is above current string size.
9427 (Replace_Slice): Fix DL computation when High is above current
9430 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9432 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9434 2011-08-01 Matthew Heaney <heaney@adacore.com>
9436 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9439 2011-08-01 Pascal Obry <obry@adacore.com>
9441 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9444 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9446 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9447 access to protected subprograms in generic bodies.
9448 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9449 protected type, indicate that the convention of the subprogram is
9450 Convention_Protected, because it may be used in subsequent declarations
9451 within the protected declaration.
9453 2011-08-01 Vincent Celier <celier@adacore.com>
9455 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9456 and "final" procedures when the name of the library is "ada", to avoid
9457 duplicate symbols "adainit" and "adafinal" in executables.
9459 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9461 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9462 quantified expression that appears within a postcondition and uses the
9463 Ada2012 'Result attribute.
9465 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9467 * init.c (__gnat_error_handler): Cast reason to int.
9468 (__gnat_install_handler): Explain sa_sigaction use.
9470 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9472 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9473 subprogram has copy-in copy-out parameters, try to promote the mode of
9474 the return type if it is passed in registers.
9476 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9478 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9479 left operand as addressable.
9481 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9483 * gcc-interface/gigi.h (build_function_stub): Remove.
9484 (build_return_expr): Likewise.
9485 (convert_vms_descriptor): Declare.
9486 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9487 (build_function_stub): Move to...
9488 * gcc-interface/utils2.c (build_return_expr): Move to...
9489 * gcc-interface/trans.c (build_function_stub): ...here.
9490 (build_return_expr): ...here.
9491 (Subprogram_Body_to_gnu): Add local variable for language_function.
9492 Disconnect the parameter attributes cache, if any, once done with it.
9493 Call end_subprog_body only after setting the end_locus.
9494 Build the stub associated with the function, if any, at the very end.
9495 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9496 variables and streamline control flow.
9498 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9501 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9504 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9507 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9508 Assign to act.sa_sigaction.
9509 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9510 current->return_address to char * before arithmetic.
9512 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9514 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9515 Correct argument types.
9516 Extract code from reason.
9517 (__gnat_install_handler): Assign to act.sa_sigaction.
9519 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9521 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9522 (GNAT1_OBJS): ...here.
9524 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9527 * g-socthi-mingw.adb (Fill): Fix formatting.
9529 * gcc-interface/gigi.h: Move around comment.
9531 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9534 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9536 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9539 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9541 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9543 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9544 range comparison if Pmode is SImode.
9546 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9547 Eric Botcazou <ebotcazou@adacore.com>
9549 * adadecode.c: Wrap up in extern "C" block.
9550 * adadecode.h: Likewise.
9551 * adaint.c: Likewise. Remove 'const' keyword.
9552 * adaint.h: Likewise.
9554 * atree.h: Likewise.
9556 * cstreams.c: Likewise.
9560 * final.c: Likewise.
9562 * initialize.c: Likewise.
9564 * namet.h: Likewise.
9565 * nlists.h: Likewise.
9566 * raise.c: Likewise.
9567 * raise.h: Likewise.
9568 * repinfo.h: Likewise.
9569 * seh_init.c: Likewise.
9570 * targext.c: Likewise.
9571 * tracebak.c: Likewise.
9572 * uintp.h: Likewise.
9573 * urealp.h: Likewise.
9574 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9575 * xsinfo.adb: Likewise.
9576 * xsnamest.adb: Likewise.
9577 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9578 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9579 * gcc-interface/misc.c: Likewise.
9580 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9581 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9582 ada/targext.o here...
9583 (GNAT_ADA_OBJS): ...and not here.
9584 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9585 (GNATBIND_OBJS): Reorder.
9587 2011-07-07 Richard Henderson <rth@redhat.com>
9589 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9590 dwarf2out_frame_init.
9592 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9594 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9596 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9599 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9601 2011-07-06 Richard Guenther <rguenther@suse.de>
9603 * gcc-interface/misc.c (gnat_init): Merge calls to
9604 build_common_tree_nodes and build_common_tree_nodes_2.
9605 Re-initialize boolean_false_node.
9607 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9608 Olivier Hainque <hainque@adacore.com>
9609 Nicolas Setton <setton@adacore.com>
9611 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9612 the type according to the ARTIFICIAL_P parameter.
9613 (create_type_decl): Likewise.
9614 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9616 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9618 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9619 (gnatbind): Likewise.
9621 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9623 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9625 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9627 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9628 local variable throughout. Remove useless call to Base_Type.
9629 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9630 Take it also into account for the volatileness of the field. Set the
9631 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9633 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9635 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9636 on a dereference built for a by-ref object if it has an address clause.
9638 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9640 * einfo.ads (Address_Taken): Document use for the second argument of
9641 Asm_Input and Asm_Output attributes.
9642 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9643 argument is an entity name, then set Address_Taken on it.
9644 <Attribute_Asm_Output>: Likewise.
9645 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9646 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9647 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9648 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9650 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
9653 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9655 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9657 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9658 (ada/utils.o): Update dependencies.
9659 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9660 ../../../libcpp/libcpp.a.
9661 * gcc-interface/utils.c: Include common/common-target.h.
9662 (process_attributes): Use targetm_common.have_named_sections.
9664 2011-06-07 Richard Guenther <rguenther@suse.de>
9666 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9669 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9671 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
9672 TREE_THIS_NOTRAP flag.
9674 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9676 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9679 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9681 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9682 constants whose full view has discriminants specially.
9684 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9686 * gcc-interface/utils.c: Include diagnostic.h.
9687 (gnat_write_global_declarations): Output debug information for all
9688 global type declarations before finalizing the compilation unit.
9689 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9691 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9693 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9695 2011-05-25 Kai Tietz <ktietz@redhat.com>
9697 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9698 initialization instead of const/none-const pointer assignment.
9700 2011-05-24 Joseph Myers <joseph@codesourcery.com>
9702 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9703 $(EXTRA_GNAT1_OBJS).
9704 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9705 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9706 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9707 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9708 libcommon-target.a instead of prefix.o.
9710 2011-05-21 Joseph Myers <joseph@codesourcery.com>
9713 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9715 2011-05-20 Joseph Myers <joseph@codesourcery.com>
9717 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9718 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9719 instead of version.o.
9721 2011-05-18 Kai Tietz <ktietz@redhat.com>
9723 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9724 boolean_false_node instead of integer_zero_node.
9725 (convert_with_check): Likewise.
9726 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9728 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9730 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9731 type of the parameter is an unconstrained array, convert the actual to
9732 the type of the formal in the In Out and Out cases as well.
9734 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9736 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9737 call build_function_type_array or build_varargs_function_type_array
9739 (create_subprog_type): Don't call build_function_type; call
9740 build_function_type_vec instead.
9742 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9744 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9745 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9746 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9748 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9750 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9752 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9753 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9755 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9757 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
9759 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9761 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9762 instead of accessing TYPE_ARG_TYPES directly.
9763 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9765 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9768 * gcc-interface/gigi.h (get_variant_part): Declare.
9769 * gcc-interface/decl.c (get_variant_part): Make global.
9770 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9771 types have the same constant size, are record types and T1 has a
9772 variant part while T2 doesn't.
9774 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9776 * gcc-interface/utils.c (begin_subprog_body): Do not call
9778 (end_subprog_body): Likewise.
9780 2011-05-04 Richard Guenther <rguenther@suse.de>
9782 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9784 (pos_to_constructor): Likewise.
9786 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
9787 Eric Botcazou <ebotcazou@adacore.com>
9789 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9790 of build_function_type. Adjust calls to...
9791 (build_raise_check): ...this. Do not take a void_tree parameter.
9792 Call build_function_type_list instead of build_function_type.
9793 Fix head comment and swap couple of conditional blocks.
9795 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9797 * gnatvsn.ads (Library_Version): Bump to 4.7.
9798 (Current_Year): Bump to 2011.
9800 2011-04-29 Michael Matz <matz@suse.de>
9802 * gcc-interface/misc.c (gnat_handle_option): Set
9803 warn_maybe_uninitialized.
9805 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9807 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9808 the Watson/McCabe paper.
9810 2011-04-23 Jim Meyering <meyering@redhat.com>
9812 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9814 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9816 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9819 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9821 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9823 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9824 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9825 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9826 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9827 <all>: Do not set flags on the reused DECL node coming from an alias.
9828 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9829 don't need debug info here...
9830 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9831 (gigi): Adjust calls to create_subprog_decl.
9832 (build_raise_check): Likewise.
9833 (establish_gnat_vms_condition_handler): Likewise.
9834 (Compilation_Unit_to_gnu): Likewise.
9835 (gnat_to_gnu): Likewise.
9837 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9839 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9840 (NO_REORDER_ADAFLAGS): New variable.
9841 (EXTRA_GNATTOOLS): Always define.
9842 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9843 Clean up and adjust list of files compiled with special options.
9844 * gcc-interface/Make-lang.in: Likewise.
9845 (ada/decl.o): Cosmetical change.
9846 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9848 2011-04-20 Jim Meyering <meyering@redhat.com>
9850 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9852 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9854 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9855 $(CFLAGS) on the link line.
9857 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9859 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9860 padded type built for the return type if it is unconstrained.
9862 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9864 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9866 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9868 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9869 before calling TREE_CHAIN.
9870 * gcc-interface/misc.c (gnat_init_ts): New function.
9871 (LANG_HOOKS_INIT_TS): Define.
9873 2011-04-12 Martin Jambor <mjambor@suse.cz>
9875 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9876 instead of cgraph_node.
9878 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9880 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9881 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9884 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9886 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9887 of aggregate types that contain a placeholder.
9889 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9891 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
9893 (handle_type_generic_attribute): Likewise.
9895 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9898 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9900 2011-04-04 Kai Tietz <ktietz@redhat.com>
9903 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9906 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9908 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
9909 type case, do not strip a padding type around the array type.
9911 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9913 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
9916 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9918 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
9919 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
9920 code for -feliminate-unused-debug-types.
9921 (gnat_post_options): Likewise.
9923 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9925 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9926 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
9929 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9931 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
9932 DECL_ARTIFICIAL flag on enumeration types.
9934 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9936 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
9937 fat pointer types artificial unconditionally.
9938 <E_Array_Subtype>: Attach the base array type as a parallel type if it
9941 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9943 * gcc-interface/gigi.h (get_dummy_type): Declare.
9944 (build_dummy_unc_pointer_types): Likewise.
9945 (finish_fat_pointer_type): Likewise.
9946 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
9947 fat pointer type has been built, complete it in place.
9948 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
9949 and thin pointers. Remove useless variable.
9950 (finish_fat_pointer_type): Make global and move to...
9951 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
9952 (get_dummy_type): New function.
9953 (build_dummy_unc_pointer_types): Likewise.
9954 (gnat_pushdecl): Propage the name to the anonymous variants only.
9955 (update_pointer_to): Only adjust the pointer types in the unconstrained
9958 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9960 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
9961 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
9962 if this is a Taft amendment type and the full declaration is available.
9963 * gcc-interface/trans.c (process_type): Likewise.
9964 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
9965 (process_freeze_entity): Likewise.
9966 * gcc-interface/utils.c (dummy_global): New static variable.
9967 (gnat_write_global_declarations): If there are types declared as used
9968 at the global level, insert them in the global hash table.
9970 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9972 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
9973 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
9974 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
9976 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
9977 flag of the type accordingly.
9978 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
9980 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9982 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
9983 finalizing types when updating the pointers to the designated type.
9984 <all>: Finalize the deferred types even if we didn't defer processing
9985 of incomplete types in this invocation.
9987 2011-04-01 Olivier Hainque <hainque@adacore.com>
9988 Nicolas Setton <setton@adacore.com>
9989 Eric Botcazou <ebotcazou@adacore.com>
9991 * gcc-interface/misc.c (gnat_descriptive_type): New function.
9992 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
9994 2011-03-28 Kai Tietz <ktietz@redhat.com>
9996 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
9998 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
9999 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10001 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10003 2011-03-28 Tristan Gingold <gingold@adacore.com>
10006 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10007 Use ada output of gnatbind.
10008 (ada/b_gnatb.adb): Ditto.
10009 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10010 (ada.mostlyclean, ada.stage1)
10011 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10012 (ada.stagefeedback): Adjust.
10013 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10014 Use ada output of gnatbind.
10015 (b_gnatm.adb): Ditto.
10016 (b_gnatl.o, b_gnatm.o): New rules.
10018 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10020 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10021 for the padded type built to support a specified size or alignment.
10023 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10025 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10026 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10027 unconditionally to the end of the unit when the designated type is
10029 <all>: Rename local variable. Attempt to un-defer types only and do it
10030 for limited_with'ed types as well.
10031 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10032 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10033 consistently and remove redundant call to finalize_from_with_types.
10035 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10037 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10038 subprograms without a previous spec declared in the same unit.
10039 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10040 subprograms at the end of the unit instead of at the beginning.
10041 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10042 isn't public for the special handling of non-inline functions nested
10043 inside inline external functions.
10045 2011-03-25 Jeff Law <law@redhat.com>
10047 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10049 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10051 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10052 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10053 to compute Set_Size_Depends_On_Discriminant.
10054 (Layout_Type): Call it on array types in back-end layout mode.
10055 * sem_util.adb (Requires_Transient_Scope): Return true for array
10056 types only if the size depends on the value of discriminants.
10057 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10058 type if the RHS is a call to a function that returns an unconstrained
10059 type with default discriminant.
10061 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10063 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10064 non-conversion to the nominal result type at the end.
10066 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10068 * gcc-interface/trans.c (create_temporary): New function taken from...
10069 (create_init_temporary): ...here. Call it.
10070 (call_to_gnu): Create the temporary for the return value early, if any.
10071 Create it for a function with copy-in/copy-out parameters if there is
10072 no target; in other cases of copy-in/copy-out, use another temporary.
10073 Push the new binding level lazily. Add and rename local variables.
10075 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10077 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10079 (set_rm_size): Likewise.
10081 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10083 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10084 for the padded type built in order to support a specified alignment.
10085 Fix incorrect formatting.
10087 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10090 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10092 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10094 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10095 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10096 to the end of the list. Adjust recursive call. Rename local variable.
10097 If REORDER is true, reorder components of the record type.
10098 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10099 components_to_record and adjust the parameter list.
10101 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10103 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10104 disabled, use the variable for bounds of loop iteration scheme.
10106 2011-03-21 Kai Tietz <ktietz@redhat.com>
10109 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10111 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10113 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10114 out whether the expression is read-only. Short-circuit placeholder
10115 case and rename a couple of local variables.
10117 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10119 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10120 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10121 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10122 (convert): Deal with conversions from a smaller form type specially.
10124 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10126 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10127 its argument, except for the special -I- switch.
10129 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10131 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10134 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10136 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10138 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10140 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10142 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10143 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10144 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10145 Do not generate the check directly, instead instantiate the template
10146 check present in the descriptor.
10147 (make_descriptor_field): Move around.
10148 (build_vms_descriptor32): Build a template check in the POINTER field.
10149 (build_vms_descriptor): Remove useless suffixes.
10150 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10152 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10155 * targext.c: Include target files if IN_RTS is defined.
10157 2011-01-26 Richard Guenther <rguenther@suse.de>
10160 * targext.c: Include config.h.
10161 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10164 2011-01-04 Pascal Obry <obry@adacore.com>
10165 Eric Botcazou <ebotcazou@adacore.com>
10167 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10169 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10171 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10172 end-of-case on the end label and its associated gotos, if any.
10174 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10176 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10177 expressions of the parameter cache within the statement group of
10178 the CICO mechanism.
10180 2011-01-04 Olivier Hainque <hainque@adacore.com>
10181 Eric Botcazou <ebotcazou@adacore.com>
10183 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10184 (set_end_locus_from_node): New function.
10185 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10186 make and the function end_locus.
10187 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10188 for the elaboration subprogram.
10189 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10190 set the end_locus of the expression as well.
10192 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10195 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10196 variables that are referenced in exception handlers volatile.
10200 Copyright (C) 2011 Free Software Foundation, Inc.
10202 Copying and distribution of this file, with or without modification,
10203 are permitted in any medium without royalty provided the copyright
10204 notice and this notice are preserved.